Averaging values from two diffirent fields | MATLAB IoT Analytics | Forum

The ThingSpeak community site has been upgraded to a new site. This site is currently in read-only mode. You can ask questions or post and read discussions on the new site.
Avatar

Lost password?
Advanced Search

— Forum Scope —






— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed sp_TopicIcon
Averaging values from two diffirent fields
No permission to create posts
December 15, 2020
4:54 pm
Avatar
auto_mitch
New Member
Members
Forum Posts: 1
Member Since:
December 15, 2020
sp_UserOfflineSmall Offline

i have two diffirent temperature sensors that they are sending data to two diffirent fields(Field1,Field3). is it possible to create a new field which will display the chart of the average values of the two initial charts?
the sensors send data every 15 seconds. Each message hasnt the same timestamp to calculate the average value for a specific time. Is it possible to solve this problem by using an analytics script?
Thank you in advance

December 16, 2020
6:16 pm
Avatar
cstapels
Moderator
Members


Moderators
Forum Posts: 885
Member Since:
March 7, 2017
sp_UserOfflineSmall Offline

FYI, MATLAB answers is the preferred location for ThingSpeak Community support.

We recommend one device per channel, it will definitely make it easier to do these kinds of operations. Having different timestamps will make it a bit harder.
It is definitely possible.
You can probably read them as two different timetables, then combine them into one and then use retime and average.
Or do them step by step.
Or read a given time range and average all values in that time range, then look over times.
Do you want to do it in real time, every 15 seconds? Then I would probably make the second device read the value from the first device then write its value and the average at the same time.
To do it in ThingSpeak, the fastest timeControl is 5 minutes, so you would have to do in batches.

Forum Timezone: America/New_York

Most Users Ever Online: 166

Currently Online:
20 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

rw950431: 272

Vinod: 240

piajola: 95

turgo: 70

vespapierre: 63

Adarsh_Murthy: 62

Member Stats:

Guest Posters: 1

Members: 8665

Moderators: 1

Admins: 2

Forum Stats:

Groups: 3

Forums: 14

Topics: 1600

Posts: 5760

Newest Members:

kusmumichael, petersmith99, Rambant, blakeharriss09, optisol, Niyonzima Fils

Moderators: cstapels: 460

Administrators: Hans: 405, lee: 457