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 209.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.
    • ? Offline
      A Former User @helmi
      last edited by A Former User

      @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 Reply Quote 0
      • H Offline
        helmi @Guest
        last edited by

        @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

          @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
          • cruunnerrC Offline
            cruunnerr
            last edited by

            Hi,

            I realized, that every time the Calendars will be fetched, pm2 creates a log entry in it’s log file.
            Well, sometime the log file will be very big, so my question is if it is necessary or advisable to delete the log file and if there is a way to do that automatically.

            :)

            yawnsY 1 Reply Last reply Reply Quote 0
            • yawnsY Offline
              yawns Moderator @cruunnerr
              last edited by

              @cruunnerr
              I would try https://github.com/keymetrics/pm2-logrotate/blob/master/README.md for this. Looks like you can set a limit, and pm2 creates a new log file after the limit is reached. You can also activate compression for older log files and define how many old log files you would like to keep.
              But I did not try

              1 Reply Last reply Reply Quote 0
              • cruunnerrC Offline
                cruunnerr
                last edited by

                @yawns
                Yeah, i saw this already. Unfortunately my english isn’t good enough to understand this :/

                I just create a bash script with following content: pm2 flush
                The script will be executed by a cronjob every sunday at 4am.

                Maybe not the cleanest solution…

                I will take a look again at the log rotate method. :) thanks dude

                yawnsY 1 Reply Last reply Reply Quote 0
                • yawnsY Offline
                  yawns Moderator @cruunnerr
                  last edited by

                  @cruunnerr
                  Understood. If you don’t figure it out I will try when I am back home next weekend

                  1 Reply Last reply Reply Quote 0
                  • cruunnerrC Offline
                    cruunnerr
                    last edited by cruunnerr

                    Hey guys,

                    I am trying to show the same calendar on “weeks” and on “upcoming” but with different “maxEntries”. Is that possible?

                    tried it like this:

                                                   {
                                                            //Muellkalendar
                                                          url: "webcal://p53-calendars.icloud.com/published/2/.....",
                                                          styleName: "style2",
                                                          maxEntries: 20,
                                                          symbol: "delete-empty@md",
                                                          views: ["weeks"],
                                                          interval: 86400000, // 24 Stunden
                                                    },
                                                    {
                                                            //Muellkalendar-Upcoming
                                                          url: "webcal://p53-calendars.icloud.com/published/2/.....",
                                                          styleName: "style2",
                                                          maxEntries: 2,
                                                          symbol: "delete-empty@md",
                                                          views: ["upcoming"],
                                                          interval: 86400000, // 24 Stunden
                                                    },
                    

                    But then i get the “create a config” message

                    ? 1 Reply Last reply Reply Quote 0
                    • ? Offline
                      A Former User @cruunnerr
                      last edited by

                      @cruunnerr
                      maxEntries is only worked for the count of loading events of calendar, not the view. You can use limit for limitation of the number of events of specific view.

                      1 Reply Last reply Reply Quote 0
                      • cruunnerrC Offline
                        cruunnerr
                        last edited by

                        Thanks for your reply.

                        I already used limit for the upcoming view. I have 3 calendars in the upcoming view and the limit works fine.

                        But i want to show the same calendar once in the weeks view with up to 20 entries and in the upcoming view max. 2 so the other calendar entries will not be blocked by the calendar i just need 2 entries.

                        anyhow, it seems not to be possible. But thank u anyway. Great module at all :)

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