MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

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

    Scheduled Pinned Locked Moved Tutorials
    raspberry pipi0zeropizeropi1
    204 Posts 47 Posters 611.2k Views 47 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      Hawking
      last edited by

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

      git pull && npm install

      Have there been errors when you did so?

      I got

      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/me/MagicMirror
      

      Thats why I then did

      cd ~/MagicMirror/vendor && npm install
      

      in addition (see my post above). Maybe this also solves your problem.

      S 1 Reply Last reply Reply Quote 0
      • S Offline
        SebTota @Hawking
        last edited by

        @Hawking Sorry to keep bothering you but I ended up making it work with the two commands you told me to do. Now my problem is when the Pi Zero W is booting it connects to the WiFi but when magic mirror boots the pi disconnects.

        H 1 Reply Last reply Reply Quote 0
        • H Offline
          Hawking @SebTota
          last edited by

          @SebTota
          Just to make sure that I understand the problem correctly:
          You see the MagicMirror on the screen (Clock running etc). but you can no longer connect to the Pi Zero (using eg. ssh)?

          Just as a test:
          What happens if you disable the MagicMirror from autostart (for example by moving the MagicMirror start script from /etc/init.d/ to your home directory) and start it manually while you are already logged in? I don’t know your exact setup or your Linux knowledge, if you need further help how to do this, just let me know.

          S 1 Reply Last reply Reply Quote 0
          • S Offline
            SebTota @Hawking
            last edited by

            @Hawking I actually eventually got it working. Thanks so much for all your help!

            1 Reply Last reply Reply Quote 0
            • H Offline
              hoggboss22
              last edited by

              Hello everyone.

              I’ve followed the instructions and did everything in the comments (all 12 pages) to make sure I am doing them right. I was able to see MM2 thru the browser but on my screen, it is showing white screen.

              Loading config ...
              Loading module helpers ...
              No helper found for module: alert.
              Initializing new module helper ...
              Module helper loaded: updatenotification
              No helper found for module: clock.
              Initializing new module helper ...
              Module helper loaded: calendar
              No helper found for module: compliments.
              No helper found for module: currentweather.
              No helper found for module: weatherforecast.
              Initializing new module helper ...
              Module helper loaded: newsfeed
              All module helpers loaded.
              Starting server on port 8080 ... 
              Server started ...
              Connecting socket for: updatenotification
              Connecting socket for: calendar
              Starting node helper for: calendar
              Connecting socket for: newsfeed
              Starting module: newsfeed
              Sockets connected & modules started ...
              
              Ready to go! Please point your browser to: http://localhost:8080
              Whoops! There was an uncaught exception...
              { [Error: listen EADDRINUSE :::8080]
                code: 'EADDRINUSE',
                errno: 'EADDRINUSE',
                syscall: 'listen',
                address: '::',
                port: 8080 }
              MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
              If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
              

              mind helping me out with this?

              ? 1 Reply Last reply Reply Quote 0
              • ? Offline
                A Former User @hoggboss22
                last edited by A Former User

                @hoggboss22 your mm seems being excuted multiple. Common pitfal is that more than one browser are opened.(maybe your previous test running?)
                Or your machine is already using port 8080.

                Kill all browsers(and node or npm) and restart. Or change port in your config like 8088.

                1 Reply Last reply Reply Quote 0
                • H Offline
                  hoggboss22
                  last edited by

                  I thought the same thing, i changed from 8080 to 9090 and it gave me the same error. I ran the net stat command to find the port being in used and guess what… there was nothing that is using 8080 or 9090

                  Active Internet connections (only servers)
                  Proto Recv-Q Send-Q Local Address           Foreign Address         State      
                  tcp        0      0 0.0.0.0:ssh             0.0.0.0:*               LISTEN     
                  tcp6       0      0 [::]:tproxy             [::]:*                  LISTEN     
                  tcp6       0      0 [::]:ssh                [::]:*                  LISTEN     
                  udp        0      0 0.0.0.0:mdns            0.0.0.0:*                          
                  udp        0      0 0.0.0.0:49645           0.0.0.0:*                          
                  udp        0      0 0.0.0.0:bootpc          0.0.0.0:*                          
                  udp6       0      0 [::]:mdns               [::]:*                             
                  udp6       0      0 [::]:44605              [::]:*                             
                  raw6       0      0 [::]:ipv6-icmp          [::]:*                  7          
                  Active UNIX domain sockets (only servers)
                  Proto RefCnt Flags       Type       State         I-Node   Path
                  unix  2      [ ACC ]     STREAM     LISTENING     7951     /var/run/dbus/system_bus_socket
                  unix  2      [ ACC ]     STREAM     LISTENING     7954     /var/run/avahi-daemon/socket
                  unix  2      [ ACC ]     STREAM     LISTENING     7957     /run/thd.socket
                  unix  2      [ ACC ]     STREAM     LISTENING     10463    @/tmp/.X11-unix/X0
                  unix  2      [ ACC ]     STREAM     LISTENING     5161     /run/systemd/fsck.progress
                  unix  2      [ ACC ]     STREAM     LISTENING     10321    /run/user/1000/systemd/private
                  unix  2      [ ACC ]     STREAM     LISTENING     10326    /run/user/1000/gnupg/S.gpg-agent
                  unix  2      [ ACC ]     STREAM     LISTENING     10329    /run/user/1000/bus
                  unix  2      [ ACC ]     STREAM     LISTENING     4967     /run/systemd/private
                  unix  2      [ ACC ]     STREAM     LISTENING     10331    /run/user/1000/gnupg/S.gpg-agent.browser
                  unix  2      [ ACC ]     STREAM     LISTENING     10363    /run/user/1000/gnupg/S.gpg-agent.ssh
                  unix  2      [ ACC ]     STREAM     LISTENING     10365    /run/user/1000/gnupg/S.gpg-agent.extra
                  unix  2      [ ACC ]     STREAM     LISTENING     8845     /var/run/dhcpcd.sock
                  unix  2      [ ACC ]     STREAM     LISTENING     5005     /run/systemd/journal/stdout
                  unix  2      [ ACC ]     STREAM     LISTENING     8847     /var/run/dhcpcd.unpriv.sock
                  unix  2      [ ACC ]     SEQPACKET  LISTENING     5325     /run/udev/control
                  unix  2      [ ACC ]     STREAM     LISTENING     10464    /tmp/.X11-unix/X0
                  
                  1 Reply Last reply Reply Quote 0
                  • 1 Offline
                    12wsx
                    last edited by

                    Hello:) I have similar problem. Magic Mirror installed from image downloaded from this thread. Installed on piZero. Working ok. On screen there was a message to update. I did this and now MM not working. Try config with only clock. Not help.
                    Full update log.

                     Starting MagicMirror: v2.1.0
                    Loading config ...
                    Loading module helpers ...
                    No helper found for module: clock.
                    All module helpers loaded.
                    Starting server op port 8080 ...
                    Server started ...
                    Sockets connected & modules started ...
                    
                    Ready to go! Please point your browser to: http://localhost:8080
                    Whoops! There was an uncaught exception...
                    { [Error: listen EADDRINUSE :::8080]
                      code: 'EADDRINUSE',
                      errno: 'EADDRINUSE',
                      syscall: 'listen',
                      address: '::',
                      port: 8080 }
                    MagicMirror will not quit, but it might be a good idea to check why this happene                                                                                                                     d. Maybe no internet connection?
                    If you think this really is an issue, please open an issue on GitHub: https://gi                                                                                                                     thub.com/MichMich/MagicMirror/issues
                    
                    (EE)
                    Fatal server error:
                    (EE) Server is already active for display 0
                            If this server is no longer running, remove /tmp/.X0-lock
                            and start again.
                    (EE)
                    (EE)
                    Please consult the The X.Org Foundation support
                             at http://wiki.x.org
                     for help.
                    (EE)
                    XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":0"
                          after 7 requests (7 known processed) with 0 events remaining.
                    pi@raspberrypi:~ $ ^C
                    pi@raspberrypi:~ $ sudo su
                    root@raspberrypi:/home/pi# cd ~/MagicMirror && sudo npm install
                    bash: cd: /root/MagicMirror: No such file or directory
                    root@raspberrypi:/home/pi# cd MagicMirror
                    root@raspberrypi:/home/pi/MagicMirror# sudo npm install
                    npm WARN peerDependencies The peer dependency stylelint@^8.0.0 included from stylelint-config-standard will no
                    npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
                    npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
                    npm WARN peerDependencies The peer dependency stylelint@^8.0.0 included from stylelint-config-recommended will no
                    npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
                    npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
                    npm WARN peerDependencies The peer dependency stylelint@^8.0.0 included from grunt-stylelint will no
                    npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
                    npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
                    npm ERR! Linux 4.4.34+
                    npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
                    npm ERR! node v4.2.1
                    npm ERR! npm  v2.14.7
                    npm ERR! code EPEERINVALID
                    
                    npm ERR! peerinvalid The package stylelint@7.7.1 does not satisfy its siblings' peerDependencies requirements!
                    npm ERR! peerinvalid Peer grunt-stylelint@0.9.0 wants stylelint@^8.0.0
                    npm ERR! peerinvalid Peer stylelint-config-standard@17.0.0 wants stylelint@^8.0.0
                    
                    npm ERR! Please include the following file with any support request:
                    npm ERR!     /home/pi/MagicMirror/npm-debug.log
                    root@raspberrypi:/home/pi/MagicMirror# vendor && npm install
                    bash: vendor: command not found
                    root@raspberrypi:/home/pi/MagicMirror#
                    
                    
                    ? 1 Reply Last reply Reply Quote 0
                    • ? Offline
                      A Former User @12wsx
                      last edited by A Former User

                      @12wsx
                      Sometimes, this error seems to happen when MM is terminated abnormally. (I don’t know what is normal termination. :D)
                      In my case, execution npm for debug or test after first normal pm2 bootup makes this error.(Of course, before npm start dev I stopped pm2 process.)
                      For the solution, I change port from 8080 to 8081 or from 8081 to 8080(when I meet this problem again). It seems that after some minutes the port is freed automatically(or by execution with port changed.). And fortunately for me, first execution of MM(by pm2 on bootup) is always a success. So… I stop caring about this.

                      1 Reply Last reply Reply Quote 0
                      • 1 Offline
                        12wsx
                        last edited by

                        my I please someone to make an image of sd card with installed and working MM? i’m trying about week to run MM on piZero and nothing… all the time diffrent errors which i don’t understand.

                        P 1 Reply Last reply Reply Quote 0
                        • P Offline
                          psteimann @12wsx
                          last edited by

                          @12wsx Change the Port from 8080 to 8099 and then try again…solved a lot of problems for me…

                          1 Reply Last reply Reply Quote 0
                          • H Offline
                            Hawking
                            last edited by

                            After some weeks with the MagicMirror running, my SD card got corrupted and I decided to reinstall the system from scratch. I switched from “Jessie Light” to “Stretch light”, used node 6.11.4 and of course the latest MagicMirror 2.1.3.

                            I can access the MM from the browser of my laptop, but Midori only shows a white page. Even for a very simple config file:

                            var config = {
                                    address: "",
                                    port: 8080,
                                    ipWhitelist: ["192.168.2.185", "127.0.0.1", "::ffff:127.0.0.1", "::1"],
                                    language: "en",
                                    units: "metric",
                                    modules: [
                                    {
                                            module: "helloworld",
                                            position: "bottom_bar",
                                            config: {
                                                    text: "Hello world!"
                                            }
                                    }
                                    ]
                            
                            };
                            
                            /*************** DO NOT EDIT THE LINE BELOW ***************/
                            if (typeof module !== "undefined") {module.exports = config;}
                            

                            The start of MM gives no error

                            Starting MagicMirror: v2.1.3
                            Loading config ...
                            Loading module helpers ...
                            No helper found for module: helloworld.
                            All module helpers loaded.
                            Starting server on port 8080 ...
                            Server started ...
                            Sockets connected & modules started ...
                            
                            Ready to go! Please point your browser to: http://localhost:8080
                            

                            and if I change from

                            midori -e Fullscreen -a http://localhost:8080
                            

                            to

                            midori -e Fullscreen -a http://www.google.de
                            

                            I see the google page. So Midori itself and the output on screen seems working as well.

                            Is anybody having an idea where to search for the error?
                            Is anybody using MagicMirror 2.1.3 on its Pi Zero?

                            D 1 Reply Last reply Reply Quote 0
                            • D Offline
                              Doubleve @Hawking
                              last edited by

                              @Hawking same problem rpi 1

                              N 1 Reply Last reply Reply Quote 0
                              • N Offline
                                noorm91 @Doubleve
                                last edited by

                                This post is deleted!
                                1 Reply Last reply Reply Quote 0
                                • 1 Offline
                                  12wsx
                                  last edited by

                                  first set:
                                  set ipWhitelist: [] to allow all IP addresses.

                                  Warning, this enables from everywhere (on your net) have access.
                                  then in webbrowser go to pizero ip with port set in config ex. 192.168.1.12:8080 and check if its working

                                  1 Reply Last reply Reply Quote 0
                                  • D Offline
                                    Doubleve
                                    last edited by Doubleve

                                    don’t work for me, cannot connect to destination :-(

                                    when i do

                                    DISPLAY=:0 npm start

                                    npm ERR! path /home/pi/package.json
                                    npm ERR! code ENOENT
                                    npm ERR! errno -2
                                    npm ERR! syscall open
                                    npm ERR! enoent ENOENT: no such file or directory, open ‘/home/pi/package.json’
                                    npm ERR! enoent This is related to npm not being able to find a file.
                                    npm ERR! enoent

                                    npm ERR! A complete log of this run can be found in:
                                    npm ERR! /home/pi/.npm/_logs/2017-10-19T18_58_10_170Z-debug.log

                                    D H 2 Replies Last reply Reply Quote 0
                                    • D Offline
                                      Doubleve @Doubleve
                                      last edited by

                                      why he’s looking for /home/pi/package.json then it is /home/pi/MagicMirror/package.json ?

                                      This is my log

                                      /home/pi/.npm/_logs/2017-10-19T18_58_10_170Z-debug.log:

                                      0 info it worked if it ends with ok
                                      1 verbose cli [ ‘/usr/local/bin/node’, ‘/usr/local/bin/npm’, ‘start’ ]
                                      2 info using npm@5.3.0
                                      3 info using node@v8.3.0
                                      4 verbose config Skipping project config: /home/pi/.npmrc. (matches userconfig)
                                      5 verbose stack Error: ENOENT: no such file or directory, open ‘/home/pi/package.json’
                                      6 verbose cwd /home/pi
                                      7 verbose Linux 4.1.19+
                                      8 verbose argv “/usr/local/bin/node” “/usr/local/bin/npm” “start”
                                      9 verbose node v8.3.0
                                      10 verbose npm v5.3.0
                                      11 error path /home/pi/package.json
                                      12 error code ENOENT
                                      13 error errno -2
                                      14 error syscall open
                                      15 error enoent ENOENT: no such file or directory, open ‘/home/pi/package.json’
                                      16 error enoent This is related to npm not being able to find a file.
                                      17 verbose exit [ -2, true ]

                                      1 Reply Last reply Reply Quote 0
                                      • H Offline
                                        Hawking @Doubleve
                                        last edited by

                                        @Doubleve
                                        In which directory did you execute npm start
                                        ? I would assume you would first go to your MagicMirror directory (cd /home/pi/MagicMirror ). This would also explain the problem with the missing package.json file.

                                        However, I’m not sure if npm start works at all in combination with the serveronly mode (needed for the Pi Zero). For starting, I use the method described in the first post of this thread in the section “Setting up boot scripts”.

                                        I can acccess my MM from remote, however still didn’t get it to show in the Midori browser :-/

                                        1 Reply Last reply Reply Quote 0
                                        • D Offline
                                          Doubleve
                                          last edited by

                                          as you said I was not in the right record.
                                          I had an error with the libnss3 library. Now more error

                                          DISPLAY =: 0 npm start

                                          magicmirror@2.1.3 start / home / pi / MagicMirror
                                          sh run-start.sh

                                          pi @ raspberrypi ~ / MagicMirror $ npm run config: check

                                          magicmirror@2.1.3 config: check / home / pi / MagicMirror
                                          node tests / configs / check_config.js

                                          Checking file … /home/pi/MagicMirror/config/config.js
                                          Your configuration file not containt syntax error :)

                                          but it still does not work with midori

                                          1 Reply Last reply Reply Quote 0
                                          • N Offline
                                            noorm91
                                            last edited by

                                            What does npm start do in /MagicMirror

                                            bheplerB 1 Reply Last reply Reply Quote 0

                                            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
                                            • 1
                                            • 2
                                            • 3
                                            • 4
                                            • 5
                                            • 6
                                            • 7
                                            • 8
                                            • 9
                                            • 10
                                            • 11
                                            • 6 / 11
                                            • First post
                                              Last post
                                            Enjoying MagicMirror? Please consider a donation!
                                            MagicMirror created by Michael Teeuw.
                                            Forum managed by Sam, technical setup by Karsten.
                                            This forum is using NodeBB as its core | Contributors
                                            Contact | Privacy Policy