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-CalendarExt3 only one calendar not updating

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    35 Posts 4 Posters 18.0k 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.
    • emloweE Offline
      emlowe Module Developer @sdetweil
      last edited by

      I am on the develop branch

      The entire start is at 10:54:23

      [2025-01-27 10:54:23.207] [LOG] Starting MagicMirror: v2.31.0-develop

      I’m not sure when Ext3Agenda starts as there is no log item specific to that afaik - but I assume it’s sometime around:

      [2025-01-27 10:54:26.290] [LOG] No helper found for module: MMM-CalendarExt3Agenda.

      so Ext3 start is no earlier than 10:54:23 and the first broadcast was at 10:55:44 - this is much less than the 5 minutes I have manually configured for waitFetch.

      (in other words, I am waiting much longer than should be needed, but it does not work unless I manually refresh)

      The log at 11:01 is the second broadcast of the same calendar

      I am only pulling 5 days of data and not broadcasting past events, 23 is correct.

      module: "calendar",
      hiddenOnStartup: true,
      position: "top_left",
      config: {
          broadcastEvents: true,
          broadcastPastEvents: false,
          maximumNumberOfDays: 5,
          maximumEntries: 100,
          fetchInterval: 5 * 60 * 1000,
          calendars: [
          {
              name: "family",
              URL: "<redacted>"
          }
          ]
      }
      
      module: "MMM-CalendarExt3Agenda",
      position: "top_left",
      config: {
          showMiniMonthCalendar: false,
          firstDayOfWeek: 1,
          startDayIndex: 0,
          endDayIndex: 0,
          calendarSet: ['family'],
          waitFetch: 5 * 60 * 1000,
          refreshInterval: 7 * 60 * 1000,
      }
      
      S 1 Reply Last reply Reply Quote 0
      • S Do not disturb
        sdetweil @emlowe
        last edited by sdetweil

        @emlowe ok, in the case of modules that only have a browser component ( no node helper) then
        starting application message is the start time

        another use just resolved the same issue w waitfetch, but he had multiple calendars
        https://forum.magicmirror.builders/topic/19359/mmm-calendarext3agenda-on-a-higher-screen-resolution?page=2

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        emloweE 1 Reply Last reply Reply Quote 0
        • emloweE Offline
          emlowe Module Developer @sdetweil
          last edited by

          Further strangeness.

          Let’s say I change waitFetch to something that shouldn’t work (eg 5 seconds) - clearly, this doesn’t work since the first broadcast is after a minute or so.

          But if I manually refresh the browser as soon as I see the log entry about the broadcast - everything appears just fine.

          So for example, setting

          waitFetch: 5 * 1000,
          refreshInterval: 2 * 60 * 1000,
          

          Nothing will appear in the calendar - not at start (expected) and not after 2 mins (1 refresh), or 4 mins, or 10 mins or however long I want to wait - nothing.

          But if I manually refresh - everything appears right away as long as I refresh after the broadcast log line

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

            @MMRIZE will have to advise. this is the depth of my knowledge

            i work on the default calendar
            well, one thing
            when you refresh the page, all the modules web components are reloaded. the default cal sends a request to its node helper to get events. and it has them already, so sends immediately

            and of course because the default cal will be shown, its shows with the correct events, right??

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            emloweE 1 Reply Last reply Reply Quote 0
            • emloweE Offline
              emlowe Module Developer @sdetweil
              last edited by

              Yea, I believe the default calender is working and broadcasting correctly - not sure exactly where Ext3Agenda is having problems - but I have a few ideas I plan to try out.

              emloweE 1 Reply Last reply Reply Quote 0
              • emloweE Offline
                emlowe Module Developer @emlowe
                last edited by

                Bah! I have to apologize - I was on the develop branch but apparently, I was some commits behind and I think I was missing the commit that fixed the “clipping” problem

                I made sure to update to the head of develop and things are working much better now. So it seems all along it has been the known issue

                Doh!

                emloweE 1 Reply Last reply Reply Quote 0
                • emloweE Offline
                  emlowe Module Developer @emlowe
                  last edited by

                  Actually have to take this back. Currently testing running in server only mode and a browser so I can see the console easier

                  When I see in the log this line:

                  [2025-01-27 13:52:24.893] [INFO] Calendar-Fetcher: Broadcasting 22 events from <redacted>

                  I can say that modules are NOT getting any calendar notifications, despite this log entry. They are not broadcast. I added some code to Ext3Agenda to print out when it gets any notification, and it never gets any CAL items. (I see it getting DOM_CREATED, DOM_UPDATED, etc,etc)

                  I see in the console log the following:

                  sorting events count=0
                  slicing events total maxcount=100

                  which seems odd given that the helper reported broadcasting 22 events. Those items repeat in the console log , but it’s always sorting events count=0

                  UNTIL I refresh the browser - Now I see the Ext3Agenda module getting CALENDER_EVENTS and sorting events count=22

                  emloweE 1 Reply Last reply Reply Quote 0
                  • emloweE Offline
                    emlowe Module Developer @emlowe
                    last edited by

                    I guess I should have run some tests with just the standard calendar module.

                    Now just using the standard calendar module - and it just says “Loading” despite having also printed “Broadcasting 22 events from”

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

                      @emlowe as you updated to the develop branch, did you also redo the npm run install-mm

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      1 Reply Last reply Reply Quote 0
                      • emloweE Offline
                        emlowe Module Developer
                        last edited by

                        I did yes - so the current test results are this

                        The calendar did eventually appear - but it took quite some time - I wasn’t watching, so I don’t know when exactly - I’ll test again. But it was several minutes after the log output of “broadcasting 22 events”

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

                          @emlowe the default for ext3 is 30 mins
                          if missed at waitFetch

                          only see the timing in
                          pm2 log

                          default calendar working, right?

                          Sam

                          How to add modules

                          learning how to use browser developers window for css changes

                          emloweE 1 Reply Last reply Reply Quote 0
                          • emloweE Offline
                            emlowe Module Developer @sdetweil
                            last edited by

                            @sdetweil No, I’m stopped testing Ext3 and I am only testing the default calendar.

                            it is not working - I see Loading... for some number of minutes or hours, I haven’t determined any consistency. This test run is now past 45 mins and it still says Loading… despite having broadcast the events 9 times:

                            [2025-01-27 14:25:24.525] [LOG]   Starting MagicMirror: v2.31.0-develop 
                            ...
                            [2025-01-27 14:25:31.806] [LOG]   Create new calendarfetcher for URL ...
                            [2025-01-27 14:26:21.083] [INFO]  Calendar-Fetcher: Broadcasting 22 events from ...
                            [2025-01-27 14:32:08.812] [INFO]  Calendar-Fetcher: Broadcasting 22 events from ...
                            [2025-01-27 14:37:55.863] [INFO]  Calendar-Fetcher: Broadcasting 22 events from
                            [2025-01-27 14:43:42.948] [INFO]  Calendar-Fetcher: Broadcasting 22 events from
                            [2025-01-27 14:49:30.144] [INFO]  Calendar-Fetcher: Broadcasting 22 events from 
                            ...
                            [2025-01-27 15:12:37.552] [INFO]  Calendar-Fetcher: Broadcasting 21 events from 
                            

                            still says Loading ... - if I refresh the browser page - then they all appear immediately

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

                              @emlowe can you extract those events out to a file

                              curl -sL theurl >somefile.txt
                              and share the file and your calendar config in an email to me
                              same userid at gmail

                              so i can look at it

                              one other thing is open the developers window console tab
                              ctrl-shift-i, select the console tab
                              or do
                              npm run start:dev

                              and see if there are any errors
                              the browser side broadcasts so it GOT the events block
                              then it processes for the ui

                              Sam

                              How to add modules

                              learning how to use browser developers window for css changes

                              emloweE 1 Reply Last reply Reply Quote 0
                              • emloweE Offline
                                emlowe Module Developer @sdetweil
                                last edited by

                                @sdetweil No errors in the console log

                                If I wait long enough where this seems anywhere between 15min to an hour or more, they do appear without a manual refresh.

                                maybe it’s a complexity issue - when I curl the calender link (it’s a google private ICS link) - the resulting file is 4.8MB - I imagine parsing that is somewhat time-consuming

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

                                  @emlowe yes, and new code takes longer than old with lots of events

                                  what is the calendar refreshinterval

                                  Sam

                                  How to add modules

                                  learning how to use browser developers window for css changes

                                  emloweE 1 Reply Last reply Reply Quote 0
                                  • emloweE Offline
                                    emlowe Module Developer @sdetweil
                                    last edited by

                                    @sdetweil You mean fetchInterval: 5 * 60 * 1000?

                                    the calendar module doesn’t have refreshinterval does it?

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

                                      @emlowe fetchInterval is same

                                      Sam

                                      How to add modules

                                      learning how to use browser developers window for css changes

                                      1 Reply Last reply Reply Quote 0
                                      • emloweE Offline
                                        emlowe Module Developer
                                        last edited by

                                        I added various log outputs to node_helper.js and calendar.js

                                        node_helper is sending the socket notification for CALENDAR_EVENTS
                                        this is not received by the front end code in calendar.js

                                        I don’t know what happens to it, but I added logging to print out in calendar.js whenever the socketNotificationReceived handler is called and it doesn’t print.

                                        (unless I refresh the page - at which point it does)

                                        emloweE S 3 Replies Last reply Reply Quote 0
                                        • emloweE Offline
                                          emlowe Module Developer @emlowe
                                          last edited by

                                          Something even stranger - if I immediately refresh the page it also works. Here I mean is:

                                          npm run server
                                          got to browser and bring up host:8080
                                          calendar will say “Loading” for a very long time
                                          (despite the events getting broadcast)

                                          But if I :
                                          npm run server
                                          go to browser and bring up host:8080
                                          calender says “Loading”
                                          Refresh the page immediately
                                          calendar says “Loading”
                                          calendar will immediately show the events as soon as the events are broadcast

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

                                            @emlowe oh, “cool” ugh, i opened an issue about that last year

                                            just reopened
                                            https://github.com/MagicMirrorOrg/MagicMirror/issues/3380

                                            can you add the contents of your post in an comment
                                            actually this one
                                            https://forum.magicmirror.builders/topic/19345/mmm-calendarext3-only-one-calendar-not-updating/30?page=3#

                                            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
                                            • 2
                                            • 2 / 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