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 not working with Google Calendar

    Scheduled Pinned Locked Moved Solved Troubleshooting
    22 Posts 6 Posters 16.0k Views 8 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
      AnduriI
      last edited by

      I have a very similiar problem. I use two calendar modules, one with dates from the local waste pickup service and another one with multiple google calendars. The waste calendar works fine (so nothing with the module), but google gives errors. I copied out two of the google-calendars:

      [03.01.2024 11:05.10.477] [ERROR] Calendar Error. Could not fetch calendar:  https://calendar.google.com/calendar/ical/XXXXX/basic.ics RangeError: Invalid time value
          at Date.toISOString (<anonymous>)
          at /home/pi/MagicMirror/modules/MMM-MyCalendar/calendarutils.js:314:28
          at Array.forEach (<anonymous>)
          at Object.filterEvents (/home/pi/MagicMirror/modules/MMM-MyCalendar/calendarutils.js:142:24)
          at /home/pi/MagicMirror/modules/MMM-MyCalendar/calendarfetcher.js:74:29
          at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      [03.01.2024 11:05.11.076] [ERROR] Calendar Error. Could not fetch calendar:  https://calendar.google.com/calendar/ical/XXXXX/basic.ics RangeError: Invalid time value
          at Date.toISOString (<anonymous>)
          at /home/pi/MagicMirror/modules/MMM-MyCalendar/calendarutils.js:314:28
          at Array.forEach (<anonymous>)
          at Object.filterEvents (/home/pi/MagicMirror/modules/MMM-MyCalendar/calendarutils.js:142:24)
          at /home/pi/MagicMirror/modules/MMM-MyCalendar/calendarfetcher.js:74:29
          at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      

      I don’t know what invalid time value means, maybe someone can help

      S J 2 Replies Last reply Reply Quote 0
      • S Offline
        sdetweil @AnduriI
        last edited by

        @AnduriI you need the latest mm version which has a fix for the isostring problem

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        A 1 Reply Last reply Reply Quote 1
        • A Offline
          AnduriI @sdetweil
          last edited by

          @sdetweil what do you mean with latest mm version? I did git pull && npm install, so I should have the latest…

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

            @AnduriI can u chedck the actual version u have

            cd ~/MagicMirror
            grep version package.json
            

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            A 1 Reply Last reply Reply Quote 0
            • A Offline
              AnduriI @sdetweil
              last edited by

              @sdetweil

              /MagicMirror $ grep version package.json
                      "version": "2.26.0",
              
              S 1 Reply Last reply Reply Quote 0
              • S Offline
                sdetweil @AnduriI
                last edited by

                @AnduriI bizarre.

                can u turn on debug in config.js

                add

                ,"DEBUG"
                

                to the loglevel: list

                then let’s use non pm2 to capture the info

                pm2 stop all
                cd ~/MagicMirror
                npm start >somefile.txt 2>&1
                

                wait til u think the error occurs
                ctrl-q

                to top mm

                then look at the somefile.txt

                search for the isostring

                you should see dates=
                for each event

                the problem was the rule.between function which calculates the repeating events would return junk
                I put in a filter to remove the junk.

                anyhow, then remove the DEBUG
                thing from config.js

                and you can use pm2 to restart mm til we figure it out

                if u can, send the somefile.txt to me via email
                my userid here at gmail

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                A R 2 Replies Last reply Reply Quote 0
                • A Offline
                  AnduriI @sdetweil
                  last edited by

                  @sdetweil wow I was not aware of all old events also being sent and parsed… from 5+ years ago. That’s a lot of entries… (more than 1500 only for my main calendar)
                  I sent the log via eMail to you.

                  S 2 Replies Last reply Reply Quote 1
                  • S Offline
                    sdetweil @AnduriI
                    last edited by

                    @AnduriI yes, the ics holds all that junk

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

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

                      @AnduriI are u willing to share one of the trouble cal urls so I can debug?

                      send in a private chat. not via mail. after use I will delete the data and the chat.

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

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

                        @AnduriI also try this

                        cd ~/MagicMirror
                        npm install electron@28.1.1
                        

                        Sam

                        How to add modules

                        learning how to use browser developers window for css changes

                        1 Reply Last reply Reply Quote 0
                        • R Offline
                          redink @sdetweil
                          last edited by

                          @sdetweil, would you mind sharing how you set up a filter for the events? I have a suspicion that too many events are causing some items to now show up on calendar.

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

                            @redink there are no backend (at the ICS parser) filters

                            on the front end (browser display) there are the following config options that affect event display

                            maximumEntries,
                            maximumNumberOfDays,
                            hidePrivate,
                            hideOngoing and
                            hideDuplicates

                            the default calendar module NEVER displays events before today. but it will broadcast them for other modules to use ( MMM-CalendarExt3* uses them)

                            sadly the parser does NOT indicate where today is in the stream of events parsed (the ICS has EVERYTHING in it). the only way to fix this is to make a breaking change, and send two lists, old and future

                            because of the single list , maximumEntries , CAN/DOES cause the event list to get clipped before any current events can be processed.

                            Sam

                            How to add modules

                            learning how to use browser developers window for css changes

                            R 1 Reply Last reply Reply Quote 0
                            • R Offline
                              redink @sdetweil
                              last edited by

                              @sdetweil ok, that makes sense.

                              My issue is really strange where my two recurring weekly events only show up during the first two weeks of the month, and are ignored the rest of the time until the next month. I even tested installed thunderbird to open the ICS file to check that the issue isn’t with google calendar. Thunderbird displays the recurring events just fine.

                              It’s making me think if I should hack together some kind a pre-processor to only return events that are relevant to the view.

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

                                @redink yes, new rrule is having trouble…

                                lets go back to the prior parser

                                cd  ~/MagicMirror
                                npm install node-ical@0.16.1
                                

                                Sam

                                How to add modules

                                learning how to use browser developers window for css changes

                                R F 2 Replies Last reply Reply Quote 0
                                • R Offline
                                  redink @sdetweil
                                  last edited by

                                  @sdetweil That did it. Thank you so much. I spent two hours this morning trying to fix this.
                                  How did you know that this was an issue? I need to get better at learning how to troubleshoot this mirror myself.

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

                                    @redink we’ve been working it for the last couple weeks. this was a major change for calendar this release. I pushed it cause of all the other recurring events time problems.

                                    I do most of the calendar module parsing support

                                    Sam

                                    How to add modules

                                    learning how to use browser developers window for css changes

                                    R 1 Reply Last reply Reply Quote 1
                                    • R Offline
                                      redink @sdetweil
                                      last edited by

                                      @sdetweil really appreciate your support on this!

                                      1 Reply Last reply Reply Quote 0
                                      • J Offline
                                        jer9189 @AnduriI
                                        last edited by

                                        @AnduriI, I had a similar issue I spent a few hours troubleshooting. MMM-Calendar (connected to private Google calendar ics link), MMM-Wallpaper, and MMM-quote-of-the-day all were black or showing errors. It started with a clean install of Raspberry Pi and MagicMirror 2.26.0 (installed via sdetweil raspberry.sh script) in early January 2024. Installing electron@28.1.1 and node-ical@0.16.1 did not fix the issue.

                                        What fixed this issue for me was disabling IPv6 in the Raspberry Pi by adding 3 lines to the sysctl.conf file. Now all three of these modules work correctly.

                                        sudo nano /etc/sysctl.conf

                                        Add these three lines:

                                        net.ipv6.conf.all.disable_ipv6 = 1
                                        net.ipv6.conf.default.disable_ipv6 = 1
                                        net.ipv6.conf.lo.disable_ipv6 = 1
                                        

                                        Save (Ctrl + x, y) and reboot sudo reboot to apply setting.

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

                                          @jer9189 great feedback, thank you!!!

                                          I pinned a new (locked) post with a link to your post in the troubleshooting section

                                          Sam

                                          How to add modules

                                          learning how to use browser developers window for css changes

                                          1 Reply Last reply Reply Quote 0
                                          • F Offline
                                            Fuen @sdetweil
                                            last edited by

                                            @sdetweil yeap thx that does it to on my side!

                                            Regards,

                                            1 Reply Last reply Reply Quote 0
                                            • T theaddies referenced this topic on

                                            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
                                            • 2 / 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