I just moved to a Smartthings hub and bought a Linear GD00Z-7 garage door opener and have been searching for 'how-to’s to integrate it with Google/Alexa voice control. I saw many different posts, but they all have been older and it seems Alexa (etc) ‘don’t work that way any more’ (at least for me). So I struggled through getting this to work myself and thought I’d post my method here for others to use.
WARNING: Please understand that this overcomes some basic home security - it can possibly allow unwanted persons to shout through a window and open your garage, so USE AT YOUR OWN RISK.
Setting up the Garage Door Opener:
First make sure your Garage Door Opener is installed and associated with a working Smartthings device handler, so that you can Open and Close the door from the Smartthings app. If not, the rest of this (obviously) will not work.
In the steps below, I found it was important to use cryptic, yet easily recognizable ‘names’ for the various items below and NOT use “GarageDoor” everywhere. If nothing else this saves Alexa/Google confusion when trying to use voice commands. You can just follow the ones I’ve used below, or use your own. Just don’t get them mixed up!
On Smartthings IDE:
Login to the IDE @ https://account.smartthings.com (updated link )
Create a pair of Virtual Switches (one for opening and one for closing the Garage Door):
- For opening the door:
-
Click 'My Devices'
-
Click the 'New Device' Button
-
Enter a 'Name' for the device, I suggest "GDVirtOpen".
-
'Label' can be left blank.
-
Enter a 'Device Network Id' either use https://www.uuidgenerator.net/ to generate one, or enter your own unique ID, ex. "GAR111"
-
'Zigbee Id' should be left blank
-
Select a 'Type' from the dropdown, this should be 'Virtual Switch'.
-
'Version' should be 'published'
-
'Location' should be your hub location, probably 'My Home'
-
'Hub' should be your hub name.
-
'Group' can be left blank.
-
Click 'Create'.
- Repeat for closing the door:
-
Click 'My Devices'
-
Click the 'New Device' Button
-
Enter a 'Name' for the device, I suggest "GDVirtClose".
-
'Label' can be left blank.
-
Enter a 'Device Network Id' either use https://www.uuidgenerator.net/ to generate one, or enter your own unique ID, ex. "GAR111"
-
'Zigbee Id' should be left blank
-
Select a 'Type' from the dropdown, this should be 'Virtual Switch'.
-
'Version' should be 'published'
-
'Location' should be your hub location, probably 'My Home'
-
'Hub' should be your hub name.
-
'Group' can be left blank.
-
Click 'Create'.
On Smartthings App:
Create a pair of Automations to ‘monitor’ the above virtual switches and translate their operation to trigger the opening/closing of the Garage Door:
- For opening the door:
-
Click Add (+ sign) and select 'Automation'
-
On the 'If' stage, click '+' and select 'Device status'
-
Select the open garage virtual switch you created above, ex. "GDVirtOpen"
-
Choose the 'On' state, click 'Save', then click 'Next'
-
On the 'Then' stage, click '+' and select 'Control Devices'
-
Choose your actual Garage Door device - NOT the virtual switches from above! (In my case "Garage Door"). Click 'Next'
-
Tap on the Garage Door device line and select 'Door control' then select 'Open'
-
Click 'Save'
-
Back on the 'Then' stage, click '+' again and select 'Control Devices'
-
Select the open garage virtual switch you created above, ex. "GDVirtOpen". Click 'Next'
-
Tap on the virtual switch device line and select 'Off' (this will reset the virtual switch after each use)
-
Click 'Done' and choose an Automation name, I suggest "GDAutomOpen"
- Repeat for closing the door:
-
Click Add (+ sign)
-
On the 'If' stage, click '+' and select 'Device status'
-
Select the close garage virtual switch you created above, ex. "GDVirtClose"
-
Choose the 'On' state, click 'Save', then click 'Next'
-
On the 'Then' stage, click '+' and select 'Control Devices'
-
Choose your actual Garage Door device - NOT the virtual switches from above! (In my case "Garage Door"). Click 'Next'
-
Tap on the Garage Door device line and select 'Door control' then select 'Close'
-
Click 'Save'
-
Back on the 'Then' stage, click '+' again and select 'Control Devices'
-
Select the close garage virtual switch you created above, ex. "GDVirtClose". Click 'Next'
-
Tap on the virtual switch device line and select 'Off' (this will reset the virtual switch after each use)
-
Click 'Done' and choose an Automation name, I suggest "GDAutomClose"
On Alexa App:
Confirm Alexa has found the virtual switches… click on ‘Devices’ -> ‘All Devices’ and scroll though and verify you can see the switches you created in Smartthings above.
At this point, you should be able to say “Alexa, turn on GDVirtOpen” and have it open the garage door. But that’s ugly, so one more stage:
Create a pair of Routines to add sensible voice controls to trigger the open/close of the Garage Door:
- For opening the door:
-
Click the 'Hamburger' icon on the top left and select 'Routines'
-
Click the '+' icon on the top right and then click on each of the following in turn:
- Leave ‘Enter routine name’ blank
- Click ‘When this happens’, click ‘Voice’ and enter “open the garage door”
- Click ‘Add action’. Scroll down and click on ‘Smart Home’, then click ‘All devices’.
- Select the “GDVirtOpen” switch you created above and make sure ‘Power’ is ‘On’. Click ‘Next’.
- Click Save.
- Repeat for closing the door:
- Click the ‘+’ icon on the top right and then click on each of the following in turn:
- Leave ‘Enter routine name’ blank
- Click ‘When this happens’, click ‘Voice’ and enter “close the garage door”
- Click ‘Add action’. Scroll down and click on ‘Smart Home’, then click ‘All devices’.
- Select the “GDVirtClose” switch you created above and make sure ‘Power’ is ‘On’. Click ‘Next’.
- Click Save.
On Google Home App:
Confirm Google Home has found the virtual switches… scroll though the home screen and verify you can see the switches you created in Smartthings above.
At this point, you should be able to say “Hey Google, turn on GDVirtOpen” and have it open the garage door. But that’s ugly, so one more stage:
Create a pair of Routines to add sensible voice controls to trigger the open/close of the Garage Door
- For opening the door:
-
Click the 'Routines' icon near the top
-
Click 'Manage Routines' at the bottom, then click '+ Add a routine'
-
Click 'Add commands' and enter "open the garage door", click 'OK'
-
Click '(Assistant will) + Add action', enter "Turn on GDVirtOpen", click 'Add'
-
Click 'Save'
- Repeat for closing the door:
-
Click '+ Add a routine'
-
Click 'Add commands' and enter "close the garage door", click 'OK'
-
Click '(Assistant will) + Add action', enter "Turn on GDVirtClose", click 'Add'
-
Click 'Save'
Notes in the form of Question/Answers
Q: Why use a virtual switch at all?
A: Because Alexa and Google won’t allow direct operation of a door opener or lock ‘for security reasons’, so we have to add a layer of abstraction. We could use a Simulated Switch or Button here, but I understand that Virtual Switches are processed locally, whereas Simulated ones are processed in the cloud, so I prefer to use the former.
Q: Why two virtual switches, instead on one that is on/off?
A: Because there’s no way to associate the state of the door with a single switch. If someone opens/closes the door manually, the switch will get out of sync.
Q: Why do we need the Smartthings Automation?
A: This is required both to operate the garage door AND to reset the virtual switch to OFF again, once it has been turned on - in other words emulate a button press. Again it may be possible to use a Simulated Button here, but I have not tried that - and again, it involves ‘the cloud’.
Q: Why create the Routine in Alexa/Google Home?
A: To associate natural speech commands to open/close the garage door (instead of having to say “turn ON the [garage door]” for example).
Q: How can I tell if the Garage Door is open or closed just by asking Alexa/Google?
A: You can just ask “Is the Garage Door open?” (assuming your opener’s Smartthings device name is “Garage Door”). Google/Alexa will reply “The Garage Door is [Open|Closed]”.