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.

    What's the difference?

    Scheduled Pinned Locked Moved Troubleshooting
    15 Posts 2 Posters 7.4k Views 2 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.
    • Mykle1M Offline
      Mykle1 Project Sponsor Module Developer @strawberry 3.141
      last edited by

      @strawberry-3.141

      Thank you, mate! :-)

      Create a working config
      How to add modules

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

        @strawberry-3.141

        I spent a day with the docs that you suggested and I successfully broadcast a notification from MMM-voice using this.sendNotification('HIDE_LUCY'). I successfully received that notification in MMM-EasyPix (test module) this way:

        if (notification === 'HIDE_LUCY') {
            MM.getModules().enumerate((module) => {
                        module.hide(1000);
                    });
        

        However, this resulted in ALL modules being hidden, not just MMM-EasyPix, which was my intention. I then tried
        moduleA.show(0, {force: true});

        if (notification === 'HIDE_LUCY') {
            MMM-EasyPix.hide(0, {force: true});
        

        and

        if (notification === 'HIDE_LUCY') {
            module_0_MMM-EasyPix.hide(0, {force: true});
        

        Nothing changed.

        module_0_MMM-EasyPix I got from examining the elements in dev console. MMM-voice in these trials is module_6_MMM-voice.

        I then removed all edits to MMM-EasyPix. Instead of trying to have MMM-EasyPix hide itself when it receives a notification, I tried to have MMM-voice hide MMM-EasyPix directly using moduleA.hide(0, {lockString: "module_b_identifier"});. One is commented out but both do not work as expected

        else if (notification === 'HIDE_LUCY') {
            //    MMM-EasyPix.hide(0, {lockString: "module_6_MMM-voice"});
                  module_0_MMM-EasyPix.hide(0, {lockString: "module_6_MMM-voice"});    
                }
        

        I know I’m going about it the wrong way. That’s painfully obvious, but I thought if I could get it to work then I would continue to find a more efficient way of doing it.

        MMM-voice works amazingly well on some laptops that I’m experimenting with. It very intelligently added “LUCY” to the words.json file and the MMM-voice.dic file automatically. I determined this was done in the node_helper via the generateDicLM() and fs.writeFile() functions when all I did was add ‘HIDE LUCY’ and ‘SHOW LUCY’ to the sentences array. Fantastic!

        And lastly, the only other modification I made was to the socketNotificationReceived function of the MMM-voice.js file here

        else if (notification === 'HIDE_MODULES') {
                    MM.getModules().enumerate((module) => {
                        module.hide(1000);
                    });
                } else if (notification === 'SHOW_MODULES') {
                    MM.getModules().enumerate((module) => {
                        module.show(1000);
                    });
        

        and here

        else if (notification === 'HIDE_LUCY') {
            //    MMM-EasyPix.hide(0, {lockString: "module_6_MMM-voice"});
                  module_0_MMM-EasyPix.hide(0, {lockString: "module_6_MMM-voice"});    
                }
                
                else if (notification === 'SHOW_LUCY') {
             //     MMM-EasyPix.show(0, {lockString: "module_6_MMM-voice"});
                    module_0_MMM-EasyPix.show(0, {lockString: "module_6_MMM-voice"});
                }
        

        So, if you care to give me some pointers, or point me in the right direction, or simply point out my mistakes so that I might try to correct them, I would greatly and humbly appreciate it. :-)

        Peace!

        Create a working config
        How to add modules

        strawberry 3.141S 1 Reply Last reply Reply Quote 0
        • strawberry 3.141S Offline
          strawberry 3.141 Project Sponsor Module Developer @Mykle1
          last edited by

          @Mykle1 just do that in easypix

          if (notification === 'HIDE_LUCY') {
              this.hide(1000);
          }
          

          Please create a github issue if you need help, so I can keep track

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

            @strawberry-3.141 said in What’s the difference?:

            just do that in easypix

            Success! :-)

            Now I plan to do it the right way. I’ll take another look at the DEVELOPER document and learn how to properly register my modules with MMM-voice.

            Thank you!

            Peace!

            Create a working config
            How to add modules

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

              @strawberry-3.141

              Is there any way to run the bash dependencies.sh command on a Windows machine? I see that it requires sudo, which Windows does not have, so the installation fails immediately.

              Create a working config
              How to add modules

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

                @strawberry-3.141

                This is what I tried to get MMM-voice working under windows:
                I successfully installed MMM-voice on a laptop that is running ubuntu. It works just fine there. So I copied the MMM-voice folder, the pocketsphinx folder and the sphinxbase folder from the ubuntu machine and pasted them in their respective directories on the Windows machine. I did get an “initializing” message once before getting the dreaded “ERROR” message. I tried microphone: 2, (numbers 1 thru 5) but all failed.

                Anyway, if there is a way to install this under Windows I would really appreciate some direction. Thanks.

                Peace!

                Create a working config
                How to add modules

                strawberry 3.141S 1 Reply Last reply Reply Quote 0
                • strawberry 3.141S Offline
                  strawberry 3.141 Project Sponsor Module Developer @Mykle1
                  last edited by

                  @Mykle1 never tried to install it on windows, you need ti install all dependencies manually if they even exist for windows, then make sure when they get used that the path etc is correct

                  Please create a github issue if you need help, so I can keep track

                  Mykle1M 2 Replies Last reply Reply Quote 1
                  • Mykle1M Offline
                    Mykle1 Project Sponsor Module Developer @strawberry 3.141
                    last edited by

                    @strawberry-3.141

                    Ok, thanks. I’m looking into that right now

                    Create a working config
                    How to add modules

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

                      @strawberry-3.141

                      I can now use MMM-voice to hide and show any module individually or all at once . I currently have about 10 working. When I launch MM I only have one module showing. All others are hidden by design. I am quite pleased with this.

                      The past 2 days I’ve been trying to make the keyword put MMM-voice directly into voice mode, as I will only be using it in voice mode to hide and show modules, sort of like MMM-RemoteControl using voice. I’ve tried notifications and socketNotifications, triggered by the keyword, to send a VOICE notification to change the mode to VOICE but I am defeated. i would really appreciate some advice on how to accomplish this. Thanks

                      Peace!

                      Create a working config
                      How to add modules

                      strawberry 3.141S 1 Reply Last reply Reply Quote 0
                      • strawberry 3.141S Offline
                        strawberry 3.141 Project Sponsor Module Developer @Mykle1
                        last edited by

                        @Mykle1 not sure if i understand there is a check if the current mode is voice if so there will be no notification sent, you need to remove that if it is what you want

                        Please create a github issue if you need help, so I can keep track

                        Mykle1M 1 Reply Last reply Reply Quote 0
                        • 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