MagicMirror² v2.13.0 is available! For more information about this release, check out this topic.

Syncing Multiple Calendars



  • Super new to this entire world of coding, Raspberry Pi-ing, and Magic Mirror-ing. I’m having a lot of fun, and I figured out a lot on my own today reading through other topics, but can’t seem to get a resolution here. I’m trying to sync calendars. I can’t even get the default calendar to sync, let alone an iCloud calendar that I changed to private and had the link generated. It’s my understanding that calendars don’t necessarily need to end in .ics to be used. Currently, the calendar section has keeps saying “No Upcoming Events,” when there are a few things that should definitely be populated on there.

    Furthermore, not entirely sure where to add “Maximum Number of Days” so that I can see far-out holidays. Not like Jerry Garcia far out, but like, deep in the future. You know what I mean! I’d like to see events 60 days out.

    Lastly, I don’t understand the significance of “symbol” for the calendars. That’s why I just named my second calendar “Carl,” instead of something else like the oddly-named sample calendar “calendar-check-o”

    Code below:

    {
    			module: "calendar",
    			header: "Events",
    			position: "top_left",
    			config: {
    				calendars: [
    					{
    						symbol: "calendar-check-o",
    						url: "https://www.calendarlabs.com/templates/ical/US-Holidays.ics"
    					},
    					{
    						symbol: "carl",
    						url: "webcal://p35-calendars.icloud.com/published/2/XXXXXXXXXXXRFltaUopT7n03o"
    					}
    				]
    			}
    		},
    

    Many thanks!



  • @cstein6486 Hey there! Have you gotten one of the calendars working before trying syncing multiple calendars? 😄


  • Module Developer

    @cstein6486 said in Syncing Multiple Calendars:

    I can’t even get the default calendar to sync, let alone an iCloud calendar that I changed to private and had the link generated. It’s my understanding that calendars don’t necessarily need to end in .ics to be used. Currently, the calendar section has keeps saying “No Upcoming Events,” when there are a few things that should definitely be populated on there.

    As far as I know they need an .ics format for being properly used.
    However, when you see something like that you will have to go for a bug hunt. One possible way is this.

    1. Deactivate all modules except for the calendar.

    2. Load up your mirror

    3. Go into the console (ideally via ssh, I hope you know what I’m talking about) and put in

    pm2 logs
    

    Look in the error logs what they are saying referring to the calendar module and post it here.

    OR

    Load the mirror in an external browser (via MIRRORIP:8080) and go into the developer’s console (often by pressing F12) and look for error messages referring to the calendar there.

    Furthermore, not entirely sure where to add “Maximum Number of Days” so that I can see far-out holidays. Not like Jerry Garcia far out, but like, deep in the future. You know what I mean! I’d like to see events 60 days out.

    It’s all described in the github repository
    You can include the maximumNumberOfDays in the config. If you want different config options for different calendars you need to set up the module more than once.

    Lastly, I don’t understand the significance of “symbol” for the calendars. That’s why I just named my second calendar “Carl,” instead of something else like the oddly-named sample calendar “calendar-check-o”

    The symbol is used for the so-called “Font Awesome” API, an API giving you pictures as font. It really is awesome.
    The reason it is called so weired is that JS takes the string to pick up the respective symbol from the font awesome api.
    Lookie here!


  • Project Sponsor

    @cstein6486 said in Syncing Multiple Calendars:

    Lastly, I don’t understand the significance of “symbol” for the calendars.

    The symbol will be added to the beginning of every event for that configured calendar. For example, I have a calendar of movie release dates merged in with my social calendar. I keep the “calendar-check-o” for the social calendar, but I use “video-camera” for the movie release calendar.

    The end result is that every entry that is a movie release shows a video camera icon and my social calendar shows a calendar with a check icon.


Log in to reply