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-Assistant (updated) -- Your voice to the world!

    Scheduled Pinned Locked Moved Utilities
    22 Posts 10 Posters 14.5k Views 11 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.
    • E Offline
      E3V3A
      last edited by E3V3A

      I have now updated to the Google Assistant and MM Voice Control module: MMM-Assistant. AFAICT it all works now. So now we can focus on improvements, but any help or testing is always appreciated.

      0_1522235586250_firefox_2018-03-28_14-12-24.png

      [card:eouia/MMM-Assistant]

      PS. I am not original developer of this module, I just help maintaining it.

      "Everything I do (here) is for free – altruism is the way!"
      MMM-FlightsAbove, MMM-Tabulator, MMM-Assistant (co-maintainer)

      Mykle1M 1 Reply Last reply Reply Quote 3
      • Mykle1M Offline
        Mykle1 Project Sponsor Module Developer @E3V3A
        last edited by

        @E3V3A

        I’m sure you just made a lot of people happy. Well done, sir. :-)

        Create a working config
        How to add modules

        E 1 Reply Last reply Reply Quote 1
        • E Offline
          E3V3A @Mykle1
          last edited by

          @Mykle1 Thank you! Not sure there will be that many… But now I can focus to also add Alexa!

          "Everything I do (here) is for free – altruism is the way!"
          MMM-FlightsAbove, MMM-Tabulator, MMM-Assistant (co-maintainer)

          D Mykle1M 2 Replies Last reply Reply Quote 3
          • D Offline
            Damian @E3V3A
            last edited by

            @E3V3A said

            But now I can focus to also add Alexa!

            Thanks very much for your work on this, and will, along with many others, really look forward to seeing Alexa actually working on my Mirror.

            Thanks again.

            1 Reply Last reply Reply Quote 0
            • Mykle1M Offline
              Mykle1 Project Sponsor Module Developer @E3V3A
              last edited by

              @E3V3A said in MMM-Assistant (updated) -- Your voice to the world!:

              Thank you! Not sure there will be that many… But now I can focus to also add Alexa!

              You are welcome, sir. Oh, I think there will be more and more once the word gets out. And once you’ve integrated Alexa, you’ll be famous. :-)

              Create a working config
              How to add modules

              D 1 Reply Last reply Reply Quote 1
              • D Offline
                Damian @Mykle1
                last edited by

                @Mykle1 said

                @E3V3A

                once you’ve integrated Alexa, you’ll be famous. :-)

                I’m unsure if @E3V3A knows the grief and suffering so many have endured trying to install Alexa, by the book, word by word, and failed to get it to work, and/or it failed to work shortly afterwards?

                So yeah, I’m sure there are quite a lot of people who would agree that @E3V3A Will be famous ;-)

                1 Reply Last reply Reply Quote 0
                • drftgD Offline
                  drftg
                  last edited by drftg

                  @E3V3A Wow, thank you for contributing!

                  I installed a fresh copy using the instructions. Not all instructions are completely up-to-date at the moment but I think I found where everything is located. Keys and such now go into the assets folder and I found a google-auth.js in the scripts folder. Unfortunately when i run

                  node google-auth.js
                  

                  it reports the following error:

                  /home/pi/MagicMirror/modules/MMM-Assistant/node_modules/google-assistant/components/auth.js:18
                  throw new Error(‘Missing “keyFilePath” from config (should be where your JSON file is)’);

                  The same error is given when running google-auth2.js

                  Any ideas how I should proceed?


                  v9.10.1
                  5.8.0
                  Linux MagicMirror 4.14.30-v7+ #1102 SMP Mon Mar 26 16:45:49 BST 2018 armv7l GNU/Linux
                  No LSB modules are available.
                  Distributor ID: Raspbian
                  Description: Raspbian GNU/Linux 9.4 (stretch)
                  Release: 9.4
                  Codename: stretch

                  E 2 Replies Last reply Reply Quote 1
                  • E Offline
                    E3V3A @drftg
                    last edited by

                    @drftg Hi! Did you clone that in the last 20 hours? I made a lot of changes the last few days…
                    I still did not test that script since my changes. You’re the one now!

                    Please post:

                    • the content of script file
                    • the MM config (with only your MMM-Assistant part)
                    • the output of ls -al ./assets (from this module directory)

                    "Everything I do (here) is for free – altruism is the way!"
                    MMM-FlightsAbove, MMM-Tabulator, MMM-Assistant (co-maintainer)

                    1 Reply Last reply Reply Quote 0
                    • E Offline
                      E3V3A @drftg
                      last edited by

                      @drftg
                      Try this:

                      cd ./assets
                      # check if you already have an access token file (google-access-tokens.json)?
                      ls -al 
                      # if YES, then try:
                      chmod 666 google-access-tokens.json
                      cd ../scripts
                      node google-auth.js
                      # if not OK, then try:
                      cd ..
                      node ./scripts/google-auth.js
                      # if not OK, then try to edit the script file, and remove one "dot" from the locations to: 
                      # "./assets/google-access-tokens.json" and try to run again from base module location.
                      # if not OK, IDK and we try something else
                      

                      "Everything I do (here) is for free – altruism is the way!"
                      MMM-FlightsAbove, MMM-Tabulator, MMM-Assistant (co-maintainer)

                      drftgD A 2 Replies Last reply Reply Quote 0
                      • MedoM Offline
                        Medo
                        last edited by

                        Can this module be worked with by NOT using Google functionallity?
                        I just want to control my mirror modules…
                        Thanks

                        E 1 Reply Last reply Reply Quote 0
                        • drftgD Offline
                          drftg @E3V3A
                          last edited by drftg

                          @E3V3A said in MMM-Assistant (updated) -- Your voice to the world!:

                          @drftg
                          Try this:

                          cd ./assets
                          # check if you already have an access token file (google-access-tokens.json)?
                          ls -al 
                          # if YES, then try:
                          chmod 666 google-access-tokens.json
                          cd ../scripts
                          node google-auth.js
                          # if not OK, then try:
                          cd ..
                          node ./scripts/google-auth.js
                          # if not OK, then try to edit the script file, and remove one "dot" from the locations to: 
                          # "./assets/google-access-tokens.json" and try to run again from base module location.
                          # if not OK, IDK and we try something else
                          

                          @E3V3A Thank you. I already tried a lot of those changes. Running the old script, supplying absolute paths, placing files in different folders, naming them differently, etcetera. Possibly something changed in the node module google-assistant? … I will test more later, maybe start from scratch again

                          1 Reply Last reply Reply Quote 0
                          • ChrisC Offline
                            Chris
                            last edited by

                            Hello,

                            I have also tried to reinstall this module since its update but I also failed to make it work. I will wait until the wiki is updated because I did not understand the entire installation process.
                            I have the impression that elements of the old installation procedure and the new one have mixed up and it is not very clear.
                            Anyway, thanks for the work done by E3V3A to make this module work.

                            1 Reply Last reply Reply Quote 0
                            • A Offline
                              aelmiri @E3V3A
                              last edited by

                              @E3V3A Hi!
                              Finished my magic mirror last week.

                              Been struggling for a week and I am getting the same error:

                              node google-auth.js
                              it reports the following error:

                              /home/pi/MagicMirror/modules/MMM-Assistant/node_modules/google-assistant/components/auth.js:18
                              throw new Error(‘Missing “keyFilePath” from config (should be where your JSON file is)’);


                              only file in assets is: config.txt


                              We will be very thankfull if the wiki installation instruction get an update too.

                              Thanks for your great support. You are making many people happy.

                              E 1 Reply Last reply Reply Quote 0
                              • drftgD Offline
                                drftg
                                last edited by

                                Found a solution. In google-auth.js change

                                const config = {
                                  auth: {
                                    keyFilePath: path.resolve(__dirname,     '../assets/google-client-secret.json'), // secret.json
                                    savedTokensPath: path.resolve(__dirname, '../assets/google-access-tokens.json'), // resources/tokens.js
                                  },
                                }
                                

                                to

                                const config = {
                                    keyFilePath: path.resolve(__dirname,     '../assets/google-client-secret.json'), // secret.json
                                    savedTokensPath: path.resolve(__dirname, '../assets/google-access-tokens.json'), // resources/tokens.js
                                }
                                
                                
                                1 Reply Last reply Reply Quote 1
                                • E Offline
                                  E3V3A @Medo
                                  last edited by

                                  @Medo said in MMM-Assistant (updated) -- Your voice to the world!:

                                  I just want to control my mirror modules…

                                  Then you use MMM-Voice with Lucy.

                                  "Everything I do (here) is for free – altruism is the way!"
                                  MMM-FlightsAbove, MMM-Tabulator, MMM-Assistant (co-maintainer)

                                  1 Reply Last reply Reply Quote 1
                                  • E Offline
                                    E3V3A @aelmiri
                                    last edited by

                                    @aelmiri said in MMM-Assistant (updated) -- Your voice to the world!:

                                    /home/pi/MagicMirror/modules/MMM-Assistant/node_modules/google-assistant/components/auth.js:18
                                    throw new Error(‘Missing “keyFilePath” from config (should be where your JSON file is)’);

                                    Ok, see solution from @drftg, above.

                                    only file in assets is: config.txt

                                    Of those files, you need to download one, one is generated from script, and another you need to create… Hmm, yes, I see the wiki doc definitely need updating… I’ll try to go through the procedure myself and update wiki after Easter.

                                    "Everything I do (here) is for free – altruism is the way!"
                                    MMM-FlightsAbove, MMM-Tabulator, MMM-Assistant (co-maintainer)

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

                                      Thnx! I will check this out when I’m back from Milano

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

                                        Hello all,
                                        I have a mirror that is working fantastically, with swipe, and pages modules with sonic sensors, PIR sensor, facial recognition, dht22, relays ad a bunch of modules for me and my wife all working together on the same raspberry pi 3 i also have Alexa Pi a full blown Alexa assistant that only shows on the mirror that is listening and working all of them are working just fine the Alexa pi is using a usb audio device and a mic and for camera i use a raspberry pi camera.

                                        Anyhow my question is if i install MMM-Assistant to voice control the mirror’s modules etc, will it interfere with the Alexa assistant i already got working??? Does it have anything to do with access to the usb audio device which one of the modules will have access to it first?? Or will they both be able to cooperate each respectively answering to their own call signs??

                                        Thank you
                                        It sounds like a great module
                                        Denis

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

                                          @e3v3a
                                          Well not like anyone answered on my first post on this thread right above but my next question is…Do i absolutely have to install the Google Assistant part meaning to configure the API etc for the GA??? … all i need is the mirror voice control to hide and show the modules ?? Will the mirror-control part work without configuring the GA side??
                                          Please let me know
                                          Denis

                                          D 1 Reply Last reply Reply Quote 0
                                          • D Offline
                                            dmwilsonkc @richland007
                                            last edited by

                                            @richland007 If all you want to do is control the modules I would recommend using MMM-voice with the Hello-Lucy modifications. You may run into the same problem that I had though. Two services cannot use the same resource at the same time (microphone). In the end, I wrote a skill for Mycroft and just decided to use the open-source AI Mycroft to also control the mirror.

                                            Here’s a short video.

                                            Here’s a thread on the Mycroft forum that covers the history of how I got there.

                                            I have not used the MMM-assistant, but my guess is you will run into the same Error: Resource busy that I had with Mycroft and the MMM-voice module.

                                            I hope this post helps.

                                            Mykle1M richland007R 2 Replies Last reply Reply Quote 1

                                            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
                                            • 1 / 2
                                            • 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