MagicMirror² v2.12.0 is available! For more information about this release, check out this topic.

MMM-pages and calendarext2



  • I have my calendar setup to rotate between a daily view and then 3 monthly views . I’m also using mmm-pages so that on the screen with the daily view I can have the rest of my modules showing and then the monthly view will only show it and the clock .
    I have set both modules up to rotate at the same speed however they do not stay in sync . Any suggestion on how I can get these to rotate through at the same speed or any ideas of maybe a better setup ?


  • Module Developer

    @mscrawford5
    Not to try by time. Use notification.



  • @Sean
    Can you give me an idea on how I would set that up? I’m really new to all of this . I appreciate any help



  • Sorry for asking, but could you show how you get the MMM-pages to work. me stuck 😞


  • Module Developer

    https://github.com/eouia/MMM-CalendarExt2/wiki/Tip:-Sync-with-MMM-Pages.
    Many people are asking me How to use this module with MMM-Pages.

    Like this;

    PAGE1

    PAGE2

    PAGE3

    Let’s configure.

    MMM-Pages

    {
      module: 'MMM-pages',
      config: {
        modules: [
          ["clock", ],
          ["MMM-COVID-19", ],
          ["MMM-News", ],
        ],
        fixed: ["MMM-page-indicator", "MMM-CalendarExt2"],
        rotationTime: 1000 * 5,
      }
    },
    

    I’ve set 3 pages (page:0, page:1, page:2). Each has some other modules like clock. Now I’ll show a different view of MMM-CalendarExt2 in each page.

    MMM-CalendarExt2

    {
      module: 'MMM-CalendarExt2',
      position: "top_left", // meaningless.
      config: {
        rotateInterval: 0,
        updateInterval: 1000 * 60 * 60,
        calendars : [
          {
            name: "bundesliga",
            url: "webcal://www.google.com/calendar/ical/spielplan.1.bundesliga%40gmail.com/public/basic.ics",
            icon: "emojione-flag-for-flag-germany",
          },
        ],
        views: [
          {
            name: "VIEW1",
            mode: "daily",
            position:"top_right",
            slotCount: 1,
            calendars: ["bundesliga"],
          },
          {
            name: "VIEW2",
            mode: "weekly",
            position:"top_right",
            slotCount: 1,
            calendars: ["bundesliga"],
          },
          {
            name: "VIEW3",
            mode: "monthly",
            position:"top_right",
            slotCount: 1,
            calendars: ["bundesliga"],
          },
        ],
        scenes: [
          {
            name: "PAGE1",
            views:["VIEW1"],
          },
          {
            name: "PAGE2",
            views:["VIEW1", "VIEW2"],
          },
          {
            name: "PAGE3",
            views:["VIEW1", "VIEW2", "VIEW3"],
            className: "fakeScene"
          },
        ],
        notifications: {
          "PAGE_INCREMENT" : {
            exec: "sceneNext",
          },
          "PAGE_DECREMENT" : {
            exec: "scenePrevious",
          }
        },
      },
    },
    
    

    I made 3 views and put them into 3 scenes.
    Then, see notifications section. When PAGE_INCREMENT is coming, sceneNext command is executed. easy.
    The results are above pictures.
    And, this is already explained in wiki of github.

    One More Thing

    Hey, I want page 3 empty. How to remove view or scene in that page?

    I wrote className:fakeScene, in 3rd scene config. Let’s add this into your css/custom.css

    .CX2.fakeScene {
      display:none;
    }
    

    Now, the 3rd scene will be displayed like this.



  • @Sean thank you so much ! I looked and couldn’t find anything in the wiki about notifications, but that worked perfectly .
    Thank you again


Log in to reply