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

Scheduled Pinned Locked Moved Solved Troubleshooting
14 Posts 5 Posters 13.5k 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.
  • ? Offline
    A Former User
    last edited by A Former User Jan 26, 2017, 4:20 PM Jan 26, 2017, 4:18 PM

    Hello all,

    I was following the suggestions for incorporating my Gmail calendars into the Calendar section per this topic. My config file works fine with the default calendar, but as soon as I make the changes, it crashes. I’m not sure if it’s a typo, but is there something I’m missing?

                            module: 'calendar',
                            header: 'Calender',
                            position: 'top_left',
                            config: {
                                    calendars: [
                                            {
                                                    symbol: 'calendar-check-o ',
                                                    url: 'webcal://www.calendarlabs.com/templates/ical/US-Holidays.ics'
                                            },
                                            {
                                                    url: 'htpps://calendar.google.com/calendar/ical/ME%40gmail.com/public/basic.ics'
                                            },
                                            {
                                                    url: 'https://calendar.google.com/calendar/ical/WIFE%40gmail.com/public/basic.ics'
                                            },
                                    ],
                    }
    

    I obviously changed the email addresses, but that’s the line I get from Google for icals. I left the default, except I changed the header to a generic Calendar since it’s not just a US Holiday calendar anymore. Thanks in Advance!

    I 1 Reply Last reply Jan 26, 2017, 4:33 PM Reply Quote 0
    • I Offline
      in_a_days @Guest
      last edited by Jan 26, 2017, 4:33 PM

      @JbeesonMagic16

      Looks like you may be missing a close bracket. Try this:

                          module: 'calendar',
                          header: 'Calender',
                          position: 'top_left',
                          config: {
                                  calendars: [
                                          {
                                                  symbol: 'calendar-check-o ',
                                                  url: 'webcal://www.calendarlabs.com/templates/ical/US-Holidays.ics'
                                          },
                                          {
                                                  url: 'htpps://calendar.google.com/calendar/ical/ME%40gmail.com/public/basic.ics'
                                          },
                                          {
                                                  url: 'https://calendar.google.com/calendar/ical/WIFE%40gmail.com/public/basic.ics'
                                          },
                                  ],
                          }
                  }
      

      What ship would bear me ever back across so wide a Sea?

      ? 1 Reply Last reply Jan 26, 2017, 4:48 PM Reply Quote 2
      • ? Offline
        A Former User @in_a_days
        last edited by Jan 26, 2017, 4:48 PM

        So I added the bracket, but still get the ‘please create a config file’, which is what I get when I add something new and inevitably mess something up.

        1 Reply Last reply Reply Quote 0
        • M Offline
          mochman Module Developer
          last edited by mochman Jan 26, 2017, 4:57 PM Jan 26, 2017, 4:54 PM

          Try putting your config.js in a website like http://jshint.com/. It should help you find any brackets you might be missing.

          ? 1 Reply Last reply Jan 26, 2017, 5:01 PM Reply Quote 1
          • ? Offline
            A Former User @mochman
            last edited by Jan 26, 2017, 5:01 PM

            @mochman How do I know what needs to be changed though? It’s finding a lot of issues, even with the default code that I’ve not changed?
            Ater adding that } , it’s complaining about double quotes instead of singular, unexpected label ‘modules’, and expected an identifier and instead saw ‘}’.
            It doesn’t seem to be geared towards the code for Magic Mirror?

            M 1 Reply Last reply Jan 26, 2017, 5:07 PM Reply Quote 0
            • Y Offline
              yawns Moderator
              last edited by Jan 26, 2017, 5:06 PM

              Please post your entire config
              btw … I don’t know for google calendars, but I replaced https with webcal for my outlook.com calendar.

              1 Reply Last reply Reply Quote 0
              • M Offline
                mochman Module Developer @Guest
                last edited by Jan 26, 2017, 5:07 PM

                @JbeesonMagic16 No, it’s a general javascript problem finder. If you paste your config.js file in it’s entirety into http://jshint.com/. You should see it say “One undefined variable”. If you see

                Expected '}' to match '{' from line XXX and instead saw ']'
                

                You are missing a bracket. Look at line XXX and then follow the code down to see where the missing bracket is.

                1 Reply Last reply Reply Quote 1
                • I Offline
                  in_a_days
                  last edited by Jan 26, 2017, 5:08 PM

                  The full config file will definitely help. You also have one more small typo here -

                  {
                      url: 'htpps://calendar.google.com/calendar/ical/ME%40gmail.com/public/basic.ics'
                  },
                  

                  that should probably be ‘https’ rather than ‘htpps’ but I don’t think this should be breaking your config.

                  What ship would bear me ever back across so wide a Sea?

                  ? 1 Reply Last reply Jan 26, 2017, 5:12 PM Reply Quote 1
                  • ? Offline
                    A Former User @in_a_days
                    last edited by Jan 26, 2017, 5:12 PM

                    @in_a_days Nice catch! I fixed it, but yeah, it wasn’t the source.

                    1 Reply Last reply Reply Quote 0
                    • ? Offline
                      A Former User
                      last edited by Jan 26, 2017, 5:17 PM

                      /* Magic Mirror Config Sample
                       *
                       * By Michael Teeuw http://michaelteeuw.nl
                       * MIT Licensed.
                       */
                      
                      var config = {
                              port: 8080,
                              ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"],
                      
                              language: 'en',
                              timeFormat: 12,
                              units: 'imperial',
                      
                              modules: [
                                      {
                                              module: 'alert',
                                      },
                                      {
                                              module: "updatenotification",
                                              position: "top_bar"
                                      },
                                      {
                                              module: 'clock',
                                              position: 'top_left'
                                                      },
                                      {
                                              module: 'calendar',
                                              header: 'Calender',
                                              position: 'top_left',
                                              config: {
                                                      calendars: [
                                                              {
                                                                      symbol: 'calendar-check-o ',
                                                                      url: 'webcal://www.calendarlabs.com/templates/ical/US-Holidays.ics'
                                                              },
                                                              {
                                                                      url: 'https://calendar.google.com/calendar/ical/ME%40gmail.com/public/basic.ics'
                                                              },
                                                              {
                                                                      url: 'https://calendar.google.com/calendar/ical/WIFE%40gmail.com/public/basic.ics'
                                                              },
                                                      ],
                                              }
                                      }
                                      {
                                              module: 'compliments',
                                              position: 'lower_third'
                                      },
                                      {
                                              module: 'MMM-WunderGround',
                                              position: 'top_right',
                                              config: {
                                                      apikey: 'MYKEY',
                                                      pws: 'pws:KMOOFALL59',
                                                      hourly: '1',
                                                      fctext: '1',
                                                      fcdaycount: "5",
                                                      fcdaystart: "0",
                                                      hourlyinterval: "3",
                                                      hourlycount: "2",
                                                      alerttime: 10000,
                                                      alerttruncatestring: "english:",
                                              roundTmpDecs: 1,
                                              UseCardinals: 0,
                                              layout: "horizontal",
                                              sysstat: 0
                                              }
                                      },
                                      {
                                              module: 'newsfeed',
                                              position: 'bottom_bar',
                                              config: {
                                                      feeds: [
                                                              {
                                                                      title: "New York Times",
                                                                      url: "http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml"
                                                              }
                                                      ],
                                                      showSourceTitle: true,
                                                      showPublishDate: true
                                              }
                                     },
                              ]
                      
                      };
                      
                      /*************** DO NOT EDIT THE LINE BELOW ***************/
                      if (typeof module !== 'undefined') {module.exports = config;}
                      
                      

                      Also modified the API to hide it in the weather section, but it’s there. JShint gave me 4 errors, but I was going off that link from the other question for syntax, so I’m not 100% what needs to be removed or added.
                      Four warnings
                      46 Expected ‘]’ to match ‘[’ from line 15 and instead saw ‘{’.
                      47 Expected ‘}’ to match ‘{’ from line 7 and instead saw ‘module’.
                      47 Missing semicolon.
                      47 Unrecoverable syntax error. (52% scanned).

                      I 1 Reply Last reply Jan 26, 2017, 5:22 PM Reply Quote 0
                      • 1
                      • 2
                      • 1 / 2
                      1 / 2
                      • First post
                        9/14
                        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