FAQ: Samsung SmartThings Button Works but Wont be Discovered by Alexa

Your explanation was really good. I guess on my end, the Alexa app isn’t working properly? It shows the Virtual Device and it’s description is Samsung Contact Sensor, but Alexa is classifying it as a plug/light.

My virtual device also has a description of Samsung Contact Sensor in the Alexa app.
As for the Type, you can edit this. I have a choice of Light or Switch. Not sure if it matters, but I selected Switch.

If you create a new Alexa Routine, select the trigger (“When this happens”), and then click on the Device icon, does your virtual device show up (or do you get the No Supported Devices message)? If it shows up, it should give you “open” and “close” options. If you get the No Supported Devices message, then you may have made a mistake in following the instructions on the wiki.

I tried that at least three times at first and it didn’t work. But I just tried it again now and it works. So weird but thanks for the help!

Happy to “pass it forward”
Glad it worked.

hi guys… first off thank you so much as this has really helped me get 99% there. It has been an adventure with 30+ different threads and wiki articles but I am sooooo close now…lol.

Here is my issue. I have my virtual device set up with the alexa switch handler. I have linked it to my samsung button and I can see them both in my smartthings app and I can see the virtual button in my alexa app. I haven’t seen my issue listed yet so please forgive me if this has already been explained…when creating the triggering in the smart lighting app I set it up to control the virtual button/alexa switch, action is to turn on, when my physical button is pressed, toggle action etc. When I hit the switch though it doesn’t toggle it. every other press of the button I can see on the app where it will trigger the switch off but immediately turn it back on. I can turn it off on the app and then turn the virtual switch back on with the physical button, but cannot get the virtual button to actually turn off via the physical button. Can one of you smartthings/alexa guru’s please help me out on this? thank you so much in advance.

I figured it out…LMAO… after having to sign in and out so many times and redo everything it turns out that smartthings removed my handler and reverted my virtual switch to a smart tv. Once I recreated the handler and assigned it again now it is working. Much thanks to everyone here and all their hard work on this. Truly awesome.

ok, so I have the single tap working no problems… Now correct me if I am wrong here but don’t you have to make 3 virtual switches for every real switch? one for single tap, one for double tap and a third for hold? I believe that is how it is supposed to work, and in the smart things app I have all 3 of the virtual switches turning off and on per each condition. they all show in in the alexa app as well. I am having an issue with having the double tap or the hold to actually trigger though. However I can hit the automation play in alexa and everything works, but they wont trigger from the condition of the virtual switches… can someone help me out on this please? thank you…

Edit after many circles run around on this… solution below.

Last post on this subject but thought that this may help others. So after setting up the single tap switch I set up the 2 other virtual switches. After setting them up alexa discovered them and was even able to use them as a trigger in the app but nothing would happen. All the posts that I read said that if your alexa app didn’t see them that you needed to log out disable the skill and re-login etc… but my app say them so I was going in circles because they were showing switching in the smartthings app and my automations were playing but they wouldn’t trigger… this was with 4 smart things buttons. turns out it doesn’t matter if the alexa app sees them or not, you have to log out and and do the disable re-enable skill for them to actually work. After looking at all the ones that worked on single tap and the other 2 virtual switches for each one I noticed on the switch details in the IDE they showed being used by the smart lighting app but not by amazon alexa. so if you are running in circles go back to the standard Comcast and AT&T advice of powercycle…lol… Do the disable, logout, login, and re-enable and you should be able to trigger with these. Thank you everyone.

Assuming you want each of the 3 different press types of the physical button (single, double, hold) to trigger distinct actions of physical Alexa devices (ie, devices that cant be controlled directly from SmartThings), then you are correct. You will need to create 3 separate virtual “Alexa” (door contact sensor) switches.

I used Alexa ROUTINES to trigger Alexa actions (eg, turning a Kasa outlet on or off) from my virtual switch – though I have yet to create multiple virtual switches.
I selected “Add action” to choose the desired resulting action.
I was able to select my virtual switch as a trigger for the desired action by pressing “When this happens” and then pressing the “Device” icon.

I couldnt find a toggle function in the Alexa app, so I needed 2 routines (one for ON and another for OFF).
But the desired action occurs not only when I press the physical button, but also when I toggle the virtual switch directly from the Alexa app.

I would assume this would work for multiple virtual switches, but I have yet to create more than one.
Hope this helps.

Hi, I followed these steps to the letter and created two device handlers. I removed the SmartThings skill, logged out of Alexa, then logged back in and re-added the skill. Still no luck! How did you get this to work on your end? Any help would be much appreciated! (Photo attached). Untitleddvfb%3Bdfmbfd|690x121

I’m not able to see your attached photo. Nothing happens when I click on the link (not sure why).
So, I cant tell exactly what part is not working on your end.

If you create a new Alexa Routine, and then select “Add action,” “When this happens” and “Device,” do you see anything listed (eg, the virtual switch you created)?

This is the key milestone.

If this doesnt happen, then you need to look back at the IDE and see if your virtual switch (eg, “Alexa Switch”) shows up as one of the Device Types (in the pop-up menu) whenever you create a new device.

If you give me a little more detail as to each step (sorry if this was in your attached photo), I might be able to provide more help.

Once you responded with that, it clicked for me why it wasn’t working! I had not gone it and edited the virtual device type to reflect the new Device Handler codes. I added it and now it shows up in my Alexa devices. Works beautifully! Thank you for giving me the aha! moment!

Glad it’s all working.

I want Alexa to detect when I push the button. Smart Things detects all 3 modes of the ST button Pressed, Double Pressed, and Held. Alexa discovered my ST MultiPurp Sensor and Motion Detector on the first try.

Can you list the names of your device handlers? I’d like to get this button working on Pressed, Double Pressed, and Held

Alexa recognizes motion sensors and contact sensors but does not recognize switches or buttons as triggers. In fact, it won’t recognize a button at all.

So you have to set it up so that each button press turns on a virtual switch which is also a contact sensor. That way when the switch is turned on, Alexa will think that the contact sensor opened.

See the FAQ:

Thanks JD. Be gentle because I’m new to these device handlers. I’m connected to GitHuib so is there a set of Device Handlers to accomplish this?

Just read the FAQ. Follow the steps there exactly for each virtual device that you want to create. That’s all you need. :sunglasses:

Then you can use the official smartlights feature to have the button press turn on the virtual device.

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

I understand this, but really hate it. If they can make Echo Buttons trigger routines, why not other switches and buttons like ST buttons? They don’t even SELL Echo Buttons anymore, which is my beef with this.

Is Echo button technically a sensor, or what?

The echo button is a button, but it’s a button that Amazon knows everything about because it’s their brand and so they Felt comfortable accepting that as a trigger.

My guess would be that eventually they will allow more different kinds of devices to act as triggers, but they don’t announce that kind of thing ahead of time, and we will just have to wait and see what they do.

I am having a hell of a time getting this to work and I think my problem is different than what I’ve read above:

I have created the device handler for the Simulated Alexa Button, created a device with that type, and then the device shows up both in my ST and in the Alexa app (great so far!). I then go to create a routine and am able to select the Simulated Alexa Button as a trigger and I tell it: when it “opens” trigger an outlet to turn on.

BUT, it NEVER works. If I “play” the routine manually from the routine page, it turns the outlet on just fine, but if I turn “on” the simulated button in ST, or even right in the Alexa app, it never triggers the routine.

I even tried using the other device handler for the switch instead of the button and that doesn’t work either.

EDIT: I found the solution! Apparently Alexa just created a new SmartThings “skill” last month and I deleted the old skill and added the new one (just called SmartThings) and it worked fine. In hindsight, i also might have been able to make it work by disabling and enabling the old SmartThings classic skill.