Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Alexa/Echo: AWS/Lambda config of myCQCHandler test fails
#1
Hello, 

As expected, Amazon has made some changes to both the AWS/Lambda (JS handler) & Developer Console (Alexa Skills) screens since the help documentation was written, including help from prior forum posts.  So I did my best to configure both areas, but Alexa skill testing failed under the Service Simulator using the Utterance...set Volume.  The response I get back is....The remote endpoint could not be called, or the response it returned was invalid.  Note: using the "arn" from Lamda to point new skill in console correctly to handler/JS and pasted the CQC Echo & CQC Echo Skills support files as noted in help doc.

Next, I tried to test the CQCHandler in AWS/Lambda, and fails w/ message:
{
 "errorMessage": "Exception: TypeError: Cannot read property 'application' of undefined"
}


The path to test handler above is: Action, Configure Test Event, Sample Event Template, Alexa Smart Home Discovery.
However, if I use these two Sample Event Templates, Alexa Start Session & End Session, it passes these two tests.  All other Sample Event Templates yield a failure message.

In configuration, I selected Runtime as Node js 4.3,  index.handler, & lambda_basic_execution. Not sure I pasted JS properly in code entry:

CODE Entry:

exports.handler = (event, context, callback) => {

    // TODO implement

    callback(null, 'Hello from Lambda');

};

//

//  Adjust these values to your specific system

//

//      HTTPType is either http or https. The latter is MUCH preferred,

//      but it requires that you have a registered security certificate

//      for your web server and configure the CQC web server to use it.

//

//      The IdKey is just a value that you will configure on the CQC

//      side, to help make sure you are getting a legitimate call from

//      your own Amazon account. Keep in mind though that, if you don't

//      use http, it's sent in the open and anyone could grab it and use it.

//

// The TarAddr and TarPort are your public address and the HTTP or

// HTTPS port of the web server (usually 80 and 443, but you whatever

// you set up when you installed CQC.)

//

var CQC_TarAddr = "1.2.3.4";

var CQC_TarPort = "80";

var CQC_HTTPType = "http";

var CQC_IdKey = "ABCDEF";





//

// Route the incoming request based on type (LaunchRequest, IntentRequest,
// etc.) The JSON body of the request is provided in the event parameter.
etc, etc.,,,============================================================.

BTW: I'm a newbie to CQC and just loaded the product a few days ago to evaluate a purchase w/ my existing HA/HomeTheater; i.e., ElkM1Gold/VantageControls (In-Fusion).  I'm not a programmer (hardware guy), but experienced using design tool/programming and GUI touchscreen development from Vantage (Q-link/Infusion), including Elk M1 programming and setting up rules, etc.  So please be gentle!   I can attached screens or logs if needed.

thanks, Ken
Reply


Messages In This Thread
Alexa/Echo: AWS/Lambda config of myCQCHandler test fails - by KenC - 09-26-2017, 10:15 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Amazon Echo integration rhosch 8 686 05-15-2021, 01:06 PM
Last Post: Bugman
  Echo troubleshooting dlmorgan999 3 493 01-13-2021, 04:27 PM
Last Post: dlmorgan999
  NetworkMonitor - Cannot Reload Config gReatAutomation 26 5,050 05-15-2020, 03:02 PM
Last Post: Dean Roddey
  Z-Wave include fails with security simplextech 15 2,979 01-04-2020, 06:18 PM
Last Post: simplextech
  IOS Homescreen Webriva fails to connect zra 5 1,930 10-05-2019, 12:26 PM
Last Post: zra
  CQC and native Alexa (again) znelbok 5 2,605 09-27-2019, 03:31 PM
Last Post: Dean Roddey
  Generic-Network Monitor - Config File Error gReatAutomation 17 5,083 06-27-2019, 11:46 AM
Last Post: gReatAutomation
  Files of type "Logic Server config" cannot be edited chmilar 2 1,445 04-06-2019, 11:53 AM
Last Post: chmilar
  Echo Set-up Woes znelbok 2 1,168 03-24-2019, 05:11 AM
Last Post: dlmorgan999
  Alexa Notifications EST 4 1,538 11-24-2018, 08:36 PM
Last Post: Dean Roddey

Forum Jump:


Users browsing this thread: 1 Guest(s)