Push notification if detected a door is already open at 23:00?

A neighbor the other day was out in their garage, went inside but never came out and closed their garage. Luckily we saw it and let them know but if we hadn’t, they might have lost some things, or worse.

I have a simple Open/Close sensor on my garage. I’m looking for an app that runs at 23:00 and checks that sensor. If it’s open, send a notification. If it opens after 23:00 also send a notification.

I’ve found how to do the second half easily, but I don’t see anything that will check at 23:00 and if it’s open, send a notification.

1 Like

Core can do this:

Robin,
How do you get to that point in the GUI? I added the repo in the smartthings.com site and can edit code which I’m not ready to do yet.

-R

@anon36505037:

Couldn’t he include the garage door sensor as a watched sensor in SHM, and the enable Armed Home status via the Good Night routine? Then if the garage door opens, or if it’s already open when he runs “Good Night,” he’ll get a notification. Could set SHM to run at 11:00 each night if doesn’t want to have to remember to run it.

There is also an app that may suit your needs.

2 Likes

Thanks, I wasn’t aware of that limitation.

Ok,
I’m wondering if I’m looking in the right place.

  1. I opened the SmartThings (ST) app.
  2. I click on “Automation” at the bottom
  3. Click on “SmartApps” in the top right
  4. Scroll to the very bottom and click on “Add a SmartApp”
  5. Scroll to the very bottom to “+More” ( There is no “my apps” )

There is no option for CoRE, My Apps or anything else.

OK, those instructions were in the SmartThings app on my phone. Im in the US and when I access the IDE the only link I found ( no idea how I found it ) is https://graph-na02-useast1.api.smartthings.com/login/auth

That code is already there, I can see it in the IDE. In the ST App, I don’t have a “my apps” option even.

Ok, it did not ask me to log in a second time.

I’m an idiot, I did not hit publish as I was thinking I didn’t want it public, when I did I saw the “For Me” and the My apps is there with the CoRE engine.

1 Like

It’s actually pretty nice. I have 2 conditions:
Time is between 6;20PM MST and 5:00AM MST which is correctly evaluating to T/F depending on the test times I set

Sensor - Garagedoor sensor is true.
* This one is not evaluating correctly. If the door is either open or closed, it is evaluating as false. Even though the smart things app itself does register the connection correctly.

If that works, I then have a push notification I’ll get next.

@anon36505037: I just played with SHM, and discovered it does appear to notice and alert you if you arm SHM when one of the monitored doors is already open. I get a push message on the SHM screen and a text indicating that SHM is armed, but the door is open.

Do you see a different behavior?

@anon36505037

Any thoughts on the second step? I’m still not seeing it mark the Garage sensor as true when it’s closed ( or open ) and CoRE doesn’t seem to detect the state change if I open or close the door.

I have a trigger that runs every night at 12:08am that closes the garage… If its already closed it stays closed, if its open then it gets closed.

Simple to create and I don’t have to worry if I accidently leave it open.

Edit: This is on top of the alert I get if the garage is opened for more then 30 minutes.

I’ll reconfigure for that.

Would it be a sensor or contact?

I don’t have a controller yet, just the sensor. I’ll be adding one in a couple months.

Ok, I reconfigured it with:

Time between 17:00 and 5:00
Happens ever 5 mins
Contact Sensor - Garage, close.

It started alerting. I’ve changed it to:
Time between 23:00 and 5:00
Happens ever 20 mins
Contact Sensor - Garage, open.

Thanks for all the help.

Got any details on the simulator? I couldn’t do anything with it.

There’s a button in the app for a simulator. Thought it might be for testing my logic. I’ll check the dashboard after rugby practice.

Thanks again!

A simple approach in CoRE is this:

IF
   Time is between 23:00 and 6:00
   AND
   Garage door contact is open
THEN
   Using location...
      > Send push notification "oh-oh, garage door is open"

To explain it, both conditional statements (time and contact) are regular conditions (empty circles) and will therefore both cause evaluations of this piston whenever any of their values changes. In plain English, the time condition will trigger two evaluations, one at 11pm and one at 6am. The contact condition will trigger evaluations every time the contact changes. Since there is an AND between them, nothing will happen if the door opens between 6:00 and 23:00, or when the door closes. However, if time reaches 23:00 and the door was already open, you’d get a notification. Same would happen if you opened the garage door after 23:00.

An extra step to make this more useful is to add a self-referenced follow up:

IF
   Time is between 23:00 and 6:00
   AND
   Garage door contact is open
THEN
   Using location...
      > Send push notification "oh-oh, garage door is open"
      > Follow up with piston (same name) in 10 minutes

This would cause the notification to be sent every ten minutes until the door closes or the time passed 6am. Annoying. Better :wink:
The more advanced route is above, the one involving a time trigger. But you don’t always need to go that far :wink:

2 Likes