Average Temperature to Stream (and Tile)


#1

Hi All,

This is my attempt to gather a collection of temperature measurement sensors, average them out, then report them to a fuel stream.

My results seem to be off and I cannot quite tell whether I have setup the piston incorrectly or there are 0’s in the averages no temperature has yet to report to the fuel stream.

In other words, if a contact sensor has yet to change its temperature because the piston has only been active for 30 minutes, would that contact sensor report a 0 thus causing the average to drop?

Alternatively, is this an issue where the temperature is reporting in celsius rather than Fahrenheit?


#2

Rather than the expression avg(living_temp) you will need to set those variables to Physical Device > select the living_temp device variable > select the temperature property > Average as the aggregation method in the yellow dropdown (should be the default). The avg() function in your expression is operating on the device names which aren’t numeric so you end up with zero.


#3

Alternatively, in an expresssion, use avg([living_temp:temperature]) to return the average of temperatures for all devices in living_temp.