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.

    Calendar not updating

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    95 Posts 4 Posters 63.7k Views 6 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.
    • S Offline
      sdetweil @matt216
      last edited by

      @matt216 yes, it was a momentary delay, which caused the timeout… trying to see why the catch() block didn’t

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      1 Reply Last reply Reply Quote 0
      • S Offline
        sdetweil @matt216
        last edited by sdetweil

        @matt216 can u try updating modules/default/calendar/calendarfetcher.js like this
        replace lines 58-84 with this . also added this to the issue

        		try {  /// new code here     // this will be the new line 58 
        
        		fetch(url, { headers: headers, agent: httpsAgent })
        			.then(NodeHelper.checkFetchStatus)
        			.then((response) => response.text())
        			.then((responseData) => {
        				let data = [];
        
        				try {
        					data = ical.parseICS(responseData);
        					Log.debug(`parsed data=${JSON.stringify(data)}`);
        					events = CalendarFetcherUtils.filterEvents(data, {
        						excludedEvents,
        						includePastEvents,
        						maximumEntries,
        						maximumNumberOfDays
        					});
        				} catch (error) {
        					fetchFailedCallback(this, error);
        					scheduleTimer();
        					return;
        				}
        				this.broadcastEvents();
        				scheduleTimer();
        			})
        			.catch((error) => {
        				fetchFailedCallback(this, error);
        				scheduleTimer();
        			});
        		}    // new code here =========
        		catch(error){
                             console.error( "fetch for calendar url" +url + "failed error="+error.code);
                            fetchFailedCallback(this, error);
                            scheduleTimer();
        		}   // end new code ===== 
        

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        M 1 Reply Last reply Reply Quote 0
        • M Offline
          matt216 @sdetweil
          last edited by

          @sdetweil Doesn’t like that - mirror won’t load. Got to pick up my little boy now, so reverted back (mirror loads ok again). Will try again and look at logs.

          S M 2 Replies Last reply Reply Quote 0
          • S Offline
            sdetweil @matt216
            last edited by sdetweil

            @matt216 u are replacing the whole block, right…

            replace lines 58-84 in original with that

            lmk

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            1 Reply Last reply Reply Quote 0
            • M Offline
              matt216 @matt216
              last edited by

              @sdetweil can you tell I’m not a developer…?!

              Ok, I’ve replaced the whole block, then pm2 stop all, cd ~/MagicMirror, npm start…

              Mirror starts but still no new calendar events are showing where I would expect to be. Interestingly I can see that edits to existing events that I’ve made are showing up on the mirror, so there is some communication. Just no new events are being picked up.

              Thanks again,
              Matt

              M S 2 Replies Last reply Reply Quote 0
              • M Offline
                matt216 @matt216
                last edited by

                By existing and new events I mean with reference to the point I added the calendar server to the calendar module. That first initial sync (if that’s the right word) of the .ics file.

                1 Reply Last reply Reply Quote 0
                • S Offline
                  sdetweil @matt216
                  last edited by

                  @matt216 and what do you see in the place where you npm start?

                  should NOT see the timeout error

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  M 1 Reply Last reply Reply Quote 0
                  • M Offline
                    matt216 @sdetweil
                    last edited by

                    @sdetweil I do not see a timeout, no. The most unusual log entry related to the calendar is
                    [04.01.2024 16:39.21.257] [LOG] Use existing calendarfetcher for url: https://my.cal.url

                    That “existing” might imply something…?

                    S 2 Replies Last reply Reply Quote 0
                    • S Offline
                      sdetweil @matt216
                      last edited by sdetweil

                      @matt216 not an error… says ’ we created a fecther() at the start’… and we found it and are reusing it… just informational

                      now… lets turn on more debug

                      in the config.js

                      change

                          logLevel: [
                            "INFO",
                            "LOG",
                            "WARN",
                            "ERROR",
                         //   "DEBUG"
                          ],
                      

                      loglevel like that (just hit enter after the commas and before the ]

                      then add the // debug line
                      then remove the leading //

                      just makes it easier later to turn off debug by adding the // (comment it out)

                      then in MagicMirror folder again do

                      npm start >somefile.txt 2>&1
                      
                      wait til you think it should have updated...
                      
                      then ctrl-q
                      
                      and then look at the somefile.txt or send it to me
                      same user id at gmail 
                      
                      (I added most of the debug output to work on calendar problems) 
                      
                      then u can comment out "DEBUG" again
                      
                      we did change the calendar parser version this release, to fix a couple bugs I added code for, and a big change on the repeating rule handler...

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      M 1 Reply Last reply Reply Quote 0
                      • M Offline
                        matt216 @sdetweil
                        last edited by

                        @sdetweil yikes, 14000 lines of calendar entries included in this one!
                        Any steer on what I’m looking for? Loads of personal info, so I won’t send over if that’s ok (no offence)

                        Matt

                        S 2 Replies Last reply Reply Quote 0
                        • 1
                        • 2
                        • 3
                        • 4
                        • 5
                        • 9
                        • 10
                        • 3 / 10
                        • 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