Read the statement by Michael Teeuw here.
MMM-ModuleScheduler: need help
-
Hello,
I need help to use the MMM-ModuleScheduler,
I don’t know how to config this module to display other modules at chosen times.
My need is to display picture module witch display different pictures on different times. Actually I use MMM-RandomPhoto, because I can configure a path with pictures.
I want to display pictures from the path:- ‘MondayMorning/’ on monday morning from 9h00 to 12h00
- ‘Mandayafternoon/’ on monday from 13h00 to 17h00
- ‘thuesdaymorning’ on thuesday form 9 to 12, etc…
I can’t understand how to do that… is there somebody to help me please?
-
@anagallis if the schedules are the same every day, the easiest way would be the global schedule
Use the crontab tool to create a schedule line from:to for each time period, and add a string for the global_scheduler classname.
Then on the picture module add a property
classes:"???? ?????"Where ??? Is the classname you specified in the schedule definition.
These classnames are just arbitrary strings, for example
Morning_scheduler, afternoon_schedule
The classes property takes a list of space separated stringsIf the schedules are different on different days,
Make a pair for each day, using the same schedule names for all the days -
Many thanks @sdetweil ,
Here is what I done, and MM only displays pictures from the first MMM-RandomPhoto, the class ‘lundimatin’ and we’re mondy afternoon, not morning…
modules: [ { module: 'MMM-ModuleScheduler', config: { // SHOW MODULES WITH THE CLASS '*********' AT **:00 AND HIDE AT **:00 EVERY DAY notification_schedule: [ // SHOW AN ALERT toutes les minutes impairs {notification: 'SHOW_ALERT', schedule: '1-59/2 * * * *', payload: {type: "notification", title: 'Impaire !'}}, // SHOW AN ALERT toutes les minutes pairs {notification: 'SHOW_ALERT', schedule: '*/2 * * * *', payload: {type: "notification", title: 'Paire !'}}, // SHOW MODULES WITH THE CLASS 'lundimatin' AT 09:00 AND HIDE AT 13:00 EVERY LUNDI {from: '0 9 * * *', to: '0 13 * * 1', groupClass: 'lundimatin'}, // SHOW MODULES WITH THE CLASS 'lundiaprem' AT 14:00 AND HIDE AT 17:00 EVERY LUNDI {from: '0 14 * * *', to: '0 17 * * 1', groupClass: 'lundiaprem'}, // SHOW MODULES WITH THE CLASS 'mardimatin' AT 09:00 AND HIDE AT 13:00 EVERY MARDI {from: '0 9 * * *', to: '0 13 * * 2', groupClass: 'mardimatin'}, // SHOW MODULES WITH THE CLASS 'mardiaprem' AT 14:00 AND HIDE AT 17:00 EVERY MARDI {from: '0 14 * * *', to: '0 17 * * 2', groupClass: 'mardiaprem'}, ] } }, { module: 'MMM-RandomPhoto', position: 'fullscreen_below', classes: 'lundimatin', config: { imageRepository: "localdirectory", repositoryConfig: { path: "/home/pi/MagicMirror/modules/Images/lundimatin/", recursive: true, exclude: ["tmp", "#recycle"], }, updateInterval: 5, opacity: "0.9", } }, { module: 'MMM-RandomPhoto', position: 'fullscreen_below', classes: 'lundiaprem', config: { imageRepository: "localdirectory", repositoryConfig: { path: "/home/pi/MagicMirror/modules/Images/lundiaprem/", recursive: true, exclude: ["tmp", "#recycle"], }, updateInterval: 5, opacity: "0.9", } },Do you see where is my problem, please?
-
@anagallis the MMM-RandomPhoto module doesn’t support multiple instances
the html ID and Classes are hard coded -
@anagallis delete the MMM-RandomPhoto folder
cd modules rm -rf MMM-RandomPhotoand git clone my repo
cd modules git clone https://github.com/sdetweil/MMM-RandomPhotothis supports multiple instances
restart MagicMirror
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