Prevent immediate retriggering?

Hi All,

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.

Thanks!

I may have just figured out that if I slow down its turnoff (tell it to dim over the course of 5 seconds), it doesn't seem to trigger motion....

Update: Nope. I can't do a "Pending Off" with a dimmer, which is how I'm controlling the 5 minute time. =/

My current rule:

55%20PM

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.

1 Like

That makes sense, but I'm not sure I follow how to actually set that up. Is this a condition I'm configuring a private boolean, or...?

Thanks!

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.

1 Like

So that set private boolean is in the "actions for true" or "actions for false"?

Here's what I have based on your screenshots.


Whichever side was bouncing...

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.

1 Like

awesome, thanks. and the "Enable/Disable with private Boolean? [true]" switch. In your screenshot that was off, but I've got it on. Is that correct?

Yes, turning it on causes the rule to be disabled when PB is false.

1 Like

so leave it off? that makes it look like there are no restrictions.

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.

1 Like

okay, that makes sense. Thank you so much for all your help. I guess I'll figure out if this works tonight. =)

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...

just changed from "Pending off" to "Delay" for the false action, and that seems to have resolved it.

Thanks!

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)

advTHANKSance :grin:

3 Likes