I would like to know when a z-wave device becomes unavailable. That can be either it runs out of power or leaves the network. I don’t want to just check the web ui or my mobile app. I would like to get notification when that happens. One way I can think of is to use a rule to either send a push notification or an email. The only problem is that I don’t know how to express this kind of trigger condition. From https://github.com/openhab/openhab/wiki/Rules#rule-triggers it seems like it doesn’t support this trigger either. My question is how can I get to know when the device is not available. I’m using OpenHAB 2.0 beta4.
Text item=SumpPumpPlugPing label=“Sump Pump Plug is offline” visibility=[SumpPumpPlugPing==ON]
Text item=SumpPumpPlugPing label=“Sump Pump Plug is online” visibility=[SumpPumpPlugPing==OFF]
And add a rule too
Rule “Sump Pump Plug Ping”
when
Item SumpPumpPlugPing received update
then
var state = SumpPumpPlugPing.state
if (state == ON) {
logError(“SumpPump”, “Sump Pump Plug is offline.”);
} else {
logInfo(“SumpPump”, “Sump Pump Plug is online.”);
}
end
I then unplug the smart plug, the runtime log says it’s DEAD.