Read the statement by Michael Teeuw here.
I Broke the default Calendar Module
-
I just had my calendars working smh. I added 4 of my apple calendars and it was working well for the most part. It would turn on for a while and then flash with: “Error in the calendar module, Check logs for more details”. I checked the logs with
tail -n 50 ~/.pm2/logs/MagicMirror-error.logand the other logs with nothing out of the ordinary. I was trying to fix the issue in the~/MagicMirror/modules/default/calendar/calendar.jsthen it broke completely. Now it just shows that error message indefinitely. I deleted thatcalendar.jsfile and then copied the file back in. Now it just doesn’t work at all again still. Below is a copy of my codes with the private info redacted:~/MagicMirror/config/config.js
{ module: "calendar", header: "My Schedule", position: "middle_center", config: { // symbols @ https://fontawesome.com/v5.15/icons?d=gallery&p=2&m=free calendars: [ { symbol: "laptop-code", // College Courses url: "webcal://p47-caldav.icloud.com/published/2/****", fetchInterval: 6000, color: "#698152" // Using hex coloring. Identify color of choice using @ https://imagecolorpicker.com/color-code/4b92b3 }, { symbol: "file-alt", // College Assignments Due url: "webcal://p47-caldav.icloud.com/published/2/****", fetchInterval: 6000, color: "#C4CACE" }, { symbol: "users", // Work Schedule url: "webcal://p47-caldav.icloud.com/published/2/****", fetchInterval: 6000, color: "#E43D4E" }, { symbol: "home", // Home / Family Events url: "webcal://p47-caldav.icloud.com/published/2/****", fetchInterval: 6000, color: "#219DF3" }, ] } },~/MagicMirror/modules/default/calendar/calendar.js- I tried to add all 4 calendars in with just the symbol and URL, didn’t work, tried leaving it as default, didn’t work.
/* global cloneObject */ /* Magic Mirror * Module: Calendar * * By Michael Teeuw https://michaelteeuw.nl * MIT Licensed. */ Module.register("calendar", { // Define module defaults defaults: { maximumEntries: 10, // Total Maximum Entries maximumNumberOfDays: 365, limitDays: 7, // Limit the number of days shown, 0 = no limit displaySymbol: true, defaultSymbol: "calendar", // Fontawesome Symbol see https://fontawesome.com/cheatsheet?from=io showLocation: false, displayRepeatingCountTitle: false, defaultRepeatingCountTitle: "", maxTitleLength: 50, maxLocationTitleLength: 50, wrapEvents: false, // wrap events to multiple lines breaking at maxTitleLength wrapLocationEvents: false, maxTitleLines: 3, maxEventTitleLines: 3, fetchInterval: 6000, // Update every 5 minutes. animationSpeed: 1000, fade: false, urgency: 7, timeFormat: "relative", dateFormat: "MMM Do", dateEndFormat: "LT", fullDayEventDateFormat: "MMM Do", showEnd: false, getRelative: 6, fadePoint: 0, // Start on 1/4th of the list. hidePrivate: false, hideOngoing: false, hideTime: false, colored: true, coloredSymbolOnly: true, customEvents: [], // Array of {keyword: "", symbol: "", color: ""} where Keyword is a regexp and symbol/color are to be applied for matched tableClass: "small", calendars: [ { symbol: "calendar", url: "https://www.calendarlabs.com/templates/ical/US-Holidays.ics" } ], titleReplace: { "De verjaardag van ": "", "'s birthday": "" }, locationTitleReplace: { "street ": "" }, broadcastEvents: true, excludedEvents: [], sliceMultiDayEvents: false, broadcastPastEvents: false, nextDaysRelative: false, selfSignedCert: false -
@olesoncrypto 1st… NEVER edit the source code
always use config.js
if u HAVE edited the source code and want it back then , in the MM folder do
git checkout modules/default/calendar/calendar.jsto restore the file from the source code repository
this should make the default work again (if u restored that section of the config.js from config.js.sample)
so, now we need to understand why 4 cals don’t work.,
1st test
take each URL from each cal entry, one by one
in a browser ON the MM system and
see if the url downloads an ics file … this is required for the cal module to workif not, fix that
then try with your config.js, which looks ok.
if not working, add
,"DEBUG"to the end of
logLevel: ["INFO", "LOG", "WARN", "ERROR"], // Add "DEBUG" for even more loggingand start MM like this (make sure to stop any previous running mm, if pm2, then pm2 stop all
npm start >somefile.txtwait til u think cal entries should have shown,
ctrl-c to stop mm in the terminal window where i started,(ctrl-m to minimize mm if doing ON the pi,
I STRONLGY recommend learning to use ssh from other machine to do all maint, so u don’t have these problems )and then edit somefile.txt to see what is going 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