Posts: 283
Threads: 26
Joined: Dec 2012
Dean, going in circles today. I suspect it's a port forwarding issue perhaps.
From Appendix A of the new doc:
This appendix provides you with the Javascript you need to paste into the Amazon server. There are a few settings at the top of the
Javascript file that you will need to change. They will look like this initially:
var CQC_TarAddr = "1.2.3.4";
var CQC_TarPort = "80";
var CQC_HTTPType = "http";
var CQC_IdKey = "ABCDEF";
The CQC_TarAddr variable you will change to point to your CQC system. So it will either be the public IP of your router, or it will be some
dynamic or static DNS name that points to your public router address if you have such a thing. CQC_TarPort is whatever CQC Web
Server port you want the Javascript to connect to. You will need to do a port forward of this port to the machine where the CQC Server is
running.
My web server port is 13519 so would I use that rather than port 80 in the AWS Lambda code?
Posts: 40,483
Threads: 491
Joined: Aug 2002
Deane Johnson Wrote:I sent it PM as I didn't see an email address.
Send it to support at our domain.
Dean Roddey
Explorans limites defectum
Posts: 40,483
Threads: 491
Joined: Aug 2002
pinballmark Wrote:Dean, going in circles today. I suspect it's a port forwarding issue perhaps.
From Appendix A of the new doc:
My web server port is 13519 so would I use that rather than port 80 in the AWS Lambda code?
You definitely don't want to expose any of the 13xxx ones. Those are for internal use only. You want to expose the ones used for HTTP requests, which would be whatever you configured during the installation on the web server page, 80 by default for non-secure HTTP. If you happen to have some other web server installed, it may win and our web server won't be able to open port 80, in which case you'll have to choose another one and update the Javascript to use that port.
Whichever you choose, expose that one.
If you do "netstat -ab" on the command line, it'll show you all of the ports and the executables that have them open. Search for port 80 (if that's what you configured CQC for) and see how has it open. If it's not CQCWebSrv.exe, then something else has it and you'll have to change our web server'sport (or stop that other server.)
Dean Roddey
Explorans limites defectum
Posts: 40,483
Threads: 491
Joined: Aug 2002
pinballmark Wrote:Ok Web Server is running.
Trying "Test" on AWS Lambda returns the following:
{
"errorMessage": "Exception: TypeError: Cannot read property 'application' of undefined"
}
BTW, that is a javascript error, where somewhat was not available in a message, so when the javascript pulled it out of the message, it got a null pointer. The subsequent attempt to get some sub-value out of that thing causes the above type error.
Hopefully nothing went awry during the extraction of the text from the PDF file that would cause such a thing. Let me try doing it from the PDF file and make sure it still works.
Dean Roddey
Explorans limites defectum
Posts: 283
Threads: 26
Joined: Dec 2012
Dean Roddey Wrote:You mean using the Test button? If so, that won't work unless you set up a test JSON message as would be sent by the Echo. If you want to test it, do it from the Skill setup page, using the test thingie there. That just requires that you type in the request that you would have spoken.
Though, once you do that, the left hand side is filled in with the actual request text. So you could copy that, go back to the Lamda, use the other button beside test that allows you to create a sample request, and then paste that text into it and save it. Then the Test button should work.
I tried "alexa ask cqc to load configuration" as a test on the left hand side and the Lambda response is "The response is invalid". That ought to be a valid utterance, right?
Posts: 40,483
Threads: 491
Joined: Aug 2002
That should be ok. But, I just tried pasting in from the text copied from the PDF and it's totally mangled. The PDF viewer is messing up all of the line ends and such. I didn't think about that. So I'm going to have to do it differently and put the skill setup text up as separate text files or something. Give me a minute to take a whack at that.
Dean Roddey
Explorans limites defectum
Posts: 283
Threads: 26
Joined: Dec 2012
Dean Roddey Wrote:That should be ok. But, I just tried pasting in from the text copied from the PDF and it's totally mangled. The PDF viewer is messing up all of the line ends and such. I didn't think about that. So I'm going to have to do it differently and put the skill setup text up as separate text files or something. Give me a minute to take a whack at that.
cool, thank you. I'll take a break from it.
Posts: 40,483
Threads: 491
Joined: Aug 2002
In the meantime, here is the Zip file that the new document will refer to. It just has two files, one has the javascript and the other the skill text stuff. So it should be obvious to you how to use it since you've gone through this already. Both are just text files, so open in NOtepad or some such and paste from it to the Amazon editor. Probably best to do both javascript and skill text. They both should end up all nicely formatted, not just a flat blob of text with no indents.
http://www.charmedquark.com/Web2/Downloa...QCEcho.Zip
Give that a try and see if it does any better.
Dean Roddey
Explorans limites defectum
Posts: 696
Threads: 62
Joined: Jun 2010
I get the following Error message when opening the script:
Line: 43
Char: 27
Error: Expected identifier
Code: 800A03F2
Source: Microsoft JScript compilation error
Posts: 40,483
Threads: 491
Joined: Aug 2002
I assume you tried to open it in something besides a text editor and it tried to run it. You need to open it with Notepad or something like that. Then just make the required modifications at the top, then select all text and paste it into the Lambda function editor.
Dean Roddey
Explorans limites defectum