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 - Alexa voice control to hide/show modules and display text/images

    Scheduled Pinned Locked Moved System
    184 Posts 25 Posters 364.6k Views 23 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.
    • J Offline
      Journeytojah
      last edited by Journeytojah

      Well, i get the same error when entering a sample utterance:

      The remote endpoint could not be called, or the response it returned was invalid.
      

      and in Lambda when i test:

      START RequestId: a70ecb9c-efe6-11e6-b979-693b99b365f9 Version: $LATEST
      END RequestId: a70ecb9c-efe6-11e6-b979-693b99b365f9
      REPORT RequestId: a70ecb9c-efe6-11e6-b979-693b99b365f9	Duration: 3003.26 ms	Billed Duration: 3000 ms 	Memory Size: 128 MB	Max Memory Used: 15 MB	
      2017-02-10T23:14:23.605Z a70ecb9c-efe6-11e6-b979-693b99b365f9 Task timed out after 3.00 seconds
      
      

      any help would be welcomed, its keeping me awake at night, would love to get it working :)

      Interesting enough, when i run it locally it connects…
      http://imgur.com/aecZ8af

      Still playing around, no luck…

      Saw this in the log now…

      Unable to import module 'index': Error
      at Function.Module._resolveFilename (module.js:325:15)
      at Function.Module._load (module.js:276:25)
      at Module.require (module.js:353:17)
      at require (internal/module.js:12:17)
      at Object.<anonymous> (/var/task/index.js:27:17)
      at Module._compile (module.js:409:26)
      at Object.Module._extensions..js (module.js:416:10)
      at Module.load (module.js:343:32)
      at Function.Module._load (module.js:300:12)
      at Module.require (module.js:353:17)
      

      Much later edit: so i notice that Lambda runs NodeJS 4.3, i am running 7.5 on the RPi, could that be it?

      S 1 Reply Last reply Reply Quote 0
      • S Offline
        savage_gr1nd
        last edited by savage_gr1nd

        @joanaz I finally got it perfected. And I love it. Minus the fact that we can’t essentially go home on the mirror. I posted it onto github. Is this something doable?

        Edit - I’m dumb and didn’t see the part where you said add a timeout to the module. How do I do this? Once I’m done with that I can finally build my actual mirror onto it :)
        One more edit - looking though files (only on github atm) I can’t find where to change font of text displayed. Is this in a node or am I missing something? Smaller and cleaner is what I’m shooting for lol

        And again. Thank you for writing this. When I saw smart mirrors about a year ago I’ve been dying to do this exact thing. Just didn’t have your brains to get it done:)

        J richland007R 2 Replies Last reply Reply Quote 0
        • S Offline
          savage_gr1nd @Journeytojah
          last edited by savage_gr1nd

          @Journeytojah my big fail with lambda was the overall simplicity. I tried to make it too complicated.
          Start fresh with a new git skill clone. Create a new project on lambda and follow @Joanaz instructions to the letter. When running npm install make sure you’re in /mirrormirroronthewallskill/src before installing dependencies.
          Don’t sudo anything. And node version should be fine. Lambda test never comes out perfect. Check skill test for success connections.
          Also. For youtube and Google APIs make sure billing is enabled for safe measure.

          1 Reply Last reply Reply Quote 0
          • J Offline
            joanaz @savage_gr1nd
            last edited by

            @savage_gr1nd that’s awesome!!! I’ll try to add a timeout on the module, it’s just that videos have different lengths, but I’m sure it can be done. To change font, you can add some css in MMM-MirrorMirrorOnTheWall.css.

            S 2 Replies Last reply Reply Quote 0
            • S Offline
              savage_gr1nd @joanaz
              last edited by

              @joanaz if the video runs through youtube-node, maybe adding into the skill “close video - stop youtube_node”? Or is it not that simple since you tube node is actually inside of the mmm module itself?

              1 Reply Last reply Reply Quote 0
              • S Offline
                savage_gr1nd @joanaz
                last edited by

                @joanaz okay so font check. Adding it’s own module in the module list hides it so that’s a temp fix. But I’ll need your help with maybe adding a lamda function for stopping the video and closing it. I think if you could get those two to work this mod would be perfect.

                1 Reply Last reply Reply Quote 0
                • J Offline
                  jdiggity
                  last edited by

                  Alright, I’ve tried setting up the skill from scratch 3 times, following the directions to a T. I still hit the same issue, the skill times out with the following error:

                  Unable to import module 'index': Error
                  at Function.Module._resolveFilename (module.js:325:15)
                  at Function.Module._load (module.js:276:25)
                  at Module.require (module.js:353:17)
                  at require (internal/module.js:12:17)
                  at Object. (/var/task/index.js:27:17)
                  at Module._compile (module.js:409:26)
                  at Object.Module._extensions..js (module.js:416:10)
                  at Module.load (module.js:343:32)
                  at Function.Module._load (module.js:300:12)
                  at Module.require (module.js:353:17)
                  

                  I’ve seen this error mentioned a few times in this thread, but no resolution has come up. Any ideas on where to start next? I’m really interested in this idea, but I’m a bit stumped as I don’t have experience with AWS.

                  J 1 Reply Last reply Reply Quote 0
                  • J Offline
                    Journeytojah @jdiggity
                    last edited by

                    @jdiggity I have the same problem. Started over again at least 5 times, even on a fresh install of Raspbian.

                    The index.js and mirrormirror.js are not missing any commas or brackets, would have to wait for @joanaz to get back to us …

                    1 Reply Last reply Reply Quote 0
                    • S Offline
                      savage_gr1nd
                      last edited by

                      It sounds like you guys are zipping the src folder itself also.
                      In terminal navigate to INSIDE the src folder then

                      zip -r code certs index.js package.json node_modules MirrorMirror.js

                      J 1 Reply Last reply Reply Quote 0
                      • J Offline
                        Journeytojah @savage_gr1nd
                        last edited by

                        @savage_gr1nd i think its pretty clear that we’re not zipping the src folder but the contents. I did it form terminal as well as selecting everything inside of it and using right click, compress…

                        tried names like import.zip export.zip package.json.zip index.zip indexjs.zip nothing worked…

                        J 1 Reply Last reply Reply Quote 0
                        • S Offline
                          savage_gr1nd
                          last edited by

                          Is the error code your getting from the lambda test?

                          1 Reply Last reply Reply Quote 0
                          • J Offline
                            joanaz @Journeytojah
                            last edited by

                            @Journeytojah that’s weird, like @savage_gr1nd said, the problem is usually on how you zip the files and folders inside src folder. It has nothing to do with RPi, or your zip file name, mine is the default ‘Archive.zip’. Assume you didn’t change the handler setting in Lambda, which should be ‘index.handler’. So you have to recreate the problem for me, show me how you do it step by step.

                            S 2 Replies Last reply Reply Quote 0
                            • S Offline
                              savage_gr1nd @joanaz
                              last edited by savage_gr1nd

                              @joanaz @Journeytojah well also the index calls for cert keys. For safe measure I had my keys come in as MagicMirror so that cert path was perfect and I didn’t have to change it at all. (You don’t put the full path, just edit your personal name on the file inside MirrorMirror.js) and also make sure you have the skill Id inside index.js correct also.

                              1 Reply Last reply Reply Quote 0
                              • S Offline
                                savage_gr1nd @joanaz
                                last edited by

                                @joanaz did you see the alexa module that runs inside magic mirror? I just noticed it. Right now I’m running alexa-avs-sample-app but I was curious if you’ve tested the other to see if it works with no additional booting outside the MagicMirror file

                                J 1 Reply Last reply Reply Quote 0
                                • zman3Z Offline
                                  zman3
                                  last edited by

                                  That’s the error I always get also. I have the the contents of the folder zipped not the folder I left the keys as MagicMirror also and have index.handler selected.

                                  1 Reply Last reply Reply Quote 0
                                  • J Offline
                                    joanaz @savage_gr1nd
                                    last edited by

                                    @savage_gr1nd yeah, but it requires a physical pushbutton. I’m using AlexaPi with my own wake word, so I can activate Alexa by saying “Mirror mirror”.

                                    S 1 Reply Last reply Reply Quote 0
                                    • S Offline
                                      savage_gr1nd @joanaz
                                      last edited by

                                      @joanaz ahhhh. That sucks. I’m running wake word also. I just liked the idea of not having to run it in terminal. Then run mirror. Would have made rebooting simple and flawless. Lol

                                      J 1 Reply Last reply Reply Quote 0
                                      • J Offline
                                        Journeytojah
                                        last edited by

                                        @joanaz @savage_gr1nd I had my certs both as MagicMirror and other names, made sure everything in the code is correct every time I changed anything.

                                        It just wont take it.

                                        I will go around this another way, I’m starting to lose interest in the whole tts concept and will go with something simpler using text :)

                                        J 1 Reply Last reply Reply Quote 0
                                        • J Offline
                                          joanaz @savage_gr1nd
                                          last edited by

                                          @savage_gr1nd you can setup AlexaPi to run automatically after reboot

                                          S 1 Reply Last reply Reply Quote 0
                                          • J Offline
                                            joanaz @Journeytojah
                                            last edited by

                                            @Journeytojah @zman3 see whether this thread helps you.
                                            https://github.com/lorenwest/node-config/issues/275

                                            J 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
                                            • 5
                                            • 6
                                            • 7
                                            • 8
                                            • 9
                                            • 10
                                            • 7 / 10
                                            • 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