Garage Door Status Check

Hello all. Very new to Hubitat. So far I'm enjoying going down the home automation rabbit hole :).
Trying to get my head around Rule Machine and creating a rule to check if my garage door was left open in the evening. My setup includes a Shelly 1 for the garage door opener switch, and a contact sensor for checking open/closed status.
So far, I have the below rule set up. It works to notify me the garage door is open, and does start the repeat notification if it is not closed within 5 minutes. However, it gets stuck in a loop on the repeat section. It will not stop notifying me the garage door is still open. Even if I close the door, it is stuck in the repeat loop. Also, If i force run the rule while the garage door is CLOSED, it will correctly notify me that the garage is now closed. Any ideas where I may be missing something to get the rule out of the repeat loop? Thanks in advance!

Hi and welcome to the rabbit hole :). From what you're describing it sounds like you want to know if the garage door is open for a time anytime at night. so you would need a slight reconfiguration. You can use the predicate condition to restrict the rule to nighttime (between 2 times specifically). Then your trigger would be the door open. Then the rule would be setup to delay 5 minutes then the repeat loop every 15 minutes unless the door reports closed. Something like this...

Predicate between 7pm - 11pm (only active at night, you can use sunset/sunrise combinations too)

Trigger on door open

Notify...
Delay 5 min
Repeat every 15 minutes, stoppable
If door is open then
notify...
else
stop repeat
endif
end rep

There are many ways to solve this and others here might have a better suggestion. But this is the way I would start.

Another option is the new repeat while. I just redid my notification routine to use it. Here is what I have.

It seems that the IF … THEN and END-IF is redundant with the WHILE … REPEAT … END-REP, such that you could delete the IF … THEN and END-IF.

This is the direction I would go. I think the issue with your current rule is that there is no "path" ou of the repeating actions. Assuming the door starts in the open state, the first IF evaluates as TRUE, and proceed to the repeating action. Since this is set up as "Repeat every 15 minutes forever" action, the rule isn't able to move beyond this portion.

It looks like you want to repeat the entire rule every 15 minutes, not just the notification. If that is the case, the IF-ELSE evaluations should be nested inside of the Repeat/END-REP.

Yeah it could be taken out.

SOLVED:
Thank you all for your insight. I tried your suggestions and was able to get a couple of them working. For now I settled on the rule shown here. It's working as expected. Maybe no need for the additional check and notification once the door has closed, but I just wanted to see if I could get it to work reliably. Thanks again!

i use the notifier app

I understand. I did look at doing this through the notifier app, but it will only notify on an event. WE typically leave our garage door open during the day. so need something that will check status even if there is no event.

1 Like

ahhh, gotcha. for some reason i thought it could be on a timer, but that was a different app (Device Status Announcer, which does not allow repeated notifications, only a ton of voice alerts/notifications/virtual device controls that can all be done through Rule Machine)

as long as the rule works, then keep on rocking

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