Using Contact and Motion Sensors to Trigger Alexa Routines (DTH in post 97) (Official Amazon Feature)

did you select the simulated switches in the ST Amazon Echo app and then tell your Alexa to discover devices?

1 Like

I started the entire process over again, deleted what I created, recreated with new names/IDs… and now it’s working!! I don’t think I actually did anything different, so I still done know what the problem was.

Thank you for your help.

1 Like

I am also experiencing this issue so any feedback would be great. I have a simulated contact sensor that I open or close through webcore and have a routine in Alexa that should trigger off of the state change. However, it does not seem to react as expected. When I change the routine’s sensor to a physical contact sensor, the routine triggers properly. I have tried deleting and recreating the virtual sensor to no luck.

Never mind… I read further up in the thread. Disabling/Reenabling the Alexa skill fixed the issues for me.

1 Like

I love this… this opens a whole new world of possibilities!

Now, if I could only get SmartThings, Alexa, IFTTT and WebCore to unclog my tub drain…

2 Likes

As for querying Alexa… I added my sensors to groups.

Example: I have a Bosch Motion Sensor in my living room that also senses temperature. I added that sensor to a group in Alexa called “Living Room” that also has all the living room lights in the group. Now, I just ask, “Alexa, what’s the temperature in the Living Room?” and she will respond with, “The Living Room temperature is 72 degrees”.

For sensors not in a group:

I can ask “Alexa, is the Back Door Sensor open?”, and she will respond with, “The Back Door Sensor is closed”.

As long as you ask for the name of the device, she will respond. It has to be the name that is in the Alexa App for the device.

So, I need to go and rename some things, because in order to get the temperature of the Rec Room, right now I have to say, “Alexa, what’s the temperature of the Rec Room Motion Detector?”

3 Likes

Just started messing with action tiles. I am going to attempt making a simulated switch on ST to play “rock music” on Alexa.

So I’m hoping that Action Tiles can open/close the simulated switch and when open, Alexa is able to play a rock music station / playlist.

Will keep you guys posted and if you have any suggestions, let me know!

I have a simulated contact sensor, and in ST, I can just click on it, and it opens and closes. So, you should just be able to place the simulated switch on Action Tiles and click it.

nope, can’t click on a simulated contact on Action tiles. So instead, I setup a quick simulated switch when clicked “on” (through webcore) makes the simulated contact sensor “open” to then play music.

The challenge now is stopping the music lol. No where on the Alexa app is there a way for the music to stop playing if a contact “closes”

I tried creating another simulated contact sensor, and tied it to an Alexa Routine. If the simulated contact sensor is OPEN, then say “Alexa…stop”.

I had Alexa play music and then triggered the routine.

But, I guess Alexa doesn’t listen to herself.

1 Like

Yeah, the music kept playing, right?

That’s correct, and is actually an intentional design feature. Echo blocks whatever it’s hearing, which allows it to better hear other commands from a person in the room. The physics are pretty interesting. And of course it also keeps it from being triggered by the command word if it’s on a podcast. :sunglasses:

Yep, but seems like there is no way to cancel the music without activating Alexa via voice. Wish if the contact sensor changed to “closed” we could cancel music. I’ll test for any work around tomorrow…

As a workaround, set up a different echo routine for the close and have it play a short sound clip of Anything you like. Then when that ends the music will have stopped. :sunglasses:

3 Likes

You could put an additional Dot next to your Echo and send the speech output there :slight_smile:

2 Likes

Thanks guys, I found a 4 second song of a “match lighting” that works great. Lol can hardly hear it

1 Like

So is there a way to purge and totally delete all my smart home devices in the Alexa app? I disabled the skill. They are all still there…gonna take forever if I have to go and delete them all one by one…

I noticed a “Forget All” button at the bottom of the page if you look at the devices using http://alexa.amazon.com

PERFECT. Thank you!

Quick note in case anyone doesn’t know this already:

I had a mix of virtual devices and was confused as to why ALL of them are in Alexa’s Devices, but only a few are in Alexa Routines. The only ones that appear in the latter (so it seems) are virtual Contact Sensors and Motion Sensors. IF you change a simulated switch to simulated sensor you’ll need to go into Smart Home in Alexa and re-Discover Devices before it can be used in a Routine.

This is awesome for me as I just worked with a great coder to create a very complex security piston in webcore that also uses Tasker to play media and such on entry (in tandem with a Fire tablet, Konnected, ActionTiles, etc.) For an EXIT we can now just create this simulated sensor and have Alexa say, “Remember, you have 60 seconds to exit or the alarm will go off. Have a safe trip.” Brilliant!

3 Likes