rule "recognize power failure in the garden"
when
Thing "avmfritz:FRITZ_DECT_210:dect:116570021295" received update OFFLINE
then
sendNotification("jan@example.com", "power failure in the garden")
end
It looks like, that this trigger doesn’t work.
I tried also the same with a Thing of the Hue-Binding, which works wonderfully.
I have build the following workaround:
rule "recognize power failure in the garden"
when
Time cron "0 0/2 * * * ?" // all 2 minutes
then
val thingStatusInfo = getThingStatusInfo("avmfritz:FRITZ_DECT_210:dect:116570021295")
if (thingStatusInfo !== null && thingStatusInfo.getStatus().toString() == "OFFLINE") {
sendNotification("jan@example.com", "power failure in the garden")
}
end
But why doesn’t work the first solution? Is it a general problem with this Binding or I don’t see the mistake of my Rule?
Of course, I have some Items that are linked to this Thing. But an Item have no ONLINE/OFFLINE state, or I’m wrong?
I already had the assumption that the problem lies with the binding. I just think it’s a bit strange that OpenHAB knows the ONLINE/OFFLINE state but a change of this state can not be triggered, or this triggering obviously depends on the binding and has to be implemented by it.