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

Two Display

Scheduled Pinned Locked Moved Hardware
15 Posts 5 Posters 3.5k Views 5 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.
  • K Offline
    krocaq
    last edited by Sep 28, 2022, 8:17 PM

    Re: Rpi 4 and two monitors

    @saljoke
    Hi. Thats right. i only use 1 Pi4 to serve both displays via 2 MM instances. first the originally MagicMirror directory and the second in a MagicMirror2 directory. Both powered up via PM2 and turned off and on via PIR sensor.

    The config looks like this:

    language: “de”,
    logLevel: [“INFO”, “LOG”, “WARN”, “ERROR”],
    timeFormat: 24,
    units: “metric”,
    electronOptions: {fullscreen:true, x:1920},

    1920 is the resolution witdh of the main display.

    Very easy to handle and good for the electrical consumption

    S 1 Reply Last reply Sep 28, 2022, 8:21 PM Reply Quote 0
    • S Away
      sdetweil @krocaq
      last edited by sdetweil Sep 28, 2022, 8:22 PM Sep 28, 2022, 8:21 PM

      @krocaq AND you can do it with ONE directory, by using the
      environment variable
      for one instance
      MM_CONFIG_FILE=config/config.js
      for the other
      MM_CONFIG_FILE=config/config2.js
      (each on a different port, same as what u have now)

      and install all the modules in the modules folder for both,
      only those used by an instance will be loaded

      in each config you can also use different custom.css files…
      so each instance can present a different view

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      L 1 Reply Last reply Oct 2, 2022, 2:47 AM Reply Quote 0
      • S sdetweil referenced this topic on Sep 28, 2022, 8:24 PM
      • L Offline
        lexcyr @sdetweil
        last edited by Oct 2, 2022, 2:47 AM

        @sdetweil Hello,
        How to setup the environnent variable and custom css for that?
        Do you have any tutorial/guide i can use?

        S 1 Reply Last reply Oct 2, 2022, 2:58 AM Reply Quote 0
        • S Away
          sdetweil @lexcyr
          last edited by Oct 2, 2022, 2:58 AM

          @lexcyr in windows u set env var with

          set varname=value

          in Linux it’s

          varname=value

          but if you are starting another program from the script, you need to do

          export varname=value

          the css name is specified in the config.js

          see the config instructions
          https://docs.magicmirror.builders/configuration/introduction.html

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          L 1 Reply Last reply Oct 3, 2022, 4:16 PM Reply Quote 0
          • L Offline
            lexcyr @sdetweil
            last edited by Oct 3, 2022, 4:16 PM

            @sdetweil Thanks for the info.
            But i think i wasn’t clear enough with my question.
            I was asking how to setup your MM, and use ONE directory and have different config for 2 display.
            From what you said it can be made by using environment variable.

            S 1 Reply Last reply Oct 3, 2022, 6:57 PM Reply Quote 0
            • S Away
              sdetweil @lexcyr
              last edited by Oct 3, 2022, 6:57 PM

              @lexcyr

              create two config files

              config.js
              and
              config2.js
              this one has the left:1920 to move to the second display
              has 3 instances of calendar

              in the installers/mm.sh

              # select the 1st config file
              export MM_CONFIG_FILE=config/config.js
              # detaches the process so we can continue
              npm start &

              #select the second config file
              export MM_CONFIG_FILE=config/config2.js
              npm start

              in each config.js file you can point to different custom.css
              using the customCSS: ??? path/name

              each instance has to use a different port or course

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              L 1 Reply Last reply Oct 5, 2022, 1:16 PM Reply Quote 0
              • L Offline
                lexcyr @sdetweil
                last edited by Oct 5, 2022, 1:16 PM

                @sdetweil Thanks a lot. It works well.
                I have another question. is it possible to do the same, but only have one of the mirror config displaying on electron browser and the other one working as server to be displayed with any other browser from another device?
                like this:

                • 1st interface with config1 launch localy from electron browser with
                  -2nd interface with config2 work as server mode and launch from another device browser

                i’ve tried to just change the second section in the mm.sh file from “npm start” to “npm server”, but unfortunately it’s not working and everything just freezing.

                PS: i am running MM on Linux Lite 6.0

                S 1 Reply Last reply Oct 5, 2022, 1:18 PM Reply Quote 1
                • S Away
                  sdetweil @lexcyr
                  last edited by Oct 5, 2022, 1:18 PM

                  @lexcyr

                  yes but its

                  npm run server
                  

                  not npm server

                  only the start clause

                  npm start 
                  

                  allows use without ‘run’

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  L 1 Reply Last reply Oct 6, 2022, 12:08 PM Reply Quote 0
                  • L Offline
                    lexcyr @sdetweil
                    last edited by Oct 6, 2022, 12:08 PM

                    @sdetweil thanks a lot, it works.

                    1 Reply Last reply Reply Quote 1
                    • R Offline
                      rubelahamed
                      last edited by Oct 7, 2022, 5:16 PM

                      How to setup the environnent variable and custom css for that?
                      Do you have any tutorial/guide i can use?

                      S 1 Reply Last reply Oct 7, 2022, 5:18 PM Reply Quote 0
                      • 1
                      • 2
                      • 1 / 2
                      1 / 2
                      • First post
                        3/15
                        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