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.

    Not loading one of two Google calendars

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    14 Posts 2 Posters 1.3k 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.
    • bdeelmanB Offline
      bdeelman @sdetweil
      last edited by

      Hi Sam,

      Total number of events: 3080. 58 upcoming. So maybe too much?

      I use MM at a Docker and that did not use PM2. The one from karsten13.

      Ton of DEBUG with no errors. He is spitting all VEVENT form the past years.

      KR,
      Bert

      S 1 Reply Last reply Reply Quote 0
      • S Do not disturb
        sdetweil @bdeelman
        last edited by

        @bdeelman yes, the calendar source sends everything, so its a memory hog, and i think we run out of memory.
        another person reported similar problem

        also if you have maxevents set that includes past events
        ive thought of a fix for that, but havent come up with a good answer

        we have maximumnumber of days so we look forward AND back that range, default a year. but that’s 2 years.

        what part of that range is important?

        then we have maxevents. starting at either end is wrong. but we start at the oldest. might never have any future events in the max range

        i think there should be two lists
        all old
        future, limited by days/max events

        but no one expects two lists (breaking part)

        another hacky way is one list. we find today and the apply limits on the forward part

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        bdeelmanB 1 Reply Last reply Reply Quote 0
        • bdeelmanB Offline
          bdeelman @sdetweil
          last edited by

          Hi Sam,

          The upcoming events are important. Always looking forward ;)

          Is there a way setting variables to fix it? I can remove all old events from Google, but why? Maybe we need to import only future events.

          What will be the best solution?

          KR,
          Bert

          S 1 Reply Last reply Reply Quote 0
          • S Do not disturb
            sdetweil @bdeelman
            last edited by

            @bdeelman we cannot import only future
            we get everything the source provides when we ask for the events. google doesn’t provide a filter mechanism

            we dont parse them directly , calling a 3rd party
            lib. but they have to parse them so we can filter. and boom we die before we can filter.

            future is important. a year out? a day? a week?

            i have a rolling 3 month future view. ( was a test, but i find it useful)

            but even my all old, limited future idea doesn’t solve the total size problem

            we are publishing a bunch of fixes i have created for calendar jan 1
            this issue remains open.
            would you be willing to share your cal url, via direct message, so i can test? i don’t share any data w others

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            bdeelmanB 1 Reply Last reply Reply Quote 0
            • bdeelmanB Offline
              bdeelman @sdetweil
              last edited by

              Hi Sam,

              I’ll generate a .ics calendar file with 4500 events, including a mix of:

              Single events: Appointments, meetings, etc.
              Recurring events: Weekly or yearly recurrences for things like birthdays, anniversaries.
              Time ranges: Events spanning multiple hours or days.
              The events will cover the period from January 1st, 2019 to January 1st, 2026.

              I can put it at a website if you want? If you need an URL.

              KR,
              Bert

              S 1 Reply Last reply Reply Quote 0
              • S Do not disturb
                sdetweil @bdeelman
                last edited by sdetweil

                @bdeelman tell me where it is so I can download, will advise when done

                make sure it fails of course, to test
                put it in a directory off the MM folder then
                then url in cal

                http://localhost:mm_port/path/to_ics.file
                

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                bdeelmanB 1 Reply Last reply Reply Quote 0
                • bdeelmanB Offline
                  bdeelman @sdetweil
                  last edited by

                  Hi Sam,

                  What I did, with some help of ChatGPT.

                  The newly random events are working flawless. I prepared Python script to check the quality of the Google .ics file. I have 3071 events and 9 of them gave an error.

                  Error parsing event: 'NoneType' object has no attribute 'dt'
                  

                  Indicates that one of the events in my .ics file has a missing or improperly formatted DTSTART or DTEND.

                  I made another script to check how much. Nine 9 events has missing date fields. Another script to remove those 9 entries and load it into MM. And now they show up.

                  But…then I saw an error at the console at the customEvents parts.

                  {
                              keyword: "Verjaardag",
                              symbol: "birthday-cake",
                              color: "Gold",
                              transform: {
                                search: "^([^']*) '(\\d{4})$",
                                replace: "$1 ($2.)",
                                yearmatchgroup: 2,
                              },
                            },
                  

                  But with this code the other Google ics was working. Strange, without this code the two Google ics are working. So not sure if commenting the customEvents did the trick.

                  I can’t revert because I deleted the “wrong” events from the calendar.

                  KR,
                  Bert

                  S 1 Reply Last reply Reply Quote 0
                  • S Do not disturb
                    sdetweil @bdeelman
                    last edited by

                    @bdeelman ok, we dont have a dt property, so that might have been a python issue

                    its ok to have start without an end , the library handles that

                    do you know what the customevents error was?

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    1 Reply Last reply Reply Quote 0
                    • bdeelmanB Offline
                      bdeelman
                      last edited by

                      Hi Sam,

                      [calendarutils.js:112 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'length')
                          at Object.titleTransform (calendarutils.js:112:24)
                          at calendar.js:353:41
                          at Array.forEach (<anonymous>)
                          at Class.getDom (calendar.js:255:10)
                          at main.js:132:35
                          at new Promise (<anonymous>)
                          at updateDom (main.js:112:10)
                          at Object.updateDom (main.js:669:4)
                          at Class.updateDom (module.js:341:6)
                          at Class.socketNotificationReceived (calendar.js:210:8)](link url)
                      

                      But also with this error, both .ics are loading.

                      KR,
                      Bert

                      S 1 Reply Last reply Reply Quote 0
                      • S Do not disturb
                        sdetweil @bdeelman
                        last edited by

                        @bdeelman thx. the transform is expecting something in the title. dont know.

                        Sam

                        How to add modules

                        learning how to use browser developers window for css changes

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