Initiating Alexa actions from a Piston


#1

1) Give a description of the problem
I would like to use Webcore to send commands to Alexa and to have Alexa carry out the command.

2) What is the expected behavior?
Alexa will perform tasks that I can currently issue to her by voice, instead though I’d would like to use WebCore to do this for me.

3) What is happening/not happening?
Not sure if this is something Ask Alexa can do or could do so here goes.
Alexa knows about all the LightwaveRF kit I have, light switches, power sockets, radiator valves etc. I can ask her to turn stuff on and off and all is good. So the question is… can this be done from a Piston?
There is a way to do this using IFTTT but it’s a bit ‘Heath Robinson’. Webcore can send an e-mail and then sooner of later the Applet runs and the task gets done. What I’d really like to be able to do is cut out the IFTTT middleman and replace it with an Alexa ‘middlewoman’ and get an instant response.

Any ideas / knowledge fellow WebCorists?

Thanks

Conrad.

**4) Post a Green Snapshot of the piston![image|45x37]

5) Attach any logs (From ST IDE and by turning logging level to Full)

REMOVE BELOW AFTER READING


#2

I’m not sure if this is what you’re looking for but I use Michael Struck’s Ask Alexa SmartApp to fire WebCoRE pistons all the time. For example, I tell Alexa, “Alexa, tell the house the dog needs to go outside” and a piston runs that captures switch state and level for all of my outdoor security lights and then turns them all on to 100%. When the dog comes back in, I tell Alexa, “Tell the house the dog came back inside” and a piston runs that sets all of the lights to the whatever settings (on/off, level) they were at when the first “dog needs to go out” piston ran. I use Alexa for simple things but use Ask Alexa to fire pistons for all of my more complex routines. I just create the piston and then add the command to run it as an Ask Alexa macro.

I guess in my case it’s not WebCoRE sending commands to Alexa but it’s Alexa sending commands to WebCoRE to run the piston associated with the command I give Alexa.

Hopefully I understood your question and that helps.


#3

Hi Mark,

Thanks for your reply. Yes, I’d like to do the opposite and use a piston to instruct Alexa to do something she can already do. With the Lightwaverf kit when you say 'Alexa discover new devices she finds everything and I can simply say ‘Alex, turn the office lamp on’ and she does it. The trick I’m after is to tap into the instruction part of Alexa and do the ‘Alexa turn the lamp on’ from a piston.

The reason I’d like to do this is that I’ve build an intruder alarm system entirely using WebCore pistons and can for instance say ‘Alexa turn on the intruder alarm system’ and she does. I got this to work quite simply by setting up a simulated switch called Intruder Alarm System which Alexa then discovered. I use these simulated switches for other things and they work really well. Anyway, back to what I want to do. When The intruder alarm system is switched on I want to turn off non-essential devices (you should see what my kids leave powered on) and also turn off the central heating. I can do this now using IFTTT but as I mentioned earlier it’s a bit ‘Heath Robinson’ and slow. I did see some Groovy code that could tap into the Lightwaverf API but for the life of me I haven’t been able to get that to work and I don’t want to add in a raspberry pie hence thinking about the Alexa route.

So, back to my original ask, is there a way to tap into Alexa (can Ask Alexa do this?) or alternatively get the groovy code to work?

Thanks

Conrad.


#4

Short version, you can’t… … Sorry. Alexa does not support being triggered from an external source.

Slightly longer version… A portion of what you ask (and probably not the part you want) is on Amazon’s road map. They are going to allow external sources to send notifications in. See: https://developer.amazon.com/blogs/alexa/post/8cc45487-d5fb-413b-b6c7-eeea4794d10c/amazon-announces-notifications-for-alexa-feature-is-coming-soon-sign-up-to-stay-tuned

As to being able to send in ‘Alexa, do this supercool thing’ from off-device… It’s probably a way off.


#5

Hi Nathan,

Thanks for your insight and taking the time to respond. I’ll watch out for future developments.

Thanks

Conrad.


#6

I apologize for reviving this old thread, but for those watching this topic, I have good news.
I have found a way to use webCoRE to control every aspect of an Amazon Alexa Echo…

Depending on what you have laying around the house, your investment may only be $5

My full writeup can be found here: