Caldav nextcloud 17

Hi,

I want to connect my nextcloud calendars to hassio but I get the following error in the home assistant reboot

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 157, in _new_conn
    (self._dns_host, self.port), self.timeout, **extra_kw
  File "/usr/local/lib/python3.7/site-packages/urllib3/util/connection.py", line 84, in create_connection
    raise err
  File "/usr/local/lib/python3.7/site-packages/urllib3/util/connection.py", line 74, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 672, in urlopen
    chunked=chunked,
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 376, in _make_request
    self._validate_conn(conn)
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 994, in _validate_conn
    conn.connect()
  File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 334, in connect
    conn = self._new_conn()
  File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 169, in _new_conn
    self, "Failed to establish a new connection: %s" % e
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x7fe5db1f1790>: Failed to establish a new connection: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 449, in send
    timeout=timeout
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 720, in urlopen
    method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
  File "/usr/local/lib/python3.7/site-packages/urllib3/util/retry.py", line 436, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='TLD.com', port=443): Max retries exceeded with url: /remote.php/dav/ (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7fe5db1f1790>: Failed to establish a new connection: [Errno 111] Connection refused'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 150, in _async_setup_platform
    await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for
    return fut.result()
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/caldav/calendar.py", line 74, in setup_platform
    calendars = client.principal().calendars()
  File "/usr/local/lib/python3.7/site-packages/caldav/davclient.py", line 118, in principal
    return Principal(self)
  File "/usr/local/lib/python3.7/site-packages/caldav/objects.py", line 370, in __init__
    cup = self.get_properties([dav.CurrentUserPrincipal()])
  File "/usr/local/lib/python3.7/site-packages/caldav/objects.py", line 219, in get_properties
    response = self._query_properties(props, depth)
  File "/usr/local/lib/python3.7/site-packages/caldav/objects.py", line 129, in _query_properties
    return self._query(root, depth)
  File "/usr/local/lib/python3.7/site-packages/caldav/objects.py", line 161, in _query
    url, body, depth)
  File "/usr/local/lib/python3.7/site-packages/caldav/davclient.py", line 133, in propfind
    {'Depth': str(depth)})
  File "/usr/local/lib/python3.7/site-packages/caldav/davclient.py", line 237, in request
    auth=auth, verify=self.ssl_verify_cert)
  File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 60, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 516, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='TLD.com', port=443): Max retries exceeded with url: /remote.php/dav/ (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7fe5db1f1790>: Failed to establish a new connection: [Errno 111] Connection refused'))

My config in configuration.yaml

    ##                                                        ##
    ##                        Calendar                       ##
    ##                                                        ##
    ############################################################    
 calendar:
   - platform: caldav
     username: !secret nextcloud_username
     password: !secret nextcloud_password
     url:  !secret nextcloud_url
     custom_calendars:
       - name: 'famille'
         calendar: 'famille'
         search: 'famille'
       - name: 'vacance'
         calendar: 'vacances'
         search: 'vacance'

Have you one idea for resolve this problem. on the nextcloud forum theyre are not help me for this problem

1 Like