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.

    Raspberry Pi Zero W for Magic Mirror

    Scheduled Pinned Locked Moved Hardware
    73 Posts 8 Posters 42.8k Views 9 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D Offline
      davidgagne @sdetweil
      last edited by

      @sdetweil So, because I am relentless, I rebooted to see if that would help. It didn’t, but now it looks like I have a different problem altogether:

      cd MagicMirror/
      pm2 start MagicMirror
      [PM2] Spawning PM2 daemon with pm2_home=/home/dvg/.pm2
      [PM2] PM2 Successfully daemonized
      [PM2][ERROR] Script not found: /home/dvg/MagicMirror/MagicMirror
      
      S 1 Reply Last reply Reply Quote 0
      • S Offline
        sdetweil @davidgagne
        last edited by

        @davidgagne pm2 status

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 0
        • D Offline
          davidgagne @sdetweil
          last edited by

          @sdetweil Oh. I thought the alert module was also indicating it was missing. Okay, I’ve tried npm init -y inside the MMM-Jeopardy dir, too, now.

          pm2 status gives me:

          ┌────┬────────────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
          │ id │ name           │ namespace   │ version │ mode    │ pid      │ uptime │ ↺    │ status    │ cpu      │ mem      │ user     │ watching │
          ├────┼────────────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
          │ 0  │ MagicMirror    │ default     │ 2.27.0  │ fork    │ 1865     │ 11s    │ 28   │ online    │ 21.4%    │ 38.6mb   │ dvg      │ disabled │
          └────┴────────────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘
          

          And now a subsequent pm2 start MagicMirror gives me:

          [PM2] Applying action restartProcessId on app [MagicMirror](ids: [ 0 ])
          [PM2] [MagicMirror](0) ✓
          [PM2] Process successfully started
          ┌────┬────────────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
          │ id │ name           │ namespace   │ version │ mode    │ pid      │ uptime │ ↺    │ status    │ cpu      │ mem      │ user     │ watching │
          ├────┼────────────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
          │ 0  │ MagicMirror    │ default     │ 2.27.0  │ fork    │ 1986     │ 0s     │ 34   │ online    │ 0%       │ 22.6mb   │ dvg      │ disabled │
          └────┴────────────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘
          

          But there’s still nothing displaying (aside from the generic Pi OS desktop, I mean).

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

            @davidgagne there are more commands after npm init

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            D 2 Replies Last reply Reply Quote 0
            • D Offline
              davidgagne @sdetweil
              last edited by

              @sdetweil Ah. I see that. But … I don’t think the Jeopardy module is the main problem here. I’d prefer to simply remove that and try to get back to where I can even get MM to run in the first place; then I’ll screw around with adding modules. As it is I still can’t get MM to even run at all (plus all the restarts).

              1 Reply Last reply Reply Quote 0
              • D Offline
                davidgagne @sdetweil
                last edited by

                @sdetweil Am I wrong about this? It actually appears that ‘electron’ is the missing module. But that’s not in /modules it’s in /js … Do I follow the same npm init steps to get it?

                S 2 Replies Last reply Reply Quote 0
                • S Offline
                  sdetweil @davidgagne
                  last edited by

                  @davidgagne no the electron missing is a problem in MagicMirror code…

                  hang on…

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

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

                    @davidgagne ok, lets clean up and restart

                    all command line commands

                    pm2 flush (to get clear out the old logs) 
                    
                    pm2 status
                    
                    cd ~/MagicMirror
                    npm start 
                    

                    all show work… and if you loaded the missing library in the MMM-Jeopardy module then all should be ok.

                    then ctrl-q on the MM screen should stop it

                    then

                    pm2 restart 0
                    

                    and MM should come back up

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    D 2 Replies Last reply Reply Quote 0
                    • D Offline
                      davidgagne @sdetweil
                      last edited by

                      @sdetweil Okay! I’m doing this right now and will keep you posted. THANK YOU AGAIN.

                      1 Reply Last reply Reply Quote 0
                      • D Offline
                        davidgagne @sdetweil
                        last edited by

                        `@sdetweil Sadly that didn’t seem to work at all.

                        pm2 flush gave me:

                        [PM2] Spawning PM2 daemon with pm2_home=/home/dvg/.pm2
                        [PM2] PM2 Successfully daemonized
                        [PM2] Flushing /home/dvg/.pm2/pm2.log
                        [PM2] Logs flushed
                        

                        Then pm2 status gave me:

                        ┌────┬────────────────────┬──────────┬──────┬───────────┬──────────┬──────────┐
                        │ id │ name               │ mode     │ ↺    │ status    │ cpu      │ memory   │
                        ├────┼────────────────────┼──────────┼──────┼───────────┼──────────┼──────────┤
                        │ 0  │ MagicMirror        │ fork     │ 0    │ online    │ 23.3%    │ 40.3mb   │
                        └────┴────────────────────┴──────────┴──────┴───────────┴──────────┴──────────┘
                        

                        Then I did cd ~/MagicMirror/ and ran npm start which spit out this:

                        > magicmirror@2.27.0 start
                        > ./run-start.sh $1
                        
                        [2024-05-29 23:08:58.949] [LOG] Starting MagicMirror: v2.27.0
                        [2024-05-29 23:08:59.437] [LOG] Loading config ...
                        [2024-05-29 23:08:59.497] [LOG] config template file not exists, no envsubst
                        [2024-05-29 23:09:07.135] [LOG] Loading module helpers ...
                        [2024-05-29 23:09:07.356] [LOG] No helper found for module: alert.
                        [2024-05-29 23:09:36.395] [LOG] Initializing new module helper ...
                        [2024-05-29 23:09:36.558] [LOG] Module helper loaded: updatenotification
                        [2024-05-29 23:09:36.688] [LOG] No helper found for module: clock.
                        [2024-05-29 23:10:00.038] [LOG] Initializing new module helper ...
                        [2024-05-29 23:10:00.109] [LOG] Module helper loaded: calendar
                        [2024-05-29 23:10:00.684] [ERROR] Whoops! There was an uncaught exception... 
                        [2024-05-29 23:10:01.570] [ERROR] Error: Cannot find module 'request'
                        Require stack:
                        - /home/dvg/MagicMirror/modules/MMM-JEOPARDY/node_helper.js
                        - /home/dvg/MagicMirror/js/app.js
                        - /home/dvg/MagicMirror/serveronly/index.js
                            at Module._resolveFilename (node:internal/modules/cjs/loader:1048:15)
                            at Module._resolveFilename (/home/dvg/MagicMirror/node_modules/module-alias/index.js:49:29)
                            at Module._load (node:internal/modules/cjs/loader:901:27)
                            at Module.require (node:internal/modules/cjs/loader:1115:19)
                            at require (node:internal/modules/helpers:130:18)
                            at Object.<anonymous> (/home/dvg/MagicMirror/modules/MMM-JEOPARDY/node_helper.js:8:17)
                            at Module._compile (node:internal/modules/cjs/loader:1241:14)
                            at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
                            at Module.load (node:internal/modules/cjs/loader:1091:32)
                            at Module._load (node:internal/modules/cjs/loader:938:12)
                            at Module.require (node:internal/modules/cjs/loader:1115:19)
                            at require (node:internal/modules/helpers:130:18)
                            at loadModule (/home/dvg/MagicMirror/js/app.js:183:19)
                            at loadModules (/home/dvg/MagicMirror/js/app.js:213:10)
                            at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
                            at async App.start (/home/dvg/MagicMirror/js/app.js:261:3) {
                          code: 'MODULE_NOT_FOUND',
                          requireStack: [
                            '/home/dvg/MagicMirror/modules/MMM-JEOPARDY/node_helper.js',
                            '/home/dvg/MagicMirror/js/app.js',
                            '/home/dvg/MagicMirror/serveronly/index.js'
                          ]
                        } 
                        [2024-05-29 23:10:01.664] [ERROR] MagicMirror² will not quit, but it might be a good idea to check why this happened. Maybe no internet connection? 
                        [2024-05-29 23:10:01.745] [ERROR] If you think this really is an issue, please open an issue on GitHub: https://github.com/MagicMirrorOrg/MagicMirror/issues 
                        [2024-05-29 23:12:53.308] [INFO] System information:
                        ### SYSTEM: manufacturer: Raspberry Pi Foundation; model: Raspberry Pi Zero W Rev 1.1; raspberry: [object Object]; virtual: false
                        ### OS: platform: linux; distro: Raspbian GNU/Linux; release: 11; arch: arm; kernel: 6.1.21+
                        ### VERSIONS: electron: undefined; used node: 20.8.0; installed node: 20.8.0; npm: 10.1.0; pm2: 5.4.0
                        ### OTHER: timeZone: America/New_York; ELECTRON_ENABLE_GPU: undefined
                        Starting chromium browser now, have patience, it takes a minute
                        Chromium_browser not installed
                        

                        This all seemed pointless, but I ran pm2 restart 0 anyway and got this:

                        Use --update-env to update environment variables
                        [PM2] Applying action restartProcessId on app [0](ids: [ '0' ])
                        [PM2] [MagicMirror](0) ✓
                        ┌────┬────────────────────┬──────────┬──────┬───────────┬──────────┬──────────┐
                        │ id │ name               │ mode     │ ↺    │ status    │ cpu      │ memory   │
                        ├────┼────────────────────┼──────────┼──────┼───────────┼──────────┼──────────┤
                        │ 0  │ MagicMirror        │ fork     │ 47   │ online    │ 0%       │ 23.5mb   │
                        └────┴────────────────────┴──────────┴──────┴───────────┴──────────┴──────────┘
                        

                        At this point I’m going to give up and go back to square one and flash the drive again and start over. Ugh.

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