Rules hanging

Has anyone noticed that rules seem to be hanging? I updated the hub recently and redid my rules. Since then, it seems like some rules will randomly hang. For instance,

  1. I have our upstairs motion trigger a light to flash for 6 seconds so we know if the kids are up and moving around (only at night). It was triggered tonight and ran up to the flash part, then kept flashing and didn’t run the rest of the rule.

  2. I also have a few that set other private booleans to false/true. They will set them to false at the beginning of the rule, but randomly don’t set them back to true.

  3. Bathroom motion lighting turns on when motion is active. When motion is inactive, turn off. The lights will turn on, but hang and stay on.

It’s like the rules are running halfway and stopping. It’s not limited to a specific rule and it’s not every time. I don’t notice a pattern and can’t reliably recreate it.

Before tonight I was on I just updated to the current version of

Turn on all logging for these rules. That may reveal what is or isn’t going on.

For the logs, I may not be looking in the correct place. I've tried to go back to the past log for the stairs flashing light rule. I keep clicking on "show more" but every time I do, it takes me out of that specific log and back to the "all" category. At this point, the hang up happened about 11 hours ago and I can't seem to make it go back that far. Am I missing the way to do that?

When I type the name of the rule and search, it doesn't show up. Then if I keep clicking "show more" it adds in logs from other rules.

Eventually, the show more disappears and I don't have any thing else to view.

ok, so I finally got a rule log to show. I have our arrival set to trigger outside lights. It triggered correctly when we arrived at 1931 but never turned off the floods, front porch, or back porch. The timers are all set for eight minutes. At eight minutes, the log says anti-turn on. They stayed on until I physically turned them off about 20 minutes later. There is no motion or wait event associated with any of these rules. These are simple, on arrival, between sunset and sunrise, turn on outside light timers.


What kind of devices are these? Please show both of the rules that doesn't work as you expect. The first one, the Basic Rule doesn't seem to have a turn off action, and the second, shows that it turned off the lights. What you need to do is perhaps some testing. Try reducing the 8 minutes to 1, so you can more quickly see what's going on. Also, you want to start with a blank Logs tab, then push the rule through it's paces, and the both the device and app logs interspersed together, showing the actual sequence of all events. The devices must have Description Logging on.

Thank you for the reply!!

All three are virtual switches set to turn off five seconds after activation. There is a simple rule that says when the virtual switch turns on, turn on the light and turn off after eight minutes for all three. We use the timers for several rules so it made sense to make them a virtual switch to trigger. You are correct that the trigger doesn't have a turn off because it triggers a switch with a turn off.

This is one of the timers. The other two are exactly the same.

As far as logging, I have life360 states installed and it completely takes over the logs every few seconds. I keep clicking show more, but even on the specific rule, it takes me back to the All tab and adds a huge list of activity to sort through.

OK, the first rule doesn't turn the lights off, so nothing odd there -- it only turns them on.

As for logging, just disable life360 during test. If you click on this gray X at top right of either Apps list or Devices list, that reveals the disable column:

Screen Shot 2021-10-22 at 10.49.09 AM

Screen Shot 2021-10-22 at 10.49.18 AM

I think the biggest issue is that I never know which rule will fail. It can work 14 times and then fail on the 15th run, then start working again for another 20 times. And it seems to never be the same rule that failed the previous time. It's so random that I'm having to try to watch every rule every time. Today the bathroom fans hung but yesterday it was the outside timer lights.

Are there any known issues that cause this type of behavior? I'm to the point that it's so random that I'd be ok with trying a factory reset (or something) to just rebuild from scratch.

Without logs, there is no way to have a clue what the issue might be. There are not general reports of anything like this, with one exception: there are some reports of delayed actions not happening, as if the scheduled event doesn't happen as it should. These show up in logs.

I would suggest to just have Action logging on in suspect rules, and to keep a Logs tab open. If something seems to hang, then look at the Logs...

I strongly recommend against any factory reset.... You could try a Soft Reset. You download a backup first, then do the Soft Reset, then restore from that backup. That will clear up some issues.

1 Like

Try installer the rebooter app and rebooting every night during down time. Things just seem to work better if you do that.

I've done a soft reset and restored a backup from earlier today. Everything (for now) seems to be working well. Of course that’s how it’s been…98% solid with something hanging every now and then. I’ll look into the rebooter app as well. Can’t hurt to restart a little more often. :slightly_smiling_face:

Just to be contrary, I have never had to reboot my hub except when doing a firmware update. I have some very complex rules, and none hang. When one of the devices (Litter Robot) gets into an alarm condition when the litter drawer fills, there is a While loop that keeps repeating and flashing the under vanity lights until the litter drawer is emptied. Admittedly, I only have a couple dozen devices, all Z-Wave Plus, and 8 of them are repeaters (6 Ring Alarm Extender Gen 2 and 2 Aeotec RE7), plus a couple of WiFi devices. C-7, now

The thing that made the Z-Wave mesh stable was throwing repeaters around and removing all non-Plus Z-Wave devices.

Edit: my hub is on a UPS.


Yeah, it's become an urban myth that hubs need to be rebooted. Generally, they do not need this.


Ok, so the soft reset may have helped a little. I haven't noticed as many rules hanging. However, this rule hangs consistently. I have an upstairs motion that has several uses. This particular rule is that between certain times (late at night), when motion is detected, flash a light in the bedroom for six seconds and turn off. It runs exactly like it should, however, it never turns the light off. The log shows that it restores the light to it's previous state, but it keeps flashing. The wall switch appears to be disabled and won't stop the flashing no matter what I try. I have to do some combination of going into devices inside the hub and trying to stop it. If that doesn't work, I have to go into the rule and stop/pause the rule, then go back to devices and turn it off.

The rule:

The rule's log:

The device's log:

The logs show that rule running to completion.

I'm not at all sure that Restore is going to stop the light flashing. If it doesn't, this isn't because the rule "hangs", but because the light doesn't stop flashing from the Restore action.

Flashing is very much device and driver dependent, and can be flaky. There is no StopFlash command. Usually, turning it off will stop it, but not necessarily. I have Lutron lights that if I flash, I have to pull the breaker to get them to stop. So your problem lies in this flash business, not the rule.

You may have a bit of a dilemma with this, if you want to flash the lights when they were on to begin with, and if off is the only way to stop them from flashing. I can tell you this: Capture grabs the state of the light and stores it in the app's state. Restore grabs that state, and if it was off before it sends an off command. If it was on, Restore sends a command to restore it to how it was when captured. I think you need to figure out exactly what will reliably stop the flashing, and put that in the rule instead of capture/restore.

1 Like

You might try something like this instead. I'm putting the state of the switch into a local variable, then using that later. Here is how that part is done:

Now, the rule itself:

That might work if commanding your Ceiling Light with off stops the flashing.

Probably nothing to do with your issue, but in your predicate section shouldn't the AND statement have parentheses around them?
So its
A or (B and C).
Just wondering.

Thanks for the info! It has been working but has recently started flaking. I don't want to imply it had anything to do with the update, but the previous version (.223 maybe?) That was around for a while had it working as it was written. It would restore back to off or on depending on what it was before the trigger. Now it works about 90% of the time. These are lutron switches and dimmers as well here.

I rewrote it and we'll try it the new way and added an "off" command after the flash to cancel it. Thanks for the examples with screenshots. That really helps me see it layed out and helps me understand.

Very possible. I was wondering about that. It works as it's written for the times and days, but I am one of those people that want to get it how it's technically supposed to be. I'll look at that. :grin:

1 Like

today, the bathroom light hung again. Also, (and mainly) the holiday lighting hung. I have three rules for them. I named them christmas lights, just because they are up the longest. This is the rule for today. The others turn on for mornings during the week and an evening routine.

They turned on as scheduled (I think) but never turned off. When we got home, they had been on for hours longer than they were supposed. to be. This is getting really frustrating. I moved to hubitat because of the reliability, but this is becoming unreliable enough that I'm starting to wonder. If we hadn't come home today, they would be on all day.

The logs won't go back to this morning and won't pull up the devices. I keep clicking show more until it disappears and it never brings up the device or log that I'm needing. I can't even see what is happening to try to address it.

I really don't know what to do.