WebCoRE asks a question, my voice response determines the action

text-to-speech
answer
query
voice
alexa

#127

I finally thought of the other instance that I mentioned earlier that I’ve experienced where Alexa asks a question on her own, waits for a response and then acts on your answer.- causing a conflict as discussed above.

As time passes and she gets smarter, Alexa has started to ask some questions about things she notices which are different from your normal schedule or way of doing things. For instance, if your household normally turns off a group of lights around the same time every night, she’ll notice that one of the lights wass left on when the others get turned off. At that point, she’ll say something like, ‘I noticed that you haven’t turned off the kitchen light yet. Would you like me to do that for you?’ She’ll expect a yes or no response - which is when the conflict happens.


#128

This is awesome. Just incorporated this into a piston. Basically between a certain time if the tv turns on then ask if I want to hear the weather. Likewise when the tv turns off during a certain time ask the question again. The former targets me and the latter targets my wife.

Works great. My only gripe is having Sonos ask the question and then having to say hey google yes or no.

Thanks @WCmore


#129

Great work, this is one useful CoRE. For my first test, when I set the Good Night routine, it checks to see what I left open and reminds me which doors are open, then asks if I want to shut the garage door. A yes answers shuts the door.

This is how I envision smart home tech working.

I’m currently testing with Alexa (Alexa Speaks) but prefer to use the Google Assistant. Anyone have any suggestions how to use Google Assistant? I would like to push notification to google assistant then respond.


#130

Brilliant execution, @Koyfam!

Without a microphone in your Sonos, the other other workaround is to pump out the question directly to your Google Home using their API. (I assume it is possible)


#131

Nice implementation, @itg! I have not tried pushing voice alerts to Google Home yet, but if memory serves me correctly, it is possible.


#132

@itg
@WCmore

This looks like it could work. I need to pick up an updated raspberry pi to try it. My pi is on the older side and currently being used to allow airplay to my Sonos speakers.

Pre-release - Send Google Home voice announcements via webCore (using node.js relay)


#133

Thanks Koyfam, I have not used a pi yet, maybe it’s time I get one and give it a try.


#134

@WCmore @lflorack - ran into the same issue as @lflorack

Today I asked:
“Alexa, what year did Toy Story come out?”
She responded with “Toy Story came out in 1994, would you like to know about Toy Story 2?”

When I said “Yes”, my yes/no routine ran instead of actually giving the answer. (Which is 1999 btw)

It sounds like best course is to change the phrases for affirmative and negative responses, so as not to interfere with native exchanges like this. Not ideal as it interrupts natural language a bit but it’ll have to do.

What would really be killer is if Amazon were to enable an invokeAlexa command that can be incorporated into WebCoRE so that we didn’t need the routines in the first place. Where do we lobby for this??


#135

I just tested that phrase, and my “Yes” aborted the info on Toy Story.

Just to clarify though:
There should only be one piston that executes when either SimSwitch (Answer Yes or Answer No) changes. (piston “dxwi5” above) Neither SimSwitch should be a trigger in any other piston. (or the logic above will break)


I do agree with you though. Using a phrase besides “Alexa Yes”, or “Alexa No” might be wise in the long run. Thankfully, the only tweak required to change that is in the two Alexa routines.


#136

Hey there, I’m able now to broadcast to Google Home with the cast-web-api. But don’t see how you can make the google home wait for an answer after you broadcast, in order to make these pistons works. I understand how theses pistons works, and I can broadcast to google home, but how do you make the google home broadcast a question and wait for an answer?
Thanks!


#137

In this thread, the speakers (Alexa/Google) have no programming and are never “waiting”… All of the coding is done here in webCoRE…


  • WebCoRE asks a question, then waits 15 seconds…
  • Your voice turns on either “Yes” or “No” SimSwitch…
  • WebCoRE continues processing, and follows the path based on your answer…

Just to clarify…
In this thread, the only tiny section where Alexa/Google is touched is when trying to use a short phrase to turn on one of the SimSwitches. The remaining 99% of this thread uses webCoRE, and there is no additional processing, logic, waits, or coding needed in Alexa or Google.


#138

I know and understand your coding. I don’t know how Alexa works, since I don’t own one. But Google home won’t take “Yes” and proceed with the routine even If I have it programmed well. It just says random answer like “OK” “Way to go” even if I added a line on the routine for confirmation. And also, since I’m able now to broadcast to google Home without using an extra speaker, I was wondering if I could make it listen after the question that I’m broadcasting.

The other thing is, if I want the Google Home to listen I need to say “OK Google” in order to activate it and then say “Answer Yes” or " Answer No" Even then if doesn’t run my routine since it like a to common thing to say and I’m guessing Google Home just doesn’t accept that as a trigger.

Need help.

Thanks!


#139

The instructions at the top of this thread are so super clear, even I could understand! They have pictures too!
You create a routine in Alexa/Google Home, IF user says “yes” or “banana” turn on sim switch “sim switch yes”.
Then in webCoRE, you create a rule, when user arrives home speak “do you want to listen to music”, if you say “yes” or “banana”, the sim switch turns on, then webCoRE sees that and plays music. I’ve probably made it sound far more complicated than it really is.


#140

I understand this. But please explain something. In order for your google home to listen to what you are saying, “Yes” or " banana" you need to say first " OK Google" in order for it to listen right? If not there is something I’m not understanding then.

If I change my routine to activate when I say a more complex sentence it works and trigger my “answer yes” SimSwitch ON. But even then I need to say “OK Google first” in order to say my routine. But simple words like “Answer Yes” or “yes” can’t seem to run the routine. Google hoem just answers random without running my routine.


#141

Why don’t you implement it yourself first, then you’ll see how it works?


#142

I have it implemented and working perfectly when using a routine with a distinctive sentence. But not without saying “OK Google” first then my sentence. “Turn on Answer Yes”. If I do that everytthing works like a charm. My simswitch turn on and my other piston runs the commands.


#143

I have the same setup with my google home. Webcore asks the question through My Sonos speaker. For me to respond I say “ok google sure” Or “ok google nope”. My google home routine would then either turn on the sim switch or not which will let the webcore piston continue accordingly.

There is no other way that I know of to answer the question without first saying ok google.

In your case it sounds like the question is being asked through google home via the broadcast feature. Even then I think you will always have to respond with ok google first. The only thing I can think of is turning on continued conversation in the google home app to see if that lets it listen for your answer without having to say ok google.


#144

All excellent responses… It makes me happy to see this in use by so many others. :sunglasses:


Alexa and Google Home require a “wake word” to begin listening…
(“Alexa” and “OK Google” respectively)

Once the microphone is awake, then send the verbal command to turn on either Answer Yes or Answer No. WebCoRE will take over from there.


#145

I need some inspiration to use this more. My creativity has become drained recently lol.

What are some things you’re using it for @WCmore?


#146

Here are a few ideas from earlier in this thread…

… just to mention a few… :sunglasses: