MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    1. Home
    2. andyc7687
    3. Posts
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.
    A
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 21
    • Groups 0

    Posts

    Recent Best Controversial
    • RE: Installing on a Pi Zero

      @analogcheep thanks, let me know if yours works and upvote if it is helpful!

      posted in Troubleshooting
      A
      andyc7687
    • RE: Installing on a Pi Zero

      @cdh1001 thanks, I will amend my guide over the weekend then.

      posted in Troubleshooting
      A
      andyc7687
    • RE: Installing on a Pi Zero

      @cdh1001 please specify tweaks as they might help others.

      posted in Troubleshooting
      A
      andyc7687
    • RE: Installing on a Pi Zero

      @big11 I did a test install today, so I’m really not sure what you are doing.

      You will notice that the missing dependencies are installed in subsequent steps (e.g. there’s a problem with style lint and acorn. This is then fixed (see where it says + stylelint@9.9.0 and + acorn lower down in your warnings).

      This installation is completely different from the MM-Wiki. It does not use sh run-start.sh at all. Therefore there may well be problems.

      Can I ask, are you doing your installation over SSH/Telnet? or on the Pi itself? because you keep mentioning ‘locally’ and I just want to make sure I know what you mean by that.

      Edit: Also, don’t use npm install in sudo; it should be run as the normal user

      posted in Troubleshooting
      A
      andyc7687
    • RE: Installing on a Pi Zero

      @big11 this goes to my forked repo. Are you booting through to the desktop or to the console?

      posted in Troubleshooting
      A
      andyc7687
    • RE: Installing on a Pi Zero

      @big11 From what I am reading of your reply, are you booting into command line mode? You should be booting into Desktop AutoLogin from sudo raspi-config | Choose option: Boot Options | Choose option: Desktop / CLI | then Desktop Autologin.

      Can you confirm which install script you ran? Did you run the one from ac2799/MagicMirror or ac2799/MagicMirrorPi0Installer?

      posted in Troubleshooting
      A
      andyc7687
    • RE: Installing on a Pi Zero

      @12wsx Did you change the default user to be called root? I’m confused as to why your prompt says root@raspberrypi, but the home directory (/home/pi/MagicMirror) is that instead of /home/root/MagicMirror

      As I remember, the shell script refers directly to a home drive using the user pi; if you wish to change this on your installation, issue:
      EDIT: I just noticed I think you’re running off my installer rather than the forked magic mirror repository that I have been testing more recently. The edits are the same, except instead of being in ~/MagicMirror/installers it’ll be in ~/MagicMirror/PiZero, and the files won’t have Pi0 on the end of their names

      sudo nano ~/MagicMirror/installers/startMagicMirror.sh
      

      change the bottom line so instead of pi it is the correct user’s home drive e.g.

      sh /home/root/MagicMirror/installers/chromium_startPi0.sh
      

      Also check pm2_MagicMirrorPi0.json and chromium_startPi0.sh in case they also are pointing to the pi user folder.

      then do

      sudo chmod a+x ~/MagicMirror/installers/startMagicMirrorPi0.sh;
      sudo chmod a+x ~/MagicMirror/installers/pm2_MagicMirrorPi0.json;
      sudo chmod a+x ~/MagicMirror/installers/chromium_startPi0.sh;
      

      to make all the files executable (just in case they aren’t already)

      Now run:

      sudo su -c "env PATH=$PATH:/usr/bin pm2 startup systemd -u pi --hp /home/pi"
      pm2 start ~/MagicMirror/installers/pm2_MagicMirrorPi0.json
      pm2 save
      

      changing the /home/pi to ensure you are in the correct user.
      Then restart and let me know what happens.

      That’s the only thing that I can think it could be at the moment

      posted in Troubleshooting
      A
      andyc7687
    • RE: Installing on a Pi Zero

      @12wsx straight after installation did you restart the pi zero? It should run, it’s quite a slow start up process though… if you run pm2 show MagicMirror what does it say? It takes a good minute to fire up sometimes…

      posted in Troubleshooting
      A
      andyc7687
    • RE: Installing on a Pi Zero

      @dazza120 thanks, did you test my script? I was looking at a single installer that would auto detect 2B/3B Or Zero and install the appropriate script, thereby meaning a single repo for all platforms.

      It’s able to detect 3B+ and Zero and does full install for 3B+ and server only for Zero, I don’t have a 3B though to make sure it works on that.

      posted in Troubleshooting
      A
      andyc7687
    • RE: Installing on a Pi Zero

      @idoodler I didn’t really understand what was the difference between server only and not. This installs magic mirror, runs it as server only and runs three chromium browser on start-up to display it all… functionally I couldn’t tell the difference, but there might be something I’m missing

      posted in Troubleshooting
      A
      andyc7687
    • RE: Installing on a Pi Zero

      @idoodler Great! I think I may have done it! I have tested most of it I think on a Pi Zero W and on a Pi 3B+; is anyone able to check whether any of my changes have affected usability on the Pi 3B and Pi 2 before I submit the pull request?

      posted in Troubleshooting
      A
      andyc7687
    • RE: Installing on a Pi Zero

      @idoodler Thanks for that advice, I have forked the original MagicMirror repo, but no idea how to merge scripts on github…

      posted in Troubleshooting
      A
      andyc7687
    • RE: Auto Start on Pi Zero

      @aidandon I commented on the other post; not sure if you have solved already. Did you install using my github repo? If so, the problem is that my pm2_MagicMirror.json file is looking for a file called startMagicMirror.sh and not mmstart.sh, so it won’t know to run your mmstart.sh file.

      Edit: if you have this working now, can you mark the post as solved.

      posted in Troubleshooting
      A
      andyc7687
    • RE: Installing on a Pi Zero

      @aidandon you will only need to cd MagicMirror and run node server only immediately after first install if you want it straight away. Otherwise when you reboot it will go automatically (after about a 1 minute or so wait)

      posted in Troubleshooting
      A
      andyc7687
    • RE: Installing on a Pi Zero

      @ramez Thanks Ramez, I was hoping someone might say that; don’t know who is the contributors to the main repository. Happy for a link to be passed, or for my repo to be placed back in the MM repo.

      posted in Troubleshooting
      A
      andyc7687
    • Installing on a Pi Zero

      Hi everyone…

      After lot’s of tinkering I finally got this to work on a Pi Zero W. I have answered a couple of people in the forum about this, so I thought I would put up a link to my github where I have put in each of the files I used.

      Edit:
      I have also tried making a single installer script for Pi Zero/2B/3B; if you have both platforms and the time to do it, please run bash -c "$(curl -sL https://raw.githubusercontent.com/ac2799/MagicMirror/master/installers/raspberry.sh)" from the terminal and let me know how you get on… I have tested on the Pi Zero and it appears to work fine but advice or feedback still welcomed.

      Edit2:
      Here is a pdf guide for the process.

      Some people reported difficulties when installing over SSH. The guide does tell you how to do it headless too (TL;DR: use SSH to enable VNC Server using raspi-config && download RealVNC Connect && connect headless using RealVNC Connect/VNC Viewer)

      Andrew

      posted in Troubleshooting
      A
      andyc7687
    • RE: Struggling with Pi0

      @rgatlin Did that work for you?

      if now working, can you mark the post as solved please :)

      posted in Troubleshooting
      A
      andyc7687
    • RE: Struggling with Pi0

      no worries. if you want to have a bit more control over it, you can execute each line of RaspberryPi0.sh (minus the echo requests) directly in the terminal.

      posted in Troubleshooting
      A
      andyc7687
    • RE: Struggling with Pi0

      I don’t know if those files uploaded…

      startMagicMirror.sh: EDIT: I uploaded the wrong code just for this file; changes are a semi colon after line 2 and at the end of line 4; plus the directory has changed from
      /home/pi/chromium_start.sh to /home/pi/MagicMirror/PiZero/chromium_start.sh in line 5

      #!/bin/bash
      cd ~/MagicMirror;
      node serveronly &
      sleep 30;
      sh /home/pi/MagicMirror/PiZero/chromium_start.sh
      

      chromium_start.sh

      #!/bin/sh
      unclutter &
      chromium-browser --start-fullscreen --app http://localhost:8080
      

      pm2_MagicMirror.json

      {
        "apps" : [{
          "name"        : "MagicMirror",
          "script"      : "~/MagicMirror/PiZero/startMagicMirror.sh",
          "watch"       : ["/home/pi/MagicMirror/config/config.js"]
        }]
      }
      
      

      RaspberryPi0.sh

      #!/bin/bash
      #Pi Zero Install, largely plagiarised from MagicMirror2's raspberry.sh shell script for Pi2 and Pi3
      echo 'Updating Pi'
      sudo apt-get update;
      echo 'Upgrading Pi'
      sudo apt-get upgrade;
      sudo apt-get upgrade --fix-missing;
      
      echo 'Downloading node v11.6.0'
      curl -o node-v11.6.0-linux-armv6l.tar.gz  https://nodejs.org/dist/v11.6.0/node-v11.6.0-linux-armv6l.tar.gz; #Most up to date recent version
      echo 'Extracting node v11.6.0'
      tar -xzf node-v11.6.0-linux-armv6l.tar.gz; # extract files
      echo 'Extracting node and npm'
      
      cd node-v11.6.0-linux-armv6l/;
      sudo cp -R * /usr/local/;
      cd ~;
      sudo apt install git; sudo apt install unclutter;
      echo 'Cloning Magic Mirror'
      
      git clone https://github.com/MichMich/MagicMirror;
      cd MagicMirror;
      echo 'Installing Magic Mirror Dependencies'
      npx npmc@latest install; npm install acorn@latest; npm install stylelint@latest; npm audit fix;
      echo 'Loading default config'
      
      # Use sample config for start MagicMirror
      cp config/config.js.sample config/config.js;
      
      #Set the splash screen to be magic mirror
      THEME_DIR="/usr/share/plymouth/themes"
      sudo mkdir $THEME_DIR/MagicMirror
      sudo cp ~/MagicMirror/splashscreen/splash.png $THEME_DIR/MagicMirror/splash.png && sudo cp ~/MagicMirror/splashscreen/MagicMirror.plymouth $THEME_DIR/MagicMirror/MagicMirror.plymouth && sudo cp ~/MagicMirror/splashscreen/MagicMirror.script $THEME_DIR/MagicMirror/MagicMirror.script; 
      sudo plymouth-set-default-theme -R MagicMirror; 
      mkdir ~/MagicMirror/PiZero;
      sudo mv ~/startMagicMirror.sh ~/MagicMirror/PiZero/startMagicMirror.sh;
      sudo mv ~/pm2_MagicMirror.json ~/MagicMirror/PiZero/pm2_MagicMirror.json;
      sudo mv ~/chromium_start.sh ~/MagicMirror/PiZero/chromium_start.sh;
      sudo chmod a+x ~/MagicMirror/PiZero/startMagicMirror.sh;
      sudo chmod a+x ~/MagicMirror/PiZero/pm2_MagicMirror.json;
      sudo chmod a+x ~/MagicMirror/PiZero/chromium_start.sh;
      
      # Use pm2 control like a service MagicMirror
      sudo npm install -g pm2;
      sudo su -c "env PATH=$PATH:/usr/bin pm2 startup systemd -u pi --hp /home/pi";
      pm2 start /MagicMirror/PiZero/pm2_MagicMirror.json;
      pm2 save;
      echo 'Magic Mirror should begin shortly'
      

      Takes about an hour depending on how up to date your Raspbian image is… I haven’t silenced/run any of the things in the background so you might get a couple of prompts where you just have to press enter (normally during the apt-get upgrade phase)

      posted in Troubleshooting
      A
      andyc7687
    • RE: Struggling with Pi0

      I believe the issue is that there are elements of nodejs that don’t get installed correctly using npm on the pi zero. Attached is a shell script that should do it from a fresh Raspbian Stretch Install. I put all the files in the home directory (~) and it all distributes itself from there by running RaspberryPi0.sh
      Let me know if that helps!

      [3_1546385331101_startMagicMirror.sh](Uploading 100%) [2_1546385331101_RaspberryPi0.sh](Uploading 100%) [1_1546385331100_pm2_MagicMirror.json](Uploading 100%) [0_1546385331099_chromium_start.sh](Uploading 100%)

      posted in Troubleshooting
      A
      andyc7687
    • 1 / 1