Power outages

So I am very lucky where I live in the UK and hardly ever suffer power outages. However they have been quite frequent lately. Each time all my bulbs come on. Is there a way to restore to previous state?

1 Like

It took me a while to handle this with Rule Machine and global variables. Each of my rooms has a global variable that defines it's current state. I am able to detect power failures by using a Sengled classic bulb that turns on when power is restored. When that happens I re-enumerate though my room rules to make sure the last set scene is re-applied. I have a 5 minute delay after I detect the bulb has come on before I execute it. After the reset I then command that bulb to turn off.

One more thing is that I have my Hubitat on a UPS that is also protecting my router and internet gateway which gives it some survivability during the power failure. I have enough battery for 35 minutes of run before I force the shutdowns on the equipment.

My old X-10 controller called a Stargate had what was called powerfail catchup. It was a really cool feature where it would checkpoint when power failed, used it's current state table for the devices and send that out after power was restored and then fast forward though any time based rules to execute any automations. It was really cool to watch it in action.

If I had time I would try to code something like this for Hubitat.

1 Like

I like the technique of having a bulb in a hidden location. If it comes on you know you had a power failure. A rule can be set up triggered by the hidden lamp.
IF (Time is 6:00 PM EDT(F) AND
Time between 6:00 PM EDT and 8:00 PM EDT(F) [FALSE]) THEN
Simply, a light you never use is the trigger, It comes on (only) when power is restored after a failure. The rule checks time of day and runs your regular rules that had run (or should have) up to that time.

I have Sengled bulbs in a walk in closet, a pantry and laundry room. I setup a rule that if all 3 are on at once and the pantry and closet door are both closed then I turn off those lights and others. This works because those 3 lights would never be on at the same time with those 2 doors closed. Haven't had it fire for real yet but I simulated a test on it and it worked.


I have a dozen or so Senlged bulbs/strips. Anyone know why some turn on and some do not even using the same driver? I have 8 in my kitchen ceiling and 1 turns on the rest stay off.

Nah all directly connected to HE. I knew hue had the setting which works on some non hue bulbs as well. I didn't know if HE could do this also

1 Like

With the recent power outages I would agree. It's a nightmare sorting them all out

1 Like

Ideally, you'd have your hub on a UPS so it didn't suffer a brutal power off (those can create issues for it).

The state of each device when it loses power SHOULD be a "per device" issue built into the device itself (if nothing else, because a "power loss" event is a per-device event. You could lose power to one circuit, to one leg entering your house, etc.

Your best bet would be to get something like a Ring Gen2 Range Extender, which has a battery.

When it loses power, it sends a "power failed" event to the hub. When it regains power, it sends an event for that.

Now, you'll definitely want your hub on a UPS to make this work.

So, once you have both of those. Then, you can detect a "Power On" event from the Extender. Possibly wait a few moments for things to settle--then you can go about resetting all the devices you want reset to a default power state.

1 Like