I’ve put Lifx bulbs throughout my house as a retrofit solution to smart lighting.
This means the wall switches are still used as the primary means of control for turning them on/off.
I understand that some work has been done to allow the offline/online state of things to be read by the rules engine, but I can’t find any hints on how to use this.
Ideally my sitemap/gui would reflect whether the light is off at the wall (offline), off via an app (off, but online), or simply on (on and online).
Has anyone done this with a rule/script or have any insight on how to do this? If there is a way to do this, is there an approach so I don’t have to write variations on the below rule for each bulb?
rule "item state change"
Item Light1 changed from ONLINE to OFFLINE
Keep in mind, that ONLINE/OFFLINE state is for the thing, not for the item
Yes, you’re right. I was writing my question while trying to do a few other things at the same time.
My question still stands though. Is there a way for a rule to be fired based on the offline/online state of a thing? If there is, I think I need to look at lambda’s or functions to make a single rule apply to all the light items.
there is currently an issue in the ESH repo adressing getting the Thing status in rules:
So it is not possible as far as i know. I like to have such a feature, too.
Looks like it is working now:
Recent updates (Spring 2017) have allowed using Thing Status Info changes in rules. I was able to use these new features to fix a lighting problem in my Frankenhouse (the light switch only controlled 1 electrical outlet, the others are always on). Using hue lights with the below rules, I now have lights responding to the physical switch (where they weren't responding before).
Note: that there can be a delay of about a minute between flipping the switch, and having all the lights turn on / of…
Tried that successfully with my hue things …
Thanks for the heads up, i’ll have a look into getting it up and running.