CoRE - Variables 101

Case Study - Average Temperature

This example will demonstrate using a local variable to store the average temperatures of all your devices that report temperature. The trigger is a simple ‘happens every minute’ and can be adjusted to your needed frequency.

The variable, ‘temp’, stores the temperature as a decimal which reports with 5 digit precision. If you wish to only see whole numbers, change the ‘Convert to data type’ from ‘decimal’ to ‘number’

Required:
At least one sensor capable of reporting temperature.

Before starting, set for expert mode: Settings->ExpertFeatures turn ON Expert Mode

When we save the variable is where we do the math. By setting the Aggregation to ‘Avg’ or Average, the math will be done for us and average more than one sensor’s data.