Read the statement by Michael Teeuw here.
Sync private iCloud calendar with MagicMirror
-
@Beh yeah that are good news for me.
in the last few weeks I was looking for a solution for it and I did not find anything
-
I have a question
So far I managed to sync one calendar from one iCloud account, but I would like to sync also a second calendar from a second iCloud account, is this possible?
Thanks
Ricardo -
Hey @ribermon!
Yes, this should be possible. You just have to add another configuration scheme for your second icloud account to the vdirsyncer config. I didn’t try it, but something like that should work:
# vdirsyncer configuration for MagicMirror. # # Move it to ~/.vdirsyncer/config or ~/.config/vdirsyncer/config and edit it. # Run `vdirsyncer --help` for CLI usage. # # Optional parameters are commented out. # This file doesn't document all available parameters, see # http://vdirsyncer.pimutils.org/ for the rest of them. [general] # A folder where vdirsyncer can store some metadata about each pair. status_path = "~/.vdirsyncer/status/" # CALDAV Sync for iCloud 1 [pair iCloud1_to_MagicMirror] a = "Mirror_iCloud1" b = "iCloud1" collections = ["HERE-GOES-THE-UUID-OF-THE-CALENDAR-YOU-WANT-TO-SYNC"] # Calendars also have a color property metadata = ["displayname", "color"] [storage Mirror_iCloud1] # We need a single .ics file for use with the mirror (Attention! This is really slow on big amounts of events.) type = "singlefile" # We'll put the calendar file to a readable location for the calendar module path = "/home/pi/MagicMirror/modules/calendars/%s.ics" [storage iCloud1] type = "caldav" url = "https://caldav.icloud.com/" # Authentication credentials username = "YOUR-ICLOUD-EMAIL-ADDRESS" password = "HERE-GOES-YOUR-APP-SPECIFIC-ICLOUD-PASSWORD" # We only want to sync in the direction TO the mirror, so we make iCloud readonly read_only = true # We only want to sync events item_types = ["VEVENT"] # We need to keep the number of events low, so we'll just sync the next month # Adjust this to your needs start_date = "datetime.now() - timedelta(days=1)" end_date = "datetime.now() + timedelta(days=30)" # CALDAV Sync for iCloud 2 [pair iCloud2_to_MagicMirror] a = "Mirror_iCloud2" b = "iCloud2" collections = ["HERE-GOES-THE-UUID-OF-THE-CALENDAR-YOU-WANT-TO-SYNC"] # Calendars also have a color property metadata = ["displayname", "color"] [storage Mirror_iCloud2] # We need a single .ics file for use with the mirror (Attention! This is really slow on big amounts of events.) type = "singlefile" # We'll put the calendar file to a readable location for the calendar module path = "/home/pi/MagicMirror/modules/calendars/%s.ics" [storage iCloud2] type = "caldav" url = "https://caldav.icloud.com/" # Authentication credentials username = "YOUR-ICLOUD2-EMAIL-ADDRESS" password = "HERE-GOES-YOUR-APP-SPECIFIC-ICLOUD2-PASSWORD" # We only want to sync in the direction TO the mirror, so we make iCloud readonly read_only = true # We only want to sync events item_types = ["VEVENT"] # We need to keep the number of events low, so we'll just sync the next month # Adjust this to your needs start_date = "datetime.now() - timedelta(days=1)" end_date = "datetime.now() + timedelta(days=30)" -
This post is deleted! -
@Beh I manage to discover the calendars from my second iCloud account but then I don’t manage to sync my calendars there, any idea, thanks
-
@ribermon No I have no idea. But since this is actually a
vdirsyncer-problem and has nothing to do with the mirror itself, I suggest you dig thevdirsyncer-Documentation: -
Hi Beh
Sorry if I´m too newbie… I´m following your step-by step and I get stuck in one place…
When creating a config file, I type:
touch ~/.vdirsyncer/configand I get:
Can´t do ‘touch’ on ‘/home/pi.vdirsyncer/config’: The file or directory doesn´t existWhat am I doing wrong?
Thanks.
-
Hey, @bgz! No problem, I’m glad to help if I have time for that :)
first: the path should be
/home/pi/.vdirsyncer/configyou forgot the slash after “pi”additionally, it seems, that the folder does not exist. Please make sure, that the folder
.vdirsyncerexists in your user’s home directory. You can create it by typingmkdir .vdirsyncerwhen you are inside the home directory -
Hi Beh.
For some reason I have no .vdirsyncer directory under /home/pi/
Any ideas?
Thanks for your patience.
bgz

-
@bgz Please read answers carefully. If it doesn’t exist, just create it. I described the creation in my last answer.
-
-
@Beh Hi Beh, great work it’s a little bit tricky but it works fine on my side. One additional Information. I got an error by syncing after modification of an event on iCloud side. Therefore is necessary to modify the conflict_resolution in the config file as described here: https://vdirsyncer.pimutils.org/en/stable/config.html#pair-section
I added this section in my configuration:
CALDAV Sync
[pair iCloud_to_MagicMirror]
a = “Mirror”
b = “iCloud”
collections = [“65CFC60E-8888-4B7A-B8DB-0043A969A041”]
conflict_resolution = “b wins”after first sync…
pi@pi_mirror:/etc/systemd/user $ /usr/bin/vdirsyncer sync
Syncing iCloud_to_MagicMirror/65CFC60E-8888-4B7A-B8DB-0043A969A041
Doing conflict resolution for item 247C105F-156B-41DC-B1D6-BFDB7C753BDC…second sync imports the modified event in my .ics file
have a nice Day!
-
@bgz Good morning Create an “hidden” folder by command mkdir .vdirsyncer, and check it by command ls - lisa
-
Also you have to create first the file, it does not exist, so first create it following the path said by Beh and inside the folder create the file
-
@Beh: First I want to thank you for this tutorial! Great job!
It syncs my iCloud calender fine, but not birthdays which are placed from the contacts app.
Can someone advice me?
Thanks in advance!
-
Thanks schwoediauer and the others.
I finally got it and it is up & syncing!! -
@ildottore I configured the syncer config to only synchronize calendar events with the property
item_types = ["VEVENT"]. The CalDav function only supports the items like"VEVENT"and"VTODO".I think, that iOS/macOS does not store the birthdays directly in the calendars but adds the birthdays via the Contacts.app to the Calendar.app.
Maybe you can achieve showing birthdays by syncing the contacts with
vdirsynceras described in the docs here and somehow extract the birthdays. But I think this would be quite costly…Or you can use the MagicMirror module MMM-iCloud-Client maybe…
-
Hi there,
i followed the instructions, my calendars are shown in discovery.
I copied the UUID and it starts syncing, but the saved files are 0kb.
I tried several calendars and checked the UUID’s but can’t find any mistake?any ideas?
thanks!! -
@Beh Everything works fine until I’ll try to save the config file:
- ~/.vdirsyncer/config directory cannot be found
- Once I manuals create directories I also save config file as config.cfg and also tried config.config and save
- I haven’t filled in collections = [“HERE-GOES-THE-UUID-OF-THE-CALENDAR-YOU-WANT-TO-SYNC”] in conf. Could this make it crash?
- Running curl for timer ok.
5.Then when vdirsyncer discover nothing happens I get Errno 21 and that’s where I get stuck…
Really wonder what might be the issues here?
-
@Gailby
The file is named config. It‘s not a directory, it‘s the name of the file. (No ending).
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