I would like to create a kumoapp that alerts when big swings in temperature take place.
For example a room increases or decreases 3 degrees in a two hour period.
var tags = <#temperature sensors_[12]_N#>;
var step = 3<%minimum °C change to trigger transmission_N%>;
tags.forEach(
function (tag) {
tag.setTempSensorThresholds(tag.temperature-step, tag.temperature+step);
tag.temperatureCross = function () {
KumoApp.Log(
this.name + " is " + this.temperature + "°C")
if (this.tempState==2)// too high
{
this.setTempSensorThresholds(this.lowTh+step, this.highTh+step)
}
else if(tag.tempState==3) // too low
{
this.setTempSensorThresholds(this.lowTh-step, this.highTh-step)
}
};
});