Author Topic: Payloads with Alexa  (Read 2559 times)

0 Members and 1 Guest are viewing this topic.

stig125

  • Jr. Member
  • **
  • Posts: 20
  • Karma: 0
    • View Profile
Payloads with Alexa
« on: February 18, 2017, 10:49:36 AM »
Hi,
I am getting an event payload{1} back from the echo Dot which contains 'Turn the Kitchen Lights On'..
I now want to extract the room part and the action... kitchen & On

I already have 2 payloads..rooms & scenes which I need to match to so that I can end up with a value for the room and scene to pass to my RakoBridge.

I cant do an if A contains B with A as {1} as I cant use my rooms payload in B.. or can I?

Thanks



jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Payloads with Alexa
« Reply #1 on: February 18, 2017, 11:39:02 AM »
You don't want to use voice commands?  Are you planning on only doing just this one thing with Echo and not having any other commands that you can issue to VC from the Echo?

stig125

  • Jr. Member
  • **
  • Posts: 20
  • Karma: 0
    • View Profile
Re: Payloads with Alexa
« Reply #2 on: February 18, 2017, 12:02:39 PM »
No, this is just the RAKO lights system. I have to do a CMD wget://RakoBridge/ etc and pass it a Room & Scene. So for this Command I will just use the payload it gives me on the event and get the room & scene info from the text. It's very quick

For the blinds, it works fine as It only has to Raise or Lower and that is going to get the TelVox
Same for the TV and the like.

There are 25 different light groups through the house so I have found the best phrases that Alexa uses.. It tends to want recognised rooms.. it didn't like 'Turn the stairs on' messed it up more than most. Changed it to staircase and it was 100%.. another was the piano room.. changed it to music room and hey ho..

stig125

  • Jr. Member
  • **
  • Posts: 20
  • Karma: 0
    • View Profile
Re: Payloads with Alexa
« Reply #3 on: February 18, 2017, 12:10:17 PM »
Alexa is very much pattern & phrase. It will hear 'Alexa what time is it' from upstairs..as it only has to hear the word time.. tell it to Fade down the living room lights..no problem.. tell it to fade up the living room lights and it doesn't get it.. Fade goes with down in it's mind...lol.. so Jarvis gets Fade the living room off..instead of up

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Payloads with Alexa
« Reply #4 on: February 18, 2017, 12:12:06 PM »
What you want to do is to use voice commands for the Rako lights and create commands that get the room name and the light state from the payloads defined in those voice commands.  You don't need to look at the speech from Alexa and try to break it up manually when you can just pass that speech to tellvox and have it do the rest based on your voice commands.

Incidentally , it would make much more sense to use the scrape action than to use wget.  You are loading a whole other program for nothing.
« Last Edit: February 18, 2017, 12:15:08 PM by jitterjames »

stig125

  • Jr. Member
  • **
  • Posts: 20
  • Karma: 0
    • View Profile
Re: Payloads with Alexa
« Reply #5 on: February 18, 2017, 12:32:15 PM »
I agree, but with so many room commands, when it does get it wrong, won't I get an emulate problem, whereby, VC stops listening. It was in all kinds of a mess this morning. It was acting strange. It would get an emulate problem and not listen.. but if I changed the room, it would work for that room but not obey any commands on the original room that got the emulate problem.??? Then, some time later it would now obey a command on that room.

The other actions, like blinds, TV etc are very limited in commands so Telvox would be fine. I'm just trying to work around the rooms problem..lol


stig125

  • Jr. Member
  • **
  • Posts: 20
  • Karma: 0
    • View Profile
Re: Payloads with Alexa
« Reply #6 on: February 18, 2017, 01:13:26 PM »
Hey...I'm a junior member now.. not a newbie...lol...I wish

The emulate shutting down the listening isn't coming from Alexa.. if you type any old stuff into TelVox that generates an emulate, then it stops listening.
I switched over to the Non SP version this morning but it still does it on that version too.
It's hard to deliver a speech command without stuttering now and again..

I wondered if I should change the invocation name to G G Granville..
Did you ever get the TV programme in Quebec... Open All Hours with Ronnie Barker..many years ago.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Payloads with Alexa
« Reply #7 on: February 18, 2017, 01:26:05 PM »
That's a bug that can be fixed.  Please check your email.  I sent you a link to a test version of VC which addresses this issue.

Even if that doesn't fix it, you could just turn VC off and then on again to solve that particular issue.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Payloads with Alexa
« Reply #8 on: February 18, 2017, 01:27:12 PM »
I wondered if I should change the invocation name to G G Granville..
Did you ever get the TV programme in Quebec... Open All Hours with Ronnie Barker..many years ago.
Don't know.  Might be before my time. :)

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2012
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Payloads with Alexa
« Reply #9 on: February 18, 2017, 03:28:14 PM »
Definitely not before your time.  :) But Quebec in the '70s & '80s did not have much English language TV, let alone of the English variety.
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Payloads with Alexa
« Reply #10 on: February 19, 2017, 12:01:23 PM »
That's a bug that can be fixed.  Please check your email.  I sent you a link to a test version of VC which addresses this issue.

Even if that doesn't fix it, you could just turn VC off and then on again to solve that particular issue.

2.2.3.5 is available now and fixes this bug.

http://voxcommando.com/mediawiki/index.php?title=ChangeLog#Version_2.2.3.5

http://voxcommando.com/home/downloads/