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

Google calendar refresh rate

Scheduled Pinned Locked Moved Troubleshooting
5 Posts 2 Posters 5.8k 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.
  • W Offline
    werdnllac
    last edited by Feb 26, 2018, 10:23 AM

    Hi guys, I had successfully loaded the main core MagicMirror(MM) by MichMich, and begin playing around with it.

    I noticed when I input a new appointment in my Google Calendar via my Smart phone, the refresh on MM is slow and could hardly appear on the MM.

    But if I input the appointment via my google web login, the update can be as fast as 1 min.

    Question:

    1. Why does my smart phone took so long to update my Google calendar?
    2. Where can I change the refresh rate in MM?

    Thanks

    1 Reply Last reply Reply Quote 0
    • P Offline
      pinsdorf Module Developer
      last edited by pinsdorf Feb 26, 2018, 1:53 PM Feb 26, 2018, 11:27 AM

      The calendar module has a config setting fetchInterval. Please see calendar documentation for details.

      W 1 Reply Last reply Feb 26, 2018, 1:45 PM Reply Quote 0
      • W Offline
        werdnllac @pinsdorf
        last edited by Feb 26, 2018, 1:45 PM

        @pindorf, Thanks for the documentation.

        According to the doc “To use this module, add it to the modules array in the config/config.js file”, may I know the module should be added under which section?

        Appreciate your guidance.

        1 Reply Last reply Reply Quote 0
        • P Offline
          pinsdorf Module Developer
          last edited by pinsdorf Feb 26, 2018, 2:17 PM Feb 26, 2018, 2:16 PM

          Well, if you have created your config.js from the config.js.sample then you should already have a configuration sequence like below.

          modules: [
          ...
          {
              module: "clock",
              position: "top_left"
          },
          {
              module: "calendar",
              header: "US Holidays",
              position: "top_left",
              config: {
                  calendars: [ {
          	    symbol: "calendar-check-o ",
                      url: "webcal://www.calendarlabs.com/templates/ical/US-Holidays.ics"
                  } ]
              }
          },
          ...
          ]
          

          You have to put the fetchInterval setting into the config setting section of the calendar module. The result would look like this (just typing the calendar module’s part for simplicity):

          {
              module: "calendar",
              header: "US Holidays",
              position: "top_left",
              config: {
                  fetchInterval: 1000 * 60 * 1,
                  calendars: [ {
          	    symbol: "calendar-check-o ",
                      url: "webcal://www.calendarlabs.com/templates/ical/US-Holidays.ics"
                  } ]
              }
          },
          

          The value 60 * 1000 * 1 retrieves the calendar from the source (see parameter url) every minute. Please note that the interval time value is given in milliseconds according to the documentation. When you pick a value make sure that your fetching is not too aggressiv. Too frequent syncs take bandwidth on your network, increases CPU load on Raspberry Pi, and there might be limitation enforced by the calendar provider.

          W 1 Reply Last reply Feb 26, 2018, 3:17 PM Reply Quote 0
          • W Offline
            werdnllac @pinsdorf
            last edited by Feb 26, 2018, 3:17 PM

            Thank you @pinsdorf , I have got the fetchInterval value changed.

            You are really a great help.

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            1 / 1
            • First post
              2/5
              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