• 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.

Calendar appears to be fetching the last calendar in the list multiple times.

Scheduled Pinned Locked Moved Troubleshooting
8 Posts 2 Posters 472 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.
  • V Offline
    vvrangler
    last edited by sdetweil Oct 11, 2020, 4:44 PM Oct 10, 2020, 10:12 PM

    Hello,

    I have 4 calendars configured, under the default MM2 calendar module

    		{
    			module: 'calendar',
    			header: 'Calendar',
    			position: 'top_left',
    			config: {
    				maxTitleLength: 50,
    				maximumEntries: 20,
    				wrapEvents: true,
    				fadePoint: 0.8,
    				colored: true,
    				dateFormat: 'ddd MMM Do hh:mma',
    				dateEndFormat: 'ddd MMM Do hh:mma',
    				timeFormat: 'absolute',
    				useRelativeDates: true,
    				columns: false,
    				urgency: 0,
    				titleReplace: {
    					'USA: ': ''
    					},
    				calendars: [
    						{
    							symbol: 'trash-o',
    							color: '#CCCC00',
    							showLocation: false,
    							url: 'webcal://recollect.a.ssl.fastly.net/api/places/**masked**/events.en-US.ics'
    						},
    						{
    							symbol: 'calendar',
    							color: '#9CECC4',
    							showLocation: true,
    							url: 'webcal://p64-calendars.icloud.com/published/2/**masked**'
    						},
    						{
    							symbol: 'calendar-o',
    							color: '#A2D7FF',
    							showLocation: false,
    							url: 'webcal://ical.mac.com/ical/US32Holidays.ics'
    						},
    						{
    							symbol: '',
    							color: '#FF6600',
    							showLocation: false,
    							url: 'webcal://p42-calendars.icloud.com/published/2/**masked**--sxGM'
    						},
    					],
    				excludedEvents: []
    			}
    		},
    

    And when the calendars are refreshed it appears that whatever the last one in the config list is gets loaded an extra time for each one of the other calendars configured is this normal/expected behavior?

    From: /home/pi/.pm2/logs/MagicMirror-out.log

    Initial Launch Fetched once for each calendar

    [2020-10-10 14:33:00.632] [LOG]    Launching application.
    [2020-10-10 14:33:04.150] [LOG]    Create new calendar fetcher for url: http://recollect.a.ssl.fastly.net/api/places/**masked**/events.en-US.ics - Interval: 300000
    [2020-10-10 14:33:04.179] [LOG]    Create new calendar fetcher for url: http://p64-calendars.icloud.com/published/2/**masked** - Interval: 300000
    [2020-10-10 14:33:04.190] [LOG]    Create new calendar fetcher for url: http://ical.mac.com/ical/US32Holidays.ics - Interval: 300000
    [2020-10-10 14:33:04.199] [LOG]    Create new calendar fetcher for url: http://p42-calendars.icloud.com/published/2/**masked**--sxGM - Interval: 300000
    [2020-10-10 14:33:05.429] [INFO]   Calendar-Fetcher: Broadcasting 7 events.
    [2020-10-10 14:33:06.410] [INFO]   Calendar-Fetcher: Broadcasting 1 events.
    [2020-10-10 14:33:06.974] [INFO]   Calendar-Fetcher: Broadcasting 118 events.
    

    Subsequent Refresh #1

    [2020-10-10 14:38:03.943] [LOG]    Use existing calendar fetcher for url: http://p42-calendars.icloud.com/published/2/**masked**--sxGM
    [2020-10-10 14:38:03.944] [INFO]   Calendar-Fetcher: Broadcasting 1 events.
    [2020-10-10 14:38:04.598] [INFO]   Calendar-Fetcher: Broadcasting 1 events.
    [2020-10-10 14:38:04.940] [LOG]    Use existing calendar fetcher for url: http://p42-calendars.icloud.com/published/2/**masked**--sxGM
    [2020-10-10 14:38:04.941] [INFO]   Calendar-Fetcher: Broadcasting 1 events.
    [2020-10-10 14:38:04.949] [LOG]    Use existing calendar fetcher for url: http://p42-calendars.icloud.com/published/2/**masked**--sxGM
    [2020-10-10 14:38:04.949] [INFO]   Calendar-Fetcher: Broadcasting 1 events.
    [2020-10-10 14:38:04.956] [LOG]    Use existing calendar fetcher for url: http://p42-calendars.icloud.com/published/2/**masked**--sxGM
    [2020-10-10 14:38:04.956] [INFO]   Calendar-Fetcher: Broadcasting 1 events.
    [2020-10-10 14:38:05.160] [INFO]   Calendar-Fetcher: Broadcasting 52 events.
    [2020-10-10 14:38:05.479] [INFO]   Calendar-Fetcher: Broadcasting 1 events.
    [2020-10-10 14:38:05.665] [INFO]   Calendar-Fetcher: Broadcasting 1 events.
    [2020-10-10 14:38:05.825] [INFO]   Calendar-Fetcher: Broadcasting 1 events.
    [2020-10-10 14:38:06.147] [INFO]   Calendar-Fetcher: Broadcasting 7 events.
    [2020-10-10 14:38:07.654] [INFO]   Calendar-Fetcher: Broadcasting 118 events.
    

    Subsequent Refresh #2

    [2020-10-10 14:43:03.947] [LOG]    Use existing calendar fetcher for url: http://p42-calendars.icloud.com/published/2/**masked**--sxGM
    [2020-10-10 14:43:03.948] [INFO]   Calendar-Fetcher: Broadcasting 1 events.
    [2020-10-10 14:43:04.670] [INFO]   Calendar-Fetcher: Broadcasting 1 events.
    [2020-10-10 14:43:05.140] [LOG]    Use existing calendar fetcher for url: http://p42-calendars.icloud.com/published/2/**masked**--sxGM
    [2020-10-10 14:43:05.144] [INFO]   Calendar-Fetcher: Broadcasting 1 events.
    [2020-10-10 14:43:05.156] [LOG]    Use existing calendar fetcher for url: http://p42-calendars.icloud.com/published/2/**masked**--sxGM
    [2020-10-10 14:43:05.159] [INFO]   Calendar-Fetcher: Broadcasting 1 events.
    [2020-10-10 14:43:05.180] [LOG]    Use existing calendar fetcher for url: http://p42-calendars.icloud.com/published/2/**masked**--sxGM
    [2020-10-10 14:43:05.183] [INFO]   Calendar-Fetcher: Broadcasting 1 events.
    [2020-10-10 14:43:05.358] [INFO]   Calendar-Fetcher: Broadcasting 52 events.
    [2020-10-10 14:43:05.949] [INFO]   Calendar-Fetcher: Broadcasting 1 events.
    [2020-10-10 14:43:06.133] [INFO]   Calendar-Fetcher: Broadcasting 1 events.
    [2020-10-10 14:43:06.385] [INFO]   Calendar-Fetcher: Broadcasting 1 events.
    [2020-10-10 14:43:06.751] [INFO]   Calendar-Fetcher: Broadcasting 7 events.
    [2020-10-10 14:43:08.475] [INFO]   Calendar-Fetcher: Broadcasting 118 events.
    

    Subsequent Refresh #3

    [2020-10-10 14:48:03.944] [LOG]    Use existing calendar fetcher for url: http://p42-calendars.icloud.com/published/2/**masked**--sxGM
    [2020-10-10 14:48:03.947] [INFO]   Calendar-Fetcher: Broadcasting 1 events.
    [2020-10-10 14:48:04.522] [INFO]   Calendar-Fetcher: Broadcasting 1 events.
    [2020-10-10 14:48:04.943] [LOG]    Use existing calendar fetcher for url: http://p42-calendars.icloud.com/published/2/**masked**--sxGM
    [2020-10-10 14:48:04.943] [INFO]   Calendar-Fetcher: Broadcasting 1 events.
    [2020-10-10 14:48:05.139] [LOG]    Use existing calendar fetcher for url: http://p42-calendars.icloud.com/published/2/**masked**--sxGM
    [2020-10-10 14:48:05.139] [INFO]   Calendar-Fetcher: Broadcasting 1 events.
    [2020-10-10 14:48:05.145] [LOG]    Use existing calendar fetcher for url: http://p42-calendars.icloud.com/published/2/**masked**--sxGM
    [2020-10-10 14:48:05.145] [INFO]   Calendar-Fetcher: Broadcasting 1 events.
    [2020-10-10 14:48:05.609] [INFO]   Calendar-Fetcher: Broadcasting 1 events.
    [2020-10-10 14:48:05.632] [INFO]   Calendar-Fetcher: Broadcasting 52 events.
    [2020-10-10 14:48:05.838] [INFO]   Calendar-Fetcher: Broadcasting 1 events.
    [2020-10-10 14:48:06.036] [INFO]   Calendar-Fetcher: Broadcasting 1 events.
    [2020-10-10 14:48:07.175] [INFO]   Calendar-Fetcher: Broadcasting 7 events.
    [2020-10-10 14:48:09.157] [INFO]   Calendar-Fetcher: Broadcasting 118 events.
    

    Thank you for any insights you might offer.
    Rick

    S 2 Replies Last reply Oct 11, 2020, 4:45 PM Reply Quote 0
    • S Away
      sdetweil @vvrangler
      last edited by Oct 11, 2020, 4:45 PM

      @vvrangler but the events numbers match

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      S V 2 Replies Last reply Oct 11, 2020, 5:41 PM Reply Quote 0
      • S Away
        sdetweil @sdetweil
        last edited by sdetweil Oct 12, 2020, 3:47 AM Oct 11, 2020, 5:41 PM

        @sdetweil looks like a timing bug… will submit a fix

        https://github.com/MichMich/MagicMirror/issues/2160
        fix
        https://github.com/MichMich/MagicMirror/pull/2162

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 0
        • S Away
          sdetweil @vvrangler
          last edited by sdetweil Oct 13, 2020, 8:35 PM Oct 13, 2020, 1:48 PM

          @vvrangler the fix i proposed has been accepted and is part of the develop branch, if you would like to use it

          to get there

          if you did manual install

          cd ~/MagicMirror
          git checkout develop
          git pull
          

          restart MagicMirror as normal

          if you used my install script

          cd ~/MagicMirror
          git fetch origin develop:develop
          git checkout develop
          

          restart MagicMirror as normal

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          1 Reply Last reply Reply Quote 0
          • V Offline
            vvrangler @sdetweil
            last edited by Oct 16, 2020, 10:18 PM

            @sdetweil Yes, the number of events look to be good, and I’m not really seeing any issues because of this, it’s just something that I noticed in the logs.

            S 1 Reply Last reply Oct 16, 2020, 10:21 PM Reply Quote 0
            • S Away
              sdetweil @vvrangler
              last edited by Oct 16, 2020, 10:21 PM

              @vvrangler yeh, it seems to luck out currently

              the top code starts the fetcher and a starts a timer for each calendar entry
              the fetcher ALSO starts a timer, so if its never called again, it still returns a refreshed list

              I changed it so the top code starts the fetcher for each calendar entry
              and let the fetcher handle its configured timer cycle

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              V 1 Reply Last reply Oct 16, 2020, 10:41 PM Reply Quote 0
              • V Offline
                vvrangler @sdetweil
                last edited by vvrangler Oct 16, 2020, 10:43 PM Oct 16, 2020, 10:41 PM

                @sdetweil said in Calendar appears to be fetching the last calendar in the list multiple times.:

                @vvrangler yeh, it seems to luck out currently

                the top code starts the fetcher and a starts a timer for each calendar entry
                the fetcher ALSO starts a timer, so if its never called again, it still returns a refreshed list

                I changed it so the top code starts the fetcher for each calendar entry
                and let the fetcher handle its configured timer cycle

                The change definitely fixed the issue and everything looks good now during the subsequent polls, thank you again.

                I also have a couple of other calendar related issues that I’ve seen in the log, would it be best if I closed this topic and post a new one?

                S 1 Reply Last reply Oct 16, 2020, 10:43 PM Reply Quote 0
                • S Away
                  sdetweil @vvrangler
                  last edited by Oct 16, 2020, 10:43 PM

                  @vvrangler said in Calendar appears to be fetching the last calendar in the list multiple times.:

                  I also have a cope of other calendar related issue that I’ve seen in the log, would it be best if I close this topic and posted a new one?

                  yes please

                  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
                    1/8
                    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