-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Environment Variables disable features.... #3302
Comments
can you try using all the variables from the sample config. I think some of them are required now. ::1 is localhost on ipv6 is your pi on an ipv6 network? do
from the command line |
Kassel: The problem is mostly a "technical" issue. Basically, you have to set up the 2nd monitor with the default config file (config.js) the way it's working for me. 2nd monitor/instance uses config.js & mm.sh It shouldn't matter which uses which, but the bugs above prevent it being done any other way. |
Sam: 3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 Am I getting an IPv6 now? That would be new. I've not got anything setup for it in my router or anything - there's no instructions to do so by my ISP, and I believe it's actually set to disabled. |
you got an inet6 address ipv6 that comes from your dhcp server/router so its not turned off at the router or the machine. |
Interesting. I'll have to look into it, I didn't think my router's DHCP was issuing IPV6.. But, really, that's a side quest to the problem at hand - if I set the address to 0.0.0.0, MagicMirror should be listening on 0.0.0.0:port no?
|
0.0.0.0 means listen on all interfaces, without specifying what they are. so maybe |
Look at the initial post - the ss command is indicating that the first mirror is listening on 0.0.0.0:8080, the 2nd is only on [::1]:8081. Nothing else has ports 8080/8081 open. |
I used a similar setup but without a second monitor and startet
As already mentioned by Sam the ip6 address |
they both cannot be using the same port |
OK - to make it clear - Both mirrors run - even if on the same port, so the 2nd mirror isn't opening up on top of the first. Once I disabled IPV6 using the method metioned above, I get this:
Note my launching method is
If I'm reading into this correctly, it's trying to open @ port 0.0.0.0:8080 then jumping to [::1]:8081? -- effectively reading the MM_PORT environment variable AFTER attempting to open up? Still points back to ignoring many or all of the address setting items in config2.js Oh, and by the way, Sam - the IPV6 address I was getting was an auto assigned local unicast address. From what I read up on it, it's some form of a local interface only. |
doing the same from mm folder after |
define "works" -- is it not ignoring the above config items on your end, or are you getting dual mirrors and not testing further? Why I noticed it is because I want to have both mirrors available on my network for remote access as well as local display. Currently, I can't access the one using the env variable. |
yes the config vars are working on my side (see Picture in my post above), both mm starts on the pi screen and because of |
OK - upon further testing, anytime I set the It will also ignore the |
I'm using latest |
@BKeyport what folder are you in when you do the exports? the pwd part was just a shortcut to the current folder pathname.. (pwd means print working directory) you said it needed braces but should be parens when used in a bash script if u echo the env var |
OK, Sam, I've gone to a direct link for everything - get bad config screen now
Edited to trim out excessive log material - only error is happening on MM2. |
|
well, the code in electron.js doesn't use the MM_PORT env variable, only the one from the config file.
the env variable is saved in app.js, but never referenced.. |
to me, there's clearly a processing issue with the MM_CONFIG_FILE set. It's ignoring parts of the file set within each and every time. as for MM_PORT - you'll notice I have it commented out above - it's reading it from the config file. That was from an earlier test trying to get it accessible from other machines. |
BTW, Merry Bah Humbug to you both. |
lol.nah, its just stuff. had a great time w young grandkids this morning. my 3d printing of pi5 case is going along. |
totally unrelated question: what 3d printer modell do you have? |
I have an Ender 3 V2. I picked it up used earlier this year for another project. I use Octoprint on a pi02w to manage the print |
can you test my PR ? For Sam it did not work but in my tests it did ... thanks! |
MM_PORT actually did work for me prior. I don't understand what I'm supposed to test here. I'd prefer to not use it at all, and actually have the config2.js read correctly. 😉 |
get the develop branch and test the MM_CONFIG_FILE env var |
I know how to do it, I just don't know why, sam. That particular bug didn't exist for me. |
or, are you saying MM_CONFIG_FILE has been updated too? |
So, here's where I'm at: Using develop branch for all tests for consistency.
Next move? |
after you do can you do are you doing this in batch file.sh) or from command line? |
I'm doing both as needed to see results. Command line test:
OK - that's interesting, new testing results:
|
${pwd} is wrong ( braces) do $(pwd) (parens) |
see my notes - (pwd) fails to error screen, but loads the address/port from the config.
We're running in circles - the issue seems to come down to config file is being partially read unless you strip off the leading parts of the path |
cool.. so it's this line of code in app.js
|
so,maybe the MM_CONFIG_FILE must be someplace in the MagicMirror folder tree I debugged this tho a couple weeks ago and it returned the full path when it was specified, and read the correct file. |
the patch is not merged yet so not on |
o.k., this explains why my tests were working because I always used
I thought it was a requirement that |
Even if it's a requirement, /home//MagicMirror/config/config.js should equal config/config.js if started in the MagicMirror directory, no? |
yes, will look into this later if there is a simple fix |
I know we're coming up on the next quarterly, so low priority. Was able to get things working properly with the shortened variable - so, that's a documented work around until such time as it's fixed.. |
related to #3302 - fix MM_PORT variable not used in electron - fix to allow full path for MM_CONFIG_FILE variable
noticed a doc suggestion in #3304 so I've updated my suggested docs to cover said suggestion. |
## [2.26.0] - 01-01-2024 Thanks to: @bnitkin, @bugsounet, @dependabot, @jkriegshauser, @kaennchenstruggle, @KristjanESPERANTO and @Ybbet. Special thanks to @khassel, @rejas and @sdetweil for taking over most (if not all) of the work on this release as project collaborators. This version would not be there without their effort. Thank you guys! You are awesome! This release also marks the latest release by Michael Teeuw. For more info, please read the following post: [A New Chapter for MagicMirror: The Community Takes the Lead](https://forum.magicmirror.builders/topic/18329/a-new-chapter-for-magicmirror-the-community-takes-the-lead). ### Added - Added update notification updater (for 3rd party modules) - Added node 21 to the test matrix - Added transform object to calendar:customEvents - Added ESLint rules for jest (including jest/expect-expect and jest/no-done-callback) ### Removed - Removed Codecov workflow (not working anymore, other workflow required) (#3107) - Removed titleReplace from calendar, replaced + extended by customEvents (backward compatibility included) (#3249) - Removed failing unit test (#3254) - Removed some unused variables ### Updated - Update electron to v27 and update other dependencies as well as github actions - Update newsfeed: Use `html-to-text` instead of regex for transform description - Review ESLint config (#3269) - Updated dependencies - Clock module: optionally display current moon phase in addition to rise/set times - electron is now per default started without gpu, if needed it must be enabled with new env var `ELECTRON_ENABLE_GPU=1` on startup (#3226) - Replace prettier by stylistic in ESLint config to lint JavaScript (and disable some rules for `config/config.js*` files) - Update node-ical to v0.17.1 and fix tests ### Fixed - Avoid fade out/in on updateDom when many calendars are used - Fix the option eventClass on customEvents. - Fix yr API version in locationforecast and sunrise call (#3227) - Fix cloneObject() function to respect RegExp (#3237) - Fix newsfeed module for feeds using "a10:updated" tag (#3238) - Fix issue template (#3167) - Fix #3256 filter out bad results from rrule.between - Fix calendar events sometimes not respecting deleted events (#3250) - Fix electron loadurl locally on Windows when address "0.0.0.0" (#2550) - Fix updatanotification (update_helper.js): catch error if reponse is not an JSON format (check PM2) - Fix missing typeof in calendar module - Fix style issues after prettier update - Fix calendar test (#3291) by moving "Exdate check" from e2e to electron to run on a Thursday - Fix calendar config params `fetchInterval` and `excludedEvents` were never used from single calendar config (#3297) - Fix MM_PORT variable not used in electron and allow full path for MM_CONFIG_FILE variable (#3302) --------- Signed-off-by: naveen <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Karsten Hassel <[email protected]> Co-authored-by: Malte Hallström <[email protected]> Co-authored-by: Veeck <[email protected]> Co-authored-by: veeck <[email protected]> Co-authored-by: dWoolridge <[email protected]> Co-authored-by: Johan <[email protected]> Co-authored-by: Dario Mratovich <[email protected]> Co-authored-by: Dario Mratovich <[email protected]> Co-authored-by: Magnus <[email protected]> Co-authored-by: Naveen <[email protected]> Co-authored-by: buxxi <[email protected]> Co-authored-by: Thomas Hirschberger <[email protected]> Co-authored-by: Kristjan ESPERANTO <[email protected]> Co-authored-by: Andrés Vanegas Jiménez <[email protected]> Co-authored-by: Dave Child <[email protected]> Co-authored-by: grenagit <[email protected]> Co-authored-by: Grena <[email protected]> Co-authored-by: Magnus Marthinsen <[email protected]> Co-authored-by: Patrick <[email protected]> Co-authored-by: Piotr Rajnisz <[email protected]> Co-authored-by: Suthep Yonphimai <[email protected]> Co-authored-by: CarJem Generations (Carter Wallace) <[email protected]> Co-authored-by: Nicholas Fogal <[email protected]> Co-authored-by: JakeBinney <[email protected]> Co-authored-by: OWL4C <[email protected]> Co-authored-by: Oscar Björkman <[email protected]> Co-authored-by: Ismar Slomic <[email protected]> Co-authored-by: Jørgen Veum-Wahlberg <[email protected]> Co-authored-by: Eddie Hung <[email protected]> Co-authored-by: Bugsounet - Cédric <[email protected]> Co-authored-by: bugsounet <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Knapoc <[email protected]> Co-authored-by: sam detweiler <[email protected]> Co-authored-by: veeck <[email protected]> Co-authored-by: Paranoid93 <[email protected]> Co-authored-by: NolanKingdon <[email protected]> Co-authored-by: J. Kenzal Hunter <[email protected]> Co-authored-by: Teddy <[email protected]> Co-authored-by: TeddyStarinvest <[email protected]> Co-authored-by: martingron <[email protected]> Co-authored-by: dgoth <[email protected]> Co-authored-by: kaennchenstruggle <[email protected]> Co-authored-by: jkriegshauser <[email protected]> Co-authored-by: Ben Nitkin <[email protected]>
@BKeyport the documentation PR is on the way, can we close this here or is there still something to discuss? |
Yes, let's go ahead and close, as we can soon refer people to the documentation for correct usage. |
In researching for documentation purposes I've been finding all sorts of issues using the environment variables to multi-screen. I'm using bookworm, wayland turned off.
using MM_CONFIG_FILE produces weird results:
A) the following config options are ignored: port, electronOptions, address (see next)
B) It'll set up the address on [::1]:8080 by default, rather than whatever address is commanded to do. I don't use IPV6 due to ISP non-support, so that puts it unavailable.
C) Due to this, was unable to test if ipWhitelist functions, but all other seems to function.
using MM_PORT does move the port to the correct port, but still leaves it on address [::1]
relevant config2.js portion
bash script launch (mm2.sh):
Currently, system is designed to have the "2" launch show up on screen 1, and the non-redirected go to screen 2 to work around bugs partially. If possible to fix bugs, I would then revert back to using 1 for screen 1, 2 for screen 2.
The text was updated successfully, but these errors were encountered: