A button is not an actionable device. That is, you don’t turn it on and off by using the app, for example. it doesn’t really have a state like that. . When it is physically pressed, it sends a message to the hub, which then can trigger other events.
So you would do this in a different way than you were imagining. Echo doesn’t have to know the Samsung button even exists.
instead, it would work like this.
you physically press the button
the button sends a message to the hub, which then uses the official smartlighting feature to turn on a virtual switch which is also a sensor ( more on that below)
when the virtual switch turns on, the virtual sensor is changed to “open“
echo recognizes that the virtual sensor opened and triggers the echo routine (not a SmartThings routine) to turn on the Echo compatible, Smartthings incompatible device.
See the community FAQ on how to create the virtual sensor and use it in this fashion:
End result: pressing the Samsung button causes the other device to turn on.
Oh, and the FAQ will take you to a list of steps to follow to get the virtual sensor set up. Make sure you follow them exactly in the order given or you will be able to see the device in your echo app but it will not trigger the echo routine.
DTH equals device type handler. We don’t need to go into all of that right now, but you said in your first post that you changed the button to a sensor. So I assumed that you had changed the DTH. If not, my apologies for any confusion.
Seriously, though, just follow the instructions in the FAQ. There are a lot of people using that method and many of them are not programmers. It should work for you.
And here’s the FAQ on using custom code which will explain the terms and what a DT is and all that if you want to go into it.
But basically it’s pretty simple. You’re just going to copy the code for the virtual sensor from the instructions in the FAQ and then you’re going to paste that into your own account. Then you will use your own account to create a new virtual device which will use that device type handler.
It sounds harder than it is. You just need to follow the instructions.
Once you’ve done that, two new devices will appear in the device list in your mobile app. One will be a sensor and one will be a switch. They will show up in the device choices in the app just like any other switch or sensor.
(My apologies if I went too fast: most people who are already using webcore are familiar with these concepts.)