• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

Large google calendar not loading

Scheduled Pinned Locked Moved Unsolved Troubleshooting
9 Posts 2 Posters 235 Views 2 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    mischag
    last edited by sdetweil Oct 21, 2024, 12:00 PM Oct 21, 2024, 11:38 AM

    Amazing forum…
    Trying to get my head around how to get my wife’s google calendar to load into the calendar ext3 section.
    Now I believe that it’s struggling because of the fact that this calendar has LOTS of entries, on every day, and it’s just not loading them into the calendar file fast enough. This is the first time it’s being added, so it’s probably pulling entries from years ago??
    When I load MM, it loads fine, but the log states
    [2024-10-21 21:26:03.827] [INFO] Calendar-Fetcher: Broadcasting 1 events from http://p112-caldav.icloud.com/published/2/...UBbA.
    [2024-10-21 21:26:11.915] [INFO] Calendar-Fetcher: Broadcasting 316 events from https://calendar.google.com/calendar/ical/.../public/basic.ics.

    How long should I expect it to take for it to load the entries into the calendar module? I currently have the following in the config file…

    module: "MMM-CalendarExt3",
    		position: "bottom_bar",
    		title: "Grummitt Family",
    		waitFetch: 10000,
    		refreshInterval: 900000,
    		config: {
    			mode: "month",
    			instanceId: "basicCalendar",
    			locale: 'en',
    			timeFormat:"h:mm a",
    			maxEventLines: 5,
    			firstDayOfWeek: 1,
    			calendarSet: ['Google']
      }
    },
    {
    		module: "calendar",
    		// position: "bottom_bar",
    		broadcastPastEvents: false,
    		config: {
    				calendars: [
    			{
    			url: "webcal://p112-caldav.icloud.com/published/2/MT...UBbA",
    			name: "iPhone",
    			color: "green"
    			}
    		]
    	}
    },
    		{
    		module: "calendar",
    		// position: "bottom_bar",
    		broadcastPastEvents: false,
    		config: {
    				calendars: [
    			{
    			url: "https://calendar.google.com/calendar/ical/.../basic.ics",
    			name: "Google",
    			color: "red"
    			}
    		]
    	}
    

    Any advice would be appreciated, I got this to display the wife’s calendar more than mine and I can get mine to show but not hers…
    Thanks

    S 1 Reply Last reply Oct 21, 2024, 11:55 AM Reply Quote 0
    • S Offline
      sdetweil @mischag
      last edited by sdetweil Oct 21, 2024, 11:58 AM Oct 21, 2024, 11:55 AM

      @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 pm2

      pm2 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

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      M 1 Reply Last reply Oct 21, 2024, 12:20 PM Reply Quote 0
      • M Offline
        mischag @sdetweil
        last edited by Oct 21, 2024, 12:20 PM

        @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

        S 2 Replies Last reply Oct 21, 2024, 12:39 PM Reply Quote 0
        • S Offline
          sdetweil @mischag
          last edited by Oct 21, 2024, 12:39 PM

          @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 time

          one 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…

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          1 Reply Last reply Reply Quote 0
          • S Offline
            sdetweil @mischag
            last edited by Oct 21, 2024, 12:46 PM

            @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 here

            the default cal only has color per url

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            M 1 Reply Last reply Oct 21, 2024, 2:33 PM Reply Quote 0
            • M Offline
              mischag @sdetweil
              last edited by sdetweil Oct 21, 2024, 2:45 PM Oct 21, 2024, 2:33 PM

              @sdetweil

              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'}
              						]
              			}
              		]
              	}
              
              S 1 Reply Last reply Oct 21, 2024, 2:43 PM Reply Quote 0
              • S Offline
                sdetweil @mischag
                last edited by sdetweil Oct 21, 2024, 2:45 PM Oct 21, 2024, 2:43 PM

                @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 wrapper

                to do

                paste text into post editor
                blank line above and below

                select the text you just pasted
                hit the button </>

                above the editor box

                this keeps indentation and also makes a scrollable box for large content

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                M 1 Reply Last reply Oct 22, 2024, 10:17 AM Reply Quote 0
                • M Offline
                  mischag @sdetweil
                  last edited by Oct 22, 2024, 10:17 AM

                  @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!!

                  S 1 Reply Last reply Oct 22, 2024, 11:18 AM Reply Quote 0
                  • S Offline
                    sdetweil @mischag
                    last edited by sdetweil Oct 24, 2024, 2:46 PM Oct 22, 2024, 11:18 AM

                    @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 module

                    so 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;
                               },
                           }
                    }
                    

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    1 Reply Last reply Reply Quote 0
                    • 1 / 1
                    1 / 1
                    • First post
                      2/9
                      Last post
                    Enjoying MagicMirror? Please consider a donation!
                    MagicMirror created by Michael Teeuw.
                    Forum managed by Sam, technical setup by Karsten.
                    This forum is using NodeBB as its core | Contributors
                    Contact | Privacy Policy