MagicMirror² v2.4.1 is available! For more information about this release, check out this topic.
Please read the release notes carefully since this update requires adjustments to your Raspberry Pi configuration!

How I got my Magic Mirror working on a Raspberry Pi 0 (zero)



  • Hi,

    Followed the instructions and could get it working neither with Midori nor Chromium.

    I got error messages for chromium like this

    bootstrap_helper: /usr/lib/chromium-browser/nacl_helper: Cannot open ELF file!  errno=2
    [1:1:0509/144633.366460:ERROR:nacl_fork_delegate_linux.cc(315)] Bad NaCl helper startup ack (0 bytes)
    [776:776:0509/144633.386035:ERROR:browser_main_loop.cc(495)] Failed to put Xlib into threaded mode.
    [776:776:0509/144633.407424:ERROR:browser_main_loop.cc(272)] Gtk: cannot open display: 
    

    and i had also npm errors that I ignored

    npm WARN package.json magicmirror-fonts@ No README data
    npm ERR! Linux 4.9.35+
    npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "--unsafe-perm"
    npm ERR! node v4.2.1
    npm ERR! npm  v2.14.7
    npm ERR! code EPEERINVALID
    
    npm ERR! peerinvalid The package stylelint@8.4.0 does not satisfy its siblings' peerDependencies requirements!
    npm ERR! peerinvalid Peer stylelint-config-standard@18.2.0 wants stylelint@^8.3.0 || ^9.0.0
    npm ERR! peerinvalid Peer grunt-stylelint@0.10.0 wants stylelint@^9.0.0
    
    npm ERR! Please include the following file with any support request:
    npm ERR!     /home/pi/MagicMirror/npm-debug.log
    

    So I guess, as @Baldrick mentioned, that this is not working anymore 😞

    Will probably just get a R3B+ for that and keep the 0w for experiments.



  • @baldrick
    After a fresh reboot and just after starting MM and getting a black screen.
    Run with:
    'cd $HOME/MagicMirror/installers/; pm2 flush && rm ~/.pm2/logs/mm-* ; pm2 start mm.sh

    And make sure that your mm.sh reads:

    cd ~/MagicMirror
    DISPLAY=:0 npm start
    

    Can you please (open a new issue on Github) and post the output of:

    1. uname -a
    2. dmesg -x -d -T
    3. journalctl -b
    4. sudo cat /var/log/Xorg.0.log
    5. sudo cat /var/log/lightdm/lightdm.log
    6. systemctl list-unit-files -t service -all
    7. cat ~/.xsession-errors
    8. cat ~/.pm2/logs/mm-error-0.log
    9. cat ~/.pm2/logs/mm-out-0.log


  • Hello 🙂 since my Zero’s USB port is broken, I have to run everything from ssh and scripts.

    I experienced the same as @Hawking: when starting midori, the screen would either turn black or white. I installed chromium and replaced the line “midori -e Fullscreen -a http://localhost:8080” by “chromium-browser --incognito --kiosk http://localhost:8080”. Chromium only shows a line at the top of the screen saying it can’t be run as sudo.

    Any idea on how to fix this? Or how to get midori to work?

    Thanks in advance 🙂



  • Sorry for a stupid question, I’m all new to this.

    When I ran the git clone command, I got this:

    fatal: unable to access ‘https://github.com/MichMich/MagicMirror/’: server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none

    Am I missing something?

    Thanks

    Edit: NM, found the problem. Date/time on the pi was wrong.



  • @janth said in How I got my Magic Mirror working on a Raspberry Pi 0 (zero):
    Chromium only shows a line at the top of the screen saying it can’t be run as sudo.

    Any idea on how to fix this? Or how to get midori to work?

    Thanks in advance 🙂

    add --no-sandbox
    for example - chromium-browser --no-sandbox --disable-infobars --start-maximized --noerrdialogs --kiosk --incognito http://localhost:8080



  • Thank you @NoNameRo !! It works now on Stretch. I can’t use localhost:8080 but xxx.xxx.xxx.xxx:8080 works fine.

    Since initd is replaced by systemd, how do I run a script at boot up? For the last couple of days, I’ve been using a solution using pm2, but it seems to run the “node serveronly/” process multiple times so that my pi’s cpu has been at 100 % all the time.

    Where do I have to place the script with
    cd ~/MagicMirror
    node serveronly &
    sleep 45
    sudo xinit /home/pi/chromium_start.sh

    and how do I activate it for boot up?



  • @janth said in How I got my Magic Mirror working on a Raspberry Pi 0 (zero):

    have them under /home /pi/

    Auto Starting Chromium
    
    
    sudo nano /home/pi/startChromium.sh
    
    #!/bin/sh
    unclutter &
    xset -dpms # disable DPMS (Energy Star) features.
    xset s off # disable screen saver
    xset s noblank # don’t blank the video device
    chromium-browser --no-sandbox --disable-infobars --start-maximized --noerrdialogs --kiosk --incognito http://localhost:8080
    
    	Control + X > Y > Return
    
    sudo chmod a+x /home/pi/startChromium.sh
    	
    ------------------------------------------------------------------------------------------------	
    	
    Auto Starting Mirror
    
    
    sudo nano /home/pi/startMirror.sh
    
    #! /bin/bash
    cd /home/pi/MagicMirror
    node serveronly
    
    	Control + X > Y > Return
    
    sudo chmod a+x /home/pi/startMirror.sh
    
    sudo nano /etc/rc.local
    	Add the following lines before exit 0:
    /home/pi/startMirror.sh &
    (/bin/sleep 30 && sudo xinit /home/pi/startChromium.sh) &
    
    	Control + X > Y > Return
    	
    		sudo reboot
    


  • @janth - thanks I also used pm2 but your way is better.

    But I have other problem - I do not see right modules on the mirror. There is no problem from the local net.
    I checked top_right and bottom_right - same result.
    I moved clock module from top_left to top_right and it became invisible.
    Any clue?