Motion Rules - Got me Again (help please!)

I thought I was finally understanding motion rules to turn on lights. Failed again.
I really thought I was smarter than this...

Here is what I want:
When motion detected, turn on light
Turn off light after 20min if no other motion detected
Do not run rule if light is already turned on, or already on
Only trigger this between 0630 and 2300

I set up a motion rule, and it was working fine. Light came on, and then shut off after 20min.
However, the following does not happen:

  1. When motion is sensed, it should re-trigger the time out
  2. If I override the motion by turning a switch on, I want it to not run the rule

I feel this should be simple?

Help please.

Thanks in advance

Have you looked at the built-in Motion Lighting app? If not, it sounds like it can handle everything you're looking for, and it's a lot easier to set up. If not, someone can probably suggest tweaks to your existing ruke if you're able to share a screenshot or at least a description of its setup.

1 Like

This is how I would do this in Rule Machine 5:

When motion is sensed, the rule will be re-triggered which will cancel the wait.

1 Like

Currently I am using the Motion Lighting app.
I thought it wouldnt be able to do all that I required, hence me looking at RM

Here is the motion lighting app so far:

Would I need to create the virtual switch and virtual motion sensor?
(or are those placeholders for my rule...) :slight_smile:

Does the predicate condition of the switch being off mean that the rule won't run if the switch isn't off? (I think I just answered my question)

Yes, you would replace the virtual devices for your devices. Also correct - the predicate conditions need to be true in order for the rule to run.

1 Like

Sounds good so far.
But what about re-triggering if motion still detected?

Wait conditions get cancelled when a rule re-triggers. So the first 20 minutes gets cancelled and a new countdown is started when motion is detected.

Another option would be to do a cancellable delayed turn off action, and start the rule with a cancel delayed options. The end result would be the same.

Download the Hubitat app