Experimental/alpha.
Rule template to monitor device status by combining “input item” state with thing status. Updates aliveSwitch
Item with ON
/OFF
indicating device status.
It is recommended to use this rule Expiration logic attached with input item.
- when thing status turns
OFFLINE
,OFF
is outputted - when thing status turns
ONLINE
, we evaluate input item status. If it is non-UNDEF
and non-NULL
,ON
is outputted. OtherwiseOFF
is outputted - when input item updates with
UNDEF
,OFF
is outputted - when input item updates with non-
UNDEF
,ON
is outputted
Language: ECMAScript 2021+
Dependencies:
- jsscripting addon
Changelog
Version 0.3 (2022-07-15)
- when thing becomes ONLINE, update alive status to ON/OFF depending on input item state
Version 0.2 (2022-07-09)
- bug fixes
Version 0.1
- initial release