MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    MMM-ModuleScheduler: need help

    Scheduled Pinned Locked Moved Showcase
    7 Posts 2 Posters 41 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A Offline
      anagallis
      last edited by

      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?

      S 1 Reply Last reply Reply Quote 0
      • S Offline
        sdetweil @anagallis
        last edited by sdetweil

        @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 strings

        If the schedules are different on different days,
        Make a pair for each day, using the same schedule names for all the days

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        A 1 Reply Last reply Reply Quote 0
        • A Offline
          anagallis @sdetweil
          last edited by

          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?

          S 2 Replies Last reply Reply Quote 0
          • S Offline
            sdetweil @anagallis
            last edited by

            @anagallis the MMM-RandomPhoto module doesn’t support multiple instances
            the html ID and Classes are hard coded

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            1 Reply Last reply Reply Quote 0
            • S Offline
              sdetweil @anagallis
              last edited by sdetweil

              @anagallis delete the MMM-RandomPhoto folder

              cd modules
              rm -rf MMM-RandomPhoto
              

              and git clone my repo

              cd modules
              git clone https://github.com/sdetweil/MMM-RandomPhoto
              

              this supports multiple instances
              restart MagicMirror

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              A 1 Reply Last reply Reply Quote 0
              • A Offline
                anagallis @sdetweil
                last edited by

                @sdetweil aaaah ok, it’s not multiple instances! I understand the problem now.

                The second version you give of the Random-Photo module can’t display local images, it’s only for images via the net. But thank you.

                l have to find a new image module, witch can be multiple instances and with picture in local directories.

                S 1 Reply Last reply Reply Quote 0
                • S Offline
                  sdetweil @anagallis
                  last edited by sdetweil

                  @anagallis ah, I see. I found the original. Not the other fork. Same problem

                  Working on it

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  1 Reply Last reply Reply Quote 0

                  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
                  • 1 / 1
                  • First post
                    Last post
                  Enjoying MagicMirror? Please consider a donation!
                  MagicMirror created by Michael Teeuw.
                  Forum managed by Sam, technical setup by Karsten.
                  This forum is using NodeBB as its core | Contributors
                  Contact | Privacy Policy