Bugsounet Coding

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Popular

    Solved npm install done but it missing script : tokens

    Issues
    3
    14
    289
    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.
    • P
      park last edited by park

      hello!
      After hearing the news that the rules of Google Assistant have changed, I am reinstalling to update my Magic Mirror.
      My node and npm versions are 14.18.1 and 6.14.15.
      So, npm install proceeded without any problems in the case of mmm-assistant as follows.

      /MagicMirror/modules/MMM-GoogleAssistant $ npm install
      npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@2. I'll try to do my best with it!
      
      > magicmirror@2.17.1 install /home/pi/MagicMirror
      > echo "Installing vendor files ...
      " && cd vendor && npm install --loglevel=error
      
      Installing vendor files ...
      
      audited 9 packages in 2.363s
      found 0 vulnerabilities
      
      
      > magicmirror@2.17.1 postinstall /home/pi/MagicMirror
      > npm run install-fonts && echo "MagicMirror installation finished successfully!
      "
      
      
      > magicmirror@2.17.1 install-fonts /home/pi/MagicMirror
      > echo "Installing fonts...
      " && cd fonts && npm install --loglevel=error
      
      Installing fonts ...
      
      audited 1 package in 2.037s
      found 0 vulnerabilities
      
      MagicMirror installation finished successfully!
      
      
      > magicmirror@2.17.1 prepare /home/pi/MagicMirror
      > [ -f node_modules/.bin/husky ] && husky install || echo no husky installed.
      
      husky - Git hooks installed
      npm WARN tsutils@3.21.0 requires a peer of typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta but none is installed. You must install peer dependencies yourself.
      npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/fsevents):
      npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch": "arm"})
      
      audited 918 packages in 78.034s
      
      110 packages are looking for funding
        run `npm fund` for details
      
      found 0 vulnerabilities
      

      However, when I run npm run tokens, I get an error saying that the file does not exist.

      ~/MagicMirror/modules/MMM-GoogleAssistant $ npm run tokens
      npm ERR! missing script: tokens
      
      npm ERR! A complete log of this run can be found in:
      npm ERR! /home/pi/.npm/_logs/2021-11-02T14_38_11_896Z-debug.log
      

      I wonder if there is any way to solve these errors.

      Thanks for reading this long and sloppy post.

      1 Reply Last reply Reply Quote 0
      • bugsounet
        bugsounet Main Coder last edited by

        Hi, Can you try this commands and give me result ?

        cd ~/MagicMirror/modules/MMM-GoogleAssistant
        git config --get remote.origin.url
        git branch
        ls -la
        
        P 1 Reply Last reply Reply Quote 0
        • P
          park @bugsounet last edited by

          @bugsounet said in npm install done but it missing script : tokens:

          git config --get remote.origin.url

          thank you for the reply.

          The result of using the command you gave is as follows.

          pi@raspberrypi:~/MagicMirror/modules/MMM-GoogleAssistant $ sudo git config --get remote.origin.url
          https://github.com/bugsounet/MMM-GoogleAssistant
          pi@raspberrypi:~/MagicMirror/modules/MMM-GoogleAssistant $ sudo git branch
          * master
          pi@raspberrypi:~/MagicMirror/modules/MMM-GoogleAssistant $ ls -la
          합계 28
          drwxr-xr-x 4 root root 4096 11월  2 23:30 .
          drwxrwxrwx 6 root root 4096 11월  2 23:21 ..
          drwxr-xr-x 8 root root 4096 11월  2 23:22 .git
          -rw-r--r-- 1 root root 1066 11월  2 23:22 LICENSE
          -rw-r--r-- 1 root root 1177 11월  2 23:22 README.md
          -rw-r--r-- 1 root root  431 11월  2 23:30 credentials.json
          
          1 Reply Last reply Reply Quote 0
          • bugsounet
            bugsounet Main Coder last edited by

            that I see, You have installed MagicMirror and other module with sudo commands
            so, All files can be writed by root user and not you !

            Humm… Do you really save in your personnal computer MP3, PDF or JPG file with administrator account ?
            I don’t think so 🙂

            So MagicMirror is the same
            Just remeber this rules:
            I use sudo command for system files/app ONLY
            MagicMirror is NOT an system app (it’s only for user pi and not for others)

            For correct your error, just try this following commands:

            cd ~
            sudo chown -R pi MagicMirror
            sudo chgrp -R pi MagicMirror
            cd MagicMirror/modules/MMM-GoogleAssistant
            git reset --hard HEAD
            git pull
            npm install
            
            P 1 Reply Last reply Reply Quote 0
            • P
              park @bugsounet last edited by

              @bugsounet thank you!!!

              it’s good for my problem.

              so i apply my tokens and test type my requste it good working!

              but i try apply my raspberry pi smart mirror project config.js file

              If only MMM-Detector is uploaded to config.js, it was confirmed that the google logo screen is displayed normally on the screen.
              After that, when I apply mmm-googleassistant, nothing is displayed on the screen as shown in the following picture.

              3adec1bd-4549-4f34-9cdf-743e1082006e-image.png

              Is there a way to solve this or analyze the problem?

              • PS
                Where should I add the raspberry pi microphone setting?
              1 Reply Last reply Reply Quote 0
              • D
                DJB1966 Helpers last edited by DJB1966

                @park
                Can you view Config using Geany? it a lot easy to do your config. or are you ssh to Pi?
                a4903742-f5c9-4e0c-ac99-a4d9c1179178-image.png
                Can you post MM log and see if any errors on start up.
                Try disabling all 3rd party Modules and test add disabled: true,
                a875006d-e0b7-4aa2-9f3a-e290874fe42d-image.png

                P 1 Reply Last reply Reply Quote 0
                • P
                  park @DJB1966 last edited by park

                  @djb1966
                  thank you for advice me!
                  yeah i can use geany. but now i’m using vnc & ssh also apply the display rotation… it too hard to me see code…haha… sorry.

                  so i can find only this happened that mmm-googleassistant and i only use 3rd party modules mmm-airquality, mmm-deactor, mmm-googleassistant you can see this picture.
                  c8cbb439-f0e4-430e-8be4-e5768635d513-image.png

                  and only this disable:true mmm-googleassistant

                  c846cf7a-9394-44ac-b255-96a10c9ea545-image.png

                  2f596800-a8f2-47c3-b983-00b4122ef2bc-image.png

                  and it is my whole config.js code

                  /* Magic Mirror Config Sample
                   *
                   * By Michael Teeuw https://michaelteeuw.nl
                   * MIT Licensed.
                   *
                   * For more information on how you can configure this file
                   * see https://docs.magicmirror.builders/getting-started/configuration.html#general
                   * and https://docs.magicmirror.builders/modules/configuration.html
                   */
                  let 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 or empty, is "localhost"
                  	port: 8080,
                  	basePath: "/", 	// The URL path where MagicMirror is hosted. If you are using a Reverse proxy
                  					// you must set the sub path here. basePath must end with a /
                  	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"],
                  
                  	useHttps: false, 		// Support HTTPS or not, default "false" will use HTTP
                  	httpsPrivateKey: "", 	// HTTPS private key path, only require when useHttps is true
                  	httpsCertificate: "", 	// HTTPS Certificate path, only require when useHttps is true
                  
                  	language: "ko",
                  	locale: "ko-KR",
                  	logLevel: ["INFO", "LOG", "WARN", "ERROR"], // Add "DEBUG" for even more logging
                  	timeFormat: 24,
                  	units: "metric",
                  	// serverOnly:  true/false/"local" ,
                  	// local for armv6l processors, default
                  	//   starts serveronly and then starts chrome browser
                  	// false, default for all NON-armv6l devices
                  	// true, force serveronly mode, because you want to.. no UI on this device
                  
                  	modules: [
                  		{
                  			module: "alert",
                  		},
                  		{
                  			module: "updatenotification",
                  			position: "top_bar"
                  		},
                  		{
                  			module: "clock",
                  			position: "top_left"
                  		},
                  		{
                  			module: "calendar",
                  			header: "일정",
                  			position: "top_left",
                  			config: {
                  				calendars: [
                  					{
                  						symbol: "calendar-check",
                  						url: "https://calendar.google.com/calendar/ical/pjw970219%40gmail.com/private-810187f9b2c509ae729359407b29a69c/basic.ics"
                  					}
                  				]
                  			}
                  		},
                  		/*{
                  			module: "compliments",
                  			position: "lower_third"
                  		},*/
                  		{
                  			module: "weather",
                  			position: "top_left",
                  			header:"현재 날씨",
                  			config: {
                  				weatherProvider: "openweathermap",
                  				type: "current",
                  				location: "Seongnam-si",
                  				locationID: "1897000", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
                  				apiKey: "c6dd74b29fe4d10b815c2a22fc36fb6b"
                  			}
                  		},
                  		{
                  			module: "weather",
                  			position: "top_left",
                  			header: "날씨 예보",
                  			config: {
                  				weatherProvider: "openweathermap",
                  				type: "forecast",
                  				location: "Seongnam-si",
                  				locationID: "1897000", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
                  				apiKey: "c6dd74b29fe4d10b815c2a22fc36fb6b"
                  			}
                  		},
                                  {
                                   module: 'MMM-AirQuality',
                                   position: 'top_left',
                                   config: {
                                   location: 'seongnam',
                                   lang: "kr"
                                   }
                                  },
                  		{
                  			module: "newsfeed",
                  			position: "bottom_bar",
                  			config: {
                  				feeds: [
                  					{
                  						title: "오늘의 뉴스",
                  						url: "https://news.google.com/rss?gl=KR&hl=ko&ceid=KR:ko",
                  					}
                  				],
                  				showSourceTitle: true,
                  				showPublishDate: true,
                  				broadcastNewsFeeds: true,
                  				broadcastNewsUpdates: true
                  			}
                  			},
                  			{
                  			  module: "MMM-GoogleAssistant",
                  			  position: "bottom_bar",
                  			  disabled: true,
                  			  configDeepMerge: true,
                  			  config: {
                  			    assistantConfig: {
                  			      latitude: 37.4473547,
                  			      longitude: 127.1306892,
                  			    },
                  			  micConfig: { // put there configuration generated by auto-installer
                  			     recorder: "arecord",
                  			     device: "plughw:2",
                  			   },
                  			  }
                  			},
                  			{
                  			  module: "MMM-Detector",
                  			  position: "top_left",
                    			  configDeepMerge: true,
                  			  //disabled: true,
                  			  config: {
                  			    debug: false,
                  			    detectors: [
                  			      {
                  			        detector: "Snowboy",
                  			        Model: "jarvis",
                  			        Sensitivity: null,
                  			        Logo: "google",
                  			        autoRestart: false,
                  			        onDetected: {
                  			          notification: "GA_ACTIVATE"
                  			        }
                  			      }
                  			    ]
                  			  }
                  			},
                  
                  	]
                  };
                  
                  /*************** DO NOT EDIT THE LINE BELOW ***************/
                  if (typeof module !== "undefined") {module.exports = config;}
                  

                  +ps
                  In case of automatic execution with mm, can I know where the error log is saved? If you let me know, I’ll post that part as well.

                  oh i found it!

                  maybe it has token problem… but npm run tokens is working fine…

                      at App.start (/home/pi/MagicMirror/js/app.js:212:3)
                  [04.11.2021 13:12.41.426] [ERROR] WARNING! Could not validate config file. Starting with default configuration. Please correct syntax errors at or above this line: /home/pi/MagicMirror/config/config.js:131
                  		   {
                  		   ^
                  
                  SyntaxError: Unexpected token '{'
                      at wrapSafe (internal/modules/cjs/loader.js:986:16)
                      at Module._compile (internal/modules/cjs/loader.js:1034:27)
                      at Object.Module._extensions..js (internal/modules/cjs/loader.js:1108:10)
                      at Module.load (internal/modules/cjs/loader.js:935:32)
                      at Module._load (internal/modules/cjs/loader.js:776:14)
                      at Function.f._load (electron/js2c/asar_bundle.js:5:12913)
                      at Module.require (internal/modules/cjs/loader.js:959:19)
                      at require (internal/modules/cjs/helpers.js:88:18)
                      at loadConfig (/home/pi/MagicMirror/js/app.js:69:14)
                      at App.start (/home/pi/MagicMirror/js/app.js:212:3)
                  [04.11.2021 13:13.38.426] [ERROR] WARNING! Could not validate config file. Starting with default configuration. Please correct syntax errors at or above this line: /home/pi/MagicMirror/config/config.js:32
                  	logLevel: ["INFO", "LOG", "WARN", "ERROR"], // Add "DEBUG" for even more logging
                  	^^^^^^^^
                  
                  1 Reply Last reply Reply Quote 0
                  • D
                    DJB1966 Helpers last edited by

                    Don’t disable GA it needs to be false.
                    Disable MMM-AirQuality and try.

                    1 Reply Last reply Reply Quote 0
                    • D
                      DJB1966 Helpers last edited by DJB1966

                      If you using pm2 can you start mm this way and copy-paste log here.

                      cd MagicMirror
                      npm start
                      

                      All so your config is incomplete Wiki.
                      a244c4fe-3a02-4ae6-825c-792d11ad00bb-image.png

                      P 1 Reply Last reply Reply Quote 0
                      • P
                        park @DJB1966 last edited by

                        @djb1966

                        mmm - airqualty

                        disable

                        and npm run

                        log like this

                        pi@raspberrypi:~/MagicMirror $ npm start
                        
                        > magicmirror@2.17.1 start /home/pi/MagicMirror
                        > DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js
                        
                        [04.11.2021 20:19.41.305] [LOG]   Starting MagicMirror: v2.17.1
                        [04.11.2021 20:19.41.331] [LOG]   Loading config ...
                        [04.11.2021 20:19.41.355] [LOG]   Loading module helpers ...
                        [04.11.2021 20:19.41.363] [LOG]   No helper found for module: alert.
                        [04.11.2021 20:19.41.428] [LOG]   Initializing new module helper ...
                        [04.11.2021 20:19.41.433] [LOG]   Module helper loaded: updatenotification
                        [04.11.2021 20:19.41.437] [LOG]   No helper found for module: clock.
                        [04.11.2021 20:19.42.033] [LOG]   Initializing new module helper ...
                        [04.11.2021 20:19.42.036] [LOG]   Module helper loaded: calendar
                        [04.11.2021 20:19.42.038] [LOG]   No helper found for module: weather.
                        [04.11.2021 20:19.42.040] [LOG]   No helper found for module: MMM-AirQuality.
                        [04.11.2021 20:19.42.095] [LOG]   Initializing new module helper ...
                        [04.11.2021 20:19.42.097] [LOG]   Module helper loaded: newsfeed
                        [04.11.2021 20:19.43.835] [LOG]   Initializing new module helper ...
                        [04.11.2021 20:19.43.840] [LOG]   Module helper loaded: MMM-GoogleAssistant
                        [04.11.2021 20:19.43.855] [LOG]   Initializing new module helper ...
                        [04.11.2021 20:19.43.858] [LOG]   Module helper loaded: MMM-Detector
                        [04.11.2021 20:19.43.860] [LOG]   All module helpers loaded.
                        [04.11.2021 20:19.44.170] [LOG]   Starting server on port 8080 ...
                        [04.11.2021 20:19.44.211] [LOG]   Server started ...
                        [04.11.2021 20:19.44.215] [LOG]   Connecting socket for: updatenotification
                        [04.11.2021 20:19.44.220] [LOG]   Connecting socket for: calendar
                        [04.11.2021 20:19.44.223] [LOG]   Starting node helper for: calendar
                        [04.11.2021 20:19.44.226] [LOG]   Connecting socket for: newsfeed
                        [04.11.2021 20:19.44.229] [LOG]   Starting node helper for: newsfeed
                        [04.11.2021 20:19.44.232] [LOG]   Connecting socket for: MMM-GoogleAssistant
                        [04.11.2021 20:19.44.237] [LOG]   [GA] Read config.js and check ConfigDeepMerge...
                        [04.11.2021 20:19.44.241] [LOG]   [GA] Perfect ConfigDeepMerge activated!
                        [04.11.2021 20:19.44.244] [LOG]   Connecting socket for: MMM-Detector
                        [04.11.2021 20:19.44.250] [LOG]   [DETECTOR] MMM-Detector Version: 1.1.3 rev: 211101-1
                        [04.11.2021 20:19.44.252] [LOG]   Sockets connected & modules started ...
                        [04.11.2021 20:19.45.181] [LOG]   Launching application.
                        [04.11.2021 20:19.45.283] [WARN]  (electron) Security Warning: A WebContents was just created with both webviewTag and contextIsolation enabled.  This combination is fundamentally less secure and effectively bypasses the protections of contextIsolation.  We strongly recommend you move away from webviews to OOPIF or BrowserView in order for your app to be more secure
                        

                        that time my config.js like this

                        /* Magic Mirror Config Sample
                         *
                         * By Michael Teeuw https://michaelteeuw.nl
                         * MIT Licensed.
                         *
                         * For more information on how you can configure this file
                         * see https://docs.magicmirror.builders/getting-started/configuration.html#general
                         * and https://docs.magicmirror.builders/modules/configuration.html
                         */
                        let config = {
                        	address: "localhost", 	// Address to listen on, can be:
                        	electronOptions: { 	//electronOptions is need if you want to display the link and Cast module
                        	    webPreferences: {
                        	      webviewTag: true
                        	    }
                        	  },
                        						// - "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 or empty, is "localhost"
                        	port: 8080,
                        	basePath: "/", 	// The URL path where MagicMirror is hosted. If you are using a Reverse proxy
                        					// you must set the sub path here. basePath must end with a /
                        	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"],
                        
                        	useHttps: false, 		// Support HTTPS or not, default "false" will use HTTP
                        	httpsPrivateKey: "", 	// HTTPS private key path, only require when useHttps is true
                        	httpsCertificate: "", 	// HTTPS Certificate path, only require when useHttps is true
                        
                        	language: "ko",
                        	locale: "ko-KR",
                        	logLevel: ["INFO", "LOG", "WARN", "ERROR"], // Add "DEBUG" for even more logging
                        	timeFormat: 24,
                        	units: "metric",
                        	// serverOnly:  true/false/"local" ,
                        	// local for armv6l processors, default
                        	//   starts serveronly and then starts chrome browser
                        	// false, default for all NON-armv6l devices
                        	// true, force serveronly mode, because you want to.. no UI on this device
                        
                        	modules: [
                        		{
                        			module: "alert",
                        		},
                        		{
                        			module: "updatenotification",
                        			position: "top_bar"
                        		},
                        		{
                        			module: "clock",
                        			position: "top_left"
                        		},
                        		{
                        			module: "calendar",
                        			header: "일정",
                        			position: "top_left",
                        			config: {
                        				calendars: [
                        					{
                        						symbol: "calendar-check",
                        						url: "https://calendar.google.com/calendar/ical/pjw970219%40gmail.com/private-810187f9b2c509ae729359407b29a69c/basic.ics"
                        					}
                        				]
                        			}
                        		},
                        		/*{
                        			module: "compliments",
                        			position: "lower_third"
                        		},*/
                        		{
                        			module: "weather",
                        			position: "top_left",
                        			header:"현재 날씨",
                        			config: {
                        				weatherProvider: "openweathermap",
                        				type: "current",
                        				location: "Seongnam-si",
                        				locationID: "1897000", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
                        				apiKey: "c6dd74b29fe4d10b815c2a22fc36fb6b"
                        			}
                        		},
                        		{
                        			module: "weather",
                        			position: "top_left",
                        			header: "날씨 예보",
                        			config: {
                        				weatherProvider: "openweathermap",
                        				type: "forecast",
                        				location: "Seongnam-si",
                        				locationID: "1897000", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
                        				apiKey: "c6dd74b29fe4d10b815c2a22fc36fb6b"
                        			}
                        		},
                                        {
                                         module: 'MMM-AirQuality',
                                         position: 'top_left',
                        		 disable : true,
                                         config: {
                                         location: 'seongnam',
                                         lang: "kr"
                                         }
                                        },
                        		{
                        			module: "newsfeed",
                        			position: "bottom_bar",
                        			config: {
                        				feeds: [
                        					{
                        						title: "오늘의 뉴스",
                        						url: "https://news.google.com/rss?gl=KR&hl=ko&ceid=KR:ko",
                        					}
                        				],
                        				showSourceTitle: true,
                        				showPublishDate: true,
                        				broadcastNewsFeeds: true,
                        				broadcastNewsUpdates: true
                        			}
                        			},
                        			{
                        			  module: "MMM-GoogleAssistant",
                        			  position: "bottom_bar",
                        			  //disabled: true,
                        			  configDeepMerge: true,
                        			  config: {
                        			    assistantConfig: {
                        			      latitude: 37.4473547,
                        			      longitude: 127.1306892,
                        			    },
                        			  micConfig: { // put there configuration generated by auto-installer
                        			     recorder: "arecord",
                        			     device: "plughw:2",
                        			   },
                        			  }
                        			},
                        			{
                        			  module: "MMM-Detector",
                        			  position: "top_left",
                          			  configDeepMerge: true,
                        			  //disabled: true,
                        			  config: {
                        			    debug: false,
                        			    detectors: [
                        			      {
                        			        detector: "Snowboy",
                        			        Model: "jarvis",
                        			        Sensitivity: null,
                        			        Logo: "google",
                        			        autoRestart: false,
                        			        onDetected: {
                        			         notification: "GA_ACTIVATE"
                        			        }
                        			      }
                        			    ]
                        			  }
                        			},
                        
                        	]
                        };
                        
                        /*************** DO NOT EDIT THE LINE BELOW ***************/
                        if (typeof module !== "undefined") {module.exports = config;}
                        

                        The same phenomenon occurs even when the fine dust measurement module is disabled.

                        1 Reply Last reply Reply Quote 0
                        • bugsounet
                          bugsounet Main Coder last edited by bugsounet

                          Hi, sorry for my mismake, I have corrected your language file path (I have do a crash of MagicMirror…)

                          Can you try this:

                          cd ~/MagicMirror/modules/MMM-GoogleAssistant
                          npm run update
                          

                          and naturally restart MagicMirror

                          P 1 Reply Last reply Reply Quote 0
                          • P
                            park @bugsounet last edited by

                            @bugsounet
                            thank you for update !
                            applied update and i check my raspberry pi run is well
                            but…
                            i’ll called jarvis and google logo blinking… but still… blinking… any reaction.

                            so i rechecking my mic and speakers like this (i’m using hdmi_speakers & usb mic)

                            pi@raspberrypi:~/MagicMirror $ aplay -l
                            **** List of PLAYBACK Hardware Devices ****
                            card 0: b1 [bcm2835 HDMI 1], device 0: bcm2835 HDMI 1 [bcm2835 HDMI 1]
                              Subdevices: 4/4
                              Subdevice #0: subdevice #0
                              Subdevice #1: subdevice #1
                              Subdevice #2: subdevice #2
                              Subdevice #3: subdevice #3
                            card 1: Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones]
                              Subdevices: 4/4
                              Subdevice #0: subdevice #0
                              Subdevice #1: subdevice #1
                              Subdevice #2: subdevice #2
                              Subdevice #3: subdevice #3
                            pi@raspberrypi:~/MagicMirror $ arecord -l 
                            **** List of CAPTURE Hardware Devices ****
                            card 2: Device [USB PnP Sound Device], device 0: USB Audio [USB Audio]
                              Subdevices: 1/1
                              Subdevice #0: subdevice #0
                            

                            so and i check my micconfig into config.js like this

                            {
                                                      module: "MMM-Detector",
                                                      position: "top_left",
                                                      configDeepMerge: true,
                                                      //disabled: true,
                                                      config: {
                                                        debug: false,
                                                        detectors: [
                                                          {
                                                            detector: "Snowboy",
                                                            Model: "jarvis",
                                                            Sensitivity: null,
                                                            Logo: "google",
                                                            autoRestart: false,
                                                            onDetected: {
                                                             notification: "GA_ACTIVATE"
                                                            }
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    {
                                                      module: "MMM-GoogleAssistant",
                                                      position: "bottom_bar",
                                                      disabled: true,
                                                      configDeepMerge: true,
                                                      config: {
                                                        assistantConfig: {
                                                          lang: "ko-KR",
                                                          latitude: 37.4473547,
                                                          longitude: 127.1306892,
                                                        },
                                                        micConfig: { // put there configuration $
                                                         recorder: "arecord",
                                                         device: "plughw:2",
                                                       },
                                                      }
                                                    },
                            
                                    ]
                            };
                            
                            
                            
                            

                            my npm start log this here

                            pi@raspberrypi:~/MagicMirror $ npm start
                            
                            > magicmirror@2.17.1 start /home/pi/MagicMirror
                            > DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js
                            
                            [08.11.2021 01:42.22.971] [LOG]   Starting MagicMirror: v2.17.1
                            [08.11.2021 01:42.22.998] [LOG]   Loading config ...
                            [08.11.2021 01:42.23.020] [LOG]   Loading module helpers ...
                            [08.11.2021 01:42.23.027] [LOG]   No helper found for module: alert.
                            [08.11.2021 01:42.23.094] [LOG]   Initializing new module helper ...
                            [08.11.2021 01:42.23.099] [LOG]   Module helper loaded: updatenotification
                            [08.11.2021 01:42.23.102] [LOG]   No helper found for module: clock.
                            [08.11.2021 01:42.23.725] [LOG]   Initializing new module helper ...
                            [08.11.2021 01:42.23.728] [LOG]   Module helper loaded: calendar
                            [08.11.2021 01:42.23.732] [LOG]   No helper found for module: weather.
                            [08.11.2021 01:42.23.736] [LOG]   No helper found for module: MMM-AirQuality.
                            [08.11.2021 01:42.23.837] [LOG]   Initializing new module helper ...
                            [08.11.2021 01:42.23.839] [LOG]   Module helper loaded: newsfeed
                            [08.11.2021 01:42.23.852] [LOG]   Initializing new module helper ...
                            [08.11.2021 01:42.23.856] [LOG]   Module helper loaded: MMM-Detector
                            [08.11.2021 01:42.23.858] [LOG]   All module helpers loaded.
                            [08.11.2021 01:42.24.182] [LOG]   Starting server on port 8080 ... 
                            [08.11.2021 01:42.24.232] [LOG]   Server started ...
                            [08.11.2021 01:42.24.237] [LOG]   Connecting socket for: updatenotification
                            [08.11.2021 01:42.24.240] [LOG]   Connecting socket for: calendar
                            [08.11.2021 01:42.24.242] [LOG]   Starting node helper for: calendar
                            [08.11.2021 01:42.24.245] [LOG]   Connecting socket for: newsfeed
                            [08.11.2021 01:42.24.247] [LOG]   Starting node helper for: newsfeed
                            [08.11.2021 01:42.24.249] [LOG]   Connecting socket for: MMM-Detector
                            [08.11.2021 01:42.24.255] [LOG]   [DETECTOR] MMM-Detector Version: 1.1.3 rev: 211101-1
                            [08.11.2021 01:42.24.258] [LOG]   Sockets connected & modules started ...
                            [08.11.2021 01:42.25.111] [LOG]   Launching application.
                            [08.11.2021 01:42.25.247] [WARN]  (electron) Security Warning: A WebContents was just created with both webviewTag and contextIsolation enabled.  This combination is fundamentally less secure and effectively bypasses the protections of contextIsolation.  We strongly recommend you move away from webviews to OOPIF or BrowserView in order for your app to be more secure
                            [08.11.2021 01:42.34.870] [LOG]   Create new calendarfetcher for url: https://calendar.google.com/calendar/ical/pjw970219%40gmail.com/private-810187f9b2c509ae729359407b29a69c/basic.ics - Interval: 300000
                            [08.11.2021 01:42.35.327] [LOG]   Create new newsfetcher for url: https://news.google.com/rss?gl=KR&hl=ko&ceid=KR:ko - Interval: 300000
                            [08.11.2021 01:42.35.364] [INFO]  Checking git for module: default
                            [08.11.2021 01:42.35.489] [INFO]  Checking git for module: MMM-AirQuality
                            [08.11.2021 01:42.35.559] [INFO]  Checking git for module: MMM-Detector
                            [08.11.2021 01:42.36.873] [LOG]   [DETECTOR] All needed @bugsounet library loaded !
                            [08.11.2021 01:42.36.881] [LOG]   [NPM] Initialized v0.9.96
                            [08.11.2021 01:42.37.261] [LOG]   [DETECTOR] Platform: 'raspberry-pi'; attempting to use 'arecord' to access microphone ...
                            [08.11.2021 01:42.37.274] [LOG]   [DETECTOR] Snowboy is initialized with 1 Models: jarvis
                            [08.11.2021 01:42.37.401] [LOG]   [DETECTOR] Starts listening. 1 Models
                            [08.11.2021 01:42.38.934] [INFO]  Newsfeed-Fetcher: Broadcasting 30 items.
                            [08.11.2021 01:42.49.556] [INFO]  Calendar-Fetcher: Broadcasting 10 events.
                            [08.11.2021 01:43.15.620] [LOG]   [DETECTOR] Stops listening. <-that time maybe i call jarvis
                            

                            it is wrong my config setting? why just call name stops listening?..

                            1 Reply Last reply Reply Quote 0
                            • bugsounet
                              bugsounet Main Coder last edited by bugsounet

                              aplay -l and arecord -l is not needed

                                                          micConfig: { // put there configuration $
                                                           recorder: "arecord",
                                                           device: "plughw:2",
                                                         },
                              

                              the feature micConfig:{} don’t exist
                              so you can delete it

                              With MMM-Detector, this module search your keyword (jarvis in your case)
                              [DETECTOR] Stops listening. <-- means that it found a keyword and send info to needed module (MMM-GoogleAssistant in your case)

                              BUT MMM-GoogleAssistant is disabled

                              ...
                                                      {
                                                        module: "MMM-GoogleAssistant",
                                                        position: "bottom_bar",
                                                        disabled: true, // <--- it's disabled !
                              ...
                              

                              so Google icon will blink and never stop 🙂

                              please read Wiki, it can help sometime 😉

                              P 1 Reply Last reply Reply Quote 0
                              • P
                                park @bugsounet last edited by

                                @bugsounet
                                thank you!!

                                ah hahaha i forgot my config setting… so i change diable = false and micconfig remove… it is all good working !!

                                again thank you so much!

                                1 Reply Last reply Reply Quote 1
                                • Topic has been marked as solved  bugsounet bugsounet 
                                • First post
                                  Last post
                                Powered by NodeBB | @bugsounet ©2022