Quick question. I have a Ring Doorbell, and Alexa enables a Virtual Switch, which RM then uses to turn on the light. It stays on 5 minutes, then shuts off. Problem is, the light shutting off is triggering the motion detection. lol.
So, what's an easy way to add a delay between retriggering? I thought maybe a second Virtual Switch that stays on like 2 seconds and add it to the rule conditions so that the light won't come on again for 2 seconds after it turns off. But wondering if there's an easier more intuitive way to do this.
There is a way to "debounce" it. Use setting Private Boolean, first to false, and then with a short delay to true. Use a Restriction of Disable with Private Boolean. This effectively puts the rule to sleep for the duration between when it first runs, and when it sets PB to true again.
Actions to set PB, and a Restriction for Disable with Private Boolean. It doesn't involve the rest of your rule. All it does is prevent the rule from firing multiple times in a short time window.
I'm honestly not sure. Is the delay being added to the beginning or end?
I'm... my brain is not wrapping itself around this issue. The PB is basically saying "ignore the first instance of this trigger" if it's run within 5 seconds of the previous run?
Yeah, sorry, I need help on this one... my brain just isn't comprehending. =(
You want these in the Actions for False part, since it's turning off the light that has the problem. So when you turn off the light, this will disable the rule for 5 seconds or whatever amount of time you need. If the light turning off is tripping the motion sensor, then after 5 seconds it should have been tripped, and the rule won't turn it on again until the next time it goes active some time later.
You want the switch to be on so that the rule will be disabled for the 5 seconds. The rule flips PB to false, disabling the rule, then flips it to true, re-enabling the rule 5 seconds later. So that switch must be on for this behavior to work.
no luck. still re-triggers. probably I assume it's because the "false" that turns it off after 5 minutes is setting the boolean immediately, so it expires after 5 seconds when the light stays on 5 minutes. =/
Should I figure out how to refactor the whole thing? I'm just trying to turn the light on for 5 minutes...
I know I'm resurrecting an old thread, but Rule Machine has gone through more changes and the solutions described here don't match up with the current RM (5.1)
@bravenel can you provide an updated example of the best way to do this in RM5.1? (by 'this' I mean having a rule temporarily disable itself from being re-triggered while it is running)