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

Different URLS to different configs

Scheduled Pinned Locked Moved General Discussion
coreurlconfig
4 Posts 2 Posters 559 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.
  • W Offline
    Whitling2k
    last edited by Jul 20, 2023, 11:19 AM

    Just wondering if it is possible to have a different URL on the local host to load a different config?

    i.e. http://192.168.1.101:8080/ points to my default, config, and is loaded on MM dedicated portrait screen.

    But, http://192.168.1.101:8080/browser.html points to a different layout optimised for a landscaped screen.

    And http://192.168.1.101:8080/ios.html points to a different layout optimised for a phone screen.

    I would want them all loading the same modules (ish), but display them differently

    S 1 Reply Last reply Jul 20, 2023, 11:40 AM Reply Quote 0
    • S Away
      sdetweil @Whitling2k
      last edited by Jul 20, 2023, 11:40 AM

      @Whitling2k currently no.

      but you could run multiple instance w different configs from the same files. using the
      environment variable

      MM_CONFIG_FILE=/user/pi/MagicMirror/config/config.js
      you can also use environment variable for port
      MM_PORT=8080

      note that css can detect size, orientation and vendor

      if width is less than height, then in portrait mode

      so you could have a customized custom.css that would do all that

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      W 1 Reply Last reply Jul 28, 2023, 1:09 PM Reply Quote 1
      • W Offline
        Whitling2k @sdetweil
        last edited by Jul 28, 2023, 1:09 PM

        Thanks @sdetweil

        What sort of system resources would two instances consume? I’m running on a Pi 4b, that’s also being used as a local web server and weather station. So critical functions - would two instances of MM cause high cpu/memory usage?

        I think the time it would take me to learn enough CSS to build responsive pages for my 4/5 devices would exceed my current free time :-D

        Cheers again!

        S 1 Reply Last reply Jul 28, 2023, 1:13 PM Reply Quote 0
        • S Away
          sdetweil @Whitling2k
          last edited by Jul 28, 2023, 1:13 PM

          @Whitling2k depends on the modules. most of the time is spent waiting for data.

          responsive

          if you were building separate urls, its the same work.

          use variables and calc at the beginning…see main.css

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          1 Reply Last reply Reply Quote 1
          • 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