Trigger a rule after a thing comes online


I connected a homematic dimmer (HM-LC-Dim1T-CV) via homegear to openhab. This dimmer sits behind the normal conventional light switches, so that hitting those will turn on/off the dimmer itself. What I want to achive is now in a first step that when I hit the normal light switch (read: when the dimmer gets powered on), the light goes on.

This doesn’t work because the dimmer level is at 0 when it gets powered on. So my idea was to just perfom a rule when the dimmer comes online and set the dimmer level to 80% or something. But I don’t know how to notice this…

I don’t think there is a way to trigger a rule with a Thing’s online status. I’ve seen no such event on the event bus.

I solved this by changing the device configruation via homegear. (in german)

However a trigger for status changes of things would be nice…

+1 on this. I would love to be able to send alarms when the status of certain things change from ONLINE to OFFLINE.

Current docs suggest user-visible Thing status is not recommended (to binding writers)

I think you are in the hands of the binding author(s) here - they could choose to have a UNDEF or similar update of associated Items, if the source device/service goes offline. Some of the OH1 bindings would do this.

1 Like

Sounds like a good idea to me. I’m currently talking about the Sonos binding, since if suddenly all Sonos speakers in my house (they are not on ups) dies there’s apparently a power outage and I’d like to be notified. Not exactly the core functionality of the Sonos binding, but it would be useful :slight_smile:

Guess I’ll raise the question with the devs of the Sonos binding then.

It is not always going to be appropriate, or even possible, to do that. Do Sonos devices make some kind of status polling or keep-alive traffic available to OH binding?

Well, I don’t know exactly how they work, but I had a power otage some days ago (the plumber tripped the RCD) and all speaker Things turned OFFLINE simultaneously, so obviously the binding is aware of them being alive or not.

+1, I would need this as well.

1 Like

This has been implemented.

Thanks a lot for this hint. That’s exactly, what I was looking for.