If item has not been updated for x time then do something

I’ve got a rule for if a door open (hooked to alarm) then turn on some lights. Easy.

I need another condition for turning ion those lights i.e. For when we’re out.

I have the UniFi binding so that knows if a user is online or not. But as part of having multiple aps I think if sets a user offline as they switch ap.

To combat that, I think in need something like if user has been offline for > 10 mins and then becomes online again, activate lights.

The question is how can I track the length of time the offline state has been set?

I think you should look at the Expire binding (http://docs.openhab.org/addons/bindings/expire1/readme.html) it will do exactly what you want. Only problem with it is the Items you want to use it for have to be declared in the “old” way using items files.

1 Like

that’s ok, a lot are defined that way.

Well then. Just thought it was worth mentioning since that’s the reason I’ve never used the binding myself although it generelly seems very good :wink:

This might be useful: