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.

    2nd MagicMirror

    Scheduled Pinned Locked Moved General Discussion
    11 Posts 2 Posters 5.6k Views 2 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.
    • R Offline
      Ray
      last edited by

      So I have my 1st magicmirror completed for quite some time now and it works perfectly. it Does everything I want. Good job guys on creating all the modules for it. I normally start it by using a very simple script, inside is
      pm2 start MagicMirror
      and it’s executed in terminal mode

      I want to create another magicmirror from scratch. but I want to keep the one I have
      I could call my new one magicmirror2, When it’s completed
      I would like to be able to start either 1 by using pm2 . If this is possible
      can you please tell me how to do this

      has anybody tried this

      S 1 Reply Last reply Reply Quote 0
      • S Offline
        sdetweil @Ray
        last edited by sdetweil

        @Ray sure. make another script in the installers folder, mm.sh is the current one

        fix the pm2_MagicMirror.json

        name and script name

        then
        pm2 start pm2_MagicMirror.json

        then pm2 save

        note you can use a different config file on the same install to run two different instances

        for example
        mm1.sh

        #!/bin/bash
        # This file is still here to keep PM2 working on older installations.
        cd ~/MagicMirror
        export MM_CONFIG_FILE=config/config.js
        DISPLAY=:0 npm start
        

        and mm2.sh

        #!/bin/bash
        # This file is still here to keep PM2 working on older installations.
        cd ~/MagicMirror
        export MM_CONFIG_FILE=config/config2.js
        DISPLAY=:0 npm start
        

        the pm2_MagicMirror.json (from my scripts repo)

        {
          "apps" : [{
            "name"        : "MagicMirror",
            "script"      : "/home/pi/MagicMirror/installers/mm.sh",
            "watch"       : ["/home/pi/MagicMirror/config/config.js"]
          }]
        }
        

        change the name and the paths

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        R 1 Reply Last reply Reply Quote 1
        • R Offline
          Ray @sdetweil
          last edited by

          @sdetweil okay I think I understand. I will give it a try . I am going to make my new magic mirror in a couple of days
          wanted feedback 1st before I start

          I appreciate the response
          I will let you know how it goes

          S 1 Reply Last reply Reply Quote 0
          • S Offline
            sdetweil @Ray
            last edited by sdetweil

            @Ray my install and fixuppm2.sh scripts use the pm2_MagicMirror.json to give the app a good name
            (instead of mm.sh)
            https://github.com/sdetweil/MagicMirror_scripts

            pm2 status shows the names of the managed apps.

            pm2 info (appname or number) give all the info about it

            pm2 --help shows all it can do

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            R 1 Reply Last reply Reply Quote 0
            • R Offline
              Ray @sdetweil
              last edited by

              @sdetweil okay I think I get it
              so just to make sure my current magic mirror folder is called
              I will be renaming that MagicMirror_1st_mirror
              not shouldn’t hurt anything. It should start as normal

              S 1 Reply Last reply Reply Quote 0
              • S Offline
                sdetweil @Ray
                last edited by

                @Ray you don’t have to make a new folder, only a new config file

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                R 1 Reply Last reply Reply Quote 0
                • R Offline
                  Ray @sdetweil
                  last edited by

                  @sdetweil I am aware of that. now Sam, I did not know we could do all that.
                  In the future I will have 2 options now
                  But following your instructions that you gave me

                  I wanted to thank you very much for the help that you gave me
                  I followed your instructions that you gave me after several tries, I now have
                  2 MagicMirror folders one is labeled MagicMirror and the 2nd 1 I labeled
                  MagicMirror_First_Mirror
                  and both folders are now listed in pm2

                  │ 1 │ FirstMirror │ fork │ 0 │ stopped │ 0% │ 0b │

                  │ 0 │ MagicMirror │ fork │ 0 │ stopped │ 0% │ 0b

                  Thank you very much for your help.
                  I would be happy to post my procedures. for other beginners If you like.
                  Just let me know and I will post it here. It’s my way of giving back to this site for all the hard work everyone does

                  S 1 Reply Last reply Reply Quote 0
                  • S Offline
                    sdetweil @Ray
                    last edited by

                    @Ray cool! glad you got it working

                    did u actually create two directories (folders) with Magic mirror installed ?

                    you didnt have to do that… just different start scripts using different config files

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    R 1 Reply Last reply Reply Quote 0
                    • R Offline
                      Ray @sdetweil
                      last edited by

                      @sdetweil I understand that now, but I already made it
                      and it works perfectly. in the future I will have 2 choices now

                      The reason I was looking for something like this. I want to generate a separate mirror for testing. That way if it crashes I won’t have to worry about it because all files and folders will be separated from the 2nd mirror folder
                      the 2 separate magic mirrors will work perfectly for me. I will definitely consider your 2nd option. In the future

                      S 1 Reply Last reply Reply Quote 1
                      • S Offline
                        sdetweil @Ray
                        last edited by

                        @Ray ok, understood

                        Sam

                        How to add modules

                        learning how to use browser developers window for css changes

                        R 1 Reply Last reply Reply Quote 0
                        • R Offline
                          Ray @sdetweil
                          last edited by

                          @sdetweil :thumbs_up:

                          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 / 1
                          • 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