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 to update.

    Scheduled Pinned Locked Moved Tutorials
    35 Posts 21 Posters 96.2k Views 20 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.
    • MichMichM Offline
      MichMich @nobita
      last edited by

      From your terminal:

      cd ~\MagicMirror
      git pull
      
      1 Reply Last reply Reply Quote 2
      • P Offline
        Phate @nobita
        last edited by Phate

        @nobita

        I’m glad I’m not the only one that needs it spelt out for me…

        Glad you asked first lol

        1 Reply Last reply Reply Quote 0
        • MichMichM Offline
          MichMich
          last edited by MichMich

          Not to be mister smartypants … but it’s mentioned in the Readme … ;)
          https://github.com/MichMich/MagicMirror#updating-you-magicmirror

          P ? 2 Replies Last reply Reply Quote 1
          • P Offline
            Phate @MichMich
            last edited by

            @MichMich

            Lol sorry. Wasn’t trying to be. More point out my inepetness. Lol

            Linux is still somewhat new to me. Always looking up some command or other.

            1 Reply Last reply Reply Quote 0
            • MichMichM Offline
              MichMich
              last edited by

              Sorry, I meant that I didnt want to be mister smartypants. 😁

              KirAsh4K 1 Reply Last reply Reply Quote 1
              • KirAsh4K Offline
                KirAsh4 Moderator @MichMich
                last edited by

                @MichMich, but … you are! :)

                A Life? Cool! Where can I download one of those from?

                1 Reply Last reply Reply Quote 2
                • ? Offline
                  A Former User @MichMich
                  last edited by

                  @MichMich said in How to update.:

                  Not to be mister smartypants … but it’s mentioned in the Readme … ;)
                  https://github.com/MichMich/MagicMirror#updating-you-magicmirror

                  finally a link to the readme :P

                  bheplerB 1 Reply Last reply Reply Quote 0
                  • bheplerB Offline
                    bhepler Module Developer @Guest
                    last edited by

                    @wjdw87 The readme.md is also downloaded with the MirrorMirror code when you run the installation command. You’ll find it on your Pi at ~/MagicMirror/README.md.

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

                      @bhepler said in How to update.:

                      @wjdw87 The readme.md is also downloaded with the MirrorMirror code when you run the installation command. You’ll find it on your Pi at ~/MagicMirror/README.md.

                      thanks

                      1 Reply Last reply Reply Quote 0
                      • B Offline
                        Binog
                        last edited by

                        But is there a way (a sh-script) to update MM and all (!) of the installed (different) modules in a batch. I now do have to go through all the directories recursively. That takes lots of time and is quite annoying. Any idea?
                        Thx Jimmy

                        1 Reply Last reply Reply Quote 0
                        • I Offline
                          izanbard
                          last edited by izanbard

                          I use this script, which comes with no guarantee:

                           #!/usr/bin/env bash
                          
                          cd /home/pi/MagicMirror
                          echo "######### CHECKING MAGIC MIRROR ##########"
                          git fetch
                          if [ $(git rev-parse HEAD) != $(git rev-parse @{u}) ]
                          then
                              echo "######### UPGRADING MAGIC MIRROR #########"
                              git pull
                              npm install
                          else
                              echo "######## NO UPGRADE REQUIRED #########"
                          fi
                          echo ""
                          
                          cd modules
                          
                          for directory in *; do
                              if [[ -d ${directory} && ${directory} != "node_modules" && ${directory} != "default" ]]; then
                                  echo "######### CHECKING ${directory} ##########"
                                  cd ${directory}
                                  git fetch
                                  if [ $(git rev-parse HEAD) != $(git rev-parse @{u}) ]; then
                                      echo "######### UPGRADING ${directory} #########"
                                      git pull
                                      if [[ -e "package.json" && -f "package.json" ]]; then
                                          npm install
                                      fi
                                  else
                                      echo "######## NO UPGRADE REQUIRED #########"
                                  fi
                                  echo ""
                                  cd ..
                              fi
                          done
                          
                          SnilleS johnnyboyJ R UnboredU 6 Replies Last reply Reply Quote 4
                          • SnilleS Offline
                            Snille Module Developer @izanbard
                            last edited by

                            @izanbard Thank you for this! :)

                            If you cant find it, make it and share it!
                            Modules: MMM-homeassistant-sensors, MMM-Modulebar, MMM-Profilepicture, MMM-Videoplayer

                            1 Reply Last reply Reply Quote 0
                            • B Offline
                              Binog
                              last edited by

                              Thank You, awesome !

                              1 Reply Last reply Reply Quote 0
                              • johnnyboyJ Offline
                                johnnyboy @izanbard
                                last edited by

                                This post is deleted!
                                1 Reply Last reply Reply Quote 0
                                • SnilleS Offline
                                  Snille Module Developer @izanbard
                                  last edited by Snille

                                  @izanbard Hello, added a restart of the mirror (via pm2) if an npm install has been done and also added “–production” to the npm install command. Sometimes the module-developer have lot’s of extra stuff added in the package list just for developing. :)
                                  I’m currently now running this script via CRON every night. :)

                                  #!/usr/bin/env bash
                                  
                                  updated=false
                                  
                                  cd /home/pi/MagicMirror
                                  echo "Checking for MagicMirror updates."
                                  git fetch
                                  if [ $(git rev-parse HEAD) != $(git rev-parse @{u}) ]
                                  then
                                      echo "Found, updating..."
                                      git pull
                                      npm install
                                      updated=true
                                      echo "Update done."
                                  else
                                      echo "No update needed."
                                  fi
                                  echo ""
                                  
                                  cd modules
                                  
                                  for directory in *; do
                                      if [[ -d ${directory} && ${directory} != "node_modules" && ${directory} != "default" ]]; then
                                          echo "Checking for ${directory} updates."
                                          cd ${directory}
                                          git fetch
                                          if [ $(git rev-parse HEAD) != $(git rev-parse @{u}) ]; then
                                              echo "Found, updating ${directory}..."
                                              git pull
                                              if [[ -e "package.json" && -f "package.json" ]]; then
                                                  echo "package.joson changed for ${directory}, installing..."
                                                  npm install --production 
                                                  updated=true
                                                  echo "Update done."
                                              fi
                                          else
                                              echo "No update needed."
                                          fi
                                          echo ""
                                          cd ..
                                      fi
                                  done
                                  
                                  if $updated; then
                                      echo "Restart of MM needed, restarting now."
                                      pm2 restart mm
                                  fi
                                  echo "All done. :)"
                                  

                                  If you cant find it, make it and share it!
                                  Modules: MMM-homeassistant-sensors, MMM-Modulebar, MMM-Profilepicture, MMM-Videoplayer

                                  D 1 Reply Last reply Reply Quote 0
                                  • R Offline
                                    RudyAcevedo @izanbard
                                    last edited by

                                    @izanbard Thank you!!

                                    1 Reply Last reply Reply Quote 0
                                    • B Offline
                                      batzyn
                                      last edited by yawns

                                      thank u!

                                      A 1 Reply Last reply Reply Quote 0
                                      • A Offline
                                        akrishnan.j @batzyn
                                        last edited by

                                        @batzyn

                                        pi@akpi:~/MagicMirror $ sudo git pull && npm install
                                        Updating 8010e62…5c41e24
                                        error: Your local changes to the following files would be overwritten by merge:
                                        css/main.css
                                        Please, commit your changes or stash them before you can merge.
                                        Aborting
                                        Any ideas…

                                        johnnyboyJ S 2 Replies Last reply Reply Quote 0
                                        • johnnyboyJ Offline
                                          johnnyboy @akrishnan.j
                                          last edited by johnnyboy

                                          This post is deleted!
                                          1 Reply Last reply Reply Quote 0
                                          • UnboredU Offline
                                            Unbored @izanbard
                                            last edited by

                                            This post is deleted!
                                            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
                                            • 1 / 2
                                            • 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