• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
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 484.7k 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.
  • S Offline
    SebTota
    last edited by Jan 15, 2017, 2:22 AM

    This post is deleted!
    1 Reply Last reply Reply Quote 0
    • S Offline
      SebTota
      last edited by Jan 15, 2017, 2:31 AM

      Alright after some time I figured it out.

      cd MagicMirror
      cd config
      sudo nano config.js
      then the file should open.

      This is for the noobs like me who might need that.

      B 1 Reply Last reply Jan 15, 2017, 3:34 AM Reply Quote 0
      • B Offline
        bhepler Module Developer @SebTota
        last edited by Jan 15, 2017, 3:34 AM

        @SebTota What @Wieber has forgotten to mention is that the config.js.sample file is the default configuration that is included with the mirror software. The mirror software itself is looking for config.js. So the step that is missing is to copy the sample to the end file name. Once you have it copied over, this will become the file that you use to change your mirror’s behavior.

        You copy the file with this command: cp ~/MagicMirror/config/config.js.sample ~/MagicMirror/config/config.js

        You can then edit the config.js command as you have already discovered: nano ~/MagicMirror/config/config.js Nano is the editor, config.js is the file you are editing.

        1 Reply Last reply Reply Quote 0
        • P Offline
          piziie
          last edited by Jan 15, 2017, 3:19 PM

          Great guide!

          I have a quick question though. When my pi zero boots, it boots into a command line where i can see the modules are loading. It ends with

          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 }
          

          any ideas what causes this and how it can be fixed?

          S B 2 Replies Last reply Jan 15, 2017, 3:22 PM Reply Quote 0
          • S Offline
            SebTota @piziie
            last edited by Jan 15, 2017, 3:22 PM

            @piziie I believe my pi had the same response but after a few seconds it boots into the browser and shoes the mirror and works fine. Is it the same with you?

            P 1 Reply Last reply Jan 15, 2017, 3:44 PM Reply Quote 0
            • P Offline
              piziie @SebTota
              last edited by piziie Jan 15, 2017, 3:53 PM Jan 15, 2017, 3:44 PM

              @SebTota
              unfortunately no, it remains on the terminal. When i open a browser and go to localhost:8080 it does appear to be working so i know the MM and modules load correctly.

              It seems to be an issue with the midori start script?

              /home/pi/startMidori.sh

              #!/bin/sh
              xset -dpms # disable DPMS (Energy Star) features.
              xset s off # disable screen saver
              xset s noblank # don’t blank the video device
              matchbox-window-manager &
              unclutter &
              midori -e Fullscreen -a http://localhost:8080
              

              My /home/pi/start.sh script:

              #!/bin/bash
              cd ~/MagicMirror
              node serveronly &
              sleep 45
              sudo xinit /home/pi/startMidori.sh
              

              and the last line in .bashrc

              /home/pi/start.sh
              

              another side note- on boot i get this error:

              (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) 
              Starting MagicMirror: v2.1.0
              Loading config ...
              Loading module helpers ...
              No helper found for module: alert.
              Initializing new module helper ...
              No helper found for module: clock.
              XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":0"
                    after 6 requests (6 known processed) with 0 events remaining.
              

              could this be the source of the error?

              S 1 Reply Last reply Jan 15, 2017, 4:27 PM Reply Quote 0
              • B Offline
                bhepler Module Developer @piziie
                last edited by bhepler Jan 15, 2017, 4:24 PM Jan 15, 2017, 4:23 PM

                @piziie In my experience, this means that the mirror process is already running and you’ve attempted to start it again. Are you using PM2 to manage the mirror process? Is it possible that two of your scripts are both trying to start the mirror? Have you changed any init settings to auto-boot the mirror?

                P 1 Reply Last reply Jan 15, 2017, 5:01 PM Reply Quote 0
                • S Offline
                  SebTota @piziie
                  last edited by Jan 15, 2017, 4:27 PM

                  @piziie if you want I can post my image and you can write my image to your sd

                  1 Reply Last reply Reply Quote 0
                  • P Offline
                    piziie @bhepler
                    last edited by piziie Jan 15, 2017, 5:04 PM Jan 15, 2017, 5:01 PM

                    @bhepler pm2 doesnt appear to be installed, however i do have npm installed. Could that cause a conflict?

                    Any way to the sources from which start the mirror process is starting?

                    Also i may have created a conflict by following the OP steps as well as the steps outlined by @kobie

                    Also…
                    
                    Instead of adding start.sh to the end of .bashrc, it’s better practice to have the
                    script run automatically on start-up. To do this:
                    
                    sudo mv /home/pi/start.sh /etc/init.d/startMagicMirror.sh
                    sudo update-rc.d startMagicMirror.sh defaults 100
                    
                    This moves the script to the standard location for start-up scripts and tells the
                    system to run it after each boot.
                    

                    I went back and deleted the startMagicMirror.sh file, however. Does update-rc.d need to be rolled back as well?

                    B 1 Reply Last reply Jan 15, 2017, 6:52 PM Reply Quote 0
                    • B Offline
                      bhepler Module Developer @piziie
                      last edited by bhepler Jan 15, 2017, 6:53 PM Jan 15, 2017, 6:52 PM

                      @piziie That sounds right. Without tracing too closely, it sounds like your startMagicMirror.sh scripts and your start.sh script are both starting the mirror process.

                      P 1 Reply Last reply Jan 15, 2017, 6:56 PM Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 4
                      • 5
                      • 6
                      • 20
                      • 21
                      • 4 / 21
                      4 / 21
                      • First post
                        32/204
                        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