Read the statement by Michael Teeuw here.
Calendar not updating
-
@matt216 no… not needed…
-
@sdetweil If I enter my calendar URL in to a web browser I can download the ics file fine, FYI
-
@matt216 yes, it was a momentary delay, which caused the timeout… trying to see why the catch() block didn’t
-
@matt216 can u try updating modules/default/calendar/calendarfetcher.js like this
replace lines 58-84 with this . also added this to the issuetry { /// 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 =====
-
@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.
-
-
@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 -
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.
-
@matt216 and what do you see in the place where you npm start?
should NOT see the timeout error
-
@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.urlThat “existing” might imply something…?