Rule to Trigger multiple notifications if Garage Door remains open

Hi there

I am trying to setup a rule to trigger a multiple notification action using my Iris 1 contact sensor.

If the garage door (previously open) remains open at a certain time ( lets say 22:00, notify me multiple times until the door is close.

I have the following rule attached but it is not working as expected.

As written, that rule will run when the door opens, and if the time isn't within the rule, it'll just end. There's also no check for when the door closes, so if the notifications start, they'll just go forever.

You want the trigger to be the time, and you need a way for the notifications to stop. Try something like this:

TRIGGER:
    Time is 21:30

ACTIONS:
    IF (Garage Door open) THEN
        Repeat 20 times every 0:00:20 (stopable)
            IF (Garage Door Closed) THEN
                Stop Repeating Actions
            ELSE
                (do notifications)
            END-IF
        END-REP
    END-IF

Set the first number in the "Repeat" to the maximum number of notifications you want to receive.

Thanks a lot..... I can follow almost everything, but no clue where to find the line " (do notifications)"

Thanks

I was just using "(do notifications)" as shorthand for the line you have in your rule doing "Notify Jorge's iPhone" etc. That's the place where that line goes.

Thanks a lot
All working now. Super

You could have used the built in notification app to do this. It is much easier to use in most cases.

Hello there @neonturbo
I agree I could have used Built in notifications, but I am not sure i would get same funtionalities.... How can I program a notification to be trigger only "if" the door is open using Built in Notifications?

I assume I can only trigger the notification if I open the garage door, but the Built in notifications will not recognize that the door is open to trigger the notification. In other words, I am not sure how to implement a "ONLY IF" command.... Am I right ?

Thanks

You are correct. Notification app expects a trigger to start it and time isn’t available as a trigger

Would "Restrictions" (in Notifications) give you that functionality? I have used them in some simple automations to activate only within certain times. The one case it would not cover is if the door was open BEFORE 21:30 and still open after 21:30 (but I don't think your rule would cover that either?).

I finally solved the issue as follow

2 Likes

Just curious - did you create 2 rules (one that executes at 22:00 and one after 22:00)? I had a similar issue with a lux trigger not activating if there was no change between before and after the time I wanted it to be monitored. So I created one rule that checked the lux reading at the particular time (08:00) and then the regular trigger based on lux readings (between 08:00 and Sunset-120) after that.

Nope I just created the rule you see above..... No extra rule created to monitor the status of the device

1 Like