Read the statement by Michael Teeuw here.
Calendar not updating
-
@matt216 cant see any errors… well not with the grep search you do
can u do this
pm2 stop all cd ~/MagicMirror npm start >somefile.txt 2>&1wait, til UI up with no issues, or no updates
ctrl-q on MM screen to end
edit the somefile.txt
loo at messages after “Starting server on port”
-
pi@magicmirror:~/MagicMirror $ cat somefile.txt | grep calendar [02.01.2024 14:56.40.510] [LOG] Module helper loaded: calendar [02.01.2024 14:56.42.557] [LOG] Connecting socket for: calendar [02.01.2024 14:56.42.558] [LOG] Starting node helper for: calendar [02.01.2024 14:56.46.986] [LOG] Create new calendarfetcher for url: https://my.cal.url - Interval: 120000 [02.01.2024 14:57.13.099] [INFO] Calendar-Fetcher: Broadcasting 379 events from https://my.cal.url. [02.01.2024 14:59.23.139] [ERROR] Calendar Error. Could not fetch calendar: https://my.cal.url TypeError: fetch failed -
[02.01.2024 14:59.23.139] [ERROR] Calendar Error. Could not fetch calendar: https://my.cal.url TypeError: fetch failed at Object.fetch (node:internal/deps/undici/undici:11576:11) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { cause: ConnectTimeoutError: Connect Timeout Error at onConnectTimeout (node:internal/deps/undici/undici:8522:28) at node:internal/deps/undici/undici:8480:50 at Immediate._onImmediate (node:internal/deps/undici/undici:8511:13) at process.processImmediate (node:internal/timers:476:21) { code: 'UND_ERR_CONNECT_TIMEOUT' } }Timeout…
Let me know if the full somefile.txt by email is still wanted. -
@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…?
-
@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... -
@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
-
@matt216 well … just let you know… I don’t LOOK at any of that info… only the cal entry dates and processing… I only match by title… and I NEVER share…
(we just added the cal url to output as some were confused about which calendar was sending what entries… more debug info )start of the content
[04.01.2024 11:14.45.590] [DEBUG] There are 5 calendar entries. [04.01.2024 11:14.45.591] [DEBUG] Processing entry... [04.01.2024 11:14.45.594] [DEBUG] Event:then thru the next Event: is all one event, with its recurring events if any
I’m interested in the events that you says don’t show up…
one thing you can do is use the configured url to get the ics file
to make sure the calendar provider is providing the entryif its in the ics , but not in the output, then this is a new parser problem… and I want to see the ics entry to test. all can be sent thru mail or private chat (altho chat posts are limited in size)
curl -sL thaturl >someicsfile.txtics file is just text
can u find that entry
can u find it in the debug output -
@matt216 also, could you check
ip addrand disable the IP v6 if present.
in desktop, menu , preferences, pi config , network settings. may have to reboot -
@matt216 also another user having trouble… his url is a shared cal , the other person owns it, but has given the secret url to the spouse for MM cal usage
are any of the cals shared like this?
-
@sdetweil Hi Sam.
A newly created event is showing up in the debug logs, but not on the mirror display:[05.01.2024 13:22.18.330] [DEBUG] Event: {"type":"VEVENT","params":[],"created":"2024-01-05T13:20:05.000Z","end":"2024-01-06T10:00:00.000Z","dtstamp":"2024-01-05T13:20:06.000Z","start":"2024-01-06T09:00:00.000Z","datetype":"date-time","lastmodified":"2024-01-05T13:20:05.000Z","sequence":"0","summary":"test1234567","transparency":"OPAQUE","uid":"60E1B9F2-66C4-46ED-B98E-AD1A36FAB1EF","url":{"params":{"VALUE":"URI"},"val":""},"APPLE-CREATOR-IDENTITY":"com.apple.mobilecal","APPLE-CREATOR-TEAM-IDENTITY":"0000000000"} [05.01.2024 13:22.18.330] [DEBUG] start: Sat Jan 06 2024 09:00:00 GMT+0000 (Greenwich Mean Time) [05.01.2024 13:22.18.331] [DEBUG] end:: Sat Jan 06 2024 10:00:00 GMT+0000 (Greenwich Mean Time) [05.01.2024 13:22.18.331] [DEBUG] duration: 3600000 [05.01.2024 13:22.18.331] [DEBUG] title: test1234567 [05.01.2024 13:22.18.331] [DEBUG] initial tz=Europe/London [05.01.2024 13:22.18.332] [DEBUG] corrected tz=Europe/London [05.01.2024 13:22.18.332] [DEBUG] start date/time=Sat Jan 06 2024 09:00:00 GMT+0000 (Greenwich Mean Time) [05.01.2024 13:22.18.332] [DEBUG] start offset=0 [05.01.2024 13:22.18.333] [DEBUG] start date/time w tz =Sat Jan 06 2024 09:00:00 GMT+0000 (Greenwich Mean Time) [05.01.2024 13:22.18.333] [DEBUG] event date=Sat Jan 06 2024 09:00:00 GMT+0000 (Greenwich Mean Time) [05.01.2024 13:22.18.333] [DEBUG] event offset=0 hour=9 event date=Sat Jan 06 2024 09:00:00 GMT+0000 (Greenwich Mean Time) [05.01.2024 13:22.18.333] [DEBUG] adjustHours=0 [05.01.2024 13:22.18.334] [DEBUG] Processing entry... -
@sdetweil done
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