Natural language voice control of Garage Doors

This has been discussed a bit in some of the Echo or IFTTT threads, but I finished up working on this over the week end and wanted to do a quick write up on it. This project uses:

  • Amazon Echo
  • Custom SmartApp
  • Custom (kind of) Device Type
  • Garage Door (obviously) with an open/close sensor and a relay/outlet that can open/close the door.

I got my Amazon Echo about a month or so ago to replace my Ubi. There were some great things about Ubi, but the hardware really limited it… poor mics and speakers made it so it wasn’t easy to use unless you were within 5 feet of the device and facing it. Amazon’s mic and speakers are WORLDS ahead of Ubi so it was a nice upgrade.

However, one area which hurt was not being able to setup custom commands. In Ubi I can type in a phrase that I want to say, and then tell Ubi what to do when it hears that phrase. Echo doesn’t have this totally yet, but with the recent addition of “triggers” to the IFTTT channel, it’s getting pretty close.

However, there’s still one more problem: If you ask Alexa to open or close your garage door (even if working through IFTTT), Alexa doesn’t check to see if a door is open or closed before performing triggering the outlet to activate the door. This isn’t a huge deal, but for me it was an annoyance, so I set to work solving it. And here’s the solution I came up with:

The smart app located there REQUIRES that you also install the following device type:

The app creates two child devices and asks you to name them. After installing the app you need to go to your IFTTT app and grant access to IFTTT to control these two devices.

The in IFTTT, you need to setup two recipes. The trigger is the Alexa channel trigger function that asks you to enter a phrase such as “the garage door open.” The task part should be to turn on the on/off tile the SmartApp created for opening your garage. For the second recipe will be much the same but for closing the garage door so use a phrase like “the garage door closed.” and point to the device we created to close the garage.

After the setup work is done, this is how it will work:

You say to Alexa: “Alexa, trigger the garage door open.” This causes the SmartApp to examine the state of the garage door.

  • If the door is closed the app opens the door and (optionally) sends a message by push and/or TTS saying: “Opening [device name].”
  • However, if the garage door is already open, then the app doesn’t trigger the relay and (optionally) sends a message by push and/or TTS saying “[device name] is ready open.”

The same happens if you use the phrase “Alexa, trigger the garage door closed.”

A few notes:

1.) I just finished this up over the weekend, so if you intend to use it, please test it first before relying on it to always work. It’s worked fine for me, but I haven’t do rigorous testing yet.
2.) I don’t know for sure how well Alexa and IFTTT interact. Alexa does a good job, in my opinion, of taking variable phrases and figuring out what you want. For example: “Turn on the Kitchen Light.” or “Turn the kitchen light off” or “Please turn the kitchen light on” all seem to work pretty will when directly communicating to ST. I don’t know if using IFTTT triggers makes it so that you need to be more rigid and say the exact phrase you want.
3.) SmartThings and TTS isn’t working great. If you’re using a “virtual device” like the stuff @ule has created, then it should work. But going directly to a Sonos or Samsung Speaker probably won’t. That’s why I included the push notification option.

Feedback appreciated.

1 Like

thanks for sharing your work. I’m having trouble with the close trigger. Open works fine but close does not work… It doesn’t seem to activate the relay when trying to close. To isolate, I can’t even trigger the close from the smartthings. Is there anything I need to do for the close trigger?