Navigation

    MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord

    Google calendar refresh rate

    Troubleshooting
    2
    5
    3781
    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
      werdnllac last edited by

      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
        pinsdorf Module Developer last edited by pinsdorf

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

        W 1 Reply Last reply Reply Quote 0
        • W
          werdnllac @pinsdorf last edited by

          @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
            pinsdorf Module Developer last edited by pinsdorf

            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 Reply Quote 0
            • W
              werdnllac @pinsdorf last edited by

              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
              • First post
                Last post
              Enjoying MagicMirror? Please consider a donation!
              MagicMirror created by Michael Teeuw.
              Forum managed by Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
              This forum is using NodeBB as its core | Contributors
              Contact | Privacy Policy