• 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 module fetchInterval

Scheduled Pinned Locked Moved Development
12 Posts 4 Posters 7.3k Views 4 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.
  • A Offline
    Anhalter42
    last edited by May 2, 2017, 12:31 AM

    I’m still interested in this. Does anyone know?

    As far as I can tell, no explicit restriction to the fetchInterval is implemented in this module. Assuming my observation is correct, this would imply that the actual max. value for fetchInterval is 2147483647 (~ 24.8 days) according to stackoverflow Why does setTimeout() “break” for large millisecond delay values?.

    S 1 Reply Last reply May 3, 2017, 8:46 AM Reply Quote 0
    • S Offline
      strawberry 3.141 Project Sponsor Module Developer @Anhalter42
      last edited by May 3, 2017, 8:46 AM

      @Anhalter42 Maybe there was one someday and the code was changed over time and the readme wasn’t adjusted accordingly or it is as a direction for users that aren’t familiar with those numbers so they don’t put something weird in it. Either way I can’t see a reason to sync a calendar less then a day?

      Please create a github issue if you need help, so I can keep track

      A B 2 Replies Last reply May 3, 2017, 12:40 PM Reply Quote 0
      • A Offline
        Anhalter42 @strawberry 3.141
        last edited by May 3, 2017, 12:40 PM

        @strawberry-3.141 Thx. Mh usually you are correct, but for example holidays as given in the example config of this module don’t change ever. There is no point in updating this hourly (unnecessary traffic for self and server). Instead, for something like this it would be sufficient to update yearly or even “never” (it updates at start and I guess you usually restart the mirror once a year).

        C 1 Reply Last reply May 3, 2017, 1:28 PM Reply Quote 0
        • C Offline
          cohron @Anhalter42
          last edited by May 3, 2017, 1:28 PM

          @Anhalter42 so should the fetchInterval be moved to the calendar array since some calendars only need to be updated once (holidays) and others more often. just a thought have a defaultFetchInterval at the module level and fetchInterval for calendar level?

          A 1 Reply Last reply May 3, 2017, 3:15 PM Reply Quote 0
          • A Offline
            Anhalter42 @cohron
            last edited by May 3, 2017, 3:15 PM

            @cohron Well… yes. Are you interested in implementing this? If you don’t rename the existing option fetchInterval (instead call the new options overwriteFetchInterval or something), it should be compatible with existing config files and therefore likely to be accepted.

            C 1 Reply Last reply May 4, 2017, 1:42 PM Reply Quote 0
            • B Offline
              bhepler Module Developer @strawberry 3.141
              last edited by May 3, 2017, 4:48 PM

              @strawberry-3.141 - I can. If you have a personal calendar (Google, Outlook, Apple, etc.) that you update frequently, you probably want to refresh it hourly or so. My wife and I use our Google calendars extensively to keep each other up to date on everything from doctor’s appointments, working late, running errands at the store/cleaners/bank. Basically anything that might throw our expected schedules off. It keeps us from starting unnecessary search parties (my wife has a serious health condition - if she doesn’t show up on time, there is a non-trivial chance she’s unconscious somewhere)

              When I get the home mirror set up, we’ll probably shift to a shared calendar that we can both add events.

              S 1 Reply Last reply May 3, 2017, 5:26 PM Reply Quote 0
              • S Offline
                strawberry 3.141 Project Sponsor Module Developer @bhepler
                last edited by May 3, 2017, 5:26 PM

                @bhepler I’m the same oppinion as you are, probably didn’t explain it well. I can’t see a point why you would care to fetch less frequent than a day.

                Please create a github issue if you need help, so I can keep track

                B 1 Reply Last reply May 3, 2017, 8:59 PM Reply Quote 1
                • B Offline
                  bhepler Module Developer @strawberry 3.141
                  last edited by May 3, 2017, 8:59 PM

                  @strawberry-3.141 Aha! Yeah, I misunderstood. “less than a day” = “less frequently than at least once per day”, as opposed to my interpretation. My interpretation was “a frequency interval of less than one day”.

                  Interesting question: Does the calculation that writes out the “xx days” string only occur on the fetch? For example, if I have an event in four days and I don’t perform a fetch for a week, will it correctly change the text to read “day after tomorrow” at the appropriate time?

                  If I were only showing holidays on my calendar then such a thing might make sense. How often do holidays change, right?

                  1 Reply Last reply Reply Quote 0
                  • C Offline
                    cohron @Anhalter42
                    last edited by May 4, 2017, 1:42 PM

                    @Anhalter42 Definately, and excellent point about not changing the existing option name. I’m hoping to implement a (swimming) pool module in the next couple of months. I haven’t coded (VB) in over a decade so i am reading up about Github (great concept btw). Not sure if i need to branch or pull request or what just yet. I think i can handle learning JS and use the existing modules to reference. This will be a great exercise for me before i jump into full coding.

                    A 1 Reply Last reply May 4, 2017, 1:51 PM Reply Quote 0
                    • A Offline
                      Anhalter42 @cohron
                      last edited by May 4, 2017, 1:51 PM

                      @cohron Just in case this helps you:
                      If you want to change something / contribute to an existing project you have to fork it, change what you want to change and create a Pull-Request (which then gets reviewed and accepted/rejected).
                      For developing your own module you just need to create a new project, i think. In case you didn’t see it, there is a handy template module you could use as base.

                      C 1 Reply Last reply May 6, 2017, 1:37 PM Reply Quote 0
                      • 1
                      • 2
                      • 1 / 2
                      1 / 2
                      • First post
                        6/12
                        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