Echo and Google home only recognize some device classes, specifically lights, switches, thermostats , and maybe locks.
The official SmartThings/Alexa integration can run routines, but only routines that are limited to the device classes above.
IFTTT has the same issue. The SmartThings service/channel can turn a single device on or off, but it doesn’t show routines or modes or smart home monitor status.
So how can you use your voice assistant or IFTTT to change your mode, unlock a lock, or change smart home monitor armed status if the voice assistant/IFTTT won’t work with those kinds of devices?
Fortunately, it’s easy. All you need to do is create a virtual switch and then have that virtual switch coming on turn on whatever routine you want.
The echo/GH/IFTTT won’t even know that the routine exists, it just thinks it’s requesting that a switch be turned on.
But since a routine can run automatically once a switch comes on, that’s all you need.
- create a virtual switch and give it the name that you want to use with echo. I’m going to call mine “nighttime.”
-
create a routine that does whatever you want. It could change the mode. It could set the smart home monitor armed state. It could unlock the lock. It doesn’t matter because echo will not even know that this routine exists.
-
towards the end of the new routine, choose the “automatically perform” options. Here you are going to specify that the routine should start automatically when your new virtual switch comes on.
If you use a momentary switch, it will turn itself off again as soon as echo turned it on, so it will always be ready for the next time.
If you use a binary switch, you should put turning that switch off inside the same routine, again, so it will be ready for the next time.
- now you just have to authorize that switch for use by Echo. So go to the smartapps tab under automations, select the alexa smart app, and make sure your new virtual switch is authorized.
Then tell echo to “discover new devices” and you’ll be ready to use your new switch! Which in turn will trigger your routine, no matter what the routine does, echo won’t care.
The next time I say, “Alexa, turn on nighttime” my routine will run.
I believe Google Home will pick up all switches anyway, otherwise there should be a similar authorization step. But the main point is the same, the voice assistant doesn’t know it’s running the routine, it’s just requesting that the switch turn on.
(We used to have a much longer FAQ for this because you used to have to add an additional smartapp in order to run the routine when the switch came on, but now that is built into routines themselves, so now it’s easy. Create a switch. Have the routine automatically run when that switch comes on. Authorize echo to use the switch. Done. )
More Uses: Daisychaining Routines, IFTTT changes Mode, etc
By the way, this is also how you have one routine trigger another routine. Have the first routine turn on a virtual switch and have the second routine run automatically when that switch comes on. Again, just remember to turn off the virtual switch again in that second routine so that it will be ready for the next use. You could also have multiple routine subscribe to the same virtual switch if you want. It just depends on exactly what you need.
And steps one and two are how you get IFTTT to run a SmartThings routine. Have turning the virtual switch on be the “THAT” in your IFTTT applet. Now you can have anything you want be the “IF” and the result will be a routine running in SmartThings. And that routine could change the mode, change the smart home monitor armed state, turn on a group of lights, etc.
All of these work because a routine can run automatically when a virtual switch turns on.
Changing the “If” in IFTTT
The same method can be used to create an “IF” condition in an IFTTT applet.
Just have a routine or smart lighting automation or webcore turn on a virtual switch, and then have that virtual switch be the “if” in your IFTTT applet.
That way you can have very complex logic for firing the applet if you need it.