Power Fail Restart

SInce I am new to Hubitat, I wasn't around when this topic was open. For this topic, the user wants to run Sunrise or Sunset rules if they were not run during a power outage.
In Hubitat RM, my suggestion is to create a rule that triggers when power is restored. This power fail restart rule should have a way to determine the date and time of the last run of the rules that should be rerun and set flags that trigger those rules that were missed during the power outage.
If those rules contain actions that should not be run during power fail restart, then the rule must have logic to execute only those parts of the rule that were missed. That is why the power fail start and end times are needed.

1 Like

Are you asking for help in doing this or just making a statement that it is possible with no examples?

Since the original topic was closed, I created this topic to bring up an alternate solution to the power fail restart issue.
Since I am new to Hubitat, I don't have a rule for this yet.

What’s your solution? Hubitat has no built-in mechanism to monitor power status.

So, how do you propose to distinguish a hub restart due to power restoration from any other restart.

1 Like

WISH LIST FOR C-9 or C-10

If not a full blown power source to attain a graceful shutdown...then at least a modest capacitor that hangs on to base level functionality just enough milliseconds to see the power failure (vs a sustainable voltage sag) and set a flag on it's way down so that upon power recovery the HE knows how things went down abnormally.

He says waving his hand in the air as if to suggest that this is simple, doable, and cost effective without really knowing :thinking:

I assume you know all your rules that are Sunrise/Sunset reliant.

You could write a rule that runs the 'actions' on those rules on system restart.

I'm not saying your request is not a valid one, but I bet it's not as easy as I would think.

2 Likes

I would store the last run date and time for any critical rules in a Hub Variable that is specific for each rule.
The Zooz Power Fail detector that they used to sell works well when the relay is UPS powered and the relay input is not.
My hub is UPS powered so I will need logic for the case when power returns while the UPS is still running and the power-fail-relay detects power again, and for the case when the UPS goes down.
The first case is straight forward.
The second case requires a watch dog timer.
For both cases, a short delay to ensure power is restored would be a good thing to have.
The restart logic would determine which rules were missed during the power outage and rin those critical rules.

The Zooz ZAC38 Range extender has battery backup. When power fails, it will report that it is now running on battery. Status changes to mains when power returns.

I have a Ecosmart bulb ( Ecosmart-ZBT-A19-CCT-Bulb) that turns on after a power failure. Whenever I detect the bulb is on, I know there has been a power outage. I believe there are several models of smart outlets that can be set to do the same thing (turn on after an outage).

So that's why they don't sell the power fail kit anymore.

It's a great solution to the power failure detection dilemma that requires the reporting device to have power in order to report that there is no power anymore, if you get my drift.