[Question] Multiple simultaneous rule execution error

I have a rule that turns on the kitchen lights, and sets the brightness depending on the time of day.
Used this for a while now, and only seen "Multiple simultaneous rule execution error" errors popup the last few weeks.

What am I doing wrong here?

The errors:

The Rule:

First thing that grabs my attention is the name of the rule... but can only assume there is some logic behind it....

Second would be that changes in motion for a sensor doesn't seem like something that would likely trigger often enough to warrant an error or even a warning. I have Hue which are often touted as the quickest to reset... Is there something special about your Kitchen motion sensor? What brand / model of device is it? Driver? Settings? etc.

Beyond that, I'm not expecting the Actions you have defined to factor too much into the logs you are seeing.... But I could be wrong....

The name contains icons. Most of my rules have this, and no other rules have this issue.

It is a clone of a well know motion sensor. I have multiple of those sensors, and all seem to work fine.

Everything the rule needs to do seems to work great, it's just errors in the logging that must be coming from someware.

Have you checked the Events for the motion sensor from the Device page? It's not flip-flopping between active / inactive too quickly (given your trigger on changing)?

Looks normal. Just the wife or kids walking in and out of the kitchen.

Does seem odd... It is interesting the rule doesn't show up as triggered when the sensor becomes inactive... but that isn't your problem.... Not sure TBH....

I can never remember if waits or delays are cancelable, but if it’s only the delays, then the wait is your issue as you would be stacking them up instead of replacing them each time there is a new motion. (Also looks like your driver may be sending 2 active events.)

What makes you suspect that?

The pattern of errors - 2 within 0.003-0.004ms

Fair point, but the device events don't seem to reflect that.... Just part of the puzzle I expect, but hard to find the source of those logs... You may be on the right track with waits / delays...

If the second event doesn’t change the status of the first it doesn’t generally record the event.

Seeing I use the generic zigbee motion driver, all sensors should have this error, and they do not.

The multiple event isn’t the cause of your issue, just an observation.


@fanmanrules The first thing I would suggest is to clean up your rule a little bit. Since both IF statements are looking for active motion, I'd change your trigger to active and remove Kitchen Motion active from both of them. I'd also rewrite your ELSE and following IF as an ELSE-IF. Lastly, I'd turn on logging. Post your logs here so we can see how the rule is executing.

I believe this is the cause of the error. If people are going in an out of that room every time motion triggers to inactive it will kick off a wait, and that wait will never be satisfied if the sensor is cycling from active to inactive within the 15 minutes. There is no time out on the wait so it will sit indefinitely until there is no more motion.

I cannot think of a easy solution to write this in RM off the top of my head, but in Room Lighting this would be a piece of cake to do.

I'm thinking that exchanging the waits for a cancelable delay may solve the the error condition.

Would a required expression stop the additional triggers allowing the rule to complete?

EDIT - What option get's cancelled automatically by a re-trigger?

I'll rebuild the rule tonight when i'm home from work. Hope this wil fix the error messages.

That'd be my question. My understanding is that "waits" are automatically cancelled on subsequent rule triggers. "Delays," however, do not by default; which is why they have the cancellable option.

Just changing the trigger should be fine. There's no functional difference between how you have the actions written and using "ELSE-IF."

Turning on logging and showing all the logs vs just having the errors will be the best next step to show exactly what's going on with the rule (and hopefully identify which part is triggering the error).

1 Like

Changed this (and similar) rule(s) like advised:

As soon as I have new results, i'll post them.


Download the Hubitat app