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
    79 Posts 10 Posters 57.7k Views 11 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 Here’s what I got after running your fixup script:

      [PM2] Applying action restartProcessId on app [MagicMirror](ids: [ 0 ])
      [PM2] [MagicMirror](0) ✓
      ┌────┬────────────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
      │ id │ name           │ namespace   │ version │ mode    │ pid      │ uptime │ ↺    │ status    │ cpu      │ mem      │ user     │ watching │
      ├────┼────────────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
      │ 0  │ MagicMirror    │ default     │ 2.27.0  │ fork    │ 27952    │ 0s     │ 1    │ online    │ 0%       │ 2.5mb    │ dvg      │ enabled  │
      └────┴────────────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘
      [PM2] Saving current process list...
      [PM2] Successfully saved in /home/dvg/.pm2/dump.pm2
      

      I’ll email install.log to you as soon as I can figure out how to … find and copy the install log.

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

        @davidgagne and MagicMirror should have come up using firefox

        Sam

        How to add modules

        learning how to use browser developers window for css changes

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

          @davidgagne said in Raspberry Pi Zero 2 W for Magic Mirror:

          I’ll email install.log to you as soon as I can figure out how to … find and copy the install log.

          you should install one of the windows ssh clients tools. Winscp or Bitvise ssh clients.
          they provide the typical ssh terminal AND also a windows file manager view of the remote system.
          so you can double click to edit on windows and automatically save the file back.

          bitvise also provides drag and drop file copy support to/from the remote system… for logs and credential files

          I use notepad++ or visual studio code to edit on windows.

          such a time saver!!

          Sam

          How to add modules

          learning how to use browser developers window for css changes

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

            @sdetweil I am not going to bother sending you the install log because it worked!

            It took a long time to launch, but now I can see MagicMirror running when I VNC into the Pi.

            After running your fixuppm2 script I executed pm2 start MagicMirror and got this:

            [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    │ 28553    │ 0s     │ 2    │ online    │ 0%       │ 2.5mb    │ dvg      │ disabled │
            └────┴────────────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘
            

            Now when I VNC into the Pi I see it running! So far the date and time is the only thing correctly displaying, but at least now MagicMirror is running. Thank you!

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

              @davidgagne I am interested in the log to see why the inline pm2 setup failed.

              yes, pi0w is not fast.

              the default calendar and weather take configuration before they produce output.

              Sam

              How to add modules

              learning how to use browser developers window for css changes

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

                @davidgagne you can also adjust the MagicMirror config so you can open your windows browser to see it too.

                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 I’m an Apple user. I am sure there’s something similar, though. Thanks.

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

                    @sdetweil It looks like I spoke too soon. After a reboot, I cannot seem to get any output from MagicMirror.
                    I rebooted and then called pm2 start MagicMirror from within the MagicMirror directory, and it seems to execute just fine. But … nothing happens. It doesn’t actually start the app, as far as I can tell. Even though the output seems the same:

                    [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    │ 4592     │ 1s     │ 148  │ online    │ 0%       │ 27.4mb   │ dvg      │ disabled │
                    └────┴────────────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘
                    

                    Any ideas?

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

                      @davidgagne pm2 logs --lines=75

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

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

                        @davidgagne that circle with the arrow heading column says times restarted. 148 is a problem

                        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 I emailed you the output from that. I’m guessing Error: Cannot find module 'electron' is bad?

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

                            @sdetweil It’s frustrating because I swear it was working before I rebooted.

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

                              @sdetweil If you thought 148 restarts was bad … This is what I see now:

                              pm2 start MagicMirror
                              [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    │ 14132    │ 0s     │ 659  │ online    │ 0%       │ 20.8mb   │ dvg      │ disabled │
                              └────┴────────────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘
                              
                              1 Reply Last reply Reply Quote 0
                              • S Offline
                                sdetweil @davidgagne
                                last edited by

                                @davidgagne got it. Just back from my walk… will examine…

                                Sam

                                How to add modules

                                learning how to use browser developers window for css changes

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

                                  @sdetweil I followed your tutorial on adding the Jeopardy module (just to see what would happen) and it worked fine. The last step is npm start and when I did that I got this:

                                  > magicmirror@2.27.0 start
                                  > ./run-start.sh $1
                                  
                                  [2024-05-29 10:30:09.649] [LOG] Starting MagicMirror: v2.27.0
                                  [2024-05-29 10:30:10.200] [LOG] Loading config ...
                                  [2024-05-29 10:30:10.267] [LOG] config template file not exists, no envsubst
                                  [2024-05-29 10:30:19.159] [LOG] Loading module helpers ...
                                  [2024-05-29 10:30:19.394] [LOG] No helper found for module: alert.
                                  [2024-05-29 10:30:53.041] [LOG] Initializing new module helper ...
                                  [2024-05-29 10:30:53.066] [LOG] Module helper loaded: updatenotification
                                  [2024-05-29 10:30:53.220] [LOG] No helper found for module: clock.
                                  [2024-05-29 10:31:18.754] [LOG] Initializing new module helper ...
                                  [2024-05-29 10:31:18.854] [LOG] Module helper loaded: calendar
                                  [2024-05-29 10:31:19.537] [ERROR] Whoops! There was an uncaught exception... 
                                  [2024-05-29 10:31:20.316] [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 10:31:20.470] [ERROR] MagicMirror² will not quit, but it might be a good idea to check why this happened. Maybe no internet connection? 
                                  [2024-05-29 10:31:20.593] [ERROR] If you think this really is an issue, please open an issue on GitHub: https://github.com/MagicMirrorOrg/MagicMirror/issues 
                                  [2024-05-29 10:34:40.779] [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
                                  

                                  FYI: There is definitely an internet connection, so we can rule that out. Otherwise I have no idea.

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

                                    @davidgagne yep,

                                    not my tutorial just one I reference

                                    see this
                                    https://forum.magicmirror.builders/topic/15778/fix-for-black-screen-in-2-16-and-later

                                    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 Hmmm. Okay. I tried that for the ‘alert’ module but it didn’t seem to have any impact:

                                      dvg@hyperspace:~/MagicMirror $ cd modules/
                                      dvg@hyperspace:~/MagicMirror/modules $ ls
                                      default  MMM-JEOPARDY
                                      dvg@hyperspace:~/MagicMirror/modules $ cd default/
                                      dvg@hyperspace:~/MagicMirror/modules/default $ ls
                                      alert  calendar  clock  compliments  defaultmodules.js  helloworld  newsfeed  updatenotification  utils.js  weather
                                      dvg@hyperspace:~/MagicMirror/modules/default $ cd alert
                                      dvg@hyperspace:~/MagicMirror/modules/default/alert $ ls package.json
                                      ls: cannot access 'package.json': No such file or directory
                                      dvg@hyperspace:~/MagicMirror/modules/default/alert $ npm init -y
                                      Wrote to /home/dvg/MagicMirror/modules/default/alert/package.json:
                                      
                                      {
                                        "name": "alert",
                                        "version": "1.0.0",
                                        "description": "The alert module is one of the default modules of the MagicMirror². This module displays notifications from other modules.",
                                        "main": "alert.js",
                                        "scripts": {
                                          "test": "echo \"Error: no test specified\" && exit 1"
                                        },
                                        "keywords": [],
                                        "author": "",
                                        "license": "ISC"
                                      }
                                      
                                      
                                      dvg@hyperspace:~/MagicMirror/modules/default/alert $ cd ..
                                      dvg@hyperspace:~/MagicMirror/modules/default $ cd ..
                                      dvg@hyperspace:~/MagicMirror/modules $ cd ..
                                      dvg@hyperspace:~/MagicMirror $ pm2 start MagicMirror
                                      [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    │ 16303    │ 0s     │ 744  │ online    │ 0%       │ 18.5mb   │ dvg      │ disabled │
                                      └────┴────────────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘
                                      

                                      Same result; just a bunch more restarts and nothing appearing. (The Pi desktop is there, though.)

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

                                        @davidgagne why alert? it’s the mmm-jeopady module that is missing a library

                                        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 said in Raspberry Pi Zero 2 W for Magic Mirror:

                                          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’,

                                          Sam

                                          How to add modules

                                          learning how to use browser developers window for css changes

                                          D 1 Reply Last reply Reply Quote 0
                                          • 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

                                            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
                                            • 4
                                            • 2 / 4
                                            • 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