Read the statement by Michael Teeuw here.
MMM-CalendarExt3
-
Hello together,
i have configured 8 calendars in the default calendar module. Three of them are from “i.cal.to” and five are my public iCloudcalendars.The default calendar app is loading them without errors, but MMM-CalendarExt3 has problems to view the iCloud entries.
The mm-error.log shows:
[19.03.2024 21:24.43.184] [ERROR] Calendar Error. Could not fetch calendar: https://p63-caldav.icloud.com/published/2/MTA... TypeError: fetch failed at Object.fetch (node:internal/deps/undici/undici:11576:11) { cause: SocketError: other side closed at TLSSocket.onSocketEnd (node:internal/deps/undici/undici:9790:26) at TLSSocket.emit (node:events:526:35) at endReadableNT (node:internal/streams/readable:1359:12) at process.processTicksAndRejections (node:internal/process/task_queues:82:21) { code: 'UND_ERR_SOCKET', socket: { localAddress: '10.0.0.20', localPort: 37214, remoteAddress: undefined, remotePort: undefined, remoteFamily: undefined, timeout: undefined, bytesWritten: 639, bytesRead: 143898 } } }
while the mm-out.log shows:
[19.03.2024 21:23.35.168] [INFO] Calendar-Fetcher: Broadcasting 5 events from https://p63-caldav.icloud.com/published/2/MTA.... [19.03.2024 21:23.35.332] [INFO] updatenotification: You are using pm2 with MagicMirror [19.03.2024 21:23.35.333] [INFO] Checking git for module: MMM-soccer [19.03.2024 21:23.35.462] [INFO] Checking git for module: MMM-Planetarium [19.03.2024 21:23.35.591] [INFO] Checking git for module: MMM-Globe2 [19.03.2024 21:23.36.450] [INFO] Calendar-Fetcher: Broadcasting 0 events from https://p63-caldav.icloud.com/published/2/MTA.... [19.03.2024 21:23.36.513] [INFO] Checking git for module: MagicMirror [19.03.2024 21:23.36.963] [INFO] Newsfeed-Fetcher: Broadcasting 30 items. [19.03.2024 21:23.37.049] [INFO] Newsfeed-Fetcher: Broadcasting 100 items. [19.03.2024 21:23.37.825] [INFO] Calendar-Fetcher: Broadcasting 7 events from https://p63-caldav.icloud.com/published/2/MTA.... [19.03.2024 21:24.03.308] [INFO] Calendar-Fetcher: Broadcasting 8 events from https://p63-caldav.icloud.com/published/2/MTA.... [19.03.2024 21:24.43.055] [INFO] Calendar-Fetcher: Broadcasting 10 events from https://p29-caldav.icloud.com/published/2/ODA.... [19.03.2024 21:24.43.503] [INFO] Calendar-Fetcher: Broadcasting 1 events from https://i.cal.to/ical/77/.... [19.03.2024 21:24.43.754] [INFO] Calendar-Fetcher: Broadcasting 5 events from https://i.cal.to/ical/3/.... [19.03.2024 21:24.43.781] [INFO] Calendar-Fetcher: Broadcasting 2 events from https://i.cal.to/ical/61/.... [19.03.2024 21:24.44.853] [INFO] Calendar-Fetcher: Broadcasting 0 events from https://p63-caldav.icloud.com/published/2/MTA.... [19.03.2024 21:24.45.665] [INFO] Calendar-Fetcher: Broadcasting 7 events from https://p63-caldav.icloud.com/published/2/MTA.... [19.03.2024 21:25.10.627] [INFO] Calendar-Fetcher: Broadcasting 8 events from https://p63-caldav.icloud.com/published/2/MTA....
I have increased the waitFetch, but it didn’t help.
{ module: "MMM-CalendarExt3", position: "middle_center", waitFetch: 32000, disabled: false, },
Can someone help me?
Max
-
@princemaxwell the error log says problem w the default calendar as ext3 gets it’s events there
-
@sdetweil when i disable the MMM-CalendarExt3 module, the errors are gone.
All calendars are working fine and loading quickly in default calendar module.
-
@princemaxwell
CX3 doesn’t connect or fetch calendar server. That error probably has been caused by default calendar module. -
@princemaxwell
CX3*s do not use nodeJS at all, so they are not related to your error messages. The modules are executed on the browser level, not on the server-side node environment, so they could not affect server-side processes like calendar fetching.
Your error message (UND_ERR_SOCKET
) is caused by theundici
node module; it may be used inside of the default calendar module to connect through HTTP/1.1. That error usually happens when the connection is closed by long waits or prior preemption.
There is a weird thing. As far as I know, the default calendar module depends onnode-ical
, which usesaxios
instead ofundici
. So I wonder why and from where this error message comes.To make things simple clearly;
- Backup your current
config.js
in the safe area. - Create a new
config.js
, and remove all other not-releated modules like MMM-Planetarium, MMM-soccer, … Leave onlyclock
,calendar
andMMM-CalendarExt3
modules. - Begin with one or two calendars, not all the calendars.
- Try to execute MM again, and let’s see what happens.
- After confirmation that a small qty of calendars has no issue, add more calendars.
- After confirmation that there is no issue with the calendars, try adding more modules one by one.
(A possible reason, I guess, is that your modules are racing to use the network/dest-server severely. For example, your calendars look being rescanned every minutes. You may need to rearrange the interval of the schedule.)
- Backup your current
-
@MMRIZE calendar uses built in fetch to get the ics file. we do not have node-ical fetch it for us ( the prior ical lib did not provide fetch)
-
@sdetweil said in MMM-CalendarExt3:
@MMRIZE calendar uses built in fetch to get the ics file. we do not have node-ical fetch it for us ( the prior ical lib did not provide fetch)
If so, this is really weird where the
undici
module is used. -
@MMRIZE undici is the implementation code of fetch
-
@MMRIZE
Thanks for your answer.I cleaned up my config.js and only had following modules in it:
- alert
- updatenotification
- clock
- calendar
- MMM-CalendarExt3
No matter how many calendars I have activated, the default calendar loads all entries quite quickly, although you can notice that the “large” calendars with many entries took a few seconds to load (sometimes up to 20-30 seconds).
Nevertheless, I deleted the fetchInterval (31000) in the default calendar, so the default value of 300000 is now active.
After the default calendar displayed all entries, it took at least another 10 minutes for them to appear in the MMM-CalendarExt3.
Why is this taking so long? They are sent to MMM-CalendarExt3 via “broadcastEvents” or what?
I took a look at the sizes of my calendar:
- Calendar 1: 1,068,804 bytes
- Calendar 2: 697,796 bytes
- Calendar 3: 398,683 bytes
- Calendar 4: 150,176 bytes
- Calendar 5: 73,128 bytes
- Calendar 6: 70,476 bytes
- Calendar 7: 23,940 bytes
- Calendar 8: 17,221 bytes
Calendars 6-8 are displayed relatively quickly in MMM-CalendarExt3, calendar 5 a little later. The others require the previously mentioned 5-10 minutes.
Could it have something to do with size?
-
@princemaxwell can you show the console log of mm with the timestamps for the broadcasts from the default calendar?
be careful as these message now expose the calendar url string…