Read the statement by Michael Teeuw here.
Different URLS to different configs
-
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
-
@Whitling2k currently no.
but you could run multiple instance w different configs from the same files. using the
environment variableMM_CONFIG_FILE=/user/pi/MagicMirror/config/config.js
you can also use environment variable for port
MM_PORT=8080note 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
-
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!
-
@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
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