Skip to content

Instantly share code, notes, and snippets.

@roubles
Last active September 17, 2017 03:25
Show Gist options
  • Save roubles/a0f4730e72f99d6c0eb9e73e6241593f to your computer and use it in GitHub Desktop.
Save roubles/a0f4730e72f99d6c0eb9e73e6241593f to your computer and use it in GitHub Desktop.

Using Alexa to Open and Close your garage door

This guide assumes a functioning Zwave garage door opener configured with Smartthings. As of this writing Alexa does not support opening and closing garage doors natively. So, some sorcery is required.

Create a routine that opens your garage

Just create a routine, say, "Open garage door" and configure it open your garage door.

Create a routine that closes your garage

Just create a routine, say, "Close garage door" and configure it open your garage door.

Create a virtual switch that Alexa can control.

We first create 1 virtual switches, via the Smartthings IDE. Lets call it the Virtual Garage Door Opener.

Create a Smart App that ties the virtual switch to the routine

We create a smart app instance, of Switch Activates Home Phrase, via the Smartthings app:

Pick switch, Virtual Garage Door Opener When it is ON, select the routine: Open garage door When it is OFF, select the routine: Close garage door

At this point, your virtual switch controls your garage door. When it is turned on, the garage door is opened. When it is turned off, the garage door is closed.

Synchronization of garage door with virual switch

There is one subtle issue. When the garage door is manually opened the virtual switch is out of sync. For this we use CoRE pistons.

  • Install one CoRE piston, When garage door is opened, turn on Virtual Garage Door Opener switch.
  • Install one CoRE piston, When garage door is closed, turn off Virtual Garage Door Opener switch.

Create a group in Alexa that controls the virtual switch

Create a group called 'Garage' in Alexa Add the Virtual Garage Door Opener Switch to this group Now, when you say, "Alexa, turn on garage", the garage will open. And when you say, "Alexa turn off garage", the garage will close.

At this point you should be set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment