• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

MirrorMirrorOntheWall Alexa Skill trouble

Scheduled Pinned Locked Moved Troubleshooting
17 Posts 8 Posters 10.1k Views 8 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    torresfm
    last edited by Jul 3, 2017, 7:11 PM

    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.
    
    1 Reply Last reply Reply Quote 0
    • S Offline
      sahilitrix123
      last edited by Jul 10, 2017, 2:45 AM

      I’m having the exact same issue. Let me know if you found a fix! I can’t seem to find any help anywhere.

      1 Reply Last reply Reply Quote 0
      • S Offline
        subminimal
        last edited by Jul 12, 2017, 1:55 AM

        Anything? This is driving me nuts. I feel like I’ve tried everything I can think of. I’ve removed and rebuilt the lambda functions, skills, even my whole raspberry pi build. I saw somewhere that the raspberry pi needs TCP port 8883 (something like that) open for public intrernet connections… could that be something? I’m grasping at staws here. Is there a certain way I should be installing Alexa? I have it working on the pi… man I’m pulling my hair out here. Anybody?

        1 Reply Last reply Reply Quote 0
        • T Offline
          torresfm
          last edited by Jul 14, 2017, 3:22 AM

          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!

          1 Reply Last reply Reply Quote 0
          • S Offline
            subminimal
            last edited by Jul 14, 2017, 7:31 PM

            THAT DID IT! The skill is working fine! Thanks SO much! I feel like it’s the last part here Im a little unclear on as well… do I put the whole MirrorMirroronthewall folder into the modules folder with certs, then add the module to config.json file? What are the last few steps to get this puppy in gear? Its a little fuzzy in the docs. THANK YOU A MILLION TIMES!!!

            1 Reply Last reply Reply Quote 0
            • S Offline
              subminimal
              last edited by Jul 14, 2017, 8:05 PM

              I’m SO close. Alexa does the “Yes my queen” intro, and says she is playing a video for me. But I don’t see a video, and I can’t make changes to the layout verbally either. I know I’m mucking up installing the actual module now that the skill is working.

              1 Reply Last reply Reply Quote 0
              • T Offline
                torresfm
                last edited by Jul 14, 2017, 11:04 PM

                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.

                1 Reply Last reply Reply Quote 0
                • S Offline
                  subminimal
                  last edited by Jul 15, 2017, 1:13 AM

                  Thank you for the reply. This is my first 3rd party module (I picked a doozy lol) do I have to place the module master folder in /modules as well? Thanks again my friend you’re a lifesaver.

                  1 Reply Last reply Reply Quote 0
                  • T Offline
                    torresfm
                    last edited by Jul 18, 2017, 6:54 PM

                    @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.

                    1 Reply Last reply Reply Quote 0
                    • S Offline
                      subminimal
                      last edited by Jul 18, 2017, 8:21 PM

                      That did it nearly 100%!!! The videos play, everything is correct… the only thing is when I use MirrorMirrorOnTheWall to bring up an image… I’m getting the endpoint error again! So weird… Words and videos work just fine, but I can’t bring up images. I’ve checked the API key and CSE ID is correct in keys.json, but still the same. Weird. I mean, I suppose it’s not crazy important, just images… but you know, always striving for 100% functionality. Is there a place that host line needs to be added in google-images somewhere? Hmmm…

                      Anyway, torresfm THANKYOU SO MUCH for getting me as far as you have!!! I think the author should be made aware of the endpoint issue. If you stumble across a fix for the images portion of the module let me know!

                      X 1 Reply Last reply Mar 5, 2018, 5:21 PM Reply Quote 0
                      • 1
                      • 2
                      • 1 / 2
                      1 / 2
                      • First post
                        5/17
                        Last post
                      Enjoying MagicMirror? Please consider a donation!
                      MagicMirror created by Michael Teeuw.
                      Forum managed by Sam, technical setup by Karsten.
                      This forum is using NodeBB as its core | Contributors
                      Contact | Privacy Policy