Thing-based Triggers of FritzDECT doesn't work

I try to use a rule like the following:

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?

1 Like

You could try to use a different trigger, like:

Thing "avmfritz:FRITZ_DECT_210:dect:116570021295" changed

Then you could reuse your workaround rule to check the state of the thing.

I’ve already tried that. :frowning_face:

Not all binding support channel/thing triggers
You may have to link an item and use that instead

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.

Correct, some binding have implemented it others not.