Read the statement by Michael Teeuw here.
MMM-Page-Selector: A page switcher that can set positions of modules
-
I guess it’s the MM-WatchDog module
Check that outMMM-WatchDog module keeps an eye on your UI and quits app in case the UI crashes. If you combine this with the PM2 process manager, MM2 will automaticly restart after a UI failure.
So you said: “my MagicMirror keeps restarting every few seconds.”
-
Yep, I can verify that it is in fact WatchDog.
I can also provide an explanation and a patch that you can do yourself. The way I made it possible to not include theposition
prop anymore is by building a temporary config, loading that one, restarting magic mirror, and then replacing the temporary with the original. I’m really sure of the underlying reason, but this process seems to trigger WatchDog to trigger an abort.
As robiv says, combined with pm2, this causes a restart loop.
The two easiest ways to get around this are:- Don’t use watchdog. If you don’t think that you are going to experience crashes, then that works
- Give a position prop to every module. Including position props doesn’t change any of the visual function and that way, Page-Selector never triggers a restart and the problem doesn’t occur in the first place. The config for any given module should follow this format:
{ module: 'MMM-module-name', position: 'any_position' //It doesn't matter what it is disabled: false, config: { ... } },
I will try to find a way to make the modules play well together, but that might take a while.
-
Hallo Veldrovive,
I just asked you a question on GitHub about Button.
Should I write this here or on GitHub? Where do you prefer it? -
Hey robiv,
I do actually prefer to have issues opened on GitHub. That way I can more easily keep track of them and also it provides a record of my work in case I want to use it in order to prove my merit.
Thanks for asking. -
OK Thanks.
It’s not really an issue, its a question about Button with Selector Howto ;-) -
@veldrovive @robiv8 Thank you two for the quick feedback and nailing it down so quickly.
I will disable Watchdog for the time being. I was using it as I experienced crashes when using an iFrame module for video playback (ISS livestream on my night-page). But it should be OK to live without that for a while. -
@veldrovive said in MMM-Page-Selector: A page switcher that can set positions of modules:
Ok, I’ve implemented persistent pages. In order to access them right now, you need to be in the development branch since I don’t have the time to do extensive testing.
Thanks again for the persistent pages feature. I have tried it all day in different scenarios and it was working reliably and as expected. :clapping_hands:
-
@veldrovive PS: I tried following your workaround and just wanted to let you know that it works :) Now I am able to use your new config option for pages which makes it so much easier to set them up! Great idea to implement it!
-
@rudibarani
Good stuff. I’m glad everything is working out. -
@veldrovive I got the second page layout working with MMM-Watchdog: added a position-value to each module as you suggested and changed the settings to a heartbeat of 5 sec and a restart interval, in case the feedback is not sufficient, of 31 sec. Maybe the default values where just to tight and interfered with your tricks to layout the pages.
How does MMM-Page-Selector decide about the order in which modules within the same location are stacked on top of each other? I have would like to move an instance of MMM-DWD-WarnWeather below MMM-MyWeather but changing the order in the “pages” part of the layout does not have an effect on the order on the screen.