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 causing Mirror to blackout

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    mmm-googleassistanthotwordblackscreen
    12 Posts 3 Posters 3.7k Views 3 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.
    • B Offline
      budddesilva
      last edited by

      Hi there, I’ve looked all over the forum for an answer to my problem. The MagicMirror works fine with the MMM-AssisstantMk2, I then added the Hotword module into the config file and the program starts… but just a black screen. This is what’s displayed on the terminal. Does anyone see what I’m doing wrong?

      pi@raspberrypi:~/MagicMirror $ npm start
      
      > magicmirror@2.5.0 start /home/pi/MagicMirror
      > sh run-start.sh
      
      Starting MagicMirror: v2.5.0
      Loading config ...
      Loading module helpers ...
      No helper found for module: alert.
      Initializing new module helper ...
      Module helper loaded: updatenotification
      No helper found for module: clock.
      Initializing new module helper ...
      Module helper loaded: calendar
      WARNING! Could not load config file. Starting with default configuration. Error found: Error: Cannot find module 'node-record-lpcm16'
      Loading module helpers ...
      No helper found for module: alert.
      Initializing new module helper ...
      Module helper loaded: updatenotification
      No helper found for module: clock.
      Initializing new module helper ...
      Module helper loaded: calendar
      App threw an error during load
      Error: Cannot find module 'node-record-lpcm16'
          at Module._resolveFilename (module.js:543:15)
          at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/electron/dist/resources/electron.asar/common/reset-search-paths.js:35:12)
          at Function.Module._load (module.js:473:25)
          at Module.require (module.js:586:17)
          at require (internal/module.js:11:18)
          at Object.<anonymous> (/home/pi/MagicMirror/modules/MMM-AssistantMk2/node_helper.js:8:16)
          at Object.<anonymous> (/home/pi/MagicMirror/modules/MMM-AssistantMk2/node_helper.js:409:3)
          at Module._compile (module.js:642:30)
          at Object.Module._extensions..js (module.js:653:10)
          at Module.load (module.js:561:32)
      Whoops! There was an uncaught exception...
      { Error: Cannot find module 'node-record-lpcm16'
          at Module._resolveFilename (module.js:543:15)
          at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/electron/dist/resources/electron.asar/common/reset-search-paths.js:35:12)
          at Function.Module._load (module.js:473:25)
          at Module.require (module.js:586:17)
          at require (internal/module.js:11:18)
          at Object.<anonymous> (/home/pi/MagicMirror/modules/MMM-AssistantMk2/node_helper.js:8:16)
          at Object.<anonymous> (/home/pi/MagicMirror/modules/MMM-AssistantMk2/node_helper.js:409:3)
          at Module._compile (module.js:642:30)
          at Object.Module._extensions..js (module.js:653:10)
          at Module.load (module.js:561:32) code: 'MODULE_NOT_FOUND' }
      MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
      If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
      Launching application.
      
      
      ? 1 Reply Last reply Reply Quote 0
      • B Offline
        budddesilva
        last edited by

        Hold on, I’m wrong here. I don’t think it’s the Hotword module causing the blackout. I just removed that part from the main config file and still get the same issue. I will try and look back in the forum related to MMM-AssistantMk2.

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

          @budddesilva
          It seems not installed properly. Some dependencies(like lpcm) are missed. Complete installation as documented carefully again.

          B 1 Reply Last reply Reply Quote 0
          • B Offline
            budddesilva @Guest
            last edited by

            @sean
            Thank you for your reply. I did a fresh install of Raspbian Stretch, did all the updates and installed all the dependencies one by one. However, every time I add the default configuration for MMM-Hotword into the main config.js file… I get the black screen. I can safely say MMM-Hotword is the culprit because the mirror works fine without it in the config.js file. Do you have an idea of what’s causing this?

            This is what I have in my config.js file

            /* 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: "en",
            	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-o ",
            						url: "webcal://www.calendarlabs.com/templates/ical/US-Holidays.ics"
            					}
            				]
            			}
            		},
            		{
              			module: "MMM-AssistantMk2",
              			position: "top_right",
              			config: {
                			       	   record: {
            				   recordProgram: "arecord",
            				   device: "plughw:1",
            					},
            
            				notifications: {
            				   ASSISTANT_ACTIVATED: "HOTWORD_PAUSE",
            				   ASSISTANT_DEACTIVATED: "HOTWORD_RESUME",
            						},
              			}
            		},
            {
              module: "MMM-Hotword",
              config: {}
            },
            		{
            			module: "compliments",
            			position: "lower_third"
            		},
            		{
            			module: "currentweather",
            			position: "top_right",
            			config: {
            				location: "Auckland",
            				locationID: "2193734",  //ID from http://bulk.openweathermap.org/sample/; unzip the gz file and find your city
            				appid: "3469461386627eaa3c97129ab3bc70ba"
            			}
            		},
            		{
            			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
            			}
            		},
            	]
            
            };
            
            /*************** DO NOT EDIT THE LINE BELOW ***************/
            if (typeof module !== "undefined") {module.exports = config;}
            

            The error I get when running the mirror with the Hotword module says it cannot find the snowboy module… I didn’t have any problems when I installed snowboy. I rebuilt this without any problems using the code below.

            cd ~/MagicMirror/modules/MMM-Hotword/node_modules/snowboy
            npm install --save-dev electron-rebuild
            npm install nan
            ./node_modules/.bin/electron-rebuild

            ERROR WHEN RUNNING MIRROR WITH HOTWORD MODULE

            pi@raspberrypi:~/MagicMirror $ npm start
            
            > magicmirror@2.5.0 start /home/pi/MagicMirror
            > sh run-start.sh
            
            Starting MagicMirror: v2.5.0
            Loading config ...
            Loading module helpers ...
            No helper found for module: alert.
            Initializing new module helper ...
            Module helper loaded: updatenotification
            No helper found for module: clock.
            Initializing new module helper ...
            Module helper loaded: calendar
            Initializing new module helper ...
            Module helper loaded: MMM-AssistantMk2
            WARNING! Could not load config file. Starting with default configuration. Error found: Error: Cannot find module 'snowboy'
            Loading module helpers ...
            No helper found for module: alert.
            Initializing new module helper ...
            Module helper loaded: updatenotification
            No helper found for module: clock.
            Initializing new module helper ...
            Module helper loaded: calendar
            Initializing new module helper ...
            Module helper loaded: MMM-AssistantMk2
            App threw an error during load
            Error: Cannot find module 'snowboy'
                at Module._resolveFilename (module.js:543:15)
                at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/electron/dist/resources/electron.asar/common/reset-search-paths.js:35:12)
                at Function.Module._load (module.js:473:25)
                at Module.require (module.js:586:17)
                at require (internal/module.js:11:18)
                at Object.<anonymous> (/home/pi/MagicMirror/modules/MMM-Hotword/node_helper.js:10:18)
                at Object.<anonymous> (/home/pi/MagicMirror/modules/MMM-Hotword/node_helper.js:115:3)
                at Module._compile (module.js:642:30)
                at Object.Module._extensions..js (module.js:653:10)
                at Module.load (module.js:561:32)
            Whoops! There was an uncaught exception...
            { Error: Cannot find module 'snowboy'
                at Module._resolveFilename (module.js:543:15)
                at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/electron/dist/resources/electron.asar/common/reset-search-paths.js:35:12)
                at Function.Module._load (module.js:473:25)
                at Module.require (module.js:586:17)
                at require (internal/module.js:11:18)
                at Object.<anonymous> (/home/pi/MagicMirror/modules/MMM-Hotword/node_helper.js:10:18)
                at Object.<anonymous> (/home/pi/MagicMirror/modules/MMM-Hotword/node_helper.js:115:3)
                at Module._compile (module.js:642:30)
                at Object.Module._extensions..js (module.js:653:10)
                at Module.load (module.js:561:32) code: 'MODULE_NOT_FOUND' }
            MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
            If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
            Launching application.
            
            ? 1 Reply Last reply Reply Quote 0
            • S Away
              sdetweil
              last edited by

              You should be doing npm install in the MMM-AssistantMk2 folder

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              1 Reply Last reply Reply Quote 0
              • B Offline
                budddesilva
                last edited by

                Thanks for the reply @sdetweil . So, do you mean like… ?

                cd ~/MagicMirror/modules/MMM-AssistantMk2
                npm install --save-dev electron-rebuild
                npm install nan
                ./node_modules/.bin/electron-rebuild

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

                  Yes, but I don’t think u need that last command. The package.json in the module folder is used for installing the dependencies at the right level. U might have to delete the MMM-AssistantMk2/node_modules folder to get it done cleanly

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

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

                    @budddesilva said in MMM-Hotword causing Mirror to blackout:

                    Error: Cannot find module ‘snowboy’

                    This says you didn’t (or failed) npm install of modules. snowboy is included in MMM-Hotword and you havn’t installed it completely. Was there any suspicious error when you install MMM-Hotword?

                    1 Reply Last reply Reply Quote 0
                    • B Offline
                      budddesilva
                      last edited by

                      Ok. These are the steps I took.

                      1. Removed the MMM-AssistantMk2/node_modules folder.
                      2. npm install in the MMM-AssistantMk2 folder
                        cd ~/MagicMirror/modules/MMM-AssistantMk2
                        npm install --save-dev electron-rebuild
                        npm install nan
                      3. Received the following error
                      WARNING! Could not load config file. Starting with default configuration. Error found: Error: Failed to load gRPC binary module because it was not installed for the current system
                      Expected directory: electron-v2.0-linux-arm-glibc
                      Found: [node-v67-linux-arm-glibc]
                      This problem can often be fixed by running "npm rebuild" on the current system
                      Original error: Cannot find module '/home/pi/MagicMirror/modules/MMM-AssistantMk2/node_modules/grpc/src/node/extension_binary/electron-v2.0-linux-arm-glibc/grpc_node.node'
                      
                      1. Ran the npm rebuild command in the MMM-AssistantMk2 folder
                      2. Still the same error as before.
                      3. Ran the npm rebuild command in the MMM-AssistantMk2 > node_modules folder
                      4. Still the same error as before.

                      What do you think @sdetweil ?

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

                        @budddesilva

                        sudo apt-get update
                        sudo apt-get upgrade
                        sudo apt-get install build-essentials
                        sudo apt-get install gcc-5
                        

                        do this first.

                        Then,

                        sudo apt-get install libasound2-dev sox libsox-fmt-all
                        

                        Then,

                        cd ~/MagicMirror/modules/MMM-AssistantMk2
                        npm install --save-dev electron-rebuild
                        ./node_modules/.bin/electron-rebuild
                        

                        I wish you have a luck. Happy holidays.

                        1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 1 / 2
                        • First post
                          Last post
                        Enjoying MagicMirror? Please consider a donation!
                        MagicMirror created by Michael Teeuw.
                        Forum managed by Sam, technical setup by Karsten.
                        This forum is using NodeBB as its core | Contributors
                        Contact | Privacy Policy