Read the statement by Michael Teeuw here.
Calendar config
-
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.
-
Try putting your config.js in a website like http://jshint.com/. It should help you find any brackets you might be missing.
-
@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? -
Please post your entire config
btw … I don’t know for google calendars, but I replaced https with webcal for my outlook.com calendar. -
@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.
-
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.
-
@in_a_days Nice catch! I fixed it, but yeah, it wasn’t the source.
-
/* 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). -
@JbeesonMagic16
add a comma here:
{ url: 'https://calendar.google.com/calendar/ical/WIFE%40gmail.com/public/basic.ics' }, ], } } { module: 'compliments', position: 'lower_third'so it looks like this
{ url: 'https://calendar.google.com/calendar/ical/WIFE%40gmail.com/public/basic.ics' }, ], } }, { module: 'compliments', position: 'lower_third'See if that solves it.
-
@JbeesonMagic16 Yeah, @in_a_days recommendation fixes the problems in the jshint. Hopefully that works for you.
-
Nice, that does get it working again, but no go on the calendars actually showing up. I found a private link to google calendars ical, which makes sense since I’m not sharing my calendar with the public. So I used that link, and they work now. Thanks to all of you for your help!!
-
@JbeesonMagic16
I almost posted the same exact problem but I found this page (thread?) (Whatever), but due to the help you received and your last comment about the private link to google calendars ical, I was able to resolve the issue without asking the question. This place is awesome. :-)
Up votes for everyone!
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