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.

    CalDAV

    Scheduled Pinned Locked Moved Troubleshooting
    26 Posts 8 Posters 23.1k Views 8 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.
    • BehB Offline
      Beh @poekel
      last edited by

      @poekel You just add ?export to your calendar URL like this (example for baikal):

      https://dav.example.org/dav.php/calendars/[username]/[calendarname]?export

      Note, that [calendarname] is the internal name of your calendar in baikal. You can look it up in the baikal admin interface.

      In addition: You can use digest authentication instead of basic auth for the calendar module, if you set the sendImmediately option to false.

      1 Reply Last reply Reply Quote 0
      • P Offline
        poekel
        last edited by

        Hi,
        I have tried this -> https://dav.example.org/dav.php/calendars/[username]/[calendarname]?export already and it ask for a login and password.
        When i try this on my mac i get this:

        Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 296 bytes) in /volume1/web/baikal/vendor/sabre/vobject/lib/Parser/MimeDir.php on line 633

        Its the calendar op my wife and she holds a lot of entries (4000)in the calendar and I think that is the problem (memory exhausted) . I does not work…

        Any ideas welcome

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

          Hey @poekel,

          You can limit the export with some options. Since baikal uses sabre/dav you can use the options provided on the sabre/dav website here.

          Maybe it is helpful for you, if you limit the export with the start and/or end options. You have to use unix timestamps for this. Converters can be found easily via a google search.

          Here’s an example:

          http://dav.example.org/calendars/user1/mycalendar?export&start=1391707119&end=1391707215

          Maybe you just want to use the start option with today’s value. This would suffice for now I think…

          1 Reply Last reply Reply Quote 0
          • P Offline
            poekel
            last edited by

            Hi,
            Thanx for all the help. It looks like a short workshop Baikal :)
            I dont know if i am on the right track. I want to automate it. That is that items in the calendar show up on the mirror.
            Is’nt there a simple way ? ( Export to some ics file ?)

            Thanx!
            Poekel

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

              @poekel I don’t know, if I understand this right. But the ?export option already triggers a download for an .ics file (with all calendar events). I’m using this on my mirror with baikal and it works fine…

              1 Reply Last reply Reply Quote 0
              • P Offline
                poekel
                last edited by

                Hi,
                The command works fine and i converted the time/datestamps. I think there is something wrong with the stamps, because
                i get a file of 146 bytes whatever i do…
                I have to play with it. :)
                How do you keep the calendar up-to-date on the mirror ?
                ( my wife holds the calendars for all the family members so …)

                1 Reply Last reply Reply Quote 0
                • P Offline
                  poekel
                  last edited by

                  Hi,
                  How do you append the username and password ?
                  I think it works but it gives me a Authorization failed.

                  Poekel

                  1 Reply Last reply Reply Quote 0
                  • P Offline
                    poekel
                    last edited by

                    Beh,
                    I think i have got the right syntax to retrieve the ics files from baikal.
                    Can you explain how you did it on the mirror?

                    1 Reply Last reply Reply Quote 0
                    • P Offline
                      poekel
                      last edited by

                      @beh

                      I have read your workaround…
                      I am using Baikal on my synology.
                      i do NOT have this > https://dav.example.org/dav.php/calendars/[username]/Events?export folder

                      http://192.168.1.xx/baikal/html/dav.php/calendars/xxxx/calendar-name?export&startdate=1488672000 (=example)

                      How do i get the record from Baikal in 1 file given a certain start-end date in a file from the command line.
                      If that works i can change the url in the MM2 config.js file and point to that created file
                      Please help …

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

                        Hey @poekel
                        you have to use the keyword start instead of startdate.
                        It’s described in the sabre/dav documentation here: http://sabre.io/dav/ics-export-plugin/

                        So your request should look like this:
                        http://192.168.1.xx/baikal/html/dav.php/calendars/xxxx/calendar-name?export&start=1488672000

                        You can use this URL in your MM2 config file. It returns a valid .ics file. I’m using this on my mirror too.

                        And please note, that your calendar-name must be the internal name in Baikal (you can look this name up in the admin settings when you edit a calendar)

                        P 1 Reply Last reply Reply Quote 1
                        • P Offline
                          poekel @Beh
                          last edited by

                          @Beh

                          Thanx for the link!.
                          It works, it creates a file with nothing more than this:
                          BEGIN:VCALENDAR
                          VERSION:2.0
                          CALSCALE:GREGORIAN
                          PRODID:-//SabreDAV//SabreDAV 3.1.3//EN
                          X-WR-CALNAME:XXXXXXXXXXXX
                          X-APPLE-CALENDAR-COLOR:#FF2968
                          END:VCALENDAR

                          164 bytes

                          How do you handle the username and password that goes with the calendar in baikal?
                          Does the link in the config.js not ask for a username and password for the baikal calendar ?

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

                            @poekel

                            I will try a request with a start parameter when I’m home and test if it works with my Baikal server.

                            For user credentials:

                            Just add user and pass to your calendar config like this:

                            config: {
                                calendars: [
                                    {
                            		url: 'http://192.168.1.xx/baikal/html/dav.php/calendars/xxxx/calendar-name?export&start=1488672000',
                            		symbol: 'calendar',
                            		user: 'USERNAME',
                            		pass: 'PASSWORD'
                                    },
                                ],
                            }
                            

                            Additionally, Baikal uses Digest authentication. To use this, you have to change the sendImmediately option in the calendarfetcher.js to false. (As I already described above)

                            The option is located here. The file is located in MagicMirror/modules/default/calendar/calendarfetcher.js

                            In a future version of MM2, there will be an option for this directly in the config file so you don’t have to change this in calendarfetcher.js. I already submitted a pull request for that.

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

                              Hey, @poekel

                              after some trying on my Baikal server, I found out, that just the use of the start parameter alone is not working indeed.

                              However, I was able to get a request, if you add the componentType option to the request URL. You have to filter the type to VEVENT. But thats no problem, because the documentation says, that this is the only working type for export anyway.

                              So I got valid answers with the following URL scheme (including recognized timestamp):

                              https://dav.example.com/dav.php/calendars/USERNAME/calendarname?export&start=1490745600&componentType=VEVENT

                              1 Reply Last reply Reply Quote 0
                              • P Offline
                                poekel
                                last edited by

                                Your the Greatest!

                                Man , it works ! Unbelievable ! Many thanks!!!

                                1 Reply Last reply Reply Quote 0
                                • O Offline
                                  OsCourt
                                  last edited by

                                  Hi gentlemen,

                                  I’m sorry to reopen this old topic.
                                  What you are succeeded to do here it’s exactly what I search to do but it doesn’t work on my MagicMirror.

                                  • I have a Syno with Baikal (http://ipaddress/baikal/admin)
                                  • I have a user (homemagic) with his calendar (default)
                                  • My calendarfetcher.js is up-to-date (v2.2.0)

                                  URL I use for :
                                  http://ipaddress/baikal/cal.php/calendars/homemagic/default?export&start= 1514761200&componentType=VEVENT

                                  • Work on my android mobile with Caldav Sync Free Beta (PlayStore)
                                  • Work on ThunderBird
                                  • Doesn’t work on my MagicMirror :'(
                                  • My web browser (IE) return an error when I try to export

                                  Someone could help me please :)

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

                                    @OsCourt I think you need to use dav.php instead of cal.php on newer baikal versions. Also you need to use digest authentication with the calendar module of the mirror. It’s described in the readme of the module.

                                    1 Reply Last reply Reply Quote 0
                                    • O Offline
                                      OsCourt
                                      last edited by

                                      Thanks @Beh.

                                      I don’t have dav.php file in my baikal folder on my Syno :/
                                      I had already read the readme and I have the digest authentication in the mirror:

                                      config: {
                                                                      calendars: [
                                                                              {
                                                                                      symbol: "calendar-check-o ",
                                                                                      url: 'http://ipaddress/baikal/cal.php/calendars/homemagic/default?export&start=1514761200&componentType=VEVENT',
                                                                                      auth: {
                                                                                             user: "homemagic",
                                                                                             password: "pass",
                                                                                             method: "digest"
                                                                                            }
                                                                              },
                                                                      ]
                                                              }
                                      
                                      
                                      P 1 Reply Last reply Reply Quote 0
                                      • O Offline
                                        OsCourt
                                        last edited by

                                        Hi @poekel,

                                        How have you installed baikal on your Syno ?

                                        1 Reply Last reply Reply Quote 0
                                        • P Offline
                                          poekel @OsCourt
                                          last edited by

                                          @Beh

                                          Since sometime my calendar will not start. It keeps saying “loading”

                                          Does anyone have an idea to solve this ?

                                          1 Reply Last reply Reply Quote 0
                                          • Z Offline
                                            zeisolf
                                            last edited by zeisolf

                                            Dear all,

                                            it definitely sounds interesting to have Baikal-calenders on a MM as well.
                                            I am using Baikal (0.2.7, for my understanding the most recent version) on Synology for some time already now.
                                            By defnition i have the old-style path like http://MYSYNO/baikal/cal.php/calendars/USER/default/.
                                            To export any .ics-files for my understanding i will need to add the export plugin.
                                            How can i add this to Baikal on Synology or should this already be integrated in version 0.2.7?
                                            If not how can i update to any other version for Synology to enable this function?

                                            After some testing this is how i got it working:
                                            Add the Export-Plugin to Baikal:
                                            Edit cal.php
                                            near the end of the file add to the plugins:
                                            $server->addPlugin(new \Sabre\CalDAV\ICSExportPlugin());
                                            Edit card.php
                                            near the end of the file add to the plugins:
                                            $server->addPlugin(new \Sabre\CardDAV\VCFExportPlugin());

                                            URL in the web browser (i.e. Magic Mirror):
                                            http(s)://SERVER/baikal/cal.php/calendars/USER/default?export
                                            http(s)://SERVER/baikal/card.php/addressbooks/USER/default?export
                                            No additional parameters needed, if you want you can as described earlier in this thread…

                                            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
                                            • 2 / 2
                                            • 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