Using an open/close sensor to send notice if open at time X

Good evening! I was hoping to find some simple way to have my hub notify me when the garage door is left open at night - for example, at 10pm it checks the status of an open/close sensor and, if open, sends a message. I was surprised when SmartThings staff told me the dashboard doesn’t have that option (during a set window, you can have it notify when open for a certain duration - but you can’t perform my simple operation described). Anyone have any ideas? It seems there should be an app for that. If not, can someone put together a few lines of code to fix that problem? Thanks so much!

You could use a “something is left open” if garage is left open for X many minutes you get a message. ? If you have a smart opener there is app - I use it so if no motion in garage for 5 minutes and garage door is open / sends me a message and CLOSES the garage door. Garage door is never left open for more than 5 minutes anymore.

In CoRE, create a piston like this:

   Time happens at 10pm
   Garage door is open
   Using location...
      > Send notification 'message' to recipient

The time part is a trigger, while the garage door part is a condition. This ensures that only the trigger can initiate a notification, if the condition is true. In other words, notification can only be sent at 10pm and only if the garage door is open.

Hope this helps.


It’s not “simple,” but core is a very sophisticated community created rules engine which can do this.

If you haven’t used custom code before first read the overview faq so you get the concept. But it’s pretty straightforward. Basically you’re going to copy the code from the author and paste it into your own account.

If that sounds like something you would like to try, and here is the author thread for core:

You can also get help with core in the peer assistance thread ( A “piston” is what core calls a single rule.)


This is not exactly what you want, but I just used SHM and created a custom alert when a door is left open for a specified period of time. This helps me when I forget to close the garage door or the door to our crawlspace.

Here is something I have set up.

This should give you an idea of what can be done.

BTW I am using a variable as I have other rules using these devices and the variable stops the pistons clashing.


There is one very simple way to do it, but it depends on how else you’re using modes.

You could have a routine which changes your house to “security check” mode (or whatever name you want to call it) at 10 PM every night and another routine which changes the house back to “night” mode at 10:05.

Then use the “notify when” Smart app which is in the marketplace section of the official mobile app and have it only run in security check mode to notify you if the garage door was open for more than a minute.

That way the check would run every night between 10 and 1005 and you would get your notification.

It’s a little clunky, but it would work.

1 Like


Customer support I think is missing something simple.

If I understand what you are asking this is easy to do with the built-in notifications.

There is an advanced section that lets a time period to be entered.


That’s what I did! It’s not quite what he asked for, but it fits my family need.

1 Like

Ryan, you are right… not quite what I was looking for, but I appreciate you two reaching out. A few others have shared some ideas that should accomplish the task - I just have to figure out how to do what they are saying! I’ll give it a try…

1 Like

Giving this a try. Looking to do a simple task. Every 10 minutes randomly change the color of my osram LED lights.

I didn’t see an option under time so I thought to use a virtual switch that will turn on and off every 10 minutes as condition #1 and use color control and #2. But nothing shows under comparison for this to work.

Mfrary , Were you able to do the garage door monitoring based on Sensor status ?
I am looking for the same setup to notify me if I forget to close my garage door .
Any help is appreciated .


If you check upthread you’ll see that a couple of different methods were suggested for doing this. :sunglasses: They all work, just depends on what your own preferences are.

The most flexible will be core:

But many people would just be able to use a custom alert in smart home monitor, which is much easier to set up.

I have mine set up to alert me if the linen closet is kept open for more than two minutes, because that’s where we have cleaning supplies that I don’t want the dog to get into.

Use Webcore to ctreate pisiton
Step 1: upload Webcore to smarthing ide using code frome gifthub
Step 2: crete pisiton like that its 100% working good try and let me know