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.

    Default calendar - parsing of VEVENT

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    3 Posts 2 Posters 634 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.
    • evroomE Online
      evroom
      last edited by

      HI,

      Can someone tell me how this Google event is parsed to the ‘data’ structure in calendarfetcher.js ?

      basic.ics part. (correct):

      BEGIN:VEVENT
      DTSTART;VALUE=DATE:20200330
      DTEND;VALUE=DATE:20200331
      DTSTAMP:20200329T132348Z
      UID:xxxl8quduqtvqbfe00fsk8xxx@google.com
      CREATED:20200329T132240Z
      DESCRIPTION:
      LAST-MODIFIED:20200329T132240Z
      LOCATION:
      SEQUENCE:0
      STATUS:CONFIRMED
      SUMMARY:TEST_ENTRY_FULLDAY
      TRANSP:TRANSPARENT
      END:VEVENT
      

      calendarfetcher.js part (incorrect):

      0|mm  | { type: 'VEVENT',
      0|mm  |   params: [],
      0|mm  |   start: { 2020-03-29T22:00:00.000Z tz: undefined, dateOnly: true },
      0|mm  |   end: { 2020-03-30T22:00:00.000Z tz: undefined, dateOnly: true },
      0|mm  |   dtstamp: { 2020-03-29T13:23:15.000Z tz: undefined },
      0|mm  |   uid: 'xxxul8quduqtvqbfe00fsk8xxx@google.com',
      0|mm  |   created: { 2020-03-29T13:22:40.000Z tz: undefined },
      0|mm  |   description: '',
      0|mm  |   lastmodified: { 2020-03-29T13:22:40.000Z tz: undefined },
      0|mm  |   location: '',
      0|mm  |   sequence: '0',
      0|mm  |   status: 'CONFIRMED',
      0|mm  |   summary: 'TEST_ENTRY_FULLDAY',
      0|mm  |   transparency: 'TRANSPARENT' }
      

      The background of this question, is that a full day event for tomorrow, is shown on the MM as Today.
      Based on the start and end date from the calendar module, this may seem right, but does not match my correct Google calendar DTSTART and DTEND dates.

      This annoys me already for some time (also happens for reoccurring full day events) and I wanted to see where it might go wrong.
      Unfortunately I am not skilled enough to see where the actual parsing part takes place.
      It seems to me ‘locale’ or timezone issue and converting to unixtime.

      And it also annoys me that it shows as Today or in XX Days, when I would like to see it as Mon Mar 30th, like my normal events.

      Greetings,

      E.J.

      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 0
      • S Do not disturb
        sdetweil @evroom
        last edited by

        @evroom the calendar parser is downlevel and causes all kinds of problems…

        it uses the ical library, which we deliver as part of the MM install… (NOT download latest)…
        see issue https://github.com/MichMich/MagicMirror/issues/1926

        the parser is in calendarfetcher.js
        uses the preloaded modules/default/calendar/vendor/ical.js

        if u replace the ical.js with the latest, it works much better (most of the time)

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 0
        • evroomE Online
          evroom
          last edited by

          @sdetweil said in Default calendar - parsing of VEVENT:

          uses the preloaded modules/default/calendar/vendor/ical.js

          Ah, that was the missing link !
          Now I understand where it comes from (I mean the ‘data’ stuff that calendarfetcher.js uses).

          Will try with latest ical.js.

          Thanks.

          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)

          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