4:54 pm
December 15, 2020

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
6:16 pm


Moderators
March 7, 2017

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.
Most Users Ever Online: 166
Currently Online:
21 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:
JadeFloralde98, mgnthe54, Zain-Ul-Abidin, wellbeingcentresuk, Vamsi, frankmehlhopModerators: cstapels: 460
Administrators: Hans: 405, lee: 457