Smarthings button integration with Alexa routines


#21

I’m all in for going down the rabbit hole if my pockets are deep enough. :grin:


#22

Amazon does not really want other devices to control Alexa, but it is definitely possible with webCoRE.

The basic concept is that webCoRE can “open” a Simulated Contact Sensor (created on the IDE webpage), and then Amazon takes over with the routine.

If you really want to use a Routine in Alexa, the trigger in:
Alexa > Routine > When this happens > Device > Contact Sensor
can point to the new SimulatedContactSensor you just created.

This way, any programming you do in webCoRE, can decide when to open that Simulated Contact Sensor, thereby activating the associated Routine.

In your case, the piston would basically be:

IF SmartThings Button is pressed
Then 
    Open SimulatedContactSensor   (this triggers the Alexa Routine)
    Wait 5 seconds
    Close SimulatedContactSensor  (this resets it for the next run)
END IF

A bit convoluted, I admit, but a decent way to bypass the current limitations on Amazon’s end.


All that being said, my two cents still goes to re-creating the routine in a webCoRE piston. It will be a great learning experience, and the end product will be so much better than Alexa’s capabilities.


#23

@WCmore What he said!!


#24

Thanks again for your input on this,already I’m loving this forum there’s so many people willing to help.
Now because I’m new to all this should I attempted this routine/action or should I start with something more simple to wet mi whistle sort a speak.
Cheers kev


#25

To be honest, both are good approaches…
Personally, I usually program based on priorities,
but either path will be a great learning experience.


#26

Can I use webcore mobile app to build these pistons or do I need to usexa desktop version.

If desktop is Apple Mac supported.

Thanks kev


#27

I have used both the mobile app and desktop. I MUCH prefer desktop when designing and debugging my pistons. Maybe just me though…


#28

I use MAC, the desktop version is not a software it’s just a webpage. So any browser would do it.


#29

My preferred method is using a web browser on a computer.


#30

I’m trying to register with webcore but webcore doesn’t appear in the smartapp section of my smarthings app🤔 just going to watch a YouTube video on webcore installation to see if I can sort it.


#31

On the computer:

On your phone:

  • Load SmartThings
  • Automation > SmartApps > webCoRE
  • Register a browser

Then type the code into the computer browser.
You only have to do this once (per browser)


Ooops, I just noticed you said:


#32

When I click on the link it takes me to the page to add a code but no where in the page does it say register instance.
Also when I follow the install video I get as far as clicking the link for GitHub integration, I click on that which opens a page but the page on the video is step 1 authorize but when I click the link it takes me to step 2🤔 add smarthings as a collaborator.


#33

If you are having trouble installing webCoRE, I would recommend starting a new thread in the “Piston Design Help” category. Your question will get much more exposure there.


#34

Ok cheers


#35
IF SmartThings Button is pressed
Then 
    Open SimulatedContactSensor   (this triggers the Alexa Routine)
    Wait 5 seconds
    Close SimulatedContactSensor  (this resets it for the next run)
END IF

Question…

Is it okay to assume that Alexa will respond to the device in 5 seconds?

I’m thinking about putting the 5 second delay in an Alexa routine and then having the routine turn off (close) the virtual device instead of depending on it always catching the event in that time.


#36

Alexa should catch the Open command in time…

I don’t use Alexa Routines much, so I am not 100% sure if the Close command will abort the Routine or not. (extending the WAIT could help with this)

Although, I like your idea to have the Routine close the SimSensor as the very last command.


#37

So this is a question that I have had. I can reset my switches in the Alexa routine or in webcore. Which is the better option? Both methods seem to work well. Most of my use for this is an Alexa routine that is triggered by a vocal command, which turns on a switch, which is a trigger for a piston. I can either reset the switch at the end of the piston or the end of the Alexa routine.


#38

Yes. LOL

The only thing I would add is I (almost) always make the “reset” the very last command.

  • For me, it’s usually Alexa triggering webCoRE, so I reset at the end, in webCoRE.
  • If webCoRE “triggered” a Routine, then I would likely reset as the last command in the Routine.

(just keep in mind the reset will trigger the piston, regardless)