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 - bbrendon - 10-09-2015

Logs are clean. I think I found the problem. A lot of my code has "sleep" in it to make sure whatever was requested is done before allowing things to move forward.

I commented out the action and just left the RepText and it responded flawlessly. I then went poking around and found a 5 second delay in the lock/unlock code.

Is there a way to call a function/method as a separate thread so the code doesn't pause? Smile


New Amazon Echo Support - Dean Roddey - 10-09-2015

Currently, you can't run the commands asynchronously. They have to complete and return because the reply text indicates at least the success or failure of the command.

It appears that the timeout is in the Echo itself, since there's no one else in the chain of events that has a timeout. I'm not sure how long it'll wait before it gives up.


New Amazon Echo Support - Dean Roddey - 10-09-2015

Maybe post-5.0 we can provide an option to invoke commands async, or maybe in the later 5.0 beta phase while waiting for other things to be beaten on.


New Amazon Echo Support - Dean Roddey - 10-09-2015

Oh, wait, on the page where you paste in the Lambda Javascript, at the bottom there is a timeout option. So it may work to crank that up, not sure.


New Amazon Echo Support - bbrendon - 10-09-2015

Dean Roddey Wrote:Oh, wait, on the page where you paste in the Lambda Javascript, at the bottom there is a timeout option. So it may work to crank that up, not sure.
That did it! Good find. Thanks.


New Amazon Echo Support - Dean Roddey - 10-09-2015

Something seems to be awry with the Amazon servers. I'm trying to update my Skill and it's just locking up while trying to build the model when I save the intent/utterance stuff. And it goes off into the ozone for a really long time. I don't know if it's going to be happy again at some point so I try another save, and it's another 15 or 20 minutes out to lunch. There's nothing I can do to stop it. Even if I log out and back in, it's still stuck.


New Amazon Echo Support - LesAuber - 10-09-2015

Wonder if they ended up with more users than there's server capacity for?


New Amazon Echo Support - kblagron - 10-10-2015

Quote:That did it! Good find. Thanks.

How much did you increase it? I have this same issue from time to time - the command executes successfully, but it gives that response every once in awhile.


New Amazon Echo Support - Dean Roddey - 10-10-2015

I just discovered that, if you have an incorrect configuration file in the right sort of way, and you ask for a reload, the worker thread that does the reload can get caught in an infinite loop and just eat up CPU. Sorry about that. I'll get it fixed in the next drop. If you see high CPU usage on the web server, that's probably it, so just kill it and let the app shell restart it again.

The problem is if you do something like this:
Code:
Action=\User\Echo\SetMedia
        Volume, Music Volume, Theater Volume
    EndMacro

So it says it's starting an action block but uses EndMacro for the end (or vice versa.) The loop never realizes it didn't see the end and because of an error, it fails to throw when the end of file is hit. So it's just stuck reading nothing at the end of the file and never making any progress.

Until you get to 4.8, be sure to watch for this. If the reload fails and the message you get back is that there was a problem with the response, as apposed to CQC saying it couldn't load the file, then this may have happened and you may have to kill the web server to make it recycle and free up that stuck thread.


New Amazon Echo Support - Dean Roddey - 10-11-2015

I have created a new PDF document that covers the Echo with CQC. I've updated the first post of this thread to point to that new file. Check it out and see if seems coherent and whatnot.