Read the statement by Michael Teeuw here.
MagicMirror on Pi Zero W
-
@strawberry-3.141 said in MagicMirror on Pi Zero W:
@Hawking you should check if moment weas installed properly it sits in the vendor directory in node_modules, if it isnt there run
npm installin the vendor directoryWith “vendor directory” you refer to “~/MagicMirror”?
I have a folder
/home/pi/MagicMirror/node_modules/moment with several files (including moment.js) and subfolders. Is this enough indication for a proper installation or should I check other details?@Mitchfarino said in MagicMirror on Pi Zero W:
I saw errors stating that MM requires a higher version of node, but I couldn’t figure out how to do it.
Could you provide the command you used? Then I’ll try it on mine too and will feed back
Yes, I got the same error/warnings, that’s why I tried to use a more recent version of node. I used the scripts available here
https://github.com/sdesalas/node-pi-zero
I tested it for v6 (don’t remember which subversion) and v7.7.1. Both was without success (no error/warning about old node version, instead other issues and finally still a blank screen). But maybe I made something wrong. Please try your self and let us know about the results (and post the error you get, I don’t remember them in detail).@Mitchfarino said in MagicMirror on Pi Zero W:
I think if someone can get this up and running, they should host the image somewhere for people to download.
I would strongly prefer to know the commands that worked. An image is a huge file that gets outdated (replacement of jessie…), has to be stored on some external server (the free one are usually slow…) The commands on the other hand are hopefully only a small modification of the tutorial writen above, can easily be used and even adapted more easy.
-
@Hawking said in MagicMirror on Pi Zero W:
/home/pi/MagicMirror/node_modules/moment
it should look like this
/home/pi/MagicMirror/vendor/node_modules/momentdo you have a package.json file in/home/pi/MagicMirror/vendor? -
@strawberry-3.141 said in MagicMirror on Pi Zero W:
@Hawking said in MagicMirror on Pi Zero W:
/home/pi/MagicMirror/node_modules/moment
it should look like this
/home/pi/MagicMirror/vendor/node_modules/momentdo you have a package.json file in/home/pi/MagicMirror/vendor?I have a directory
/home/pi/MagicMirror/vendorcontaining
package.jsonandvendor.jsbut noting more.I now used npn version 2.14.7 (checked by
npm -version) tocd ~/MagicMirror/vendor npm installThis gave
npm WARN package.json magicmirror-vendors@ No README data font-awesome@4.7.0 node_modules/font-awesome moment-timezone@0.5.13 node_modules/moment-timezone weathericons@2.1.0 node_modules/weathericons moment@2.18.1 node_modules/momentand the folder
/home/pi/MagicMirror/vendor/node_modules/momentthat you mentioned before was created.
I then rebootet (not sure if necessary) and it seems to work (I see the date and time, holidays,quote…). I’ll now set everything up but it looks way better then before.
So thanks a lot for your help!! I hope that your fix also works for the other people who have the same problem.Just to understand the fix a bit better:
Is there a reason that one seem to have to do run
sudo npm installonce in/home/pi/MagicMirror/(this is already included in the initial post) and oncenpm installin/home/pi/MagicMirror/vendor/? (this is not mentioned in the initial post and also not directly done by the standard installer (that does not work for the pi-Zero) located in/home/pi/MagicMirror/installers/raspberry.sh(at least I don’t see it therein). -
@Hawking the command
npm installin the directory/home/pi/MagicMirror/has a hook in the package.json file which automatically runsnpm installin/home/pi/MagicMirror/vendoras well, so there is no need to mention this because it’s done automatically ;) -
I now did a installation on a fresh image and used node version 6.6.1 which automatically includes npm 3.10.8. So instead of
sudo wget http://node-arm.herokuapp.com/node_latest_armhf.deb sudo dpkg -i node_latest_armhf.deb sudo apt-get install npmI did
wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v6.9.1.sh | bashThen I got later on no warnings about to old or insecure version any more but just
npm WARN prefer global coffee-script@1.10.0 should be installed with -g npm WARN prefer global jsonlint@1.6.2 should be installed with -g npm WARN prefer global colorguard@1.2.0 should be installed with -g > electron-chromedriver@1.6.0 install /home/hawking/MagicMirror/node_modules/electron-chromedriver > node ./download-chromedriver.js > electron@1.6.5 postinstall /home/hawking/MagicMirror/node_modules/electron > node install.js npm WARN lifecycle magicmirror@2.1.1~install: cannot run in wd %s %s (wd=%s) magicmirror@2.1.1 cd vendor && npm install /home/hawking/MagicMirror npm WARN lifecycle magicmirror@2.1.1~postinstall: cannot run in wd %s %s (wd=%s) magicmirror@2.1.1 sh installers/postinstall/postinstall.sh /home/hawking/MagicMirror(in this installation I did not use the pi user, but I had the same problem when I used the default pi user).
If one knows the solution for the blank screen it is obvious that this is a strong hint that one should run
cd ~/MagicMirror/vendor/ && npm install cd ~/MagicMirror/ && sh installers/postinstall/postinstall.sh(the later at the moment just prints a success message and is therefore not really needed)
I don’t know why these commands did not work automatically, maybe an issue with some directories that are not set (I assume in the error instead of %s the directory should be displayed). -
I installed the image from https://forum.magicmirror.builders/topic/1183/how-i-got-my-magic-mirror-working-on-a-raspberry-pi-0-zero/84 , updated the System to use the onboard wifi and this works for me.
-
@Hawking Thanks for all your help and comments, I’ve managed to get it up and running now!
Now I just need to get the whitelist sorted :grimacing:
-
@Mitchfarino said in MagicMirror on Pi Zero W:
@Hawking Thanks for all your help and comments, I’ve managed to get it up and running now!
No problem.
@Mitchfarino said in MagicMirror on Pi Zero W:
Now I just need to get the whitelist sorted :grimacing:
This worked fine for me, I just added the IP of my regular PC (e.g 192.168.2.185) to the list in the config file so that it looked like
ipWhitelist: ["192.168.2.185", "127.0.0.1", "::ffff:127.0.0.1", "::1"],If I then typed the ip:port (the port is also defined in the MM config, default is 8080) of my raspi (e.g.
http://192.168.2.170:8080/) in the browser bar of my regular PC I could see the page also on my regular PC (took 1-2 seconds to load).
If this does not work for you, just open a new thread and provide details. -
BLANK SCREEN, NO CLOCK/CALENDAR/MOMENTS solved and simplified from other topics and posts:
After you follow the instructions in the first post to #23 then jump to here:
24 cd ~/MagicMirror/vendor
25 npm install
26 sudo rebootI’m not a linux expert, but I built this a few weeks back before the latest version of MM and it worked flawlessly. There should be a hook in the original package.json that kicks it into the vendor directory and runs “npm install” there but it doesn’t happen now (5/3/2017).
Also, for those of you who do not have a monitor, after you SSH into your Rpi Zero W:
sudo raspi-config
5 interfacing options
P3 VNC
YES you want to enable the VNC server
reboot when it asks.Use VNC Viewer or whatever, connect to your rpi using either ip address or if you set it up in your DHCP table with a :0 (zero) to see your screen or :1 to have a desktop.
CaptnJB
-
This post is deleted! -
@Iseknutz said in MagicMirror on Pi Zero W:
I installed the image from https://forum.magicmirror.builders/topic/1183/how-i-got-my-magic-mirror-working-on-a-raspberry-pi-0-zero/84 , updated the System to use the onboard wifi and this works for me.
@Iseknutz
At least I can get this method up and running on my RPI0w, but what’s the trick to updating the system to use the onboard wifi? I’ve created the wpa_supplicant.conf and I’ve even jacked with the etc/network/interfaces - but no luck getting it to connect to the network.
Thx -
@kylelmartin can you post or pm your WPA_supplicant.conf file? Please remove your passwords and maybe change your wifi name if that makes you feel better.
How are you updating your wpa-supplicant through a terminal or by copying it onto your card? Windows or Mac?
CaptnJB -
@CaptnJB
here is the wpa_supplicant.conf file - or at least the latest rendition of it.country=US ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1 network={ ssid="KLM-Guest" key_mgmt=NONE priority=1 id_str="guest" } network={ ssid="mywebsite.com" psk="oldasspw" priority=2 id_str="klm" }My regular old wifi network name has a “.” in the name and I thought that might cause some problems. So, I set up a second guest wifi network so this device wouldn’t need a password.
-
@kylelmartin, I apologize for the delay just landed in Madrid. For starters I would take out the id lines. Keep it simple. Try this.
country=US ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1 network={ ssid="KLM-Guest" psk="" priority=1 } network={ ssid="KLM" psk="oldasspw" priority=2 }Also, mywebsite.com should be be your router ssid. If you have it set to that “mywebsite.com” in the file you gave it is most likely “KLM”.
Why would you want the guest network to have priority?
CaptnJB
-
@kylelmartin after the Update to the actual OS, the Onboard-WiFi from my raspi0 was automatically enabled. Did you use the Desktop or console?
-
-
@Iseknutz
What do you mean by “after the Update to the actual OS”? I used the image linked above. I can’t do an update/upgrade as I have no internet connection. I’m using the console on the Pi and editing my conf in Mint Linux. I’m using Jessie Lite rather than the full install.@CaptnJB
Thanks for the rewrite on the wpa_supplicant, but it still won’t connect to any provided wifi network.Thanks to all.
-
@kylelmartin I have connected an USB Wlan Dongle (Edimax, working without extra software) and do the update. Im using Jessie Lite and later I installed the desktop.
Sorry for my bad english ;) -
Greetings from Toulouse. To do the update and upgrade, from the terminal type:
sudo apt-get update
sudo apt-get upgradeAfter the installation of the new updated packages, sudo shutdown. Wait. Remove the power and your edimax adapter and connect power. Now does it work?
JB
-
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