Read the statement by Michael Teeuw here.
Calendar not loading after update
-
I just did a fresh install of Raspberry Pi OS and Magic Mirror, and moved my modules, config and css. Everything works, except the Calendar module. This is my code.
{ module: 'calendar', header: '', position: 'top_left', config: { maximumEntries: '12', maximumNumberOfDays: '31', maxTitleLength: '57', hidePrivate: true, fade: false, displaySymbol: false, calendars: [ { symbol: 'calendar-check-o ', url: 'URLTOMYPRIVATECALENDAR' } ] } },
It’s just stock at Loading… now. So I tried to redo the code based on the documentation, which unfortunately doesn’t have a complete code snippet example with a calendar URL that I’ve been able to successfully use. I tried based on the sample code to add piece by piece of my old config but it stops at loading everything I try to add something.
Does anybody see anything wrong with my code?
-
@looolz the default confi loads the US holidays… u can edit config/config.js.sample
to see what it looks likeanother test, ON the pi, open the browser (from the top left toolbar) and enter your cal url… it MUST download an ics file (which is just text)
let me know… been mucking with the calendar fetcher/parser now for the last 9 months
also, do you see any error messages in the terminal window where u start MM with npm start
if you use pm2, then pm2 logs --lines=?? (?? is a number, default 15)
will display the same content -
@sdetweil Thanks for the reply!
I did the manual check of visiting the calendar URL directly from the browser on the pi, and it successfully downloaded the .ics file.
I haven’t ever been able to se much errors via my setup, but learning the pm2 logs --lines=15 command from you know was interesting. It actually shows me stuff like this:
0|mm | event={"type":"VEVENT","params":[],"start":"2013-11-21T15:00:00.000Z","datetype":"date-time","end":"2013-11-21T19:45:00.000Z","dtstamp":"2021-03-31T18:39:55.000Z","uid":"E627EC7E-6FA4-4E8A-801C-03D26F093F70","created":"2013-11-20T11:01:17.000Z","description":"","lastmodified":"2013-11-20T11:01:22.000Z","location":"","sequence":"2","status":"CONFIRMED","summary":"Loolz is visting ROFL","transparency":"OPAQUE"} 0|mm | [31.03.2021 20:40.53.545] [DEBUG] start=Thu Nov 21 2013 16:00:00 GMT+0100 (sentraleuropeisk normaltid) end=Thu Nov 21 2013 20:45:00 GMT+0100 (sentraleuropeisk normaltid) 0|mm | [31.03.2021 20:40.53.548] [DEBUG] have entries 0|mm | [31.03.2021 20:40.53.551] [DEBUG]
- It’s an event in the calendar from back in 2013.
- There are multiple events like this in the log file, (if I do pm2 logs --lines=100 I get a lot more.
- And I see a lot of information is passed in Norwegian. So I redid the setup wizard on the Pi and choose to ‘Use English langauge’. Restarted hoping it would work, but it didn’t.
Keeping the rest the same, I tried replacing the calendar URL with another calendar URL I had, and I was able to get it to work. So it seems that my calendar could be the problem. But it (still) works on my previous Magic Mirror setup, just not the new one that it freshly installed.
-
@looolz i don’t understand the new url doesn’t work… but downloads the ics
looks like u have debug turned on in the MM config.js
also have language set to not english in the MM config// change language language: "en", // remove ,"DEBUG" logLevel: ["INFO", "LOG", "WARN", "ERROR","DEBUG"],
then restart MM…
the calendar code doesn’t know anything other than what is in the ics file…
i would be willing to look at it, send the ics to my mail, same userid at gmail
-
@sdetweil said in Calendar not loading after update:
// change language
language: “en”,
// remove ,“DEBUG”
logLevel: [“INFO”, “LOG”, “WARN”, “ERROR”,“DEBUG”],Thanks again. I tuned down DEBUG, and the log file made it easier to spot this:
| Create new calendar fetcher for url: https://calendar.google.com/calendar/ical/SECRETSTRING/basic.ics - Interval: 300000 0|mm | [31.03.2021 21:11.19.188] [LOG] 0|mm | received: SECRETSTRINGn0= 0|mm | [31.03.2021 21:11.22.778] [LOG] 0|mm | MMM-Ring at (31.3.2021, 21:11:22): Refresh Token Updated 0|mm | [31.03.2021 21:11.36.837] [INFO] 0|mm | Calendar-Fetcher: Broadcasting 12 events.
Anything useful to get out of that?
-
And there… without me doing anything. It suddenly is showing events in Magic Mirror! Could it be that the calendar is just to darn big, and that it takes 10-15 minutes for it to process it?
-
@looolz could be… and with debug on lots longer
-
It works now! And it seems to be due to debugging being turned off. Thank you so much for your help!