Rule Machine - Light Rule Help

Hi
Can some please help? I have created the following rule in RM, it mostly works. During motion, the light comes on, it seems to stay on for longer than 30 seconds if there’s continued motion. However, if the light goes off and there is immediate motion straight after the light goes off, the light doesn’t come back on (roughly 20 seconds after last light off):

For false, you’ve picked delay first then turn off. That will turn the light off after 30 seconds no matter what.

You need to select turn off switch after delay pending cancellation.

1 Like

Thanks @jrau272. So it should be this instead?

Yup. That looks right.

1 Like

Thank you for your help. Lol that would explain why other lights using the same rule are staying on for a short period instead of the full 5 minutes defined in the delay. Thank you

@jrau272 any ideas why this rule would still be turning off the lights after around a minute from the point the light comes on even though I have the 10 minute delay pending cancellation?

Looks like you updated one of the conditions (illum <=40) but didn't update the rule, since it still shows illum <=20. If you go into the rule you'll see that the illum condition has been blanked out. That will affect the performance of the rule. Not sure if it's causing the specific thing you're asking about but it needs to be corrected before you test anything else.

1 Like

DOH. Good point, I thought it would just pull the update from conditions over to the rule on condition update. Think I need to go check some other rules out. Thanks

Will update this thread if all now works as intended

DOH. I’ve updated the rule but still getting the same behaviour. Should false be defined as:
Delay: 9 minutes
Pending off: %device%: 1 minute
?
Thanks

No, you had it right the first time. If you use the delay, then it will only evaluate for movement during a 1 minute period, 9 minutes after it first detects movement. I imagine you want it to reset the timer if there is any movement during that 10 minute period.

Otherwise I don’t see anything in your rule logic that would be turning off the light after 1 minute. I’d check your logs to figure out what’s going on.

Also, just as an aside, 10 minutes is an awfully long time for motion. I think the longest pend I have is 4 minutes.

1 Like

Thank you. This is for the lounge - in the evening we wouldn’t want the light to go off due to not moving for a while lol.
The light is a LIFX bulb. Im wondering if something else is plying up with that driver (GOG custom I found in the forum). As you can see I have a virtual device called Loungr Automation. Even with that turned off the light has been playing up - even when the rule isn’t set to run, something is turning the light off when I manually turn it of as a device.
Thanks for your help and advise

Found the problem. There was a bug in another unrelated rule.

Thanks all for your help

1 Like

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