Charmed Quark Systems, Ltd. - Support Forums and Community

Full Version: New Amazon Echo Support
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
(02-26-2017, 05:27 PM)Dean Roddey Wrote: [ -> ]It should be giving you Sage. The only reason I can think it might not is that there's actually some non-printable character between "sage, " and "cable" which is making it think that cable is on a line by itself. There is an extra space there, which may not actually be a space, so delete that space and reload the config and see if that makes a difference.

Rich,
I don't like how you are going about this.  You have "set LG"  etc to something.  Sage, cable etc.  Then you use Sage in the config file.  You don't need that.  You need utterances on amazon like;
Set LG to sage,
set LG to cable. An utterance per option.
You only need one global event per line in the config file.  It will invoke the LG global event, and you need to look at the _2 or _3 parameter to see whether you want sage or cable or whatever else. 

You are specifying sage as something in your config file.  CQC will expect a global event for that.  I can see amazon getting confused here, with sage both a parameter for LG, and an item for which a global variable is switched on!
So get rid of the Sage, sage, cable line from the config file. Check for sage, cable, etc in param_2 or param_3 of the LG global event code.
(02-26-2017, 07:30 PM)Ron Haley Wrote: [ -> ]
(02-26-2017, 05:27 PM)Dean Roddey Wrote: [ -> ]It should be giving you Sage. The only reason I can think it might not is that there's actually some non-printable character between "sage, " and "cable" which is making it think that cable is on a line by itself. There is an extra space there, which may not actually be a space, so delete that space and reload the config and see if that makes a difference.

Rich,
I don't like how you are going about this.  You have "set LG"  etc to something.  Sage, cable etc.  Then you use Sage in the config file.  You don't need that.  You need utterances on amazon like;
Set LG to sage,
set LG to cable. An utterance per option.
You only need one global event per line in the config file.  It will invoke the LG global event, and you need to look at the _3 parameter to see whether you want sage or cable or whatever else. 

You are specifying sage as something in your config file.  CQC will expect a global event for that.  I can see amazon getting confused here, with sage both a parameter for LG, and an item for which a global variable is switched on!

Ron - Thanks.. your comments is along the lines of what I was trying to figure out.  ie, is what I call the 'dictionary substitutions' only valid for the actions  (_2 parameter) or valid for the value (_3 parameter) as well.  I was trying to igure out if I could treat this just like a dictionary list of substitutions for both parameters.   My thoughts was that at least some values that I am setting things to could have alternate names.  I was just looking to see if any needed for handling of alternative names for _3 parameter  could all be in the EchoCfg file.  Not a big deal, i was just wasn't clear if that was supported. 
 
However, Dean's comments above seemed to indicate this is supported unless his response is based on my question being unclear(certainly possible) .  That being said I removed and retyped the sage line and  'cable' didn't get substituted after i reloaded the config.  It did behave like Ron said and my failure doesnt appear to be related to an unprintable character.
At the point of invocation of your action, you should only ever see the first value of a given line, ever. Depending on where it gets logged, you might see the raw value. But what goes to your action should only ever be the first value of a given line.

Oh, but yeh, that's only for the key, not the parameters. It's not a general substitution, it's a way to have multiple ways to say a given key but only have to respond to one of them. For the parameters you get what is passed and you'd have to deal with the variations.
Make sure you put something like this in your code, because then you can see what is coming from the echo in your cqc log.
System::LogMsg
P1=Test climate
P2=0
P3=Intent: %(LVar:CQCActParm_1), Key: %(LVar:CQCActParm_2), Parms: %(LVar:CQCActParm_3)
P4=Status
Example log message;

02/27 18:25:52-bedroomserver, CQCWebSrv, CQCWebSrvWorkerThread2
{
CQCWebSrvC, CQCWebSrvC_EchoHandler.cpp.809, Status/App Status
Key=ABCDEF, Intent=CQCSetOnIntent, Phrase=front lights, Value=on
}
02/27 18:25:52-bedroomserver, CQCWebSrv, CQCWebSrvWorkerThread2
{
CQCAct, Lighting.0, Status/App Status
Intent: CQCSetOnIntent, Key: Porch lights, Parms: on
}
Please, Please add notifications. It is now out in a developer preview.

https://www.engadget.com/2017/11/28/amaz...ty-skills/
(11-28-2017, 03:55 PM)potts.mike Wrote: [ -> ]Please, Please add notifications. It is now out in a developer preview.

https://www.engadget.com/2017/11/28/amaz...ty-skills/

This is a step in the right direction, but if I am at home I want alexa to speak to me straight away.  If the water pump is running for more than 20 mins I used to have the IV use the TTS and speak to me, no Alexa is in the kitchen and the IV is not I have lost that ability and wnat CQC to be able to tell Alexa to say something when I need to be alerted about something.

This is good for when I return home and want to find out what happened in my absence
Given how much they change things even after it's official, I'll wait until it's official before looking into this. I don't want to be chasing the spec. And this will require stuff on the AWS side which would mean everyone would be chasing changes not just me.