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

MMM-CalendarExt

Scheduled Pinned Locked Moved Productivity
198 Posts 45 Posters 178.9k Views 45 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.
  • P Offline
    Phil_T
    last edited by Nov 29, 2017, 5:08 PM

    Wonderful, everyting works now. Thanks a lot!

    1 Reply Last reply Reply Quote 0
    • H Offline
      helmi
      last edited by Dec 19, 2017, 8:09 AM

      MMM-CalendarExt not updating calendar events.**
      I have configured two calendar views: “daily” and “upcoming”. I have set the redrawInterval to minimum: 60000 ms. I have two calendars: Private Google Calendar and local ics calendar file. When I update one or another of my calendars, my calendars don’t update at all. Updates happen only when I restart MMM from the beginning. For testing purposes I have also the “default” calendar in my configuration and it updates normally. For testing purposes I have added command 'self.sendSocketNotification(‘RESET_CALENDARS’) to the MMM-CalendarExt.js code inside the redrawTimer function. This dirty patch resets the calendars every 60 seconds, but I don’t think this is the right way to solve my problem. Please help.

      ? 1 Reply Last reply Dec 19, 2017, 8:26 AM Reply Quote 0
      • ? Offline
        A Former User @helmi
        last edited by Dec 19, 2017, 8:26 AM

        @helmi
        Well, I tested and found nothing problem.
        So, I suspect there might be some errors in front-electron views. Front-view error(from any module) could cause interfering other modules working. You can test by npm start dev.

        H 2 Replies Last reply Dec 19, 2017, 8:31 AM Reply Quote 0
        • H Offline
          helmi @Guest
          last edited by Dec 19, 2017, 8:31 AM

          @Sean I have been using the ‘npm start dev’ and it shows no errors. From the console log I can see that the timer triggers as expected. From the Calendar.js log (terminal view) I can see that the calendars fetching happens only when I start MMM from the beginning.

          1 Reply Last reply Reply Quote 0
          • H Offline
            helmi @Guest
            last edited by Dec 19, 2017, 9:10 AM

            @Sean FYI: I have removed all other modules, only MMM-CalendarExt existing. I have also removed local calendar file, only Google Calendar URL existing. I have done shutdown and restart (both Rpi and MMM) several times. Problem still exists. For me looks like problem is where the calendars fetching should trigger. They happen only once when I start MMM from the beginning.

            ? 1 Reply Last reply Dec 19, 2017, 9:15 AM Reply Quote 0
            • ? Offline
              A Former User @helmi
              last edited by Dec 19, 2017, 9:15 AM

              @helmi
              Hmmmm… weird.

              Anyway, Calendar fetching interval([calendar].interval) is different with front-view redrawing(system.redrawInterval). There is some possibility of you’ve been confusing.

              H 1 Reply Last reply Dec 19, 2017, 9:39 AM Reply Quote 0
              • H Offline
                helmi @Guest
                last edited by Dec 19, 2017, 9:39 AM

                @Sean Ok - So does that mean that the redrawInterval parameter (my setting 60000) has nothing to do with Calendar fetching interval? If so, could you please give me some testing procedure in order to test those parts of the code where the fetching interval is working (or for me: not working)? I have some coding experience, but js is not my best knowledge.

                ? 1 Reply Last reply Dec 19, 2017, 10:04 AM Reply Quote 0
                • ? Offline
                  A Former User @helmi
                  last edited by A Former User Dec 19, 2017, 10:06 AM Dec 19, 2017, 10:04 AM

                  @helmi

                  system.redrawInterval is used for refreshing calendar view. It is set to 30 minutes by default. It doesn’t affect calendar fetching. With already fetched data, module redraws views per this interval value.

                  system: {
                    show: ['upcoming', 'daily'],
                    redrawInterval: 30*60*1000, //minimum 60000
                  },
                  

                  [calendar].interval is used for reading iCal file and fetching. If you set this value to one hour, the calendar will be re-parsed per one hour. But, if there is no changed event or new event, the module doesn’t load newly-parsed-but-same data and use previous data already loaded.

                  The process is like this;

                  1. node_helper.js reads calendars per interval time.
                  2. it fetches calendars and compares them with previously fetched data.
                  3. If nothing changed, nothing happens.
                  4. If something changed, newly fetched data will be sent to the module.
                  5. Module loads fetched events data on the memory.
                  6. Every redrawInterval time, module redraw views with loaded events data.
                  H 2 Replies Last reply Dec 19, 2017, 11:46 AM Reply Quote 0
                  • H Offline
                    helmi @Guest
                    last edited by Dec 19, 2017, 11:46 AM

                    @Sean Thank you for the clarifying information. Apparently I was expecting the calendars fetching to happen by system.redrawInterval, which was set at one minute (60000 ms). Now I waited for 30 minutes and fetching happened and events were updated as I expected. No problem so far!
                    Seems to me that the [calendar].interval (fetching) is set to 30 minutes by default.
                    Now only one question remains: How can I change the [calendar].interval to for example 5 minutes? This is the interval in “default” calendar, and I have some events needing to be updated more often than 30 minutes.

                    1 Reply Last reply Reply Quote 0
                    • H Offline
                      helmi @Guest
                      last edited by Dec 19, 2017, 12:31 PM

                      @Sean Solved! No need to answer my last question. Sorry I didn’t read the documentation carefully enough. It is a very clever solution to have refresh interval setting for each calendar individually!
                      Thank you very much for nice conversation and happy Christmas greetings from snowy Finland!

                      1 Reply Last reply Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 4
                      • 5
                      • 6
                      • 7
                      • 19
                      • 20
                      • 5 / 20
                      • 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