Creating a schedule for MMM-Pages
Closed this issue · 9 comments
Hello,
Is it possible to disable modules and not only hidde ? i'm using MMM-pages and i would like to have only some modules on screen without rotate.
thanks
Hi @chassain - can you describe what you are trying to achieve a little more. Perhaps provide a copy of your config (with any api keys/usernames/password etc removed) and which modules you'd like to be displayed when?
Yes..
[see next comment for config]
all modules from 6 to 11h30 and only 4 modules after..but mmm pages is always running and i have only page 1 ok and the others with only 3 modules..and i would like to have always the fours modules
{
module: 'MMM-ModuleScheduler',
disabled: false,
config: {
// Montre tous les modules de 06h00 à 11h30. Montre que les modules ignorés à partir de 11h30
global_schedule: {from: '00 6 * * *', to: '30 11 * * *', ignoreModules: ["MMM-EmbedYoutube" , "clock" , "newsfeed" , "MMM-DarkSkyForecast"] },
}
},
{
module: "MMM-pages",
config: {
modules:
[[ "MMM-EmbedYoutube" , "clock" , "newsfeed" , "MMM-DarkSkyForecast" ],
[ "MMM-EmbedYoutube" , "clock" , "newsfeed" , 'MMM-Lunartic' , 'MMM-rfacts' ],
[ "MMM-EmbedYoutube" , "clock" , "newsfeed" , "calendar", "calendar_monthly" ],
[ "MMM-EmbedYoutube" , "clock" , "newsfeed" , "MMM-cryptocurrency" ],
[ "MMM-EmbedYoutube" , "clock" , "newsfeed" , "MMM-Cocktails" , 'MMM-SystemStats' ],
[ "MMM-EmbedYoutube" , "clock" , "newsfeed" , "MMM-NowPlayingOnSpotify" , 'MMM-rfacts' ],
[ "MMM-EmbedYoutube" , "clock" , "newsfeed" , 'MMM-MovieListings' , 'MMM-SystemStats' ]],
rotationTime: 7000,
}
},
sorry, the code is not display well
So are you trying to achieve the following:
-
Always show "MMM-EmbedYoutube" , "clock" , "newsfeed"
-
Between 06h00 and 11h30 rotate the following groups
- "MMM-DarkSkyForecast"
- 'MMM-Lunartic' , 'MMM-rfacts'
- "calendar", "calendar_monthly"
- "MMM-cryptocurrency"
- "MMM-Cocktails" , 'MMM-SystemStats'
- "MMM-NowPlayingOnSpotify" , 'MMM-rfacts'
- 'MMM-MovieListings' , 'MMM-SystemStats'
yes you're right. and after i would like to see only on my screen during X minutes the following groups:
"MMM-EmbedYoutube" , "clock" , "newsfeed " , "MMM-DarkSkyForecast "
and come back to : Always show "MMM-EmbedYoutube" , "clock" , "newsfeed" and rotate modules
In future, it will be to see more the module "MMM-GoogleMapsTraffic" at 7h00, 12h00, 18h00 during 10 minutes and have the rotation modules between other hours
Okay - I think the way to achieve this is by removing the MMM-Pages config, and using a more complex MMM-ModuleScheduler config.
Try experimenting with group schedules similar to the following:
{
module: "MMM-ModuleScheduler",
config: {
global_schedule: [
// group-1: show at 0 seconds past every minute past every hour from 6 through 11 and hide them at 9 seconds past.
{from: "0 * 6-11 * * *", to: "9 * 6-11 * * *", groupClass: "group-1" },
// group-2: show at 10 seconds past every minute past every hour from 6 through 11 and hide them at 19 seconds past.
{from: "10 * 6-11 * * *", to: "19 * 6-11 * * *", groupClass: "group-2" },
// group-3: show at 20 seconds past every minute past every hour from 6 through 11 and hide them at 29 seconds past.
{from: "20 * 6-11 * * *", to: "29 * 6-11 * * *", groupClass: "group-3" },
// group-4: show at 30 seconds past every minute past every hour from 6 through 11 and hide them at 39 seconds past.
{from: "30 * 6-11 * * *", to: "39 * 6-11 * * *", groupClass: "group-4" },
// group-5: show at 40 seconds past every minute past every hour from 6 through 11 and hide them at 49 seconds past.
{from: "40 * 6-11 * * *", to: "49 * 6-11 * * *", groupClass: "group-5" },
// group-6: show at 50 seconds past every minute past every hour from 6 through 11 and hide them at 59 seconds past.
{from: "50 * 6-11 * * *", to: "59 * 6-11 * * *", groupClass: "group-6" },
]
}
},
Then add the appropriate groupClass
to the classes
option for each module you would like to be in each group. e.g.
{
module: "MMM-DarkSkyForecast",
classes: "group-1",
// then the rest of the MMM-DarkSkyForecast config options...
},
{
module: "MMM-Lunartic",
classes: "group-2",
// then the rest of the MMM-Lunartic config options...
},
{
module: "MMM-rfacts",
classes: "group-2",
// then the rest of the MMM-rfacts config options...
},
{
module: "calendar",
classes: "group-3",
// then the rest of the calendar config options...
},
// And so on...
For those modules which should always be displayed, e.g. "MMM-EmbedYoutube" , "clock" , "newsfeed", don't add the groupClass
to the classes
option.
Have a play and see how it goes.
Once you've got it working, you should be able to add more schedules for additional modules (e.g. MMM-GoogleMapsTraffic
) as you go...
it's clear and clean..thanks for your response. I will try this and come back to say the result...thanks again