Rule Machine - Repeat Action

I have an alarm I need to repeat until the event clears.

Example, when Switch No1 "Opens", send message (Door open), but continue to repeat sending message "Door Open", until the Switch No1 "Closes"

Can someone send me the logic on how do do this?

BTW, I have it repeating, it just never stops repeating after the switch closes

Thanks in advance

It would help if you posted a screenshot of your Rule, so that it can be corrected. In the meanwhile, here's a simple example of a Repeat Action that will repeat while a condition is true.

1 Like

Im adding an extra smoke alarm relay to my exiting smoke alarm circuit to notify me directly to my cell

You probably want to use ‘repeat while expression’ is true and use ‘smoke alarm active’ as the expression. That should cancel the repeat when your alarm clears.

1 Like

You can modify this, as suggested by @johnwill1, to look like the example I posted. But I have a question and a suggestion:

  1. Why do you want the event to be active for 2 seconds to function as a trigger?
  2. Repeating an action every 2 seconds is really frequent, and will increase the hub's workload quite a bit when the rule is triggered. I would suggest using something like 1-5 minutes.

Also, when you use stoppable, you need to define the condition that stops the repeat. And in this example, stoppable can be avoided entirely by using "Repeat while expression".

The 2 sec is a debonce timer to reduce false alarms

And the send message every 2 seconds was just for testing, i will adjust after i get the logic working,

I only have one input, the relay that is toggled only when the smoke detector(s) circuit is tripped, the smoke detector circuit is always active. When the smoke detector ac breaker is turned on, all detector are active.

So the question is, what do i use for the expression condition since i only have the one input im monitoring?

The input that you are monitoring, i.e. "While Smoke Interface Relay Input is on".

Here's a repeat rule I just made. When rule is triggered, it starts a repeat loop that repeats every 30 seconds until a particular attribute reports a particular value, which triggers the repeat to stop and then the rule continues with further actions:

thanks I will give that a try

There is a stock Notifications app that can easily handle this too. I use it to notify me if the garage fridge and freezer doors have been left open:

1 Like

this is cool

Much simpler to do with the notification app. Built In take a look.

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