Closed majherek closed 6 years ago
Added time of observation to implement watchdog.
Items file:
DateTime observationTime "Time of observation [%1$td/%1$tm/%1$tY - %1$tH:%1$tM:%1$tS]" <time> { channel="rflink:OregonTempHygro:usb0:AlectoV4_5379:observationTime" }
Switch watchdog { expire="10m,command=OFF" }
Rules file:
rule "RfLink changed"
when
Item observationTime changed
then
if (watchdog.state != ON)
logWarn(logfile, "RfLink Sensors Visibility: ONLINE")
watchdog.sendCommand(ON) // resets the watchdog
end
rule "RfLink watchdog"
when
Item watchdog changed from ON to OFF
then
logWarn(logfile, "RfLink Sensors Visibility: OFFLINE")
watchdog.sendCommand(OFF)
end
Correction in negative temperatures.