How to use SmartThings to have Alexa do something without speaking to it
WARNING -WARNING - WARNING
In late April 2020, Samsung released a new smartthings skill for Alexa. If you are using the previous skill and you disable it, you will not be able to go back to it. Instead, when you re-enable the skill, you will get the new one. And a new one has some bugs. See the community discussion
As of November 2018, you can now use smartthings to automate Echo events without having to speak to an echo device. So you can use this to integrate with devices that echo can control but that are not available to smartthings and do not have an IFTTT channel. You can also use this to have echo speaker specific phrases when certain events happened, like the door opening or the laundry finishing.
It’s simple. 😎
- 1 To Control Devices
- 2 Code for a Virtual Device which will Show Up as Both a Contact Sensor and a Switch
- 3 To Make Echo Speak a Custom Phrase or Play a Standard Sound Effect
- 4 Activating Your Virtual Device
- 5 Blog article with step by step screenshots for the new V3 app
- 6 Official Amazon Help Page for Echo Routines
- 7 Triggering an Echo Routine with an Echo Button
To Control Devices
Anything which can be turned on/off in an echo routine (not a smartthings routine) Can now be controlled from smartthings.
That’s because an echo routine can now be initiated by a contact sensor opening or closing.
And smartthings allows you to create a virtual contact sensor which looks just like a real contact sensor to Alexa.
Even better, smartthings allows you to create a virtual device which looks like both a contact sensor and a switch to both smartthings and echo. When you turn the switch on, it makes the contact sensor look like it is open. When you turn the switch off, it makes the contact sensor look like it is closed.
So now you can turn that virtual switch on and off with any smartthings automation, including the official smart lights feature, that will make the virtual contact sensor look like it is open or closed, and that can trigger an echo routine.
SmartThings control of anything which can be turned on/off in an echo routine. 😎 which now includes an Xbox.
Code for a Virtual Device which will Show Up as Both a Contact Sensor and a Switch
The following post includes the code for a virtual contact sensor which is also a switch, so you can use that one. forum post including the code for a virtual sensor/switch
If you have never used custom groovy code before, see the article on how to install custom groovy code to your account.
Since SmartThings’ support of Groovy code will be going away soon, if you are interested in trying the Beta Edge Driver as your virtual device (Edge Drivers replace groovy DTHs in the new architecture), see the following thread:
To Make Echo Speak a Custom Phrase or Play a Standard Sound Effect
You can use the same virtual device method to trigger an echo routine that will make echo speak a custom phrase. If you only need it to happen on one device, choose the “ Alexa says” action under the echo routine when you add a new routine. But if you want it to happen on multiple devices, choose the “messaging“ action under the echo routine when you add a new routine, and then choose the “announcement“ option. You will then be able to choose specific echo devices or all echo devices to speak the announcement that you are going to trigger.
If you want a standard sound effect like a doorbell chime or dog barking, choose “Sounds” for the action.
Activating Your Virtual Device
To activate your virtual device so Alexa can use it, do the following steps:
1) create virtual device in the IDE
2) use the smartthings app to approve Echo access to that device if you don’t have “all devices” approved.
3) use the Alexa app to disable the smartthings skill.
4) log out of the Alexa app.
5) log back into the Alexa app.
6) re-enable the SmartThings skill.
7) ask Alexa to discover new devices
Your virtual device should now be available to trigger an echo routine.
Blog article with step by step screenshots for the new V3 app
If you are using the new V3 smartthings app and you would like to see examples with screenshots, check the following blog article.
Official Amazon Help Page for Echo Routines
Triggering an Echo Routine with an Echo Button
We should also mention that as of November 10, 2018, Amazon echo buttons (two for $20, about the size of a deck of cards) can also trigger an echo routine. So you can press the button and have the echo routine turn on a virtual switch which then triggers pretty much anything you want in SmartThings. The button won’t be visible to smartthings, but it’s a nice alternative means of control if you already have an echo in that room.