Read the statement by Michael Teeuw here.
MMM-BirdNET issue with MMM-pages
-
Request: Please help me get MMM-BirdNET to play nice with MMM-pages.
Setup: rpi 2 model B with Raspberry Pi OS desktop Bookworm installed. Fresh install with Nodejs version 22.1.0. Using the Edward Shen fork of MMM-pages.
Issue: MMM-BirdNET runs as expected if MMM-pages is not running. With MMM-pages, BirdNET is part of the “fixed” group, i.e., it should show up all the time. This part works fine—it shows up where expected and stays there as the other pages rotate. But each time the other pages rotate (currently every 15 seconds), the BirdNET module appears to refresh itself and the bird popup begins to switch much more quickly than the default 30 seconds. It’s a glitchy mess.
Other notes: I tried using the sdetweil fork of MMM-pages, but it wouldn’t rotate any pages whatsoever. I’m using MMM-pages because I find it simpler to use than MMM-Carousel, especially with multiple instances of modules. BirdNET plays nice with Carousel, but I much prefer pages.
Thanks for your time and input!
-
@mumblebaj Thank you so much for your efforts! For whatever reason, if those sections are commented out and pages is enabled, the map fails to load on my rpi (it would load if I disabled pages). I reinstalled both pages and BirdNET, disabled all other modules, removed custom.css, etc., but it wouldn’t work.
I’ve given up trying to resolve this because I was able to make MMM-Carousel work for my purposes. For anyone wondering, my struggle with Carousel was configuring multiple instances of the default weather app—an “ignored” current weather instance to always remain on the screen and a forecast weather instance to appear on another page. I couldn’t make it work using the carouselId method. Instead, I duplicated the default weather module. With that done, I was easily able to ignore “weather” and put “weather2” on another page. BirdNET works perfectly and I’m all set.
Thanks again for your time!
-
@geronimodupree I made no changes to the pages code, only the readme for config
yes, we don’t have pages in MagicMirror, we can only hide or show. so pages, and carousel, like profileswitcher and facerecodnn, just show groups of modules and hide the rest.
BUT when shown after being hidden the modules usually refresh.
IF they have refresh cycles it will indeed get nutty. maybe force their cycle really long , longer than the pages cycle
-
@sdetweil It seems to be something specific between MMM-BirdNET and Pages. I can put something like MMM-DadJokes as a fixed item on the page, and it will, as hoped, only refresh on its own schedule, not when the other modules/pages are switched. The popInterval option of BirdNET is already configured longer than the rotationTime option of Pages.
Using Carousel, I can ignore BirdNET, and it will stay in place and update properly (it doesn’t refresh every time the pages switch). Unfortunately, Carousel presents other issues unrelated to BirdNET (perhaps better saved for a separate post).
-
@geronimodupree I think the following is the problematic code.
resume: function() { this.updateTimer = setInterval(()=> { this.updateData(); }, this.config.updateInterval); this.schedulePopInterval(); },
You can comment that out and it should work as expected. When MMM-pages “resumes” the module, the module forces a refresh.
-
@mumblebaj Comment out that entire block of code, correct? After commenting it out, the module header still appeared on the screen, but the map itself did not. I thought the map might appear after several page rotations, but alas, no luck. Thanks for looking at it.
-
@geronimodupree You may want to comment out both the suspend and resume modules. I have and it works just fine.
And working fine on each page:
-
@mumblebaj Thank you so much for your efforts! For whatever reason, if those sections are commented out and pages is enabled, the map fails to load on my rpi (it would load if I disabled pages). I reinstalled both pages and BirdNET, disabled all other modules, removed custom.css, etc., but it wouldn’t work.
I’ve given up trying to resolve this because I was able to make MMM-Carousel work for my purposes. For anyone wondering, my struggle with Carousel was configuring multiple instances of the default weather app—an “ignored” current weather instance to always remain on the screen and a forecast weather instance to appear on another page. I couldn’t make it work using the carouselId method. Instead, I duplicated the default weather module. With that done, I was easily able to ignore “weather” and put “weather2” on another page. BirdNET works perfectly and I’m all set.
Thanks again for your time!
-