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.

    Sync private iCloud calendar with MagicMirror

    Scheduled Pinned Locked Moved Tutorials
    162 Posts 58 Posters 390.1k Views 65 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.
    • S Offline
      spesh
      last edited by

      Does this allow the option for different icons for different calenders? I’m just starting to build mine and would like to sync two seperate iCloud calenders and have them display with different icons/colours

      BehB 1 Reply Last reply Reply Quote 0
      • BehB Offline
        Beh @spesh
        last edited by

        @spesh

        Yes, this should allow multiple coloured calendars.
        You just have to add the UUIDs for each calendar you want to sync to the collections array in your vdirsyncer config.
        This should create multiple .ics files. One for each calendar. Then you could add each calendar to your MagicMirror config and use the color option described in the default calendar module for your calendars. Just add the colored option to your “global” module config and add a color option to each calendar.

        A calendar config could look like this then (for “Calendar 1” and “Calendar 2” as described above):

        {
            module: 'calendar',
            position: 'top_left',   // This can be any of the regions. Best results in left or right regions.
            config: {
                colored: true,   // Activate coloring
                maximumNumberOfDays: 10,
                maximumEntries: 7,
                calendars: [
                        // "Calendar 1"
                        {
                                url: 'http://localhost:8080/modules/calendars/25CB285C-E163-4E0E-B420-C3FB469B7C00.ics',
                                symbol: 'calendar'
                                color: '#123456'   // Assign color
                        },
                        // "Calendar 2"
                        {
                                url: 'http://localhost:8080/modules/calendars/221FEE8-E8B4-4D07-9402-8638529919EC.ics',
                                symbol: 'calendar'
                                color: '#ABCDEF1'  // Assign color
                        }
                ]
            }
        },
        
        G A 2 Replies Last reply Reply Quote 0
        • D Offline
          Doubleve
          last edited by

          hello how do we get the links calendars icloud thank you

          BehB 1 Reply Last reply Reply Quote 0
          • BehB Offline
            Beh @Doubleve
            last edited by

            @Doubleve What do you mean?

            1 Reply Last reply Reply Quote 0
            • D Offline
              Doubleve
              last edited by Doubleve

              I will like my 3 calendars icloud but I do not see the links of the style
              https://p02calendars.icloud.com/published/2/xxxxxxxxxxxxxxxxxxxxxQhtoAvoFiIwGI1
              To have UUID

              BehB 1 Reply Last reply Reply Quote 0
              • BehB Offline
                Beh @Doubleve
                last edited by

                @Doubleve You don’t need these links, since vdircsyncer discovers your calendars automatically on iCloud and identifies them by their IDs.

                It is explained in the “Let vdirsyncer discover the collections and do the inital sync” section of the walkthrough.

                You mirror accesses the calendar saved to a file on your mirror.

                D 1 Reply Last reply Reply Quote 0
                • D Offline
                  Doubleve @Beh
                  last edited by

                  @Beh error for discover

                  Traceback (most recent call last):
                  File “/usr/bin/vdirsyncer”, line 7, in
                  from vdirsyncer.cli import main
                  ImportError: No module named ‘vdirsyncer’

                  BehB F 2 Replies Last reply Reply Quote 0
                  • BehB Offline
                    Beh @Doubleve
                    last edited by

                    @Doubleve Did you change the first line of the file to #!/usr/bin/python3 ?

                    1 Reply Last reply Reply Quote 0
                    • D Offline
                      Doubleve
                      last edited by Doubleve

                      everything is good

                      BehB 1 Reply Last reply Reply Quote 0
                      • L Offline
                        l0cal
                        last edited by

                        That sounds good for me. Does it work with reminders on the same way?

                        BehB schwoediauerS 2 Replies Last reply Reply Quote 0
                        • BehB Offline
                          Beh @Doubleve
                          last edited by

                          @Doubleve Hmmm…

                          Maybe you have to allow your localhost address to the MagicMirror ipWhiteList option in your config. Just add ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1"], to your config right before the modules option. Maybe the calendar module can not access the .ics file if this is not allowed…

                          1 Reply Last reply Reply Quote 0
                          • BehB Offline
                            Beh @l0cal
                            last edited by

                            @l0cal Yes this should work.

                            Just add "VTODO" to the item_types array in your vdirsyncer config as described in the vdirsyncer docs here: https://vdirsyncer.pimutils.org/en/stable/config.html?highlight=VEVENT#storage-caldav.

                            L 1 Reply Last reply Reply Quote 0
                            • L Offline
                              l0cal @Beh
                              last edited by

                              @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

                              1 Reply Last reply Reply Quote 0
                              • R Offline
                                ribermon
                                last edited by

                                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

                                BehB 1 Reply Last reply Reply Quote 0
                                • BehB Offline
                                  Beh @ribermon
                                  last edited by

                                  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)"
                                  
                                  R 2 Replies Last reply Reply Quote 0
                                  • R Offline
                                    ribermon @Beh
                                    last edited by

                                    This post is deleted!
                                    1 Reply Last reply Reply Quote 0
                                    • R Offline
                                      ribermon @Beh
                                      last edited by

                                      @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

                                      BehB 1 Reply Last reply Reply Quote 0
                                      • BehB Offline
                                        Beh @ribermon
                                        last edited by Beh

                                        @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 the vdirsyncer-Documentation:

                                        https://vdirsyncer.pimutils.org/en/stable/

                                        1 Reply Last reply Reply Quote 0
                                        • B Offline
                                          bgz
                                          last edited by

                                          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/config
                                          

                                          and I get:
                                          Can´t do ‘touch’ on ‘/home/pi.vdirsyncer/config’: The file or directory doesn´t exist

                                          What am I doing wrong?

                                          Thanks.

                                          BehB 1 Reply Last reply Reply Quote 0
                                          • BehB Offline
                                            Beh @bgz
                                            last edited by

                                            Hey, @bgz! No problem, I’m glad to help if I have time for that :)

                                            first: the path should be /home/pi/.vdirsyncer/config you forgot the slash after “pi”

                                            additionally, it seems, that the folder does not exist. Please make sure, that the folder .vdirsyncer exists in your user’s home directory. You can create it by typing mkdir .vdirsyncer when you are inside the home directory

                                            1 Reply Last reply Reply Quote 0

                                            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
                                            • 1
                                            • 2
                                            • 3
                                            • 4
                                            • 5
                                            • 6
                                            • 7
                                            • 8
                                            • 9
                                            • 6 / 9
                                            • First post
                                              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