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.

    Multiple instances

    Scheduled Pinned Locked Moved Tutorials
    12 Posts 3 Posters 4.2k Views 3 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
      sdetweil @ELMAGO
      last edited by

      @elmago yes that too…

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      E 2 Replies Last reply Reply Quote 0
      • E Offline
        ELMAGO @sdetweil
        last edited by

        @sdetweil super thank you

        1 Reply Last reply Reply Quote 0
        • E Offline
          ELMAGO @sdetweil
          last edited by

          @sdetweil

          Hello,

          I tried your solution, in absolute terms it works.

          Except that I did not think of a particularity.

          Indeed, I have a screen connected to the RPI which broadcasts the “basic” port 8080 maggic mirror.

          If I apply your policy, the screen will show me the port 8085 or 8080 instance every other time.

          How do I force this screen to open the port 8080 instance?

          Thanks in advance.

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

            @elmago eh??

            only ONE can be on screen at a time…

            on my pi 4 I have 2 screens, 1 on each HDMI port, with a separate MM instance on each

            which ever is started last will be on the single physical screen

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            E 1 Reply Last reply Reply Quote 0
            • E Offline
              ELMAGO @sdetweil
              last edited by

              @sdetweil

              Hello.

              I must have expressed myself badly.
              yes indeed there is only one on the screen but when I restart the RPI it displays one or the other.
              if I understand your explanation correctly, I have to put in the file mm.sh last the instance that I want to display on the physical screen.

              thank you

              TipponT 1 Reply Last reply Reply Quote 0
              • TipponT Offline
                Tippon @ELMAGO
                last edited by

                @elmago What is it that you want to do exactly?

                As @sdetweil says, only one instance can be on the screen at a time. Are you trying to run one on the screen and access another one remotely? If you are, this may help.

                I’ve got two instances running, and they have different modules and a different port. The ‘standard’ MM instance uses the mm.sh that’s generated from @sdetweil’s script:

                cd ./MagicMirror
                DISPLAY=:0 npm start
                

                while my second instance runs as a server, and doesn’t display on the Pi’s screen. My second instance is in the MagicMirror2 folder and uses this script:

                cd ./MagicMirror2
                DISPLAY=:0 npm run server
                

                I use a separate .sh script, but someone more knowledgeable could probably combine them. The first section of the config.js lets you define which port you want MM to use, so I changed it on the one I wanted to view remotely.

                var config = 
                {
                  address: '0.0.0.0',
                  port: 12345,
                  ipWhitelist: [
                    '127.0.0.1',
                    '::ffff:127.0.0.1',
                    '::1',
                    '::ffff:192.168.0.1/120',
                    '192.168.0.1/24'
                  ],
                

                Please forgive me if I'm slow to reply, I'm currently experiencing memory issues, and sometimes forget that I've asked a question >.<

                E 1 Reply Last reply Reply Quote 0
                • E Offline
                  ELMAGO @Tippon
                  last edited by

                  @tippon

                  Hello

                  I did like you and it works perfectly.

                  Thank you so much.

                  S TipponT 2 Replies Last reply Reply Quote 2
                  • S Offline
                    sdetweil @ELMAGO
                    last edited by

                    @elmago you never said u wanted one as a server!..

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    1 Reply Last reply Reply Quote 0
                    • TipponT Offline
                      Tippon @ELMAGO
                      last edited by

                      @elmago said in Multiple instances:

                      @tippon

                      Hello

                      I did like you and it works perfectly.

                      Thank you so much.

                      No problem, glad I could help :)

                      Please forgive me if I'm slow to reply, I'm currently experiencing memory issues, and sometimes forget that I've asked a question >.<

                      1 Reply Last reply Reply Quote 0
                      • C cweinhofer referenced this topic on
                      • 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