Fire piston based on how command was sent to switch


#1

Is there a way to have a piston run based on how a command is sent to a switch. It is a virtual switch Amazon Alexa switch (https://github.com/MichaelStruck/SmartThingsPublic/blob/master/smartapps/michaelstruck/alexa-helper.src/alexa-helper.groovy). This allows a stateless switch which can be controlled by Alexa. The switch has commands sent to it by a Smartthings SmartApp (DirecThings) and by Amazon Alexa. Is there a way to fire the piston from just the Amazon Alexa sent commands (see screen shot)? Thank you for any help.


#2

Hi @emax
Never heard of this one before but my immidiate questions are,
1- can you see this switch in WebCore? have you tried adding it?
If it shows up in Webcore most likely you can do stuff…

2 - can you send commands to this switch via IFTTT?

3 - Are you creating an alexa routine to send commands to this switch
IF YES a workaround would be a simulated switch.
Lets say you created an Alexa routine that sends a command to this switch,
You can add a second action to the routine that triggers a simulated switch. (Which is created in ST IDE)
That simulated switch is connected to webcore and can do what ever you want…