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

I Broke the default Calendar Module

Scheduled Pinned Locked Moved Solved Troubleshooting
2 Posts 2 Posters 1.1k Views 2 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.
  • O Offline
    OlesonCrypto
    last edited by Oct 23, 2021, 3:27 AM

    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.log and the other logs with nothing out of the ordinary. I was trying to fix the issue in the ~/MagicMirror/modules/default/calendar/calendar.js then it broke completely. Now it just shows that error message indefinitely. I deleted that calendar.js file 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
    
    S 1 Reply Last reply Oct 23, 2021, 1:43 PM Reply Quote 0
    • S Offline
      sdetweil @OlesonCrypto
      last edited by sdetweil Oct 25, 2021, 11:46 PM Oct 23, 2021, 1:43 PM

      @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.js
      

      to 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 work

      if 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 logging
      

      and start MM like this (make sure to stop any previous running mm, if pm2, then pm2 stop all

      npm start  >somefile.txt
      

      wait 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

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      1 Reply Last reply Reply Quote 0
      • 1 / 1
      1 / 1
      • First post
        2/2
        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