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.

    MMM-MirrorMirrorOnTheWall installation issue

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    138 Posts 11 Posters 171.1k Views 10 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.
    • O Offline
      OceanK
      last edited by OceanK

      Hey!

      OK so I have figuerd out some parts. If I make a test in the lamda and choose “Alexa start session”

      I get a nice green log, So that means the alexa skill is fine However when I try some other test for the lamda itself I get an error like you.:

      {
      “version”: “1.0”,
      “response”: {
      “shouldEndSession”: false,
      “outputSpeech”: {
      “type”: “SSML”,
      “ssml”: “ Hello my Queen, what can I do for you? ”
      },
      “reprompt”: {
      “outputSpeech”: {
      “type”: “SSML”,
      “ssml”: “ I can show you text and images, if you give me commands like ‘say you are the fairest of them all’ or ‘find Snow White’. I can also open or close a magic mirror module, if you say commands like ‘open compliments’, or ‘close weather forecast’. What can I do for you, my Queen? ”
      }
      },
      “card”: {
      “type”: “Simple”,
      “title”: “Hello”,
      “content”: “Hello my Queen, what can I do for you? I can show you text and images, if you give me commands like ‘say you are the fairest of them all’ or ‘find Snow White’. I can also open or close a magic mirror module, if you say commands like ‘open compliments’, or ‘close weather forecast’. What can I do for you, my Queen?”
      }
      },
      “sessionAttributes”: {},
      “userAgent”: “ask-nodejs/1.0.25 Node/v6.10.3”
      }

      lambda test:

      at AlexaRequestEmitter.HandleLambdaEvent (/var/task/node_modules/alexa-sdk/lib/alexa.js:112:38)
      at AlexaRequestEmitter.value (/var/task/node_modules/alexa-sdk/lib/alexa.js:100:31)
      at exports.handler (/var/task/index.js:37:11)

      1 Reply Last reply Reply Quote 0
      • O Offline
        OceanK
        last edited by

        This post is deleted!
        1 Reply Last reply Reply Quote 0
        • O Offline
          OceanK
          last edited by

          OK so I have narrowed it down to the lamda function. The lamda it not working, something wrong with index file.

          I have no idea how to correct it

          1 Reply Last reply Reply Quote 0
          • richland007R Offline
            richland007
            last edited by

            Well on my end i cant even get to the point you that your are at. Even if i try to test with “Alexa start Session” i get the same error as before so my problem is with aws-iot-device-sdk inside node_modules and for this i need your help how to get to the same spot where my test on Alexa side will turn on “Hello my queen…” and not null.
            How can you send me the step by step on what you did and where did you differ from the instructions on @joanaz site or maybe a copy of the node_modules aws-iot-device-sdk i don’t know…and than we will try to get the rest figured out
            Denis

            1 Reply Last reply Reply Quote 0
            • O Offline
              OceanK
              last edited by

              OK so lets try it out! I will explain my steps here:

              1. Taspberry pi model 3b+
              2. stretch OS

              I began with a fresh OS install and then installed the magicmirror with the curl script. Configured all the basics for the mirror. So thats with that.

              1. I cloned the https://github.com/joanaz/MMM-MirrorMirrorOnTheWall into the magic mirrors modules

              Then I cd into that folder and ran NPM install

              1. Then cloned the https://github.com/joanaz/MirrorMirrorOnTheWallSkill into the magic mirrors modules folder

              I then cd into that folder and into the src folder and there ran npm install

              so far so good.

              I noticed that the node_modules got vissible in the MirrorMirrorOnTheWallSkill after the npm install(src folder) just like joanaz guide told us to do.

              then follow joanaz: https://joanaz.github.io/MirrorMirrorOnTheWallSkill/#1-setup-an-aws-iot-device

              after running that script for the connection in step 1 of joanaz tutorial,
              Copy all your credential files, then go to your local copy of this repo, and paste them inside the certs folder (which is inside the src folder)

              those files goes into the MirrorMirrorOnTheWallSkill in the src/certs

              in the certs folder cp keys_sample.json keys.json and insert in the keys.json your credentials for youtube and google.

              then cd into the src folder for the MirrorMirrorOnTheWallSkill and zip everything inside src folder

              go to step 2 in joanaz guide for making the lamda and follow that and upload the zip

              last step is to Copy the ARN from the top right to be used later in the Alexa Skill Setup (just where you created the lamda function)

              step 4 in joanaz guide tells us to create the Alexa skill. follow that guide

              Invocation - as in the guide “on the wall”
              json editor (that template Interaction model, is within the MirrorMirrorOnTheWallSkill somewhere speech I cant remember right now but you will see it) just copy and paste it

              interfaces - here I picked the “display”
              endpoint here you need the ARN copied from earlier steps.
              save the model and then build it.

              after that you should be able to test it and it should say “yes my Queen etc”

              step 9 in joanaz guide tell us to copy the alexa skill id and insert into the index.js witch is in the MirrorMirrorOnTheWallSkill

              After that you have to rezip those files in the src folder in the module: MirrorMirrorOnTheWallSkill just like before and upload it to lambda function.

              BUT before you rezip you have to edit /src/MirrorMirror.js (inside the
              MirrorMirrorOnTheWallSkill,)

              and paste your hostid: witch you will fet from the:

              https://signin.aws.amazon.com/signin?redirect_uri=https%3A%2F%2Fconsole.aws.amazon.com%2Fiot%2Fhome%3Fregion%3Dus-east-1%26state%3DhashArgs%2523%252Fsettings%26isauthcode%3Dtrue&client_id=arn%3Aaws%3Aiam%3A%3A015428540659%3Auser%2Ficebreaker&forceMobileApp=0

              when thats done rezip it again and upload to lambda.

              1 Reply Last reply Reply Quote 0
              • O Offline
                OceanK
                last edited by

                this part here I dont get:

                MirrorMirror.js in this folder, and again, replace the keyPath, certPath, and caPath to your own.

                keyPath: __dirname + “/certs/MagicMirror.private.key”,
                certPath: __dirname + “/certs/MagicMirror.cert.pem”,
                caPath: __dirname + “/certs/root-CA.crt”,

                should we delete the __dirname + and then enter our path?

                1 Reply Last reply Reply Quote 0
                • richland007R Offline
                  richland007
                  last edited by richland007

                  I do’not think so …as long your exact copy of cert, private key and CA certificate files are with those exact names…meaning MagicMirror and you have them saved in that actual working directory where that file MagicMirror.js is than it ads those files automatically.
                  other than that the MagicMirror.js will through an error for the “___dirname+” part.

                  I think…or wait on a second note… if you remove the anything after the keyPath: (and the other 2) and hard code the actual path to the files should work as well and will be a safer bet actually, so do that
                  Denis

                  1 Reply Last reply Reply Quote 0
                  • richland007R Offline
                    richland007
                    last edited by

                    Ok so i was reading your steps and i basically did exactly the same thing and followed @joanaz instruction but with one exception!!! … are you absolutely sure that “node_modules” folder gets created by “npm install” inside the “src” folder on the “MirrorMirrorOnTheWallSkill” ??? …OR… did “node_modules” get created when you run “start.sh” on the IoT procedure and than copy that over to the “src” folder???

                    Do we only copy the 4 certificate files from the IoT part only or everything in that folder over to the “src” ???

                    Denis

                    1 Reply Last reply Reply Quote 0
                    • richland007R Offline
                      richland007
                      last edited by

                      @OceanK Ok major major development on my end i got it to work …sort of LOL :) …meaning when i am on Magic Mirror and its doing its thing displaying the modules i can call Alexa ask her to start “on the wall” the mirror replies back with How can i Help you my Queen but when i ask to display a text or anything it says there was a problem with your skills response. Why is that???

                      D

                      O 1 Reply Last reply Reply Quote 0
                      • O Offline
                        OceanK @richland007
                        last edited by

                        @richland007 Thais is EXACTLY! where I am =)

                        I have to check this in the weekend from scratch!

                        I think there is something wrong with the lamda.

                        displaying what modules? sounds like you have come further than me?

                        1 Reply Last reply Reply Quote 0
                        • richland007R Offline
                          richland007
                          last edited by

                          @OceanK Well i meant i got the MMM-MirrorMirrorOnTheWall module for Magic Mirror figured out but it is not working right if that makes sense. :rolling_on_the_floor_laughing: :rolling_on_the_floor_laughing: So when Magic Mirror itself is lunched and it is displaying other modules like Weather and Calendar and all that, it is not throwing an error for MMM-MirrorMirrorOnTheWall so i got the certs path figured out and you need to run “npm Install” on MMM-MirrorMirrorOnTheWall module before using it after you clone it on modules folder. I use Alexa Pi which has its own module on MM so when i call Alexa and i ask to “Start On the wall” the mirror replies as “Hello my queen what can i do for you” but when i ask to do something like hide a module or display anything it says an error has occurred with your skills response please try again later. I have no clue whats causing that so i guess some more research is needed.
                          Denis

                          1 Reply Last reply Reply Quote 0
                          • O Offline
                            OceanK
                            last edited by

                            Hey!

                            I have AlexaPi Aswell. In the module MMM-MirrorMirronOnTheWall, you copied the certs folder from MirrorMirrorOnTheWallSkill , right?

                            Then npm install in MMM-MirrorMirronOnTheWall

                            Did you change the path in anyway in the files for the certs? Like we discussed before ?

                            Regards K

                            1 Reply Last reply Reply Quote 0
                            • O Offline
                              OceanK
                              last edited by

                              OK so Im going to do this again from scratch.

                              what did you enter in your config.js file for the mirror, just this part?

                              {
                              module: ‘MMM-MirrorMirrorOnTheWall’,
                              position: “middle_center”,
                              config: {}
                              },

                              1 Reply Last reply Reply Quote 0
                              • richland007R Offline
                                richland007
                                last edited by

                                Ok so here is my hardcoding of certs path on the Magic Mirror module

                                keyPath: “/home/pi/MagicMirror/modules/MMM-MirrorMirrorOnTheWall/certs/MagicMirror.private.key”,
                                certPath: “/home/pi/MagicMirror/modules/MMM-MirrorMirrorOnTheWall/certs/MagicMirror.cert.pem”,
                                caPath: “/home/pi/MagicMirror/modules/MMM-MirrorMirrorOnTheWall/certs/root-CA.crt”,

                                Also dont forget to add your iot-endpoint

                                region: “us-east-1”,
                                host: “aonu6XXXX8o.iot.us-east-1.amazonaws.com”,

                                I kept the config on module just as yours or the default for testing purposses

                                1 Reply Last reply Reply Quote 0
                                • O Offline
                                  OceanK
                                  last edited by

                                  Cool thanx, well I am at same stage as you, When I try the skill after build and the test. I get the !my queen etc etc" when I try to say “close all modules” I just get the error response skill etc.

                                  so I have no cloue whats wrong. I think its something with the lambda function itself.

                                  When I try to say “find youtube video on how to make slime” she says the error but when I check the clod logs its actually looking for videon on slime/youtube:’

                                  2018-09-01T15:41:33.768Z 806824d0-adfd-11e8-aea5-f7829904bba6
                                  {
                                  “kind”: “youtube#searchListResponse”,
                                  “etag”: “"XI7nbFXulYBIpL0ayR_gDh3eu1k/trfpcxzuGVnn32QncnihWoxjjgs"”,
                                  “nextPageToken”: “CAEQAA”,
                                  “regionCode”: “US”,
                                  “pageInfo”: {
                                  “totalResults”: 1000000,
                                  “resultsPerPage”: 1
                                  },
                                  “items”: [
                                  {
                                  “kind”: “youtube#searchResult”,
                                  “etag”: “"XI7nbFXulYBIpL0ayR_gDh3eu1k/BqgWo2mCqNCYN8WncT1NMhRM7VE"”,
                                  “id”: {
                                  “kind”: “youtube#video”,
                                  “videoId”: “eaALjlyKDZI”
                                  },
                                  “snippet”: {
                                  “publishedAt”: “2017-04-11T19:00:03.000Z”,
                                  “channelId”: “UCIze4Pldy_KjXhYHqBwMLDQ”,
                                  “title”: “How to Make SLIME for Beginners! Best EASY Way to Make Slime!”,
                                  “description”: “YOU CAN NOW BUY MY SLIME ON ETSY: https://goo.gl/9GMmWA Hey guys! Today I’ll be showing you the best, easiest way to make slime. Check out my other …”,
                                  “thumbnails”: {
                                  “default”: {
                                  “url”: “https://i.ytimg.com/vi/eaALjlyKDZI/default.jpg”,
                                  “width”: 120,
                                  “height”: 90
                                  },
                                  “medium”: {
                                  “url”: “https://i.ytimg.com/vi/eaALjlyKDZI/mqdefault.jpg”,
                                  “width”: 320,
                                  “height”: 180
                                  },
                                  “high”: {
                                  “url”: “https://i.ytimg.com/vi/eaALjlyKDZI/hqdefault.jpg”,
                                  “width”: 480,
                                  “height”: 360
                                  }
                                  },
                                  “channelTitle”: “Courtney Lundquist”,
                                  “liveBroadcastContent”: “none”
                                  }
                                  }
                                  ]
                                  }

                                  1 Reply Last reply Reply Quote 0
                                  • O Offline
                                    OceanK
                                    last edited by

                                    and here is some error in the logs when I try other stuff:

                                    2018-09-01T15:41:09.907Z 722f8cd3-adfd-11e8-befe-f5fd64df2d92
                                    {
                                    “errorMessage”: “In state: . No handler function was defined for event SessionEndedRequest and no ‘Unhandled’ function was defined.”,
                                    “errorType”: “Error”,
                                    “stackTrace”: [
                                    “AlexaRequestEmitter.EmitEvent (/var/task/node_modules/alexa-sdk/lib/alexa.js:212:15)”,
                                    “AlexaRequestEmitter.ValidateRequest (/var/task/node_modules/alexa-sdk/lib/alexa.js:181:23)”,
                                    “HandleLambdaEvent.i18n.use.init (/var/task/node_modules/alexa-sdk/lib/alexa.js:123:29)”,
                                    “/var/task/node_modules/i18next/dist/commonjs/i18next.js:190:9”,
                                    “done (/var/task/node_modules/i18next/dist/commonjs/i18next.js:281:21)”,
                                    “/var/task/node_modules/i18next/dist/commonjs/i18next.js:302:7”,
                                    “I18n.loadResources (/var/task/node_modules/i18next/dist/commonjs/i18next.js:238:7)”,
                                    “I18n.changeLanguage (/var/task/node_modules/i18next/dist/commonjs/i18next.js:301:10)”,
                                    “load (/var/task/node_modules/i18next/dist/commonjs/i18next.js:186:14)”,
                                    “I18n.init (/var/task/node_modules/i18next/dist/commonjs/i18next.js:195:7)”
                                    ]

                                    1 Reply Last reply Reply Quote 0
                                    • richland007R Offline
                                      richland007
                                      last edited by

                                      Where do you find these log files at?? so i can look at mine??
                                      it seems like it doesn’t find the way to sent the results back and where to send them??

                                      1 Reply Last reply Reply Quote 0
                                      • O Offline
                                        OceanK
                                        last edited by

                                        Login to your console where u created the lamda, search for CloudWatch and then Logs, console.aws.amazon.com

                                        1 Reply Last reply Reply Quote 0
                                        • O Offline
                                          OceanK
                                          last edited by

                                          Whats the progress and status on this?@richland007

                                          1 Reply Last reply Reply Quote 0
                                          • richland007R Offline
                                            richland007
                                            last edited by

                                            @OceanK Absolutely nothing i have to do much more research and read everything on the forums when it comes to this.
                                            It seems like it has a problem with: No handler function was defined for event AMAZON.FallbackIntent and no ‘Unhandled’ function was defined.

                                            Here is my error log as well and it is exactly like yours

                                            0_1536003807221_MyLamdaError.png

                                            We need to continue reading
                                            Denis

                                            1 Reply Last reply Reply Quote 0

                                            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                            With your input, this post could be even better 💗

                                            Register Login
                                            • 1
                                            • 2
                                            • 3
                                            • 4
                                            • 5
                                            • 6
                                            • 7
                                            • 7 / 7
                                            • First post
                                              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