Run or resume rules after a power outage

This morning we had a power outage shortly after 6:00 AM.
The power came back on 2 hours later.

One rule was already active when the power went out, two more would have become active during the outage period.

After the power came back on and the hub came back online, I manually turned off the bulb that would have turned off by a rule, and turned on switches, etc. that would have turned on during the power outage period.

Is there a way to have the hub check its rules to see what should be running and resume them?

What you could do is have a RM4.1 rule that has a trigger pf
Location Event: system Start
Then in your actions have a delay of maybe 5 minutes so that things have settled down then run actions on any rules (with a delay between each rule you want to run to stop flooding the hub) that you want to be checked on system start.
This would probably work OK.

1 Like

As an aside, I have a rule that fires on MODE CHANGED and copies that mode to a string variable; one of the things my "system start" rule does is set the mode from that variable.

As a second aside :grin: , that string variable comes in handy if you want to pass the mode value to another hub.

It's been a while since my original post about this.

I did create a rule for this problem that would run for the systemStart event.

I have it set up so that it would turn off any lights that do not remember their power state, and then execute "Resume rule" against their respective automation rules.

It works, but not in the way I had hoped.

I was hoping that when "resume rule" ran, it would do something like the following use case:

  1. the system has started
  2. it's now 1:30 PM
  3. according to the Office rule, the Office light should be on and set to 100%.
  4. let's turn it on.

#4 doesn't happen.
In this example, the next stage of the Office automation rule would occur at 4:30 when the light is set to dim to 50%.

Looks like I'm going to need to keep track of the power state, etc of the lights that don't remember their prior state (Sengled Element Classic and Sengled Element Plus).

edit: poking around the forum, I see @toby recently ported over a ST app that seems to do exactly what I'm looking for.

I use a simple rule to do this. It will not, of course, address any rules that were missed because the hub was unavailable. I'm not sure if the capture will retain its info if the hub itself loses power. Mine does't, and my bulbs will be without power for less than a minute.

1 Like