MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    1. Home
    2. davidgagne
    3. Posts
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.
    D
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 5
    • Posts 60
    • Groups 0

    Posts

    Recent Best Controversial
    • RE: Frameless Bathroom Magic Mirror (Hue-controlled)

      @Chloe282 This is freaking awesome and exactly my goal. Way to go!

      posted in Show your Mirror
      D
      davidgagne
    • RE: Installation Problems

      @sdetweil I gave up. I think that MM is simply too demanding to run well on the older Pi Zero W devices. Even after dozens and dozens of attempts, and finally getting it to install perfectly and running, on a blazing fast WiFi connection (close to the signal), multiple modules repeatedly fail and don’t restart on their own, until eventually the MM software itself locks and doesn’t restart.
      At this point I’m going to simply abandon these efforts and wait until I can grab a 3 or 4; I’ll put the Zero to good use doing something else soon.
      Thanks for all your help.

      posted in Troubleshooting
      D
      davidgagne
    • RE: Installation Problems

      @sdetweil No, I am not running a pihole or any other service or hardware which would cause a network delay, and the device is fairly close to the WiFi router. There’s no reason I can imagine for a network timeout.

      posted in Troubleshooting
      D
      davidgagne
    • Installation Problems

      I’m attempting (again) to get MM working well on a Pi Zero W.
      After flashing the card with the Legacy 32-bit OS, I connected via ssh and executed bash -c "$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/raspberry.sh)" and this was the result:

      Updating packages ...
      [                                                                                        <=>                                                                 ]Installing helper tools ...
      Check current Node installation ...
      Node.js is not installed.
      Installing Node.js ...
      Node.js installation Done! version=v20.9.0
      Check current NPM installation ...
      NPM currently installed. Checking version number.
      Minimum npm version: V10.1.0
      Installed npm version: V10.1.0
      No npm upgrade necessary.
      Cloning MagicMirror ...
      Cloning into 'MagicMirror'...
      remote: Enumerating objects: 399, done.
      remote: Counting objects: 100% (399/399), done.
      remote: Compressing objects: 100% (314/314), done.
      remote: Total 399 (delta 78), reused 185 (delta 70), pack-reused 0 (from 0)
      Receiving objects: 100% (399/399), 457.00 KiB | 797.00 KiB/s, done.
      Resolving deltas: 100% (78/78), done.
      Cloning MagicMirror Done!
      Installing dependencies ...
      (node:8329) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
      (Use `node --trace-warnings ...` to show where the warning was created)
      (node:8329) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
      (node:8329) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
      (node:8329) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
      npm notice 
      npm notice New minor version of npm available! 10.1.0 -> 10.8.3
      npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.8.3
      npm notice Run npm install -g npm@10.8.3 to update!
      npm notice 
      npm ERR! code ETIMEDOUT
      npm ERR! errno ETIMEDOUT
      npm ERR! network request to https://registry.npmjs.org/ignore failed, reason: 
      npm ERR! network This is a problem related to network connectivity.
      npm ERR! network In most cases you are behind a proxy or have bad network settings.
      npm ERR! network 
      npm ERR! network If you are behind a proxy, please make sure that the
      npm ERR! network 'proxy' config is set properly.  See: 'npm help config'
      
      npm ERR! A complete log of this run can be found in: /home/dvg/.npm/_logs/2024-09-28T18_28_59_417Z-debug-0.log
      Unable to install dependencies! 
      

      I have a blazing fast internet connection at home, and am not behind any sort of proxy or firewall.

      Any thoughts on how to resolve? And what’s with all the MaxListenersExceededWarning warnings?

      posted in Troubleshooting
      D
      davidgagne
    • RE: MagicMirror Failing on Raspberry Pi Zero W Rev 1.1

      @butchkemper said in MagicMirror Failing on Raspberry Pi Zero W Rev 1.1:

      You might consider moving from the SDcard to an SSD which will provide quicker data access and improved security against SDcard failure.

      If I connect an SSD via the data port and remove the SIM, will the 0 boot from the SSD? Or is there a way to configure the SIM to have it switch to the SSD or something?

      posted in Troubleshooting
      D
      davidgagne
    • RE: MagicMirror Failing on Raspberry Pi Zero W Rev 1.1

      @sdetweil @butchkemper I just checked that file and it has no CONF_SWAPSIZE variable.

      There is a SWAPSIZE variable set to 1024.

      Is there a chance that @sdetweil’s script misnamed that variable?

      posted in Troubleshooting
      D
      davidgagne
    • RE: MagicMirror Failing on Raspberry Pi Zero W Rev 1.1

      @sdetweil Hm. I do have a file /.pm2/pm2.log that’s filled with thousands of these:

      2024-08-04T00:35:12: PM2 log: App [MagicMirror:1] exited with code [1] via signal [SIGINT]
      2024-08-04T00:35:13: PM2 log: App [MagicMirror:1] starting in -fork mode-
      2024-08-04T00:35:13: PM2 log: App [MagicMirror:1] online
      2024-08-04T00:35:19: PM2 log: App [MagicMirror:1] exited with code [1] via signal [SIGINT]
      2024-08-04T00:35:19: PM2 log: App [MagicMirror:1] starting in -fork mode-
      2024-08-04T00:35:19: PM2 log: App [MagicMirror:1] online
      2024-08-04T00:35:25: PM2 log: App [MagicMirror:1] exited with code [1] via signal [SIGINT]
      2024-08-04T00:35:25: PM2 log: App [MagicMirror:1] starting in -fork mode-
      2024-08-04T00:35:25: PM2 log: App [MagicMirror:1] online
      

      The last entry in that file is from 2024-08-04T21:22:04, which is around/about the last time I rebooted the Pi.

      The tail of that log file looks like this:

      2024-08-04T21:16:54: PM2 log: pid=3352 msg=failed to kill - retrying in 100ms
      2024-08-04T21:16:54: PM2 log: Process with pid 3352 still alive after 1600ms, sending it SIGKILL now...
      2024-08-04T21:16:55: PM2 log: App [pm2:0] exited with code [0] via signal [SIGKILL]
      2024-08-04T21:16:55: PM2 log: pid=3352 msg=process killed
      2024-08-04T21:16:56: PM2 log: PM2 successfully stopped
      2024-08-04T21:22:02: PM2 log: ===============================================================================
      2024-08-04T21:22:02: PM2 log: --- New PM2 Daemon started ----------------------------------------------------
      2024-08-04T21:22:02: PM2 log: Time                 : Sun Aug 04 2024 21:22:02 GMT-0400 (Eastern Daylight Time)
      2024-08-04T21:22:02: PM2 log: PM2 version          : 5.4.2
      2024-08-04T21:22:02: PM2 log: Node.js version      : 20.9.0
      2024-08-04T21:22:02: PM2 log: Current arch         : arm
      2024-08-04T21:22:02: PM2 log: PM2 home             : /home/dvg/.pm2
      2024-08-04T21:22:02: PM2 log: PM2 PID file         : /home/dvg/.pm2/pm2.pid
      2024-08-04T21:22:02: PM2 log: RPC socket file      : /home/dvg/.pm2/rpc.sock
      2024-08-04T21:22:02: PM2 log: BUS socket file      : /home/dvg/.pm2/pub.sock
      2024-08-04T21:22:02: PM2 log: Application log path : /home/dvg/.pm2/logs
      2024-08-04T21:22:02: PM2 log: Worker Interval      : 30000
      2024-08-04T21:22:02: PM2 log: Process dump file    : /home/dvg/.pm2/dump.pm2
      2024-08-04T21:22:02: PM2 log: Concurrent actions   : 2
      2024-08-04T21:22:02: PM2 log: SIGTERM timeout      : 1600
      2024-08-04T21:22:02: PM2 log: ===============================================================================
      2024-08-04T21:22:04: PM2 log: [Watch] Start watching pm2
      2024-08-04T21:22:04: PM2 log: App [pm2:0] starting in -fork mode-
      2024-08-04T21:22:04: PM2 log: App [pm2:0] online
      

      And in the /.pm2/logs/ directory I have MagicMirror-error.log, MagicMirror-out.log, pm2-error.log, and pm2-out.log.

      That last one appears to contain what I would have expected to see in the MM-out.log.

      I am not opposed to flashing the drive and starting from scratch if you think I should.

      posted in Troubleshooting
      D
      davidgagne
    • RE: MagicMirror Failing on Raspberry Pi Zero W Rev 1.1

      @sdetweil I mean … I have no idea how I created that. I simply followed the same steps as last time and then executed a few of the commands you told me, e.g. pm2 delete 0, pm2 delete 1, and pm2 save -f. Then I called your fix’em up script:

      bash -c "$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/fixuppm2.sh)"
      the log will be saved in /home/dvg/MagicMirror/installers/pm2_setup.log
      

      and after that I called pm2 save followed by pm2 start MagicMirror and then installers/mm.sh & when I was asking you about my cluttered Terminal screen.

      Then I called pm2 restart MagicMirror which told me:

      Use --update-env to update environment variables
      [PM2][ERROR] Process or Namespace MagicMirror not found
      

      So then I called npm start & which gave me

      [1] 12338
      
      > magicmirror@2.28.0 start
      > ./run-start.sh $1
      
      ./run-start.sh: line 79: 11841 Killed                  node serveronly
      

      So I did a sudo reboot and everything seemed to be working fine. But my out log was empty so I called npm run server at your direction, and here we are.

      posted in Troubleshooting
      D
      davidgagne
    • RE: MagicMirror Failing on Raspberry Pi Zero W Rev 1.1

      @sdetweil Executing pm2 status yields:

      ┌────┬────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
      │ id │ name   │ namespace   │ version │ mode    │ pid      │ uptime │ ↺    │ status    │ cpu      │ mem      │ user     │ watching │
      ├────┼────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
      │ 0  │ pm2    │ default     │ 2.28.0  │ fork    │ 1238     │ 17h    │ 0    │ online    │ 0%       │ 240.0kb  │ dvg      │ enabled  │
      └────┴────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘
      
      posted in Troubleshooting
      D
      davidgagne
    • RE: MagicMirror Failing on Raspberry Pi Zero W Rev 1.1

      @sdetweil So then why is my MagicMirror-out.log always empty?

      posted in Troubleshooting
      D
      davidgagne
    • RE: MagicMirror Failing on Raspberry Pi Zero W Rev 1.1

      @sdetweil Calling npm run server immediately after connecting via ssh yields:

      npm error code ENOENT
      npm error syscall open
      npm error path /home/dvg/package.json
      npm error errno -2
      npm error enoent Could not read package.json: Error: ENOENT: no such file or directory, open '/home/dvg/package.json'
      npm error enoent This is related to npm not being able to find a file.
      npm error enoent
      npm error A complete log of this run can be found in: /home/dvg/.npm/_logs/2024-08-05T16_42_00_562Z-debug-0.log
      

      If I switch to the MagicMirror directory and call it, I get this:

      > magicmirror@2.28.0 server
      > node ./serveronly
      
      [2024-08-05 12:43:48.489] [LOG]   Starting MagicMirror: v2.28.0 
      [2024-08-05 12:43:48.956] [LOG]   Loading config ... 
      [2024-08-05 12:43:49.021] [LOG]   config template file not exists, no envsubst 
      [2024-08-05 12:43:56.659] [LOG]   Loading module helpers ... 
      [2024-08-05 12:43:56.760] [LOG]   No helper found for module: alert. 
      [2024-08-05 12:43:57.912] [LOG]   Initializing new module helper ... 
      [2024-08-05 12:43:58.105] [LOG]   Module helper loaded: updatenotification 
      [2024-08-05 12:43:58.210] [LOG]   No helper found for module: clock. 
      [2024-08-05 12:43:58.475] [LOG]   Initializing new module helper ... 
      [2024-08-05 12:43:58.608] [LOG]   Module helper loaded: mmm-systemtemperature 
      [2024-08-05 12:43:58.784] [LOG]   No helper found for module: weather. 
      [2024-08-05 12:43:58.837] [LOG]   No helper found for module: weather. 
      [2024-08-05 12:44:06.841] [LOG]   Initializing new module helper ... 
      [2024-08-05 12:44:06.956] [LOG]   Module helper loaded: MMM-ThemeParkWaitTimes 
      [2024-08-05 12:44:08.953] [LOG]   Initializing new module helper ... 
      [2024-08-05 12:44:09.018] [LOG]   Module helper loaded: MMM-birthdays 
      [2024-08-05 12:44:09.067] [LOG]   No helper found for module: MMM-CloneWarsQuotes. 
      [2024-08-05 12:44:09.136] [LOG]   Initializing new module helper ... 
      [2024-08-05 12:44:09.228] [LOG]   Module helper loaded: MMM-ThemeParkWaitTimes 
      [2024-08-05 12:44:09.603] [LOG]   Initializing new module helper ... 
      [2024-08-05 12:44:09.673] [LOG]   Module helper loaded: MMM-ImagesPhotos 
      [2024-08-05 12:44:09.721] [LOG]   All module helpers loaded. 
      [2024-08-05 12:44:11.000] [LOG]   Starting server on port 8080 ...  
      [2024-08-05 12:44:11.743] [WARN]  You're using a full whitelist configuration to allow for all IPs 
      [2024-08-05 12:44:13.607] [ERROR] Whoops! There was an uncaught exception... 
      [2024-08-05 12:44:14.335] [ERROR] Error: listen EADDRINUSE: address already in use 0.0.0.0:8080
          at Server.setupListenHandle [as _listen2] (node:net:1872:16)
          at listenInCluster (node:net:1920:12)
          at doListen (node:net:2069:7)
          at process.processTicksAndRejections (node:internal/process/task_queues:83:21) {
        code: 'EADDRINUSE',
        errno: -98,
        syscall: 'listen',
        address: '0.0.0.0',
        port: 8080
      } 
      [2024-08-05 12:44:14.400] [ERROR] MagicMirror² will not quit, but it might be a good idea to check why this happened. Maybe no internet connection? 
      [2024-08-05 12:44:14.422] [ERROR] If you think this really is an issue, please open an issue on GitHub: https://github.com/MagicMirrorOrg/MagicMirror/issues 
      [2024-08-05 12:47:35.279] [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.9.0; installed node: 20.9.0; npm: 10.8.2; pm2: 5.4.2
      ### OTHER:    timeZone: America/New_York; ELECTRON_ENABLE_GPU: undefined 
      
      posted in Troubleshooting
      D
      davidgagne
    • RE: MagicMirror Failing on Raspberry Pi Zero W Rev 1.1

      @sdetweil I’m sorry, but I don’t understand. What exactly is mm? (MagicMirror is running.)

      What does npm run server do? (I can visit the IP address of the Pi on my phone or laptop on my home network.)

      posted in Troubleshooting
      D
      davidgagne
    • RE: MagicMirror Failing on Raspberry Pi Zero W Rev 1.1

      @sdetweil Okay. Next issue is that MagicMirror-out.log is always empty. I recall that I could find lots of information in there the last time I was setting up a MM, but this time it’s always just blank. (The MagicMirror-error.log file is, sadly, useless because it’s just filled with tens of thousands of lines of Error: Cannot find module 'electron'.)

      Any idea why MagicMirror-out.log is always empty?

      posted in Troubleshooting
      D
      davidgagne
    • RE: Fork Mode

      @sdetweil Oh. So just close that Terminal window and ssh into it again, you mean?

      posted in Troubleshooting
      D
      davidgagne
    • RE: Fork Mode

      @sdetweil said in Fork Mode:

      installers/mm.sh &

      That doesn’t seem to work:

      ~/MagicMirror $ installers/mm.sh &
      [1] 11788
      
      > magicmirror@2.28.0 start
      > ./run-start.sh $1
      
      [2024-08-04 16:01:09.618] [LOG] Starting MagicMirror: v2.28.0
      [2024-08-04 16:01:10.764] [LOG] Loading config ...
      [2024-08-04 16:01:10.845] [LOG] config template file not exists, no envsubst
      [2024-08-04 16:01:17.539] [LOG] Loading module helpers ...
      [2024-08-04 16:01:17.705] [LOG] No helper found for module: alert.
      [2024-08-04 16:01:19.196] [LOG] Initializing new module helper ...
      [2024-08-04 16:01:19.283] [LOG] Module helper loaded: updatenotification
      [2024-08-04 16:01:19.535] [LOG] No helper found for module: clock.
      [2024-08-04 16:01:20.029] [LOG] Initializing new module helper ...
      [2024-08-04 16:01:20.278] [LOG] Module helper loaded: mmm-systemtemperature
      [2024-08-04 16:01:20.396] [LOG] No helper found for module: weather.
      [2024-08-04 16:01:20.554] [LOG] No helper found for module: weather.
      [2024-08-04 16:01:27.632] [LOG] Initializing new module helper ...
      [2024-08-04 16:01:27.767] [LOG] Module helper loaded: MMM-ThemeParkWaitTimes
      [2024-08-04 16:01:30.552] [LOG] Initializing new module helper ...
      [2024-08-04 16:01:30.603] [LOG] Module helper loaded: MMM-birthdays
      [2024-08-04 16:01:30.714] [LOG] No helper found for module: MMM-CloneWarsQuotes.
      [2024-08-04 16:01:30.761] [LOG] Initializing new module helper ...
      [2024-08-04 16:01:30.854] [LOG] Module helper loaded: MMM-ThemeParkWaitTimes
      [2024-08-04 16:01:31.469] [LOG] Initializing new module helper ...
      [2024-08-04 16:01:31.526] [LOG] Module helper loaded: MMM-ImagesPhotos
      [2024-08-04 16:01:31.561] [LOG] All module helpers loaded.
      [2024-08-04 16:01:32.866] [LOG] Starting server on port 8080 ...
      [2024-08-04 16:01:33.567] [WARN]  You're using a full whitelist configuration to allow for all IPs 
      [2024-08-04 16:01:35.645] [LOG] Server started ...
      

      It is still returning all the reporting to Terminal.

      posted in Troubleshooting
      D
      davidgagne
    • RE: Fork Mode

      @sdetweil Oh, nice. That’s a good tip. Thanks!

      posted in Troubleshooting
      D
      davidgagne
    • RE: Fork Mode

      @sdetweil Awesome! That seemed to do the trick. Thanks!

      posted in Troubleshooting
      D
      davidgagne
    • RE: Fork Mode

      @sdetweil Yes. I think something is wrong with pm2 itself, because (a) calling the standard pm2 start MagicMirror will appear to work, but it does not actually launch the MagicMirror. This is the output it yields:

      ~/MagicMirror/modules $ pm2 start MagicMirror
      [PM2] Applying action restartProcessId on app [MagicMirror](ids: [ 1 ])
      [PM2] [MagicMirror](1) ✓
      [PM2] Process successfully started
      ┌────┬────────────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
      │ id │ name           │ namespace   │ version │ mode    │ pid      │ uptime │ ↺    │ status    │ cpu      │ mem      │ user     │ watching │
      ├────┼────────────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
      │ 1  │ MagicMirror    │ default     │ 2.28.0  │ fork    │ 2816     │ 1s     │ 57   │ online    │ 0%       │ 29.0mb   │ dvg      │ disabled │
      │ 0  │ pm2            │ default     │ 2.28.0  │ fork    │ N/A      │ 0      │ 0    │ stopped   │ 0%       │ 0b       │ dvg      │ enabled  │
      └────┴────────────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘
      

      And (b) it shows pm2 as stopped which doesn’t make any sense. I thought pm2 was supposed to always be running.

      Calling /installers/mm.sh will launch the MagicMirror, but then I am stuck with it reporting everything back to the ssh Terminal window and I can’t so anything else until/unless I ctrl-z it, which is annoying.

      posted in Troubleshooting
      D
      davidgagne
    • Fork Mode

      Can anyone help me understand why my .pm2/pm2.log file is filled with the below errors?

      2024-08-03T18:30:09: PM2 log: App [MagicMirror:1] online
      2024-08-03T18:30:15: PM2 log: App [MagicMirror:1] exited with code [1] via signal [SIGINT]
      2024-08-03T18:30:15: PM2 log: App [MagicMirror:1] starting in -fork mode-
      2024-08-03T18:30:15: PM2 log: App [MagicMirror:1] online
      2024-08-03T18:30:20: PM2 log: App [MagicMirror:1] exited with code [1] via signal [SIGINT]
      2024-08-03T18:30:20: PM2 log: App [MagicMirror:1] starting in -fork mode-
      
      posted in Troubleshooting
      D
      davidgagne
    • RE: MagicMirror Failing on Raspberry Pi Zero W Rev 1.1

      @sdetweil If electron hasn’t been required for years, then why does a fresh install of everything generate tens of thousands of “can’t find electron” lines in MagicMirror-error.log?

      posted in Troubleshooting
      D
      davidgagne
    • 1 / 1