Delay re-trigger of rule

Hi All,
I've tried searching the forum, and either I am horrible at searching, or it hasn't popped up yet.

I have a beam across our gate, and when the beam is triggered, it will buzz a beeper, but also starts an activity in harmony to switch our TV to show the camera on the gate, there is then a second rule which is triggered by this rule, which will switch back to the default harmony activity after 15 seconds.

It works really well, and I love it. Except when the beam is retriggered before harmony has switched back to the default activity, as it causes the first rule to fire again, which triggers the already active harmony activity; to harmony this means turn the TV off.

Is there a way to stop a rule from refiring with in a time frame? Ideally, I'd like it so the rule will not fire if the beam is tripped within 30 seconds of the last fire.

Thanks in advance!

1 Like

Use Private Boolean. In Restrictions, set disable with Private Boolean. Then, you set Private Boolean to false when the rule runs, thus disabling the rule. Also, set Private Boolean to true with a 30 second delay, thus re-enabling the rule 30 seconds later.

2 Likes

Here's an example of what @bravenel is talking about.

When someone rings my doorbell (which is picked up by an acceleration sensor), my dogs go nuts barking, which also sets off the acceleration sensor. This used to generate multiple notifications. In this example, I have an initial notification from the doorbell ringing, then the rule disables itself for 3 minutes to prevent the subsequent notifications, then re-enables itself.

1 Like

That’s perfect, worked. Treat! Thank guys.

1 Like

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