Hue lights back to last known state

Posted on
Sat Jun 10, 2017 7:26 am
Albatros offline
Posts: 132
Joined: Feb 07, 2015

Hue lights back to last known state

Maybe asked before but is it possible to get the hue lights to the last known state from Indigo when the power has been off and comes on again.

If saving and restoring the state of the lights isn't the solution is it possible for Indigo to know if the hue hub has been down so you can trigger form Indigo some actions. Or get notified when bulbs have goe offline



https://community.home-assistant.io/t/s ... n/11186/15

Posted on
Sat Jun 10, 2017 2:33 pm
nsheldon offline
Posts: 1949
Joined: Aug 09, 2010
Location: CA

Re: Hue lights back to last known state

Hi.

Let me see if I can answer your questions one at a time.

Albatros wrote:
...is it possible to get the hue lights to the last known state from Indigo when the power has been off and comes on again.


No. There might be some rather complex triggers that could be used to save various device states then restore them, but designing that would probably be rather tedious.

Albatros wrote:
...is it possible for Indigo to know if the hue hub has been down so you can trigger form Indigo some actions.


Yes, sort of. If you enable the SQL Logger plugin (which is included with Indigo), you could create a trigger to execute whenever any Hue Lights Error appears in the Indigo log. This isn't quite the same as detecting whether the Hue hub is down, but Hue Lights Error log entries are pretty rare and usually only appear if there's a problem communicating with the Hue hub. If you used that as a trigger, you'd need to use some kind of condition in the trigger to prevent it from firing over and over again after the first error appeared, though, because the Hue Lights plugin shows an error every 4 seconds or so if it completely looses contact with the hub.

Albatros wrote:
Or get notified when bulbs have goe offline


Yes. However, bulbs only show as "disconnected" if the Hue hub itself reports that the bulb is having communication problems. So, if the Hue Lights plugin can't even connect to the Hue hub, it won't change the sate of every bulb to "disconnected" because it's not the bulb that's disconnected, it's the hub. Granted, if the hub is not reachable, neither is the bulb (at least from an Indigo perspective), but the Hue Lights plugin is intended to just be a kind of conduit between Indigo and the Hue hub, so it tries to only show changes in Hue devices if those changes come directly from the Hue hub itself.

Ultimately, there isn't an easy solution to the scenario you're talking about. Lost Hue hub connectivity could potentially be included in the Hue Lights plugin in the future. As you might imagine, just from trying to find a solution yourself, it can get complicated and isn't something that can be added quickly.

Posted on
Sat Jun 17, 2017 7:39 am
Different Computers offline
User avatar
Posts: 1846
Joined: Jan 02, 2016
Location: East Coast

Re: Hue lights back to last known state

I could imagine a fairly easy brute force and crude way of doing this, but it would be more of a rough guess return to state than a surgical return.

Set up scenes for your typical states--time of day and house occupancy for example--and run triggers that fire at system start up (that's possible, right?) with conditions so you get the default state for the time of day and occupancy status.

In other words:

Trigger: Start up
Condition: between midnight and 6 am
Action: turn off all hue lights

and

Trigger: Start up
Condition: between 6AM and 6 pm
Action: turn on daytime light scene

and

Trigger: Start up
Condition: between 6pm and 6 am and someone is home
Action: set evening lights.

and so on.

Now I'm curious--IS there an indigo start trigger? EDIT: Duh, of COURSE there is. "Indigo Server Startup" right there in the Trigger type list.

SmartThings refugee, so happy to be on Indigo. 10.13.6 on an i5 MBP w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKit Bridge, MatplotLib, Plex, uniFAP, Wunderground, Nanoleaf, LED Simple Effects, Airfoil Pro, Grafana.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 2 guests