Can Alexa run a piston or modify a WC variable?


Is there any way to have Alexa run a piston or set a variable in WC? I’ve created a bunch of virtual switches that I turn on and off via Alexa in order to trigger pistons and I’d like to get away from that approach.

It’s probably wishful thinking, but I’d see if there was a way to have Alexa run a piston without the use of virtual switches? Either directly or by setting a WC variable to a particular value. I was previously using Ask Alexa that has become cumbersome due to the amount of pistons I want to run via voice command.


Well, here’s a way to get WC to run an Alexa routine (thru Echospeaks, specifically), but it sounds like you want the opposite.

Unfortunately, Alexa doesn’t recognize WC, so there’s no direct control. That said, WC Pistons can be started from variables (If thermostat temp > x then blah blah blah.). What kinds of automations are you trying to come up with?


Are you trying to make something happen within Smartthings from Alexa?


That’s correct, I want to give Alexa a command and have a piston run based on that command. Right now, I’m creating virtual switches and then creating pistons that execute when the switches change to on or off. I then tell Alexa to turn on or turn off the virtual switch in order to get the piston to execute. Unfortunately, this means I have a ton of virtual switches. I was hoping there was a way to give Alexa a command and have a piston run. Basically I want to remove virtual switches from the equation. I don’t think it’s possible right now but thought I’d ask.


Currently, Alexa cannot send web requests directly…
(So she cannot use the “External URL” to fire a piston)

The easiest way is to have Alexa change a device that webCoRE can monitor.
(IE: using Simulated Switches)

If you find yourself with too many SimSwitches (too much clutter)… here are a few tips:

I like to label all my SimSwitches to start with the letter “V”. For example:
Name: Quick Light
Label: VQuickLight

This lets me call the device normally thru Alexa, (turn on Quick Light), but also keeps all my SimSwitches neatly grouped together when looking at my list.

Additionally, if you have a good memory, it is possible to create a single Simulated Dimmer Switch, which can trigger up to 99 different pistons. For example, I have one called “Body Temp” which I use to tell my house how hot or cold I feel at the moment. Depending on my voice command, it executes one of 5 pistons.

Alexa, turn Body Temp to 10… (means I am very cold)
Alexa, turn Body Temp to 30… (means I am cool)
Alexa, turn Body Temp to 50… (means I am just right)
Alexa, turn Body Temp to 70… (means I am warm)
Alexa, turn Body Temp to 90… (means I am very hot)

(Note: If you go this route, do NOT use level 0 or 100 in your programming)

So basically, different voice commands all change the one device… but different actions take place depending on which number I change the “Dimmer” to.


Yes, I want to give Alexa a command and have “her” execute a WebCoRE piston. I execute pistons from Blue Iris via HTTP commands but to my knowledge that’s not something Alexa supports.


She can, but only indirectly at this time.

If you are a programmer, one advanced technique is to create your own (unpublished) Alexa Skill. You can make the invocation word anything, and Skills have the capability of sending web requests.

One note though. You will spend much more time creating (and modifying) your Alexa Skill than the time spent creating SimSwitches.

It is a fun project, although the process is quite a bit convoluted.

Pro Tip:

A single Alexa Skill can trigger different pistons here in webCoRE, IF you are willing to give TWO verbal commands. (one command to start the skill, and one to target the piston)

A more time involved method can make a single action per Skill. This is a lot more programming work, but it can trigger a piston immediately after the invocation phrase.


I almost forgot… An Alexa Skill CAN be programmed to accept a long phrase…
(the invocation phrase followed by the utterance or specific command)

So for example, if your Skill is called SmartHome, one phrase might be:

But keep in mind that every single possibility (after invocation) has to be programmed in advance.
(I usually create multiple story boards to show various paths before even programming one line)

It is also worth making a few alternative Utterances & Slot values which trigger the same thing.
(since all family members will not remember exact phrases)


Yep. Experienced that one myself.


And that can get totally crazy!
Occasionally, I will print out a list of commands that I have programmed (3-5 sentences) and tape that list to my wife’s bathroom mirror. Then she can visually and mentally get used to using the phrases that I have chosen. The WAF seems okay.