Passing a value from Ask Alexa to WebCoRE and using the value in a wait statement


#1

Is anyone passing arguments from Michael Struck’s Ask Alexa to WebCoRE? I currently have a piston that will suspend LANnouncer announcements for one hour. This is used to silence “motion was detected” announcements when my outside cameras sense motion but it’s actually blowing snow. All the piston does is set a variable that determines if announcements are made to false, waits one hour, and then sets the variable to true so alerts are generated again.

I’d prefer to say something along the lines of, “Alexa, tell the house to suspend motion alerts for x hours.” Ask Alexa would pass the value of x hours to WebCoRE and the piston would then wait for x hours and then set the announceMotion variable to true. It seems simply enough but I can’t figure out how to pass the “x hours” value from Ask Alexa to WebCoRE. If anyone has one, an example piston would be greatly appreciated.

I’ve attached a screenshot of the piston I’m using now. I just need to figure how (if it’s possible) to pass a value and use that instead of wait 1 hour.

Thanks for any suggestions anyone has.


#2

Never mind, I was able to find the answer to my question in the Ask Alexa wiki. You can pass parameters from Ask Alexa to WebCoRE using {$args.xParam}.

In case any one is looking for something similar, if I ask Ask Alexa to suspend motion alerts and include a numeric value at the end of the command, the numeric value is passed to a variable and the variable determines the number of hours that the piston will wait. So I can say, “Alexa, tell the house to suspend motion alerts 5” and the piston will wait 5 hours. You have to complete a couple of extra fields in the Ask Alexa macro in order to have the value passed to WC.