MagicMirror_scripts icon indicating copy to clipboard operation
MagicMirror_scripts copied to clipboard

start up on pi0w

Open shiryu1031 opened this issue 4 years ago • 95 comments

Hi,

Thank you very much for all your work. I used your script to install the MagicMirror onto a Pi zero W. However, after I run pm2 start MagicMirror, it says process successfully started, but nothing happens afterward. Am I missing something?

Sorry, I am new to this. Thank you very much for your help!

20211204_103159

shiryu1031 avatar Dec 04 '21 15:12 shiryu1031

do lsb_release -a pm2 status and ps -ef | grep chrome

show output please

sdetweil avatar Dec 04 '21 21:12 sdetweil

pi 0 w is pretty slow now adays..

sdetweil avatar Dec 04 '21 22:12 sdetweil

I hope this helps. Thank you~

Capture

shiryu1031 avatar Dec 05 '21 05:12 shiryu1031

ok, so the status info say 865 restarts ( pm2's job is to keep whatever running)

so more info

pm2 stop all
pm2 logs --lines=50

sdetweil avatar Dec 05 '21 13:12 sdetweil

sorry, I don't know what is a better way to put this info up besides screenshot. I really appreciate your help!

Capture Capture1 Capture2 Capture3 Capture4

shiryu1031 avatar Dec 05 '21 14:12 shiryu1031

aha.. something is already using that port... do this

pm2 stop all
pm2 flush 
ps -ef | grep node

sdetweil avatar Dec 05 '21 14:12 sdetweil

Thank you for your prompt responses.

Capture

shiryu1031 avatar Dec 05 '21 19:12 shiryu1031

aha, the server side stuck

sudo kill -9 32740 then npm start

sdetweil avatar Dec 05 '21 19:12 sdetweil

is this easier to see or screenshot is better?

pi@raspberrypi:~/MagicMirror $ sudo kill -9 32740 pi@raspberrypi:~/MagicMirror $ npm start

[email protected] start /home/pi/MagicMirror ./run-start.sh $1

[05.12.2021 15:09.18.281] [LOG] Starting MagicMirror: v2.17.1 [05.12.2021 15:09.18.387] [LOG] Loading config ... [05.12.2021 15:09.18.520] [LOG] Loading module helpers ... [05.12.2021 15:09.18.581] [LOG] No helper found for module: alert. [05.12.2021 15:09.19.392] [LOG] Initializing new module helper ... [05.12.2021 15:09.19.434] [LOG] Module helper loaded: updatenotification [05.12.2021 15:09.19.448] [LOG] No helper found for module: clock. [05.12.2021 15:09.23.344] [LOG] Initializing new module helper ... [05.12.2021 15:09.23.352] [LOG] Module helper loaded: calendar [05.12.2021 15:09.23.363] [LOG] No helper found for module: compliments. [05.12.2021 15:09.23.377] [LOG] No helper found for module: weather. [05.12.2021 15:09.24.154] [LOG] Initializing new module helper ... [05.12.2021 15:09.24.168] [LOG] Module helper loaded: newsfeed [05.12.2021 15:09.24.195] [LOG] All module helpers loaded. [05.12.2021 15:09.26.738] [LOG] Starting server on port 8080 ... [05.12.2021 15:09.27.290] [LOG] Server started ... [05.12.2021 15:09.27.312] [LOG] Connecting socket for: updatenotification [05.12.2021 15:09.27.365] [LOG] Connecting socket for: calendar [05.12.2021 15:09.27.377] [LOG] Starting node helper for: calendar [05.12.2021 15:09.27.414] [LOG] Connecting socket for: newsfeed [05.12.2021 15:09.27.438] [LOG] Starting node helper for: newsfeed [05.12.2021 15:09.27.465] [LOG] Sockets connected & modules started ... [05.12.2021 15:09.27.507] [LOG] Ready to go! Please point your browser to: http://localhost:8080 Starting chromium browser now, have patience, it takes a minute ./run-start.sh: line 115: 5269 Illegal instruction "$b" -noerrdialogs -kiosk -start_maximized --disable-infobars --app=http://localhost:$port --ignore-certificate-errors-spki-list --ignore-ssl-errors --ignore-certificate-errors 2> /dev/null npm ERR! code ELIFECYCLE npm ERR! errno 132 npm ERR! [email protected] start: ./run-start.sh $1 npm ERR! Exit status 132 npm ERR! npm ERR! Failed at the [email protected] start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /home/pi/.npm/_logs/2021-12-05T20_09_31_784Z-debug.log pi@raspberrypi:~/MagicMirror $

Capture Capture1

shiryu1031 avatar Dec 05 '21 20:12 shiryu1031

cool, thanks do

which chromium-browser and which chromium

need a browser, was installed by default

sdetweil avatar Dec 05 '21 20:12 sdetweil

I downloaded the raspberry pi imager to flash the SD card, I used the legacy one. I don't actually know which chromium browser it came with. In fact, I am not sure if it is even installed... because when I clicked the icon, nothing happens. How do I check? Sorry, this must sound very stupid.

when I check add/remove software, web browser chromium-90.0.4430.212-1~deb10u1 is checkmarked.

shiryu1031 avatar Dec 05 '21 21:12 shiryu1031

when u click, nothing happens.. well that's a problem. I haven't tried legacy yet. will do shortly

sdetweil avatar Dec 05 '21 22:12 sdetweil

should I start over again with the newest OS with all the recommended software instead? would that be easier?

shiryu1031 avatar Dec 05 '21 22:12 shiryu1031

no, that's been flaky too and I don't think recommended for pi0w.

sdetweil avatar Dec 05 '21 22:12 sdetweil

can I install /re-install a browser? Will that help? Or it's not that simple.

or maybe I should just give up on using a pi0w. I just thought it was smaller size to put into the frame.

shiryu1031 avatar Dec 06 '21 02:12 shiryu1031

I don't know at this time.

pi0w2 is out, same size and footprint. like pi3 speed

sdetweil avatar Dec 06 '21 02:12 sdetweil

pi0w2 probably won't have the same problem as we do now right?

shiryu1031 avatar Dec 06 '21 03:12 shiryu1031

because there is an electron for armv7l, all is ok. don't need to do the server with chromium over to fake it

sdetweil avatar Dec 06 '21 04:12 sdetweil

ok. Thank you very much for all your help. I really appreciate it.

shiryu1031 avatar Dec 06 '21 04:12 shiryu1031

I have confirmed that chromium on legacy is broken. uninstall/reinstall does not fix.. I have started discussion with pi os team

sdetweil avatar Dec 06 '21 14:12 sdetweil

firefox also fails

sdetweil avatar Dec 06 '21 15:12 sdetweil

I guess that means pi0w is no longer good for magic mirror. Thank you very much for your help!

shiryu1031 avatar Dec 07 '21 04:12 shiryu1031

Note: Running the script completes on my PI Zero. Chromium will not load but I did install:
sudo apt-get install midori The midori web browser does work. image

bnewland1958 avatar Dec 31 '21 18:12 bnewland1958

I'm getting white screen on pizw

➜  ~ cat /etc/os-release 
PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)"
NAME="Raspbian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

Screenshot from 2022-05-01 13-51-38

mistrysiddh avatar May 01 '22 08:05 mistrysiddh

you need to use the legacy, buster image for pi0w, (and pi1) using armv6l

sdetweil avatar May 01 '22 10:05 sdetweil

you need to use the legacy, buster image for pi0w, (and pi1) using armv6l

thank you very much I'm really happy that I can't express my feeling to you. this was my first project in the company and i did it thanks to you

mistrysiddh avatar May 02 '22 18:05 mistrysiddh

there is a problem i notice that there are 2 browser open at the boot

mistrysiddh avatar May 03 '22 09:05 mistrysiddh

do pm2 status, to see if there are two apps being started

pm2 delete name whichever you don't want then pm2 save to clean the restart list

pm2 --help will show u all it can do

sdetweil avatar May 03 '22 11:05 sdetweil

Screenshot_20220503-173757_Termux it's showing me one only

> cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

mistrysiddh avatar May 03 '22 12:05 mistrysiddh

hm..

do

ps -ef | grep npm | grep -v grep

this will list out the running instance of the npm command.

sdetweil avatar May 03 '22 12:05 sdetweil