Charmed Quark Systems, Ltd. - Support Forums and Community
New Amazon Echo Support - Printable Version

+- Charmed Quark Systems, Ltd. - Support Forums and Community (https://www.charmedquark.com/vb_forums)
+-- Forum: General Discussion (https://www.charmedquark.com/vb_forums/forumdisplay.php?fid=3)
+--- Forum: CQC Support (https://www.charmedquark.com/vb_forums/forumdisplay.php?fid=9)
+--- Thread: New Amazon Echo Support (/showthread.php?tid=9423)



New Amazon Echo Support - LesAuber - 08-22-2015

Thx. Makes sense. Just wasn't sure you could set them all back to the same server.

Has anyone tried the certificate thing yet? I'm guessing the $10 yr ones don't have much in the way of tech support and Verisign et al costs more than the device.


New Amazon Echo Support - kblagron - 08-23-2015

Quite an odd thing is happening for me when trying to use Echo to set and unset my alarm. This is what I have in my echcfg.txt file.

Code:
    Action=\User\Set\Alarm
        ArmAway, Arm, Arm Away
        Disarm
        Alarm, my alarm
    EndAction

And my global query is set up to immediately set or unset my alarm if it is the one of the first two, and goes through an If statement if I say "Alarm Off" or "Alarm On" for the third entry.

What I am finding is that sometimes it reads the word "alarm", and chooses the word "disable" as my intent instead. I do not have the word disable in my echocfg.txt file anywhere.

Here is one that worked correctly:

Code:
08/23 13:31:33-CQCSERVER, CQCWebSrv, CQCWebSrvWorkerThread1
{
    CQCWebSrvC, CQCWebSrvC_EchoHandler.cpp.311, Status/App Status
    Key=XXX, Intent=CQCSetOffIntent, Phrase=alarm, Value=off
}
08/23 13:31:33-CQCSERVER, CQCWebSrv, CQCWebSrvWorkerThread1
{
    CQCKit, Alarm  Gact.0, Status/App Status
    Intent: CQCSetOffIntent, Key: ALARM, Parms: off

And here is one that picked up the same word, but set it differently:

Code:
08/23 13:31:48-CQCSERVER, CQCWebSrv, CQCWebSrvWorkerThread0
{
    CQCWebSrvC, CQCWebSrvC_EchoHandler.cpp.311, Status/App Status
    Key=XXX, Intent=CQCSetOffIntent, Phrase=alarm, Value=off
}
08/23 13:31:48-CQCSERVER, CQCWebSrv, CQCWebSrvWorkerThread0
{
    CQCKit, Alarm  Gact.0, Status/App Status
    Intent: CQCSetOffIntent, Key: DISABLE, Parms: off
}

I don't mind using DISABLE, but I have no idea where that came from.


New Amazon Echo Support - Dean Roddey - 08-23-2015

The first one is logged by the web server when it comes in. Unless there's some sort of error in that handling, I'm not sure how you could get something else. Try logging the raw action parameter value, to make sure. If it shows disable there, then it has to be something in the web server. If it doesn't, then it has to be something in your handler. So that should point us in one direction or another.


New Amazon Echo Support - kblagron - 08-23-2015

Quote:Try logging the raw action parameter value

Sorry for my ignorance, but how would I do this?


New Amazon Echo Support - Dean Roddey - 08-23-2015

Just pass the %(LVarTonguearm1) or whatever the syntax is for the action parameters, I'm blanking out on it, to the System::LogMsg() command. It's the value you are already getting the comparison value from. Just making sure that it's really bad as received, and not getting modified in the process of your action or something.


New Amazon Echo Support - kblagron - 08-23-2015

Okay, yes I am logging that in the bit I sent you before, and now it is doing it to another global action.

This is what is being logged every time I talk to control:

Code:
System::LogMsg
    P1=Alarm  Gact
    P2=0
    P3=Intent: %(LVar:CQCActParm_1), Key: %(LVar:CQCActParm_2), Parms: %(LVar:CQCActParm_3)
    P4=Status

This part comes in from the webserver on my log first:

Code:
Key=XXX, Intent=CQCSetOffIntent, Phrase=alarm, Value=off

And this is what is logged when it hits the global query (from code above)

Code:
Intent: CQCSetOffIntent, Key: DISABLE, Parms: off

To make this even odder, I set up another global action to handle my squeeze box music box, and it did the same thing but with different parameters.

I have a global action called music, and I set it up to go to a global action called music if it hears the following:

Code:
    Action=\User\Set\Music
        SBFamily, Music, Squeeze Box, Squeeze Box Family
        SBOutside, Music Outside, Squeeze Box Outside
    EndAction

So the first time through I can say "Turn on Music Outside", and it runs SBOutside and works fine. The next time it doesn't try to run SBOutside, it runs MUSICOUTSIDE -

Code:
08/24 01:38:44-CQCSERVER, CQCWebSrv, CQCWebSrvWorkerThread2
{
    CQCWebSrvC, CQCWebSrvC_EchoHandler.cpp.311, Status/App Status
    Key=XXX, Intent=CQCSetOffIntent, Phrase=music outside, Value=off
}
08/24 01:38:44-CQCSERVER, CQCWebSrv, CQCWebSrvWorkerThread2
{
    CQCKit, Music Gact.0, Status/App Status
    Intent: CQCSetOffIntent, Key: MUSICOUTSIDE, Parms: off
}

I can reload the echo configuration file, and it works for one time and then goes back. On this one, I can rename my global action "Music" and it should be fine, but not sure about the disable one. Something seems to be not working as planned.


New Amazon Echo Support - kblagron - 08-24-2015

One thing I was curious about was if there is a limit for how many items you can have CQC watch for in one row - I was just looking at my entry for changing the channels to "SEC Network" and I have put down 16 different ways that it can be interpreted as the Echo has trouble with my voice saying this.


New Amazon Echo Support - Dean Roddey - 08-24-2015

There shouldn't be any limit. I'll look at the code to see if there's some way it's not getting the value set or something.


New Amazon Echo Support - Dean Roddey - 08-24-2015

Are you sure you are running the global action you think you are? From what I'm seeing above, I don't see how this could be happening, even if there was an error in the Echo handler on the web server side. It would never change "Music Outside" to "MUSICOUTSIDE", note the missing space. It would change it to "MUSIC OUTSIDE".

Make some arbitrary change to the logmsg call at the top of the action and see if that shows up in the logs when you invoke it, just to be sure. I'll continue looking but just in case, because those symptoms seem sort of semi-impossible to happen. There's plenty of possibility for bugs but that one doesn't seem like it can happen. Also, post your whole config file, and the list of utterances if you have made any changes of your own.


New Amazon Echo Support - Dean Roddey - 08-24-2015

It seems to be working correctly for me, and going through the code I can't see where the problem might be. So we definitely need to look more closely at your utterances and and config file and such.