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.

    v2.26.0 - default calendar rrule / event.recurrences issue

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    4 Posts 3 Posters 702 Views 4 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.
    • evroomE Offline
      evroom
      last edited by

      This event:

      BEGIN:VEVENT
      DTSTART;TZID=Europe/Berlin:20240104T180000
      DTEND;TZID=Europe/Berlin:20240104T200000
      RRULE:FREQ=WEEKLY;WKST=MO;COUNT=10;BYDAY=TH
      DTSTAMP:20240102T212443Z
      UID:63c23cpe0h356vgjl0o4tsnjbi@google.com
      CREATED:20240102T212139Z
      LAST-MODIFIED:20240102T212139Z
      SEQUENCE:0
      STATUS:CONFIRMED
      SUMMARY:#:SingleEventRepeating
      TRANSP:OPAQUE
      END:VEVENT
      

      Leads to this:

      0|MagicMirror  | [02.01.2024 22:22.25.197] [DEBUG] Title: #:SingleEventRepeating, with dates: ["2024-01-04T17:00:00.000Z","2024-01-11T17:00:00.000Z",null,null,"2024-02-01T17:00:00.000Z","2024-02-08T17:00:00.000Z",null,null,null,"2024-03-07T17:00:00.000Z"]
      0|MagicMirror  | [02.01.2024 22:22.25.197] [DEBUG] event.recurrences: undefined
      

      So:

      [
          "2024-01-04T17:00:00.000Z",
          "2024-01-11T17:00:00.000Z",
          null,
          null,
          "2024-02-01T17:00:00.000Z",
          "2024-02-08T17:00:00.000Z",
          null,
          null,
          null,
          "2024-03-07T17:00:00.000Z"
      ]
      

      Resulting in MM showing only 5 of the 10 events.

      I would like to know where to look for the RRULE processing; cannot find anything in the calendar code.
      As there are some other issues that I found, I could perhaps learn something from it.

      Otherwise I will open an issue for it.

      MagicMirror version: 2.30.0
      Raspberry Pi 4 Model B Rev 1.5 (8 GB RAM)
      Raspbian GNU/Linux 12 (bookworm)

      Test environment:
      MagicMirror version: v2.30.0
      Raspberry Pi 3 Model B Plus Rev 1.3 (1 GB RAM)
      Raspbian GNU/Linux 12 (bookworm)

      S 1 Reply Last reply Reply Quote 1
      • S Away
        sdetweil @evroom
        last edited by

        @evroom we don’t do the RRULE processing ourselves,… we call the RRULE library function between

          rrule.between(now and 1 year from now) 
        

        calendarfetcherutils.js

        Log.debug(`Search for recurring events between: ${pastLocal} and ${futureLocal}`);
        					let dates = rule.between(pastLocal, futureLocal, true, limitFunction);
        					Log.debug(`Title: ${event.summary}, with dates: ${JSON.stringify(dates)}`);
        					dates = dates.filter((d) => {
        						if (JSON.stringify(d) === "null") return false;
        						else return true;
        					});
        

        the we process the dates returned… note the filter I added this release, cause the null values returned killed the calendar

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 0
        • K Offline
          kitlaan
          last edited by

          FYI: I think this is related to the latest rrule release (2.7.0), which was updated when node-ical was upgraded to 0.17.1 (from 0.16.1). It looks like rrule removed luxon with its own self-built replacement… and the behavior changed.

          If you sift through issues filed in node-ical and rrule, there seems to be folks also seeing new recurrence behavior. As to why, /shrug…

          On my install, I rolled-back to the older version (npm install node-ical@0.16.1) and it seems now to be behaving.

          S 1 Reply Last reply Reply Quote 1
          • S Away
            sdetweil @kitlaan
            last edited by sdetweil

            @kitlaan yes it’s the new rrule.

            the old one is broken too…

            but, thanks for the feedback

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            1 Reply Last reply Reply Quote 0
            • 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