Is there any way to make an Automation that triggers if something left open for 10 minutes?

I’m moving rules over from SHM to STHM. I had a custom SHM rule that alerted me when either of my garage doors were open for more than 10 minutes at night. The “more than 10 minutes” means this doesn’t get triggered if we go out or return at night, only if we leave them open.

It looks like I can’t do this with an automation – there appears to be no equivalent of “For how long?”. Am I missing something?

I used to use a webCoRE piston to accomplish this before I realized I could make it run local by having it in a SHM custom rule. I’ll just go back to the piston.

You can create an automation to check the status of a device and control a device with a delay (i.e if garage door open then close garage door with 10 minute delay) but you can’t check the status of a device and notify with a delay of 10 minutes.

There is nothing in the official features. There are some options. See the community FAQ. (The topic title is a clickable link)

FAQ: Get a Notification if Something is Left On, Open, or Unlocked for X Minutes (2020)

I found a way, its kind of “clunky” but it works using a virtual switch and two automations.
Set up the two rules as follows, where:
DS =Door Sensor
VS = Virtual Switch.
X =Delay time desired.

IF DS(open) THEN VS(open) [x minute delay]
IF DS(open) AND VS(open) THEN (your desired routine), close VS
Or, you could
IF DS(closed) THEN VS(closed) [x+1 minute delay]

I know, clunky, but I use this for my basement freezer door. Even better, its FREE.

There is a free option, actually two, in the FAQ linked to above. :sunglasses:

Does your method work if the door gets closed and then opened again? It looks to me like you might get some false alerts.

“Does your method work if the door gets closed and then opened again? It looks to me like you might get some false alerts.”

My grandkids run downstairs for ice cream ALL the time with zero false alarms using the three rule method.
Each time you open the door, another timing cycle starts so in theory you’d get multiple alerts if the door is opened and closed multiple times during the first timing cycle. But, if the door is closed rule #2 would be false with no notifications sent.
Realistically, how many times do you cycle your garage door in 10 minutes then drive away leaving it open? :wink:

Different people have different use cases. Our back door gets opened and closed all the time (three housemates, friends, dog going in and out). I want to know if the door has been left open for more than 10 minutes after 10 pm, but I don’t care how many times it’s been opened.

Similar issue with the supply closet door, only there I want to know if it’s been left open for more than two minutes because there’s toxic stuff in it.

I’m not sure exactly how the delay works now, but when I tried it initially, The event didn’t get canceled if the trigger state changed. So if I had it set to delay 10 minutes, Closed the door after three minutes, then re-opened it again coming back in five minutes later, I would get a notification that it had been left open for 10 minutes, even though it hadn’t. But like I say, I don’t know if that’s changed.

But again, I don’t know exactly how it works now, and I think it has changed a couple of times.

if what you have is working for you, that’s great. Choice is good. :sunglasses:

Every time you start an action with a timer (currently) that timer HAS to complete and cause an action. Unless there a condition that prevents that action from cascading forward.
That’s what rule 2 does, it verifys that the door was left open allowing the desired action to take place. In other words the virtual switch (or timer) has counted down AND your housemate left the door open (how inconsiderate :unamused:)
Time constraint? Simple. Just add a time period in rule #2. IF (between time1 and time2) AND DS(open) AND VS(open) THEN desired action.
But, do what makes you happy.

1 Like

SmartThings has a lot of SmartApps that are not natively shown in either app. I use there ‘Notify Me When’ SmartApp which can be added via the IDE website using the ‘From Template’ option.

Sorry that’s the wrong SmartApp.

The right one is ‘Left it Open’ which has the delay timer, but is limited to just one device so I just created two of them for each door.

Because I’m in a wheelchair, it takes me about three minutes from the time the door is opened until it is closed again.

So when I initially tried the delay to mimic the old “open for 10 minutes” this is what frequently happened.

  1. I opened the door and went out on the deck while my dog was out in the yard. I did close the door behind me.

  2. after about five minutes we were ready to go in. This transition would take about three minutes, as usual.

At no time was the door ever open for more than three minutes, but the alert would go off from the first time because the virtual switch was turned on From when I opened the door the second time When the 10 minutes was up from the first timer.

This just happened to catch us pretty much every time I was just letting the dog out into the yard. :disappointed_relieved: Because the first timer never got canceled by the door closing, and it didn’t matter if I used a virtual switch and the virtual switch got turned off when the door closed, because the virtual switch was getting turned on again when we were coming back in. So the virtual switch would be on 10 minutes after the first time I opened the door even though it had been closed in between going out and coming back in.

But like I say, I don’t know if it still works that way or not. And I realize that other people with shorter transit times might not run into this. But I just found that the other methods detailed in the FAQ didn’t have this issue.

I’m glad I didn’t let their migration tool handle moving this from SHM to STHM for me, because who knows what it might have done. I’ll just chalk this up as another bit of missing feature-set in the new ecosystem.

Meanwhile, this weekend I might get around extending my Zigbee mesh on Hubitat into my garage, in which case I’ll move these contact sensors over there. The fact is that Hubitat’s Notifications App does all this built-in.

1 Like