Calendar - connecting to Synology Calendar

Dear Community,
I’m trying to connect home assistant to my Synology Calendar App - I’m not able to do this ;-(
I set up a calendar at Synology Calendar and shared this calendar.
In Home Assistant I configured the calendar in the configuration.yaml

calendar:
  - platform: caldav
    username: username from user "homeassistant"
    password: password from user "homeassistant"
    url: http://192.168.100.5:5000/caldav/homeassistant
    custom_calendars:
      # CALDAV Synology waste calendar
      - name: "Gelbe Tonne"
        calendar: "Abfallkalender"
        search: "Gelbe Tonne"
      - name: "Restabfalltonne"
        calendar: "Abfallkalender"
        search: "Restabfalltonne"
      - name: "Blaue Tonne"
        calendar: "Abfallkalender"
        search: "Blaue Tonne"

In home assistant the calendar view stays empty after several reboots… grrr.
Anybody out there who has a tipp where Im wrong???

Thanks in advance
//Erik

1 Like

Any errors in the log?
Sure that your ha server can reach the nas?

Not sure, but if you access this link and want to “access” the other calendars, ypu need to give access to them (via the webinerface).

That’s all I can think of…

I believe it should be caldav.php and closing slash in your calendar URL:

calendar:
  - platform: caldav
    username: username from user "homeassistant"
    password: password from user "homeassistant"
    url: http://192.168.100.5:5000/caldav.php/homeassistant/
    custom_calendars:
      # CALDAV Synology waste calendar
      - name: "Gelbe Tonne"
        calendar: "Abfallkalender"
        search: "Gelbe Tonne"
      - name: "Restabfalltonne"
        calendar: "Abfallkalender"
        search: "Restabfalltonne"
      - name: "Blaue Tonne"
        calendar: "Abfallkalender"
        search: "Blaue Tonne"
2 Likes

Hi Mirek - that’s it “.php” did the trick.

Thanks a lot! Now a can do my waste management.

1 Like

Thanks, it worked with “.php”.

Hi. I can’t connect HA calendar to Synology Calendar. I use all yours recommendations, but calendar in HA don’t received calendar data.

HA ver: 20230608.0 - latest in docker container Synology.

HA logs:

Logger: homeassistant.components.calendar
Source: helpers/entity_platform.py:254
Integration: Календарь (documentation, issues)
First occurred: 12:55:47 (1 occurrences)
Last logged: 12:55:47

Setup of platform caldav is taking longer than 60 seconds. Startup will proceed without waiting any longer.

Logger: homeassistant
Source: components/caldav/calendar.py:87
First occurred: 12:56:16 (1 occurrences)
Last logged: 12:56:16

Error doing job: Future exception was never retrieved
Traceback (most recent call last):
File

“/usr/local/lib/python3.11/concurrent/futures/thread.py”, line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/components/caldav/calendar.py”, line 87, in setup_platform
calendars = client.principal().calendars()
^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/caldav/davclient.py”, line 411, in principal
self._principal = Principal(client=self, *largs, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/caldav/objects.py”, line 480, in init
cup = self.get_property(dav.CurrentUserPrincipal())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/caldav/objects.py”, line 210, in get_property
foo = self.get_properties([prop], **passthrough)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/caldav/objects.py”, line 235, in get_properties
response = self._query_properties(props, depth)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/caldav/objects.py”, line 171, in _query_properties
return self._query(root, depth)
^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/caldav/objects.py”, line 196, in _query
ret = getattr(self.client, query_method)(url, body, depth)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/caldav/davclient.py”, line 459, in propfind
return self.request(url or self.url, “PROPFIND”, props, {“Depth”: str(depth)})
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/caldav/davclient.py”, line 629, in request
return self.request(url, method, body, headers)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/caldav/davclient.py”, line 654, in request
return self.request(url, method, body, headers)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/caldav/davclient.py”, line 654, in request
return self.request(url, method, body, headers)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/caldav/davclient.py”, line 654, in request
return self.request(url, method, body, headers)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[Previous line repeated 962 more times]
File “/usr/local/lib/python3.11/site-packages/caldav/davclient.py”, line 582, in request
r = self.session.request(
^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/requests/sessions.py”, line 589, in request
resp = self.send(prep, **send_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/requests/sessions.py”, line 703, in send
r = adapter.send(request, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/requests/adapters.py”, line 486, in send
resp = conn.urlopen(
^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/urllib3/connectionpool.py”, line 714, in urlopen
httplib_response = self._make_request(
^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/urllib3/connectionpool.py”, line 466, in _make_request
six.raise_from(e, None)
File “”, line 3, in raise_from
File “/usr/local/lib/python3.11/site-packages/urllib3/connectionpool.py”, line 461, in _make_request
httplib_response = conn.getresponse()
^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/http/client.py”, line 1375, in getresponse
response.begin()
File “/usr/local/lib/python3.11/http/client.py”, line 337, in begin
self.headers = self.msg = parse_headers(self.fp)
^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/http/client.py”, line 236, in parse_headers
return email.parser.Parser(_class=_class).parsestr(hstring)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/email/parser.py”, line 67, in parsestr
return self.parse(StringIO(text), headersonly=headersonly)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/email/parser.py”, line 56, in parse
feedparser.feed(data)
File “/usr/local/lib/python3.11/email/feedparser.py”, line 176, in feed
self._call_parse()
File “/usr/local/lib/python3.11/email/feedparser.py”, line 180, in _call_parse
self._parse()
File “/usr/local/lib/python3.11/email/feedparser.py”, line 295, in _parsegen
if self._cur.get_content_maintype() == ‘message’:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/email/message.py”, line 621, in get_content_maintype
ctype = self.get_content_type()
^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/email/message.py”, line 605, in get_content_type
value = self.get(‘content-type’, missing)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/email/message.py”, line 498, in get
return self.policy.header_fetch_parse(k, v)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/email/_policybase.py”, line 316, in header_fetch_parse
return self._sanitize_header(name, value)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/email/_policybase.py”, line 287, in _sanitize_header
if _has_surrogates(value):
^^^^^^^^^^^^^^^^^^^^^^
RecursionError: maximum recursion depth exceeded