Read the statement by Michael Teeuw here.
Raspberry Pi Zero W for Magic Mirror
-
@sdetweil Okay which one do you use specifically?
-
@Jakobud the top one on that page
-
@sdetweil I am ripping my hair out trying to get MM running on a Pi Zero W. I’ve followed all of your (super helpful) suggestions across multiple posts, but no matter what I do, I keep getting:
[PM2][ERROR] File ecosystem.config.js not found
any time I try to execute pm2 start.
I’ve run your upgrade / update scripts from github, I’ve removed Chromium and replaced it with Firefox, I’ve uninstalled and reinstalled ten different flavors of the PiOS, I’ve tried the MagicMirrorOS that someone else posted, etc. All with no luck.
Do you have any ideas what could be the problem here?
Thanks in advance,
dvg -
@davidgagne said in Raspberry Pi Zero 2 W for Magic Mirror:
File ecosystem.config.js no found
well, I haven’t seen that…, BUT it sounds like from a google search thgat you have the wrong node js version installed…
but
flash the sd card… its a pi02W, a 3 in pi0 form factor
then run my install script. don’t dop anything else first
you can try to see if you can fixup pm2 first…
pm2 stop all
pm2 status
this will display a linepi@raspberrypi42:~ $ pm2 status ┌────┬────────────────────┬──────────┬──────┬───────────┬──────────┬──────────┐ │ id │ name │ mode │ ↺ │ status │ cpu │ memory │ ├────┼────────────────────┼──────────┼──────┼───────────┼──────────┼──────────┤ │ 0 │ MagicMirror │ fork │ 0 │ online │ 0% │ 2.7mb │ └────┴────────────────────┴──────────┴──────┴───────────┴──────────┴──────────┘
you can use the name or number on any line
pm2 delete 0
pm2 save -f
then run
bash -c “$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/fixuppm2.sh)”to recreate the app in pm2.
lets see…
else redo the install as above
-
@sdetweil said in Raspberry Pi Zero 2 W for Magic Mirror:
flash the sd card… its a pi02W, a 3 in pi0 form factor
I’m sorry but I don’t understand what this means. Which PiOS should I flash? I have been trying with the Legacy, 32-bit.
(If it makes a difference, I actually have a Raspberry Pi Zero W Rev 1.1. I don’t think it’s a 2.)
Thank you!
-
@davidgagne ok, if it IS a pi0W, then 32 bit legacy image
flash sd card, boot to the desktop, use terminal window or ssh
then my install script.
they have removed the chromium browser, for armv6l, so you will have to use firefox or one of the others… midori or surf
so YOU MUST use the environment variable in
~/MagicMirror/installers/mm.sh to set the browser to use ( all have to be installed manually) -
@sdetweil Okay. I’m doing this right now.
- Flashed card with Legacy 32-bit.
- Connected via ssh to run your script.
bash -c "$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/raspberry.sh)"
Answered yes to disable screen saver and use pm2 questions.
- Removed chromium with:
sudo apt-get remove chromium-browser sudo apt autoremove
- Added Firefox with:
sudo apt-get update sudo apt-get install firefox-esr
- Enabled VNC using sudo raspi-config GUI
- Connect via TigerVNC
- Edit mm.sh via VNC in Pi's baked-in text editor by adding:
cd ~/MagicMirror export external_browser=firefox DISPLAY=:0 npm start
-
sudo reboot
- Connect via ssh
-
cd MagicMirror pm2 start MagicMirror
- And now -- finally! -- some progress:
[PM2] Spawning PM2 daemon with pm2_home=/home/dvg/.pm2 [PM2] PM2 Successfully daemonized [PM2][ERROR] Script not found: /home/dvg/MagicMirror/MagicMirror
So … now what have I done wrong? What script is missing?
-
@davidgagne well…
it seems the pm2 setup failed for some reason
can you send me the ~/install.log
my same userid at Gmail.
you didn’t have to vnc to edit, nano works over ssh.
because the pm2 setup was not completed,
when you did pm2 start from the MagicMirror folder, it was trying to create the app MagicMirror command
/home/username/MagicMirror/MagicMirrorcan you try to run the fixuppm2 script from my scripts page
-
@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.
-
@davidgagne and MagicMirror should have come up using firefox