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 16.5k 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
                        • G Offline
                          guongthongminh @Guest
                          last edited by

                          @Sean Thank you very much!
                          Let me try and see how I hope it will look perfect

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

                            @Sean Is my config file ok?
                            I think it’s almost not working, please help me!
                            alt text

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

                              @Sean said in MMM-Hotword,MMM-AssistanMk2 Hotword no Funktion:

                              First, using default Browser(Chromium) is not so good idea. You could lose control.

                              on the armv6 processors (pi 0, 1 and some 3), the electron browser is no longer available at the newer node versions (>8) we are running on 10, so they have to use some other browser and serveronly split mode

                              Sam

                              How to add modules

                              learning how to use browser developers window for css changes

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

                                @sdetweil Can you be more specific? Can you help me finish my project because I’m interested in it !!!

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

                                  @guongthongminh I dont think this is your problem

                                  you have two models: [] sections above

                                  one that says the hotword is smart_mirror

                                  and one that says “tin_tuc”

                                  I don’t know which became active…
                                  just take the

                                  {   
                                      hotwords: "tin tuc", 
                                      file:   .., 
                                      sensitivity: "0.5"
                                  },
                                  

                                  and put it into the the models array above

                                  Sam

                                  How to add modules

                                  learning how to use browser developers window for css changes

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

                                    @sdetweil The hot word is “hotword” for using mmm-asisstantMK2
                                    hot word “tun tuc” to call mmm-pagereader
                                    The result I want it like this https://www.youtube.com/watch?v=xdLz0bdxO58
                                    Can you help me because I don’t know much about this!

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

                                      @guongthongminh sorry, I cannot help…

                                      Sam

                                      How to add modules

                                      learning how to use browser developers window for css changes

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

                                        @Sean
                                        I really need your support !!! Please

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

                                          @guongthongminh
                                          You did define models twice, so previous one (“smart_mirror”) is ignored.
                                          do like this; (I wrote You can add more models here but you might not see.)

                                          models: [
                                            {
                                              hotwords: "smart_mirror",
                                              ...
                                            },
                                            {
                                              hotwords: "tin_tuc",
                                              ...
                                            },
                                          ],
                                          
                                          G 1 Reply Last reply Reply Quote 0
                                          • G Offline
                                            guongthongminh @Guest
                                            last edited by

                                            @Sean I fixed this but still could not get the MMM-PageReader module to appear on the screen. Could the cause be from the MMM-PageReader modules?
                                            alt text

                                            ? 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
                                            • 3 / 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