If-then conditions very slow on Rule Machine

I'm trying to isolate this issue here but having trouble. I'm hoping some fresh set of eyes can help me out.

I have a C7 hub, latest update (2.2.4.158)

I have a group of 5 switches called "Motion Lights". 4 are GE smart switches, 1 is a Zooz smart switch; all are Z-wave plus. They are all pretty close together and my hub is pretty central to everything.

I have a contact sensor on my Back Porch Door, zigbee, SmartSense Multi Sensor v4.

Outside, on the back porch, I have a GE Zwave motion sensor, wired (no battery).

My original rule was a little more complex but because of my issues, I'm simplifying it for simplicity's sake. But here's my rule I have now:

Trigger Event: Motion at Back Porch Motion Sensor
Actions: If Back Porch contact/door sensor is closed, then turn on "Motion Lights", otherwise (else), just turn on Back Porch Switch.

If I open the Back Porch Door and motion is detected with my GE Zwave motion sensor, just my Back Porch Switch comes on. It comes on instantly and just as it should.

However, the other way runs horribly slow. If a squirrel runs by the motion sensor (and my Back Porch door is closed), it takes about 40-60 seconds for the "Motion Lights" group to come on. In the Device page, the group device shows on but the switches are still delayed. On my dashboard, the group device shows on but again, the switches are delayed.

When I turn on the group "Motion Lights" directly from Device page, all the switches turn on instantly.

I created a virtual motion sensor and replaced that in my rule. When I activate the virtual motion sensor, the "Motion Lights" come on instantly. So I'm thinking maybe it's my GE zwave motion sensor? However, the sensor reports to the hub instantly just like it should.

Maybe also my rule is flawed? But it seems to be a pretty straight-forward rule. If I create a rule that says:

Trigger Event: Motion at Back Porch Motion Sensor
Actions: Turn on group "Motion Lights"

....then the switches come on instantly.

It's only when I begin using the conditional "If-then" actions does it start to slow down.

Anybody have any thoughts?

It's a feature

Welcome to Hubitat!

It would be much easier to troubleshoot if you could post screenshots of your Rules.

4 Likes

I agree that screenshots would help, but might I also suggest just redoing a copy of the rule from scratch as a test?
Sometimes it works, not sure why.

1 Like

I'm new and it's not allowing me to post media. But if this helps...

IF (Door Sensor - French #1 closed (T) [TRUE]) THEN
On: Group: Motion & Intrusion Lights
ELSE
On: Back Porch Light
END-IF

Is it slow all the time or just later at night?

All the time. It's getting colder here and I thought maybe temperature was affecting my GE zwave motion sensor on the back porch but I tested it today and it's still slow.

Is there a particular reason you are using Rule Machine? This is a pretty "heavy" app compared to the more simple, and lightweight Motion Lighting or Simple Automations apps.

This would imply it's the not conditional. Also there re other threads re slow action response w Jasco zwave motion sensors

My original rule is more complex and I don't think Simple Automations can handle it. I'd like to also add timeframe condition to the rule. But for now, I'm getting a delay with simply just the rule I've posted

You can add time restrictions to both of those. But either way, if you need the complexity RM should work for you.

What does your trigger look like for that rule you posted just above?

And just so we know what you are trying to do exactly, could you describe (Ignore Rule Machine for a minute here) what you are trying to make happen? Something like "I want the back door light to come on when the door sensor is closed, and the group lights to do X when Y happens between dusk and dawn".

I want my back porch motion sensor to turn on a group of 5 lights (Motion Lights) when motion is detected (between hours of 11pm-6am)

But, if I need to wake up in the middle of the night to let the dog out, I want my contact/door sensor to cancel my back porch motion sensor from turning on my group "Motion Lights" and instead just turn on 1 simple Back Porch Light.

Again, it's working, it's just terribly slow. If there is motion on the back porch, it takes about 40 seconds for this "Motion lights" group to turn on. However, if the back porch door (French #1) is open, the back porch light turns on instantly

And as a "control" test, did you try not using the group of lights, but instead use the individual lights in the rule?

The group should work fine here, strange that it is different in the rule then manually operating it. Conditional rules aren't that slow to where it would be 30 seconds or more to run this action.

Yes I did do that. That group of 5 lights are all inside and instead of using "Group: Motion & Intrusion Lights", I put each one individually but still the delay.

I didn't think of this but I'm gonna try a virtual switch instead of a group. I'll create a virtual switch with an automation to turn on all these 5 lights. I'll replace the group with this virtual switch in the rule and see if that helps

At some point, you might try turning on all logging in that rule, trigger the rule, and post the log screenshots so we can see what is really happening.

And try redoing the rule from scratch as a test like I mentioned before

This really shouldn't be necessary. If you've tried addressing each of the lights (eg. it's not a group issue) and still it's too slow then you have a mesh issue.

Any errors in your logs?

As an additional test, you could try switching the lights around the other way. Now do they work and the other light is slow? Probably not. I think it's likely a mesh issue affecting the routing on that set of lights.

I'm assuming you want the else to evaluate when the door is open.
You do not have a trigger for the door being open. Only closed.
What happens if you change the trigger to changed.

1 Like

Yeah, but his trigger is when motion is detected and his conditional is about the door being closed. So if its not closed (eg. it is open) then his else should trigger when motion is detected. So it should work, right? I think the rule is ok and there should not be any delay in his If condition triggering the lights on. It still seems to me he must has a mesh issue.

Having said that, I used to get many delays on motion triggered lighting rules (although they were a bit more complex than this and checked global variables as part of the flow). I had to move these routines to Node-RED to get rapid triggering. Now my motion lights work very fast and reliably.

1 Like