Read the statement by Michael Teeuw here.
Large google calendar not loading
-
@mischag lets add debug logging and see if we can catch whats going on
add
,"DEBUG"
to the logLevel property list in config.js
the stop MagicMirror
if using pm2pm2 stop all
then
cd ~/MagicMirror npm start >somefile.txt 2>&1
wait a couple minutes
use keyboard ctrl-q to stop MagicMirror
use some editor tool to examine somefile.txt
nano somefile.txt
it is broadcasting 316 events
if you uncomment the position for the default cal,
does it display the correct entries -
@sdetweil
thanks for the suggestion.
I believe I’ve found the issue, was just struggling with speed or time or both, as waited 10mins after loading magic mirror and all entries come up now.I did disable pastbroadcast events to try and help as well, it does make the calendar look boring though as the past events aren’t shown…
Need to tweak it with colours too, as my wife uses multiple different colours to show different entries, but they’re all just showing as one colour at the moment, not sure how I can do that…
Thanks -
@mischag large calendars are always a problem… we fetch and get EVERYTHING
and we don’t parse it, call a lib which parses EVERYTHING
then we wade thru it, one entry at a timeone could create a background process that reads the cal and filters out up to last month
and create a NEW ics file that the calendar reads… -
@mischag for color/etc
you can use the ext3 filter to examine text in the event topic and set the color to be used
try to match her choice of color herethe default cal only has color per url
-
so, I was wondering if I added customEvents information to the calendar modules that CalendarExt3 is pulling info from, would it pull that info as well?
So far I’ve done the following but it doesn’t seem to be changing anything in the CalendarExt3 on the mirror side when loading the events.{ module: "calendar", // position: "bottom_bar", broadcastPastEvents: true, config: { calendars: [ { url: "https://calendar.google.com/.../basic.ics", name: "Google", color: "red", pastDaysCount: 7, fetchInterval: 75000, customEvents: [ {keyword: 'Birthday', symbol: 'fa-solid fa-cake-candles', color: 'Gold'}, {keyword: 'Piano', symbol: 'fa-solid fa-music', color: 'Purple'}, {keyword: 'Barbies', symbol: 'fa-regular fa-futbol', color: 'Pink'}, {keyword: 'Legomen', symbol: 'fa-regular fa-futbol', color: 'Yellow'}, {keyword: 'Bandits', symbol: 'fa-regular fa-futbol', color: 'Blue'} ] } ] }
-
@mischag no… those are added dynamically in the UI and NOT in the data
you need to move the customEvents to an Ext3 eventFilter
oh, one more thing
forum post
all config, or logs data should be in a code block wrapperto do
paste text into post editor
blank line above and belowselect the text you just pasted
hit the button </>above the editor box
this keeps indentation and also makes a scrollable box for large content
-
@sdetweil
thank you for this. Sorry for putting it in wrong…
Just wondering how you mean to put the customEvents into an Ext3 eventFilter??
I’ve found the code to use, but I’m not sure where I put it?
Do I put it in the config file? and if so, is it before the config section of the Ext3 section, or within the config brackets of the Ext3 section?
I have tried adding it to before teh calendarSet: line, but then my calendars don’t load…
Then I tried adding it to after the calendarSet: line, but still nothing, not even the calendars open then?
I’ve read all about how the Handling Events section in the Ext3 instructions, but not sure where to put the customEvents code or eventTransformer code into the eventFilter section?
Any help is much appreciated thank you!! -
@mischag ALL config for ALL modules goes in config.js.
all the stuff in a module config BEFORE the config:{} section is info for the MagicMirror runtime. everything inside the config:{} section belongs to the moduleso in the MMM-CalendarExt3 module config section
maybe you want a transformer as you want to change it
{ module:'MMM-CalendarExt3', position: xxx , config:{ mode:'month', eventTransformer: (event) => { if(event.title.includes('Mary') event.color='red' // always return the event return event; }, } }