• 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.

Multiple instances

Scheduled Pinned Locked Moved Tutorials
12 Posts 3 Posters 3.3k 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.
  • E Offline
    ELMAGO
    last edited by Jun 12, 2021, 1:22 AM

    Good morning all

    can we run two maggic mirror instances with different modules on the same RPI? with of course a different port.

    thank you

    S 1 Reply Last reply Jun 12, 2021, 1:47 AM Reply Quote 0
    • S Away
      sdetweil @ELMAGO
      last edited by sdetweil Jun 12, 2021, 11:32 AM Jun 12, 2021, 1:47 AM

      @elmago sure, I do this on my pi4 on different displays sometimes.

      install one, copy the mm folder tree to another name, MagicMirror2 and change the port and modules used…

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      E 1 Reply Last reply Jun 12, 2021, 11:21 PM Reply Quote 1
      • E Offline
        ELMAGO @sdetweil
        last edited by Jun 12, 2021, 11:21 PM

        @sdetweil

        surely you have to rewrite the mm.sh file too?

        thank you

        S 1 Reply Last reply Jun 12, 2021, 11:45 PM Reply Quote 0
        • S Away
          sdetweil @ELMAGO
          last edited by Jun 12, 2021, 11:45 PM

          @elmago yes that too…

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          E 2 Replies Last reply Jun 12, 2021, 11:46 PM Reply Quote 0
          • E Offline
            ELMAGO @sdetweil
            last edited by Jun 12, 2021, 11:46 PM

            @sdetweil super thank you

            1 Reply Last reply Reply Quote 0
            • E Offline
              ELMAGO @sdetweil
              last edited by Jun 15, 2021, 7:28 PM

              @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 Jun 15, 2021, 7:29 PM Reply Quote 0
              • S Away
                sdetweil @ELMAGO
                last edited by sdetweil Jun 15, 2021, 7:30 PM Jun 15, 2021, 7:29 PM

                @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 Jun 16, 2021, 8:10 AM Reply Quote 0
                • E Offline
                  ELMAGO @sdetweil
                  last edited by Jun 16, 2021, 8:10 AM

                  @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

                  T 1 Reply Last reply Jun 16, 2021, 10:48 PM Reply Quote 0
                  • T Offline
                    Tippon @ELMAGO
                    last edited by Jun 16, 2021, 10:48 PM

                    @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 Jun 17, 2021, 5:52 PM Reply Quote 0
                    • E Offline
                      ELMAGO @Tippon
                      last edited by Jun 17, 2021, 5:52 PM

                      @tippon

                      Hello

                      I did like you and it works perfectly.

                      Thank you so much.

                      S T 2 Replies Last reply Jun 17, 2021, 6:53 PM Reply Quote 2
                      • 1
                      • 2
                      • 1 / 2
                      1 / 2
                      • First post
                        8/12
                        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