Routine for closing garage door

I have contact sensors on the garage doors and momentary buttons which open/close the respective doors.

It was working great in webCoRE but with my routine it closes and then opens it again.

Here’s the logic:
Using my phone location. If I am away for 1 minute and the garage door sensor is open, press the momentary button.

Of course there’s no delay after the button press so the door is in motion and has not yet closed and it appear to repeat causing the door to open again. If there were a delay after the button press that would solve the issue but I don’t see that option in routines.

Yes I could implement a virtual garage door (maybe that’s the only solution) but that’s going to require multiple routines for each door.

Is there another method I am not seeing?

The open when I return, after being away for 10 minutes works OK. It only triggers once.

You might want to add two preconditions. The garage door is not “Closing” and the Garage door is not “Closed.” Of course, you may need to add a virtual garage door to do this.

Yes, that would require virtual garage doors, and the associated routines.

I have it working using a virtual garage door now as that seems like the only solution for now but the routines need to have a pause (after event) command and really the presence should have options for arrived home or left and only trigger once.

can you post a screenshot of the routine please?

for myself… I just use

presence sensor: not present
for 1 minute
garage door
door closed

I do not use the if garage door open part

All that matters is that my phone presence is away and the garage door contact is open. It presses the momentary switch to close it.

These are Z-wave tilt contact switches on the doors.

I may be wrong, but you set it up so that the door closes if any of the conditions are met, even if the mode changes. Shouldn’t it be structured so that all conditions must be met?

I assumed the “away for 1 minute” would trigger once, so then if the door is open it would initiate the button press to close it. The location mode could be removed as could the other condition.

@gst I would also take a look at the virtual garage door in this driver. It helps manage the distinction between open/opening and closed/closing. It also presents as a door so you can open and close it logically via the dashboard or the smart locks app. You can follow the door tutorial so connect your contact sensor.

Thank you, actually I already installed it and yes that does solve the issue but requires 12 routines not including those that trigger from presence. I hope ST add such simple automation tasks as a pause.

If you want to share the 12 automations in DM, I can take a look and see if there is any way to reduce those.

1 Like

Thanks for the offer. There’s nothing too complicated it’s 2 for the sensor states (open/closed) and 2 for the switch (opening/closing) but multiplied by 3 garage doors. It is working fine so I will just leave it for now and more on to other devices.

Add virtual momentary button from @TAustin to Routines. It has “timer” that reset status after set time, for example 20 seconds
Place it in Condition to be if Off. It’s going to give 20 second to garage to close, before goes back to off.


Great suggestion, thank you.

Running a routine with multiple triggers is fraught with problems. If you set the garage door, location mode, and sensor to Preconditions, it would just trigger on the away. So when you leave, presence triggers, it checks the preconditions and if they are met it runs.

Thanks. I initially only had the phone presence sensor as the trigger and it didn’t work, but that was resolved by using the virtual garage door although I like Milan’s suggestion better so will give that a try.

@gst I also have a virtual momentary button in the same driver that has the garage door. A virtual switch would do the same thing using the “auto off” available to all switch in ST.

1 Like