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.

    Default Calendar module frequently refreshes

    Scheduled Pinned Locked Moved General Discussion
    25 Posts 3 Posters 1.9k Views 3 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.
    • D Offline
      DarrenO 0 @sdetweil
      last edited by

      @sdetweil
      I restored my MM from an image i took of it from prior to upgrading to Debian 13 and, so far, I am not experiencing the same refresh.
      I’ll keep an eye on things over the next few hours and see if the issue re-occurs.

      S 1 Reply Last reply Reply Quote 0
      • S Do not disturb
        sdetweil @DarrenO 0
        last edited by

        @DarrenO-0 thx. Id really like to see the logs from both for the event broadcast cycle

        There was a big calendar parser change in. 33 and another coming in. 34

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        D 1 Reply Last reply Reply Quote 0
        • M Offline
          michaelarnauts
          last edited by

          I just made this github issue to track this issue.

          https://github.com/MagicMirrorOrg/MagicMirror/issues/3971

          S 1 Reply Last reply Reply Quote 0
          • S Do not disturb
            sdetweil @michaelarnauts
            last edited by

            @michaelarnauts I replied to it, but there you have a different complaint.

            The system design is
            Pull the iCal file via the URL
            It’s whatever events the source calendar wants to send , we have no control , it’s all text

            We convert that to a usable list
            And then figure out the repeating events and get a list that could be displayed, expired and not , as of right this second

            Then we send that list out to other modules to use
            MMM-CalendarExt3 for example, which displays a wall cal view, using the events in view expired or not

            Then we process the not expired list and display the xx that you wanted

            And repeat that whole process for the next fetchInterval
            Once every xx minutes or whatever you have it set to

            For each URL configured , we do the exact same process, each sending events when they are fetched. One URL processor doesn’t know about the next, they ALL run independently

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            M 1 Reply Last reply Reply Quote 0
            • D Offline
              DarrenO 0 @sdetweil
              last edited by

              @sdetweil said in Default Calendar module frequently refreshes:

              @DarrenO-0 thx. Id really like to see the logs from both for the event broadcast cycle

              There was a big calendar parser change in. 33 and another coming in. 34

              I’d upgraded to .33 in mid-Oct and had only upgraded Debian from 12 to 13 earlier this month but don’t recall noticing the issue prior to the OS upgrade.

              i’ll see how i go with it under Debian 12 over the weekend and probably re-upgrade to Debian 13 early next week to then see if the issue re-presents itself.
              Interestingly, the calendar that contains the most events is the one that was listed in the pm2 logs when the host was issue under Debian 13.
              Now that the system is back under Debian 12, I’ll recheck the logs to see if the same notification in the pm2 logs is listed.

              One item i also noted in the pm2 logs was it identified that pm2 was out of date and i need to upgrade.
              I’m not 100% sure, but I think my MM is currently on 6.0.6, and 6.0.13 is the latest stable version available.
              I did attempt to upgrade pm2 from the instructions at pm2.io using “npm install pm2@latest -g” or “sudo npm install pm2@latest -g” and though it appeared to upgrade, it always returned an error that “-g” was an unknown command or option.
              When i then run pm2 --version, it still reported that i was running 6.0.6.

              S 2 Replies Last reply Reply Quote 0
              • S Do not disturb
                sdetweil @DarrenO 0
                last edited by

                @DarrenO-0 on the pm2 side there are two parts

                the code on the disk
                and the part running

                to change the part running
                you need to execute

                sudo pm2 updatePM2 
                

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                1 Reply Last reply Reply Quote 0
                • S Do not disturb
                  sdetweil @DarrenO 0
                  last edited by

                  @DarrenO-0 I rejected your post w the log entries, see the notification message I sent

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  D 2 Replies Last reply Reply Quote 0
                  • D Offline
                    DarrenO 0 @sdetweil
                    last edited by

                    @sdetweil said in Default Calendar module frequently refreshes:

                    @DarrenO-0 I rejected your post w the log entries, see the notification message I sent

                    The calendar entries for the logs were unique.
                    I removed the true component of the email address prior to the “@” and replaced them with calendaruser1… calendaruser4

                    Incidentally, i’ve been back through the config.js file for the default calendar and found that I had specified tableClass= twice.
                    The fIrst instance had a value of “small” with the bulk of the other options.
                    The second instance had a value of “xsmall” and was between the customEvents[] and calendars[] arrays.

                    I removed the second instance and changed the value of the first to “xsmall”.
                    Saving the config automatically restarted MM and it appears to have resolved the matter as it hasn’t repeated the issue in the last hour, but i’ll continue to monitor over the next couple of days.
                    Not sure how that one line could have caused the issue… Any ideas???

                    S 1 Reply Last reply Reply Quote 0
                    • D Offline
                      DarrenO 0 @sdetweil
                      last edited by

                      @sdetweil
                      one thing i’ve now noticed since removing the duplicate tableClass entry in the calendar module’s config, when i now run :
                      pm2 logs --lines=15
                      i am now seeing the Broadcasting ### events entries calendars update on the scheduled intervals.

                      Prior, while i was having the issue, i would see a constant updating of the live view of pm2 logs.

                      1 Reply Last reply Reply Quote 0
                      • M Offline
                        michaelarnauts @sdetweil
                        last edited by

                        @sdetweil

                        That makes sense, but I see a lot more updates then what you describe here.
                        I’ve added a screenshot of the updates I get to my github issue, and I’ve added it here as well. (note that all the messages have the same length, and some are a few seconds apart.

                        I’m not sure how to proceed in troubleshooting. When I enable debug logging, it is outputting a LOT (the whole ics file contains data from years ago).

                        f5e11a58-e0dc-46db-8b6b-ecc1a1d64bbd-image.png

                        S 1 Reply Last reply Reply Quote 0
                        • S Do not disturb
                          sdetweil @DarrenO 0
                          last edited by

                          @DarrenO-0 sorry, not quite sure what you’ve said here

                          You specified tableClass twice in the config of a single calendar module declaration?

                          JavaScript should take the second, and ignore the first
                          JSON.parse() should overlay the first w the second

                          And tableClass is only used in the presentation of the events long after the broadcast message is sent

                          Sam

                          How to add modules

                          learning how to use browser developers window for css changes

                          D 1 Reply Last reply Reply Quote 0
                          • S Do not disturb
                            sdetweil @michaelarnauts
                            last edited by

                            @michaelarnauts For the log output, we were looking for the broadcasting xxxx events messages entries
                            But note they have the full URL string , which you shouldn’t post on the forum

                            Sam

                            How to add modules

                            learning how to use browser developers window for css changes

                            1 Reply Last reply Reply Quote 0
                            • D Offline
                              DarrenO 0 @sdetweil
                              last edited by

                              @sdetweil said in Default Calendar module frequently refreshes:

                              @DarrenO-0 sorry, not quite sure what you’ve said here

                              You specified tableClass twice in the config of a single calendar module declaration?

                              JavaScript should take the second, and ignore the first
                              JSON.parse() should overlay the first w the second

                              And tableClass is only used in the presentation of the events long after the broadcast message is sent

                              Correct, yes.
                              I would have assumed, and expect, that the second specified instance of “tableClass” would supersede the first, but for some reason when I removed either instance and re-saved the config, the calendar has been rock-solid and no longer performs the constant/frequent refresh outside of the fetchInterval value.

                              Was the duplicate value the cause and removing it was the solution?
                              Was simply re-saving the config, to force MM to re-read it, the solution?
                              I don’t know, but it is all now working as expected - i see the calendar temporarily fade out and redisplay according to the configured 5min interval
                              When viewing the live tail of pm2 logs --lines=15, i’m no longer seeing a constant display of the “Broadcasting…” of each calendar throughout the configured fetchInterval. I now only and correctly see it update according to the fetchInterval value.

                              S 1 Reply Last reply Reply Quote 0
                              • S Do not disturb
                                sdetweil @DarrenO 0
                                last edited by

                                @DarrenO-0 weird!!!

                                Sam

                                How to add modules

                                learning how to use browser developers window for css changes

                                D 1 Reply Last reply Reply Quote 0
                                • D Offline
                                  DarrenO 0 @sdetweil
                                  last edited by

                                  @sdetweil
                                  OK, so after a few days, my MM is still on Debian12 and i’m now seeing the same constant/frequent reload of the default calendar.

                                  What logs should I be looking in and what should I be looking for in them?

                                  S 1 Reply Last reply Reply Quote 0
                                  • S Do not disturb
                                    sdetweil @DarrenO 0
                                    last edited by sdetweil

                                    @DarrenO-0 in the output of npm start
                                    There will be a line

                                    Broadcasting xxx events for calendar yyyy
                                    Where yyyy is the full url configured in the calendar

                                    That line will have a timestamp at the beginning of the line

                                    That is the output of the calendar module fetcher and starts the delivery to the front end to display

                                    If you use pm2 that content is captured for you

                                    You could use grep to extract just those lines

                                    cd ~/.pm2/logs
                                    ls

                                    Find the right filename.
                                    Pm2_app name-out.log

                                    grep Broadcasting fffff
                                    Where fffff is the file name you selected
                                    Note the file is added to each time MagicMirror is restarted unless you clear it first
                                    pm2 flush
                                    To clear

                                    Before posting in a public place, make sure to mangle the url on each line so as not to expose your working cal url

                                    Sam

                                    How to add modules

                                    learning how to use browser developers window for css changes

                                    1 Reply Last reply Reply Quote 0

                                    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                    With your input, this post could be even better 💗

                                    Register Login
                                    • 1
                                    • 2
                                    • 1 / 2
                                    • 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