SmartThings Community

Persistent notification, Alexa / ST?

I left my big garage door open last night, and at 11pm my ST’s goodnight routine ran and quietly sent me a push notification to my phone. Well, being half asleep, or just lazy to pickup my phone and look at the message, my garage door was open all night long inviting people to come in a steal my stuff. uggh!

I would like to write an automation to do this…
At 11pm, if my garage door is open, Alexa will tell me every 2 mins until it’s closed.

It sounds basic to me. But I can’t figure out how to do this using Alex connected to my ST without ‘other’ services.

Using ‘other’ services, I came up with this idea, but it still won’t work because Alexa can’t be triggered by switches or virtual-switches, only sensors: open/close, motion, etc.

Here’s my ‘almost works’ routine. If anyone has a better solution, please share :slight_smile:

  • when my big garage door opens, IFTTT will send httpGET to my garage.php with key garage=1 (my garage door has a ST contact sensor)

  • garage.php will write this status into dbGarage MySQL database

  • cron job will call garagecheck.php at 11pm

  • garagecheck.php will check garage door status and
    if garage=1 (open) it will send httpGET to ‘garage1’ IFTTT webhook
    after 30sec it will send httpGET to ‘garage0’ IFTTT webhook (pulse)
    every 2mins…
    it will loop ‘garage1’ & ‘garage0’ until it finds garage=0 in dbGarage
    once it finds garage=0 in dbGarage, it will end program

  • ‘garage1’ IFTTT webhook will turn ON ST virtual switch ‘garagenotify’

  • ‘garage0’ IFTTT webhook will turn OFF ST virtual switch ‘garagenotify’

  • Alexa routine: when ST virtual switch ‘garagenotify’ is opened
    Alexa will say ‘Big garage door is open’ (and this will repeat every 2 mins because of the garagecheck.php)

There’s gotta be a better way to do this! Any ideas?

Not completely related, but I wish the automations (like Goodnight) had the option to send a httpGET request aside from the push notification.

thank you!

tagging @bamarayne

As far as triggering echo routines from a virtual switch, that’s easy. :sunglasses: You just have to use a DTH which creates a virtual sensor that also has the capability switch. That way when you turn the switch on from SmartThings, the sensor registers as opened. When you turn the switch off, the sensor registers as closed. And so you can have your echo routine react to those state changes

See the community FAQ for the exact steps and the code for that DTH:

1 Like

I see it’s been a couple of years since you’ve posted. Welcome back.

First, what kind of garage door opener are you using I based on that we can do this a couple of different ways.

I do what you’re wanting by using EchoSistant. You may have seen it the part time you were here. The install process is much easier and it does much more.

Using EchoSistant you can tell Alexa to open/close the garage.
You can all of the door is open or closed.
You can create shortcuts that will close the door at certain times.
You can tell the door to open or close in xx minutes or hours.
You can also create automations that will close the door.

For example, when I’m ready for bed I say Alexa, tell the house goodnight. Then EchoSistant takes care of the rest, including the garage door.

Another way, which does not give you voice control, is to use WebCoRE. This will allow you to create simple to extremely complex automations to do almost anything you want it to do.

3 Likes

Thanks for your help and detailed response Jason. I’m renting now, so my plan was to keep it simple and temporarily run parallel to the N/O garage door push button switch to open/close the door, use a magnetic reed switch as an open/close sensor, and have these connected to an ESP32-CAM so I could actually have a look if I wanted to confirm what’s going on in my garage or take photos when it opens. The ESP32-CAM would be using the ST DTHs I found around here and on github.

EchoSistant and WebCoRE sound pretty cool. I will have to check them out.

Thanks again.

2 Likes

Hi bamarayne and JDRoberts,

So I installed the Virtual Alexa Switch DTH, setup WebCoRE and programmed it so…
while ST mode is Armed/Home (after Goodnight) and Garage Door contact switch is ‘open’
do: VirtualAlexaSwitch is on for 1 min & off for 1 min

and my Alexa routine runs if it sees the VirtualAlexaSwitch switches on
so Alexa tells me ‘the Big Garage Door is Open’ every 2mins.

Perfect! worked out well. Thank you very much.
And big thanks for turning me on the WebCoRE. I can’t wait to see what else I can do with it.

2 Likes