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-Hotword,MMM-AssistanMk2 Hotword no Funktion

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    50 Posts 5 Posters 11.3k Views 5 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.
    • M Offline
      MichaelKrems
      last edited by broberg

      ello forum
      I’ve been trying MMM-Assistant Mk2 and MMM-Hotword on a RaspberryPi 3 with Raspian Buster,for a week ,without success.
      Everything starts so far OK “Brief today” is played.
      But does not respond to “Smart Mirror” hotword.

      Test in the console with Arecord and Aplay function OK
      Infos :

      arecord -l
      **** Liste der Hardware-Geräte (CAPTURE) ****
      Karte 1: Device [USB PnP Sound Device], Gerät 0: USB Audio [USB Audio]
        Sub-Geräte: 0/1
        Sub-Gerät #0: subdevice #0
      Config.js
      /* Magic Mirror Config Sample
       *
       * By Michael Teeuw http://michaelteeuw.nl
       * MIT Licensed.
       *
       * For more information how you can configurate this file
       * See https://github.com/MichMich/MagicMirror#configuration
       *
       */
      
      var config = {
      	address: "10.0.0.15",
      		              //"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
                           [], // 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: "de",
        	timeFormat: "24",
      	units: "metric",
      
      	modules: [
      		{
      			module: "alert",
      		},
      		{
      			module: "updatenotification",
      			position: "top_bar"
      		},
      		{
      			module: "clock",
      			position: "top_left"
      		},
      	//	{
      	//	    module: "MMM-GoogleAssistant",
      	//	    position: "top_right",
      	//	    config: {
      	//	        maxWidth: "100%",
      	//	        header: "",
      	//	    publishKey: "pub-c-9ce2adff-cdc9-497e-a81b-a0f2f64b3fc1",
      	//	    subscribeKey: " sub-c-a337d0f8-e9ea-11e9-914e-0a6be83abca1",
      	//	    updateDelay: 500
      	//	    }
      	//	},	
      		{
      			module: "calendar",
      			header: "kommende Termine",
      			position: "top_left",
      			config: {
      				calendars: [
      					{
      						symbol: "calendar-check",
      					//	url: "webcal://www.calendarlabs.com/ical-calendar/ics/76/US_Holidays.ics",
                                                     url: "webcal://mail.bruedergros.at/owa/calendar/e27e09b9651248a8870f91463c14603d@bruedergros.at/993da715237941099626d16d0da2631f3462472444406405802/S-1-8-2874105991-1718106435-1479008544-2259784499/reachcalendar.ics" ,
      					//	url: "https://calendar.google.com/calendar/ical/salzer.michael2164%40gmail.com/public/basic.ics" ,
      					}
      				]
      			}
      		},
      //		{
      //			module: "compliments",
      //			position: "lower_third",
      //			config: {
      //			 remoteFile:	"https://raw.githubusercontent.com/michadenheijer/MagicMirrorCompliments/master/de.json"
        //  }
      //		},
      		{
      			module: "currentweather",
      			position: "top_center",
      			config: {
      				location: "Elsarn im Strassertal",
      				locationID: "7871800",  //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
      				appid: "8a19f8f173506892e56e500859f045ba"
      			
      
                               	}
      		},
      		{
      			module: "weatherforecast",
      			position: "top_right",
      			header: "Weather Forecast",
      			config: {
      				location: "Elsarn im Strassertal",
      				locationID: "7871800",  //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
      				appid: "8a19f8f173506892e56e500859f045ba"
      			}
      		},
      				{
        module: "MMM-News",
        position: "bottom_bar",
        config: {
          apiKey : "663c4ed685354fa7a0c432bb25ed5e53",
          type: "horizontal",
          query : [
            {
              sources: "bild,abc-news, cnn",
            },
            {
              country: "at",
              className: "redTitle",
            },
            {
              country: "at",
              category: "sports",
              q : ""
            }
          ],
        }
      },
      		{
      			module: "newsfeed",
      			position: "bottom_bar",
      			config: {
      				feeds: [
      					{
      						//title: "New York times",
      					       //url: "http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml"
      						title:"OE3",
      					        url:"https://rss.orf.at/news.xml"
      					}
      				],
      				showSourceTitle: true,
      				showPublishDate: true,
      				broadcastNewsFeeds: true,
      				broadcastNewsUpdates: true
      			}
      		},
      	]
      
      };
      
      /*************** DO NOT EDIT THE LINE BELOW ***************/
      if (typeof module !== "undefined") {module.exports = config;}
      
      Did I miss something? Thankful for any tip or hint.
      Translated by Google in English
      
      1 Reply Last reply Reply Quote 0
      • M Offline
        MichaelKrems
        last edited by broberg

        Sorry posted Wrong config.js
        This is for MMM -Assistant

        /* Magic Mirror Config Sample
         *
         * By Michael Teeuw http://michaelteeuw.nl
         * MIT Licensed.
         *
         * For more information how you can configurate this file
         * See https://github.com/MichMich/MagicMirror#configuration
         *
         */
        
        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: "de",
        	timeFormat: 24,
        	units: "metric",
        
        	modules: [
        		{
        			module: "alert",
        		},
        		{
        			module: "updatenotification",
        			position: "top_bar"
        		},
        		{
        			module: "clock",
        			position: "top_left"
        		},
        		//{
        		//	module: "calendar",
        		//	header: "US Holidays",
        		//	position: "top_left",
        		//	config: {
        		//		calendars: [
        		//			{
        		//				symbol: "calendar-check",
        		//				url: "webcal://www.calendarlabs.com/ical-calendar/ics/76/US_Holidays.ics"					}
        		//		]
        		//	}
        		//},
        		{
        			module: "compliments",
        			position: "lower_third"
        		},
        		//{
        		//	module: "currentweather",
        		//	position: "top_right",
        		//	config: {
        		//		location: "New York",
        		//		locationID: "",  //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
        		//		appid: "YOUR_OPENWEATHER_API_KEY"
        		//	}
        		//},
        		//{
        		//	module: "weatherforecast",
        		//	position: "top_right",
        		//	header: "Weather Forecast",
        		//	config: {
        		//		location: "New York",
        		//		locationID: "5128581",  //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
        		//		appid: "YOUR_OPENWEATHER_API_KEY"
        		//	}
        		//},
        		//{
        		//	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,
        		//		broadcastNewsFeeds: true,
        		//		broadcastNewsUpdates: true
        		//	}
        		//},
        
        		{
        	module: "MMM-Hotword",
        	position: "top_right",
        	config: {
        		// chimeOnFinish: null,
        		detectorAudioGain: 2.0,
        		detectorApplyFrontend: false, // When you are using `.pmdl`, set this to `false`.
        		// For `.umdl`, When you use only`snowboy` and `smart_mirror`, `false` is better. But with other models, `true` is better.
        
        		mic: {
          recordProgram : "arecord", //record prgram, `rec`, `arecord`, `sox`, `parec` is available
          device        : "plughw:1",
          sampleRate    : 16000,  // audio sample rate
          channels      : 1,      // number of channels
          threshold     : 0.5,
          thresholdStart: null,
          thresholdEnd  : null,
          silence       : 1.0, // detect end of your hotword or afterRecord.
          verbose       : false,  // log info to the console
        },
        
        recipes: [],
        models: [],
        commands: {},
        defaultCommand: {
          notificationExec: {
            notification: "HOTWORD_DETECTED",
            payload: (detected, afterRecord) => {
              return {hotword:detected, file:afterRecord}
            }
          }
        },
        
        chimeOnFinish: "resources/ding.wav", // If you don't want to use chime, set this to null.
        useDisplay: true,
        iconify: "https://code.iconify.design/1/1.0.2/iconify.min.js",
        //iconify: null,
        //When you use this module with `MMM-CalendarExt2`, `MMM-Spotify` or any other `iconify` used modules together, Set this to null.
        
        icons: { //https://iconify.design/icon-sets/
          waiting: "uil-comment-message",
          detected: "uil-comment-exclamation",
          finished: "uil-comment-dots",
        },
        
        // customizable notification trigger
        notifications: {
          PAUSE: "HOTWORD_PAUSE",
          RESUME: "HOTWORD_RESUME",
          LISTENING : "HOTWORD_LISTENING",
          SLEEPING : "HOTWORD_SLEEPING",
          ERROR : "HOTWORD_ERROR",
          DETECTED: "HOTWORD_DETECTED"
        },
        		//mic: {
        		//	recordProgram: "arecord",
        		//		device: "default"
        		//},
        		models: [
        			{
        				hotwords    : "smart_mirror",
        				file        : "smart_mirror.umdl",
        				sensitivity : "0.5",
        			},
        		],
        		commands: {
        			"smart_mirror": {
        				notificationExec: {
        					notification: "ASSISTANT_ACTIVATE",
        					payload: (detected, afterRecord) => {
        						return {profile:"default"}
        					}
        				},
        		models: [
          {
            hotwords    : "Magic_Mirror",
            file        : "Magic_Mirror.pmdl",
            sensitivity : "0.5",
          },
        ],
        commands: {
          "volume_up" : {
            notificationExec: {
              notification: "VOLUME_UP"
            }
          }
        },
        				restart:false,
        				afterRecordLimit:0
        			}
        		}
        	}
        },
        {
        	module: "MMM-AssistantMk2",
        	position: "top_right",
        	config: {
        		deviceLocation: {
        			coordinates: {
        				latitude: 37.5650168, // -90.0 - +90.0
        				longitude: 126.8491231, // -180.0 - +180.0
        			},
        		},
        		record: {
        			recordProgram : "arecord",  
        			device        : "plughw:1",
        		},
        		notifications: {
        			ASSISTANT_ACTIVATED: "HOTWORD_PAUSE",
        			ASSISTANT_DEACTIVATED: "HOTWORD_RESUME",
        		},
        		useWelcomeMessage: "brief today",
        		profiles: {
        			"default" : {
        				lang: "de-DE"
        			}
        		},
        	}
        },
        	]
        
        };
        
        		
        
        
        
        /*************** DO NOT EDIT THE LINE BELOW ***************/
        if (typeof module !== "undefined") {module.exports = config;}
        
        ? 1 Reply Last reply Reply Quote 0
        • ? Offline
          A Former User @MichaelKrems
          last edited by A Former User

          @MichaelKrems
          You don’t need to use all of the fields of configuration sample.

          Just try from here;

          https://github.com/eouia/MMM-AssistantMk2/wiki/Configuration#with-mmm-hotwordv2 (with MMM-Hotword(v2) section)

          G 1 Reply Last reply Reply Quote 0
          • G Offline
            guongthongminh @Guest
            last edited by

            @Sean You can help me with the command exec section, calling the browser with the parameter as well as the command line in mmm-hotword

            ? 1 Reply Last reply Reply Quote 0
            • ? Offline
              A Former User @guongthongminh
              last edited by

              @guongthongminh Sorry, I can’t catch your intention. What exactly do you want to do?

              G 2 Replies Last reply Reply Quote 0
              • G Offline
                guongthongminh @Guest
                last edited by

                @Sean Can you help me with the website part shown on the mirror?

                1 Reply Last reply Reply Quote 0
                • G Offline
                  guongthongminh @Guest
                  last edited by

                  @Sean using MMM-NotificationTrigger to invoke the voice search browser

                  ? 1 Reply Last reply Reply Quote 0
                  • ? Offline
                    A Former User @guongthongminh
                    last edited by

                    @guongthongminh
                    Do you mean, you want to show specific web page when you say hotword?
                    In that case, which module are you using to show web page?

                    G 1 Reply Last reply Reply Quote 0
                    • G Offline
                      guongthongminh @Guest
                      last edited by

                      @Sean Can I use the default browser, Chromium?
                      MMM-PageReader is also possible.
                      Sorry for not good at english!

                      ? 1 Reply Last reply Reply Quote 0
                      • ? Offline
                        A Former User @guongthongminh
                        last edited by A Former User

                        @guongthongminh
                        First, using default Browser(Chromium) is not so good idea. You could lose control.
                        I’m reading MMM-PageReader(https://github.com/dgburr/MMM-PageReader) now, it seems possible to use.

                        models: [
                          {
                            hotwords    : "smart_mirror",
                            file        : "smart_mirror.umdl",
                            sensitivity : "0.5",
                          },
                          // You can add more models here.
                        ],
                        commands: {
                          "smart_mirror": {
                            notificationExec: {
                              notification: "PAGE_READER_LOAD",
                              payload: "https://forum.magicmirror.builders/topic...."
                            }
                          },
                        // You can add more commands here
                        }
                        

                        In this example, you can activate MMM-PageReader with hotword “smart mirror”. Not tested, but ideally working like this.

                        G S 3 Replies Last reply Reply Quote 0
                        • 1
                        • 2
                        • 3
                        • 4
                        • 5
                        • 1 / 5
                        • 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