Using a SmartThings Virtual switch to trigger an Alexa announcement?

We have a Honeywell Siren that gets triggered if our Smart Home Monitor is set off by an intrusion. It will wake the dead in the next town. Instead, when we are home, I would like Alexa to just announce to us that there has been an intrusion detected. Since there are a lot of switches and sensors that can cause an alarm condition it would take a lot of Routines to cover all the possibilities. I have Alexa announcing when the front door opens so I know how to do that with an actual contact switch. I have a virtual switch set up that is turned on if the alarm trips but I can not ā€œseeā€ that switch with the Alexa Routines to trigger an announcements. I have been reading threads all morning trying to find whether or not someone has figured this out but could not find anything that fits my need. So I guess my more direct question is Can I get SHM to trigger an Alexa announcement either directly or via a virtual switch?

Is your switch visible in the Alexa app as a ā€œdeviceā€? If not, ask Alexa to ā€œdiscover devicesā€ and see if it shows up.

You can definitely do this, but thereā€™s a trick to it. Echo routines can only be triggered from a sensor, not a switch. But you can create a virtual device in smartthings which is both a switch and a sensor. This allows you to turn it on and off like a switch, but Alexa will see it as A sensor opening and closing and you can trigger the routine off of that.

Complete instructions are in the community FAQ. This is a very popular use case. :sunglasses:

FAQ: Can I trigger an Echo Action without Speaking to It?

5 Likes

So I have the virtual sensor working and if I manually change it from closed to open it does trigger the Alex announcement. What I am having trouble with now is how to change the status of that sensor when the alarm is triggered. I have tried using Webcore but I am not sure what variable I need to use that changes when the alarm is tripped. Is there any documentation that explains the various $ variables and what they do/how they work?

Iā€™m not sure exactly what works with STHM (smartthings home monitor in the new V3 app). In the classic V2 app, you can add a light to come on When the SHM ( Smart home monitor) is tripped, so you just put your virtual device as a light in that automation. Since it is both a switch and a sensor, you should be able to include it in any automation that works with light switches.

For WebCore-specific questions, ask in the webcore forum, and the experts there will be glad to help you. :sunglasses:

Introducing the new webCoRE Community Forum

I think part of my issues that I have been able to create the virtual switch and the virtual sensor but not one device that is both things. So I can not change the state of the virtual sensor with the alarm but I can switch the switch but Alexa can not see the virtual switch. Can you point me to instructions on how to create the combination device?

The code link you need is included in the community FAQ that I posted previously. :sunglasses:

http://thingsthataresmart.wiki/index.php?title=How_to_use_SmartThings_to_have_Alexa_do_something_without_speaking_to_it

Thanks for that link JD. I have been able to accomplish what I wanted without resorting to any custom code. I created a virtual switch and a virtual motion sensor. Since Webcore can see both I use it to change the status of the virtual sensor to OPEN based on the status of the virtual switch, which I can turn on with SHM. I then have a Smartthings Routine to clear and restest all of this and a Webcore to reset the virtual motion sensor. ā€œIt works for meā€ and at least I understand what is happening and how to maintain it. :>)

1 Like