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-Assistantmk2 and MMM-Hotword not picking up

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    54 Posts 9 Posters 37.7k Views 9 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
      jmartin1009
      last edited by

      @sdetweil do you have any knowledge of these modules? You’ve been a great help in my other problems

      S 1 Reply Last reply Reply Quote 0
      • S Offline
        sdetweil @jmartin1009
        last edited by

        @jmartin1009 i have not used those modules…

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 0
        • S Offline
          sdetweil @jmartin1009
          last edited by sdetweil

          @jmartin1009 if you start MM in developer mode,

          npm start dev
          

          and then select the console tab of the dev window

          do you see the notifications being sent?

          and u are not using MMM-Voice at the same time, right? only one module can have the mic at a time

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          J 1 Reply Last reply Reply Quote 0
          • ejay-ibmE Offline
            ejay-ibm Project Sponsor Module Developer
            last edited by

            seems to be an audio config issue .
            Please paste your config.js file here
            and the outputs of the following commands :
            aplay -l
            arecord -l

            Ejay

            J 1 Reply Last reply Reply Quote 0
            • J Offline
              jmartin1009 @sdetweil
              last edited by

              @sdetweil I’m not using MMM-Voice, I’m using MMM-Assistantmk2 and MMM-Hotword, hotword pics up the word to wake the assistant and assistant takes care of the rest. I’ve been able to talk to the assistant but hotword doesn’t wake when I say the wakeword.

              1 Reply Last reply Reply Quote 0
              • J Offline
                jmartin1009 @ejay-ibm
                last edited by

                @ejay-ibm here is my magicmirror config file:

                var config = {
                	address: "localhost", // Address to listen on, can be:
                	                      // - "localhost", "127.0.0.1", "::1" to listen on loopback interface
                	                      // - another specific IPv4/6 to listen on a specific interface
                	                      // - "", "0.0.0.0", "::" to listen on any interface
                	                      // Default, when address config is left out, is "localhost"
                	port: 8080,
                	ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"], // Set [] to allow all IP addresses
                	                                                       // or add a specific IPv4 of 192.168.1.5 :
                	                                                       // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.1.5"],
                	                                                       // or IPv4 range of 192.168.3.0 --> 192.168.3.15 use CIDR format :
                	                                                       // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.3.0/28"],
                
                	language: "en",
                	timeFormat: 12,
                	units: "imperial",
                
                	modules: [
                	
                		{
                			module: "updatenotification",
                			position: "top_bar"
                		},
                		{
                		    module: "MMM-AssistantMk2",
                		    position: "top_bar",
                		    config: {
                		      record: {
                		        recordProgram : "arecord",  
                		        device        : "plughw:1, 0",
                		      },
                		
                		      notifications: {
                		        ASSISTANT_ACTIVATED: "HOTWORD_PAUSE",
                		        ASSISTANT_DEACTIVATED: "HOTWORD_RESUME",
                		      },
                		    }
                		  },
                		  {
                		    module: "MMM-Hotword",
                		    config: {
                		      record: {
                		        recordProgram : "arecord",  
                		        device        : "plughw:1, 0",
                		      },
                		      autostart:true,
                		      onDetected: {
                		        notification: function (payload) {
                		          return "ASSISTANT_ACTIVATE"
                		        },
                		        payload: function (payload){
                		          return {
                		            profile: payload.hotword
                		          }
                		        }
                		      },
                		    },
                  		},
                		{
                			module: "clock",
                			position: "top_left"
                		},
                		{
                			module: "calendar",
                			header: "US Holidays",
                			position: "top_left",
                			config: {
                				calendars: [
                					{
                						symbol: "calendar-check",
                						url: "webcal://www.calendarlabs.com/templates/ical/US-Holidays.ics"
                					}
                				]
                			}
                		},
                		{
                			module: "compliments",
                			position: "lower_third"
                		},
                		{
                			module: "currentweather",
                			position: "top_right",
                			config: {
                				location: "Dubuque",
                				locationID: "4854529",  //ID from http://bulk.openweathermap.org/sample/; unzip the gz file and find your city
                				appid: "6730254e02c0f50e5d951db321f6fa33"
                			}
                		},
                		{
                			module: "weatherforecast",
                			position: "top_right",
                			header: "Weather Forecast",
                			config: {
                				location: "Dubuque",
                				locationID: "4854529",  //ID from https://openweathermap.org/city
                				appid: "6730254e02c0f50e5d951db321f6fa33"
                			}
                		},
                		{
                    			module: "MMM-EARTH",
                    			position: "bottom_right",
                    			config: {
                        			mode: "Natural",
                        			rotateInterval: 15000,
                        			MaxWidth: "30%",
                        			MaxHeight: "30%",
                    			}
                		},
                		{
                			module: "newsfeed",
                			position: "bottom_bar",
                			config: {
                				feeds: [
                					{
                						title: "New York Times",
                						url: "http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml"
                					}
                				],
                				showSourceTitle: true,
                				showPublishDate: true
                			}
                		},
                		{
                    			module: 'MMM-ShairportMetadata',
                    			position: 'bottom_left',
                    			config: {
                      			    metadataPipe: "/tmp/shairport-sync-metadata", // location of pipe with shairport-sync metadata
                	  			alignment: "center",	// Possible values [left|right|center]. Default: center
                    		}
                  		},
                	]
                
                };
                

                here is the output for aplay -l:

                pi@raspberrypi:~ $ aplay -l
                **** List of PLAYBACK Hardware Devices ****
                card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
                  Subdevices: 7/7
                  Subdevice #0: subdevice #0
                  Subdevice #1: subdevice #1
                  Subdevice #2: subdevice #2
                  Subdevice #3: subdevice #3
                  Subdevice #4: subdevice #4
                  Subdevice #5: subdevice #5
                  Subdevice #6: subdevice #6
                card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
                  Subdevices: 1/1
                  Subdevice #0: subdevice #0
                

                I do use PulseAudio because i use the PS3 eye mic, which uses a mic array that alsamixer doesn’t like, but it works when i talk to the assistant, Hotword just doesn’t hear my wakewords.
                Here is the output for arecord -l

                pi@raspberrypi:~ $ arecord -l
                **** List of CAPTURE Hardware Devices ****
                card 1: CameraB409241 [USB Camera-B4.09.24.1], device 0: USB Audio [USB Audio]
                  Subdevices: 1/1
                  Subdevice #0: subdevice #0
                

                It seems to work whether i use “plughw: 0” and “plughw: 0, 1”.

                S 1 Reply Last reply Reply Quote 0
                • S Offline
                  sdetweil @jmartin1009
                  last edited by

                  @jmartin1009 I would remove the space in the device name

                  "plughw: 0,1"
                  

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

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

                    I just installed MMM-Hotword, and used this config

                            {
                              module: "MMM-Hotword",
                              config: {
                                autostart:true,
                                autorestart: true
                            }
                    

                    and it works fine…
                    i did have a little snowboy rebuild work to do but documented in the hotword install doc…

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    J 3 Replies Last reply Reply Quote 0
                    • J Offline
                      jmartin1009 @sdetweil
                      last edited by

                      @sdetweil I can try removing the space and hope to works, and I had to do the snowboy rebuild already as it said I had an error when I tried to start magicmirror, so that should be okay, so I’ll try deleting the space and if it doesn’t work I will try to rebuild snowboy and try again and I’ll get back to you. Thanks!!

                      1 Reply Last reply Reply Quote 0
                      • J Offline
                        jmartin1009 @sdetweil
                        last edited by

                        @sdetweil is that your config for magicmirror or in the config file or hotword?

                        S 1 Reply Last reply Reply Quote 0
                        • J Offline
                          jmartin1009 @sdetweil
                          last edited by

                          @sdetweil I tried getting rid of the space, I tried adding autorestart=true on both configs, and still no luck :/

                          1 Reply Last reply Reply Quote 0
                          • S Offline
                            sdetweil @jmartin1009
                            last edited by

                            @jmartin1009 just the config for hotword.

                            Sam

                            How to add modules

                            learning how to use browser developers window for css changes

                            1 Reply Last reply Reply Quote 0
                            • ejay-ibmE Offline
                              ejay-ibm Project Sponsor Module Developer
                              last edited by ejay-ibm

                              Hello,
                              I agree with Sam :
                              You need to remove the space at both places.
                              1st in MMM-AssistantMk2

                              module: "MMM-AssistantMk2",
                              		    position: "top_bar",
                              		    config: {
                              		      record: {
                              		        recordProgram : "arecord",  
                              		        device        : "plughw:1,0",
                              

                              And as well in

                              module: "MMM-Hotword",
                              		    config: {
                              		      record: {
                              		        recordProgram : "arecord", 
                              		        device        : "plughw:1,0",
                              

                              If that still doesn’t work try just :
                              plughw:1

                              As well you should check in the audio properties that your mic have enough gain.

                              you can check this by typing
                              alsamixer
                              in command line

                              hope this helps

                              Ejay

                              J 2 Replies Last reply Reply Quote 0
                              • J Offline
                                jmartin1009 @ejay-ibm
                                last edited by

                                @ejay-ibm @sdetweil what should I have in the module list in the config.js for the magicmirror program for each module? Not sure if I have the right stuff or too much or what

                                1 Reply Last reply Reply Quote 0
                                • J Offline
                                  jmartin1009 @ejay-ibm
                                  last edited by

                                  @ejay-ibm also is there anyway to change the gain or whatever? I went to alsamixer and went to the capture section and the bar doesn’t move or anything when I speak into my mic. Not sure if anything is supposed to happen but it says both L and R capture are the 100, not sure what that means.

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

                                    @ejay-ibm I also changed it so the sauce wasn’t there and I made it so it said plughw:1 in all of them, but still nothing

                                    1 Reply Last reply Reply Quote 0
                                    • ejay-ibmE Offline
                                      ejay-ibm Project Sponsor Module Developer
                                      last edited by

                                      This is my MMM-Hotword config.js part :

                                      {
                                            module: "MMM-Hotword",
                                            config: {
                                              snowboy: [
                                                /*	{
                                      						"hotwords": "smartmirror",
                                      						"file": "resources/models/smart_mirror.umdl",
                                      						"sensitivity": "0.5"
                                      					},
                                      
                                      */
                                                {
                                                  hotwords: "alexa",
                                                  file: "resources/models/alexa.umdl",
                                                  sensitivity: "0.6"
                                                },
                                      
                                                {
                                                  file: "resources/models/jarvis.umdl",
                                                  sensitivity: "0.6,0.60",
                                                  hotwords: ["jarvis", "jarvis"]
                                                }
                                              ],
                                              record: {
                                                sampleRate: 16000,
                                                threshold: 0.5,
                                                thresholdStart: null,
                                                thresholdEnd: null,
                                                silence: 1,
                                                verbose: false,
                                                recordProgram: "arecord",
                                                device: "plughw:1"
                                              },
                                              autostart: true,
                                              autorestart: true,
                                              notifications: {
                                                PAUSE: "HOTWORD_PAUSE",
                                                RESUME: "HOTWORD_RESUME",
                                                LISTENING: "HOTWORD_LISTENING",
                                                SLEEPING: "HOTWORD_SLEEPING",
                                                ERROR: "HOTWORD_ERROR"
                                              },
                                              onDetected: {
                                                notification: function(payload) {
                                                  return "ASSISTANT_ACTIVATE";
                                                },
                                                payload: function(payload) {
                                                  return {
                                                    profile: payload.hotword
                                                  };
                                                }
                                              }
                                            }
                                          },
                                      

                                      You can give it a try .

                                      Ejay

                                      J 1 Reply Last reply Reply Quote 0
                                      • S Offline
                                        sdetweil @jmartin1009
                                        last edited by

                                        @jmartin1009 but, that explains no response from the modules!

                                        Sam

                                        How to add modules

                                        learning how to use browser developers window for css changes

                                        J 1 Reply Last reply Reply Quote 0
                                        • J Offline
                                          jmartin1009 @ejay-ibm
                                          last edited by

                                          @ejay-ibm that is for the MM config.js right? Or is that what you have in the MMM-Hotword.js config file?

                                          1 Reply Last reply Reply Quote 0
                                          • J Offline
                                            jmartin1009 @sdetweil
                                            last edited by

                                            @sdetweil What explains no response from the modules? My mic’s gain in alsamixer? if so how can i fix that? Or should i just get a new mic

                                            S 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
                                            • 1 / 3
                                            • 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