Rules with Time Variables not working after power outage

I recently had a power outage, that lasted longer than my UPS.
When the Hub rebooted, I lost the ability to run rules (RM, Simple Automation) with time variables.
Examples: turn fan off after a countdown interval, lights off after sunrise, light triggered by motion off after 15min, etc.)

Not sure what I can do to fix this.
I have tried going into each rule, and updating it, but that has not helped.

Any ideas?

Does your hub still have the correct time settings?

Yes. Just checked. Time is correct.
Also, when I run the rules manually, they run without issue.

"Done" (available in any app) or "Update Rule" (a Rule Machine feature that does the same without closing the rule) would be good first steps, though maybe you already tried the latter. If that doesn't help, more information on "doesn't work" would be a good place to start. Turn on logging for the rule (at least event and action logging in Rule Machine, or similar debug log options in other apps) and see if you find anything in logs/past logs at the expected times. It's possible the rules are, in fact, running but your devices just aren't acting as expected. (If any triggers depend on devices, you might also want to make sure they generate events when expected.) If your power was down for a while, it's possible your Zigbee or Z-Wave meshes are still recovering.

Looking at the gear/"App Status" page for scheduled jobs would also be good to confirm; what you see here depends on the app and won't always mean much if you didn't write the app, but for a rule in the middle of a delay or one with a spexific time or periodic trigger, something should be there.

I have completed the Done and Update steps, and that did not seem to help.
The rules work corrrectly to start, just do not seem to finish.
Example: motion light in closet. When I open the door, the motion triggers the light to go on - that works as it is supposed to. I then have a delay of 10min, and the light should turn off. It doesn't.
I will check the logs to see what I can find.

Here is the log entry for the door being opened:
image
After 7 minutes, I am seeing nothing in the logs about this switch, and the light is still on.
Before the power failure and reboot, this worked all the time, everytime.

What app is that? It's not Rule Machine, as I assumed (how are you manually running the actions in this other app?). But everything there does look good if taken at face value, so I'm not sure why this would be happening.

There is a possibility that the ā€œhardā€ shut down caused corruption in the hubā€™s database. To resolve this, take a backup and download it to a PC, do a soft reset on the hub and load the backup. If there is DB corruption, this will clear it.

Could I just take a DB backup from before the shutdown, and restore that? I'm just thinking that if I create a backup now, is it not backing up a corrupt DB?

Yes, that will also work. Do download it to be sure.

Just so I understand the steps...

  1. download backup
  2. Soft reset hub (is this an easy thing to do?)
  3. Restore pre-outage DB

Yup, you got the steps. you can also try to restore without doing the soft reset.

The soft reset step is done via http://hubitat.local:8081

1 Like

Looks like it might have worked.
Will check some rules tonight.

Thanks for the suggestion!

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.