I would like to be able to get away from Webcore with ST. I have these pistons that when something happens I will be asked a question and based on my answer Yes or No to Alexa things happen. For instance, if I come home and walk into the house my kitchen speaker will ask me if I want to play my playlist. If I answer yes, it will start my playlist, if I answer no it won't do anything and if I don't answer it will say "sorry to bother you". It is setup with two pistons. One piston just controls the Answer Yes or No and the other piston is the Question. By setting up virtual switches and setting them up as routines in Alexa to turn on depending on the answer, they can be used for multiple questions. I got this from here. I can't figure out how to have the wait time after the question is asked. If this can be done in HE using RM, it would be awesome!
Yes, you can. You just have to break it down into component parts. You start off by creating the virtual switches the way you would in ST. Then, in HE, you create a triggered rule or trigger, to play the voice prompt you want. This rule will also enable to private boolean of two other triggers. Those triggers will have the trigger of, you guessed it, turning on Yes or No. That trigger can either trigger another rule or action of whatever you want. Then it will also set the PB to false for both Yes and No triggers. So, for each question, I see the need for 3 triggers. 1 to ask the question and two to deal with the answers. You would also want to have built in Logic within the 1st question trigger to set the PB back to false for the two questions just in case you don't answer in time. That way they are not sitting out there forever and able to be triggered the next time (if you have multiple questions set up). I've never really thought of using an approach like this but I think i might give it a try.
It works with WC but I am not sure how to get the wait time for the answer? Post if you get something figured out.
What do you mean "the wait time for the answer"? You can answer in whatever time you want. You first have to say the wake work, Alexa, and then answer yes or no. You just can't answer yes or no...you have to wake Alexa up first.
Yes I suppose so because it is the answer that is going to switch on the Yes or No switch. And you say that you would set the PB to false if there is no answer. So that must be timed.
If this can be done in HE it will really open up the dialogue for having your home ask you questions and things happening. Because the virtual switches can be used for any question.
I set this up using my GH device to try it out and I will definitely not use it:
- The loud noise at the beginning of the TTS announcement.
- Having to say "hey google" before the response. Because google didn't ask the question, just played the MP3 file for the TTS, continued conversations doesn't keep the connection open to wait for a response. Now, a broadcast might...but my cast-web-api is down and i'm trying to fix it.
So, yeah...it's cool. But there are just too many things that prevent it from being really that useful. When we are able to get GH or Alexa to actually ask a question through an API or something, then that is going to be really cool.
I had some pistons like that, I keep its on ST, don't need porting to HE because anyway Echospeaks need to use internet.
This was the wait time I was referring to.
That is definitely not possible with GH and I don't believe possible with Alexa either. That's why the original post for this function said that you have to answer with 'Alexa, yes' or 'Alexa, no'. You have to include the wakeword before saying the response.