I did’nt have this problem. You should check if the CSE ID and API key is correct and make sure the youtube and cse apis are in different projects.
Read the statement by Michael Teeuw here.
Latest posts made by torresfm
-
RE: MirrorMirrorOntheWall Alexa Skill trouble
-
RE: MirrorMirrorOntheWall Alexa Skill trouble
@subminimal
In the modules mirrormirror.js file you need to add the same host line with the ios endpoint. If youve copied the certs to the module folder, added the module in config/config.js, and run npm install in the module folder to install dependencies then you should be all set. -
RE: MirrorMirrorOntheWall Alexa Skill trouble
Haven’t tried configuring the MM module yet but it says to just copy the cert folder from the Alexa skill to the module directory and make sure that the cert paths are correct in the modules mirrormirror.js file. I’ll try it out sometime next week.
-
RE: MMM-MirrorMirrorOnTheWall - Alexa voice control to hide/show modules and display text/images
I found the issue, please look at my other ports for the solution. Thanks.
-
RE: MirrorMirrorOntheWall Alexa Skill trouble
I found the problem.
In the MirrorMirror.js file you need to add an extra line to point to the aws-iot endpoint you created in the very first steps. You can find the string in the aws-iot dashboard and clicking on settings in the bottom left hand corner.
Mirrormirror.js:
app.setup = function() { app.device = awsIot.device({ keyPath: __dirname + "/certs/MagicMirror.private.key", certPath: __dirname + "/certs/MagicMirror.cert.pem", caPath: __dirname + "/certs/root-CA.crt", clientId: "MirrorMirror" + (new Date().getTime()), region: "us-east-1", host: "your-custom-endpoint", });
The string should look something like this:
xxxxxxxxxxxx.iot.us-east-1.amazonaws.com
After you add that in just save, re-zip, and upload to lambda and it should work if you did everything else correctly. Hope this helps!
-
RE: MMM-MirrorMirrorOnTheWall module problem?
I found the problem.
In the MirrorMirror.js file you need to add an extra line to point to the aws-iot endpoint you created in the very first steps. You can find the string in the aws-iot dashboard and clicking on settings in the bottom left hand corner.
Mirrormirror.js:
app.setup = function() { app.device = awsIot.device({ keyPath: __dirname + "/certs/MagicMirror.private.key", certPath: __dirname + "/certs/MagicMirror.cert.pem", caPath: __dirname + "/certs/root-CA.crt", clientId: "MirrorMirror" + (new Date().getTime()), region: "us-east-1", host: "your-custom-endpoint", });
The string should look something like this:
xxxxxxxxxxxx.iot.us-east-1.amazonaws.com
After you add that in just save, re-zip, and upload to lambda and it should work if you did everything else correctly. Hope this helps!
-
RE: MMM-MirrorMirrorOnTheWall - Alexa voice control to hide/show modules and display text/images
Hi! @joanaz, @savage_gr1nd , @Journeytojah
I’ve been trying to get this skill to work, but I’m stuck with a Lambda error that doesn’t really give me much to work on. My AWS IoT dashboard does show successful connections and I’ve followed every step in the readme to a T (I’ve even read this most of this thread to go make sure I didn’t make the common mistakes), but when I try to run a test on the Lambda function I get this error below. Thanks for the help in advance!
{ "errorMessage": "Invalid connect options supplied.", "errorType": "Error", "stackTrace": [] } Log output: START RequestId: 4b366259-601e-11e7-899b-8dd5d86aa5dd Version: $LATEST module initialization error: Error at Module.require (module.js:497:17) END RequestId: 4b366259-601e-11e7-899b-8dd5d86aa5dd REPORT RequestId: 4b366259-601e-11e7-899b-8dd5d86aa5dd Duration: 0.37 ms Billed Duration: 100 ms Memory Size: 128 MB Max Memory Used: 33 MB
I copied and pasted the Lambda request from the Alexa Skill config simulator for the test in Lambda: (I’ve redacted the id keys)
Request: { "session": { "sessionId": "SessionId.xxxx", "application": { "applicationId": "amzn1.ask.skill.xxxx" }, "attributes": {}, "user": { "userId": "amzn1.ask.account.xxxx" }, "new": true }, "request": { "type": "IntentRequest", "requestId": "EdwRequestId.xxxx", "locale": "en-US", "timestamp": "2017-07-03T18:55:38Z", "intent": { "name": "MirrorMirrorHelloIntent", "slots": {} } }, "version": "1.0" } Response: The remote endpoint could not be called, or the response it returned was invalid.
edit:
I think I found a few areas in aws-iot-device-sdk in device/index.js where the error is coming from, but not sure how to fix it.
if (isUndefined(options) || Object.keys(options).length === 0) { throw new Error(exceptions.INVALID_CONNECT_OPTIONS); if (isUndefined(options.host)) { throw new Error(exceptions.INVALID_CONNECT_OPTIONS); } if (!isUndefined(options.host)) { var pattern =/[a-zA-Z0-9]+\.iot\.([a-z]+-[a-z]+-[0-9]+)\.amazonaws\.com/; var region = pattern.exec(options.host); if (region === null) { console.log('Host endpoint is not valid'); throw new Error(exceptions.INVALID_CONNECT_OPTIONS); } else { options.region = region[1]; } }
My folder struct:
. +--certs/ | +----keys_sample.json | +----keys_sample.json | +----MagicMirror.cert.pem | +----MagicMirror.private.key | +----MagicMirror.public.key | +----root-CA.crt | +----index.js +----MirrorMirror.js +----node_modules/ +----package.json
The index.js and mirrormirror.js are stock, I haven’t changed a thing.
-
MirrorMirrorOntheWall Alexa Skill trouble
Hello,
I’ve been trying to get this skill to work, but I’m stuck with a Lambda error that doesn’t really give me much to work on. My AWS IoT dashboard does show successful connections and I’ve followed every step in the readme to a T, but when I try to run a test on the Lambda function I get this error below. Thanks for the help in advance!
{ "errorMessage": "Invalid connect options supplied.", "errorType": "Error", "stackTrace": [] } Log output: START RequestId: 4b366259-601e-11e7-899b-8dd5d86aa5dd Version: $LATEST module initialization error: Error at Module.require (module.js:497:17) END RequestId: 4b366259-601e-11e7-899b-8dd5d86aa5dd REPORT RequestId: 4b366259-601e-11e7-899b-8dd5d86aa5dd Duration: 0.37 ms Billed Duration: 100 ms Memory Size: 128 MB Max Memory Used: 33 MB
I copied and pasted the Lambda request from the Alexa Skill config simulator for the test: (I’ve redacted the id keys)
Request: { "session": { "sessionId": "SessionId.xxxx", "application": { "applicationId": "amzn1.ask.skill.xxxx" }, "attributes": {}, "user": { "userId": "amzn1.ask.account.xxxx" }, "new": true }, "request": { "type": "IntentRequest", "requestId": "EdwRequestId.xxxx", "locale": "en-US", "timestamp": "2017-07-03T18:55:38Z", "intent": { "name": "MirrorMirrorHelloIntent", "slots": {} } }, "version": "1.0" } Response: The remote endpoint could not be called, or the response it returned was invalid.