Homematic setup does not finish

My Homematic plugin stopped working some time ago.
I am currently running Hass core 2021.9.7 with supervisor 2021.9.6, but I have had this problem for some time now also with lower versions.

The error is:

Setup of homematic is taking longer than 300 seconds. Startup will proceed without waiting any longer

My homematic config used to work with my CCU2.

My current config:

homematic:
  interfaces:
    ip:
      host: 192.168.1.91
      port: 2010
      #ssl: true
      #verify_ssl: false
      username: homeassistant
      password: !secret ccu3_password
    groups:
      host: 192.168.1.91
      port: 9292
      resolvenames: xml
      username: homeassistant
      password: !secret ccu3_password
      path: /groups
  hosts:
    ccu2:
      host: 192.168.1.91
      port: 2001
      username: homeassistant
      password: !secret ccu3_password

I played with the ssl settings without success.
How can I proceed here further?

The debug+ log states:

2021-10-02 20:17:47 INFO (MainThread) [homeassistant.setup] Setting up homematic
2021-10-02 20:17:47 DEBUG (SyncWorker_0) [pyhomematic.connection] HMConnection: Creating server object
2021-10-02 20:17:47 DEBUG (SyncWorker_0) [pyhomematic._hm] ServerThread.__init__
2021-10-02 20:17:47 DEBUG (SyncWorker_0) [pyhomematic._hm] createProxies: Creating proxies
2021-10-02 20:17:47 INFO (SyncWorker_0) [pyhomematic._hm] Creating proxy ip. Connecting to 192.168.1.91:2010
2021-10-02 20:17:47 DEBUG (SyncWorker_0) [pyhomematic._hm] LockingServerProxy.__init__: Getting local ip
2021-10-02 20:17:47 DEBUG (SyncWorker_0) [pyhomematic._hm] LockingServerProxy.__init__: Got local ip 192.168.1.110
2021-10-02 20:17:47 INFO (SyncWorker_0) [pyhomematic._hm] Creating proxy groups. Connecting to 192.168.1.91:9292/groups
2021-10-02 20:17:47 DEBUG (SyncWorker_0) [pyhomematic._hm] LockingServerProxy.__init__: Getting local ip
2021-10-02 20:17:47 DEBUG (SyncWorker_0) [pyhomematic._hm] LockingServerProxy.__init__: Got local ip 192.168.1.110
2021-10-02 20:17:47 INFO (SyncWorker_0) [pyhomematic._hm] Creating proxy ccu2. Connecting to 192.168.1.91:2001
2021-10-02 20:17:47 DEBUG (SyncWorker_0) [pyhomematic._hm] LockingServerProxy.__init__: Getting local ip
2021-10-02 20:17:47 DEBUG (SyncWorker_0) [pyhomematic._hm] LockingServerProxy.__init__: Got local ip 192.168.1.110
2021-10-02 20:17:47 DEBUG (SyncWorker_0) [pyhomematic._hm] RPCFunctions.__init__
2021-10-02 20:17:47 DEBUG (SyncWorker_0) [pyhomematic._hm] RPCFunctions.__init__: iterating proxy = homeassistant-ip
2021-10-02 20:17:47 DEBUG (SyncWorker_0) [pyhomematic._hm] RPCFunctions.__init__: iterating proxy = homeassistant-groups
2021-10-02 20:17:47 DEBUG (SyncWorker_0) [pyhomematic._hm] RPCFunctions.__init__: iterating proxy = homeassistant-ccu2
2021-10-02 20:17:47 DEBUG (SyncWorker_0) [pyhomematic._hm] ServerThread.__init__: Setting up server
2021-10-02 20:17:47 DEBUG (SyncWorker_0) [pyhomematic._hm] ServerThread.__init__: Registering RPC functions
2021-10-02 20:17:47 INFO (Thread-3) [pyhomematic._hm] Starting server at http://0.0.0.0:40583
2021-10-02 20:17:47 DEBUG (SyncWorker_0) [pyhomematic._hm] ServerThread.proxyInit: init('http://192.168.1.110:40583', 'homeassistant-ip')

...

2021-10-02 20:18:27 DEBUG (MainThread) [async_upnp_client.traffic.ssdp] Received packet from ('192.168.1.91', 1900): b'HTTP/1.1 200 OK\r\nCACHE-CONTROL: max-age=5000\r\nEXT: \r\nLOCATION: http://192.168.1.91/upnp/basic_dev.cgi\r\nSERVER: HomeMatic\r\nST: upnp:rootdevice\r\nUSN: uuid:upnp-BasicDevice-1_0(*redacted*)::upnp:rootdevice\r\n\r\n'

Then only a lot of those messages are in the log related to homematic:

2021-10-02 20:18:51 DEBUG (MainThread) [homeassistant.bootstrap] Running timeout Zones: {'homematic': <homematic: 1 / 0>}
2021-10-02 20:18:51 DEBUG (MainThread) [homeassistant.bootstrap] Integration remaining: {'homematic': 63.789136}

Found out the issue was, that homematic seems to contact the ccu with ssl enabled, if the setting is omitted. This causes the CCU2 to idle on the connection forever. It seems, contrary to the documentation, ssl defaults to true. After setting ssl explicitly to false it worked again. (It seems resolvenames: xml is also not supported anymore, so I had to switch to json, but this had nothing to do with the timeout)