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 483 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.
    • S Offline
      sdetweil @mischag
      last edited by

      @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

        @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 Reply Quote 0
        • M Offline
          mischag @sdetweil
          last edited by sdetweil

          @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 Reply Quote 0
          • S Offline
            sdetweil @mischag
            last edited by sdetweil

            @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 Reply Quote 0
            • M Offline
              mischag @sdetweil
              last edited by

              @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 Reply Quote 0
              • S Offline
                sdetweil @mischag
                last edited by sdetweil

                @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
                • First post
                  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