Connection to RaspberryMatic not successfull

Hi all,
it is not possible for me to establish a connection between my Home Assistant(Docker) and my Raspberrymatic.
The error in the log:

2019-10-04 19:15:53 WARNING (SyncWorker_13) [pyhomematic._hm] Failed connecting to proxy at http://192.168.1.27:2001
2019-10-04 19:15:53 CRITICAL (SyncWorker_13) [pyhomematic.connection] Failed to create server
2019-10-04 19:15:53 CRITICAL (SyncWorker_13) [pyhomematic.connection] Failed to start server
2019-10-04 19:15:53 ERROR (MainThread) [homeassistant.setup] Error during setup of component homematic
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/pyhomematic/connection.py", line 73, in start
    self._server.start()
AttributeError: 'HMConnection' object has no attribute '_server'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 172, in _async_setup_component
    component.setup, hass, processed_config  # type: ignore
  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/homematic/__init__.py", line 410, in setup
    homematic.start()
  File "/usr/local/lib/python3.7/site-packages/pyhomematic/connection.py", line 79, in start
    self._server.stop()
AttributeError: 'HMConnection' object has no attribute '_server'

I opened a bash on the running docker container and was able to ping my raspberrymatic. Portscan successfully showed that the port 2000,2001 and 2010 are open.
Raspberrymatic IP: 192.168.1.27
Home Assistant: 192.168.1.220
Home Assistant config:

  GNU nano 3.2                                                                                 configuration.yaml                                                                                           


# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:

# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
# http:
#   base_url: example.duckdns.org:8123

# Text to speech
tts:
  - platform: google_translate

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
homematic:
  local_ip: 192.168.1.220
  interfaces:
    rf:
      host: 192.168.1.27
      resolvenames: json
      username: Admin
      password: <>
    wired:
      host: 192.168.1.27
      port: 2000
      resolvenames: json
      username: Admin
      password: <>
    ip:
      host: 192.168.1.27
      port: 2010
    groups:
      host: 192.168.1.27
      port: 9292
      resolvenames: json
      username: Admin
      password: <>
      path: /groups
  hosts:
    ccu3:
      host: 192.168.1.27
      username: Admin
      password: <>

I’m completely new to both tools and might have overlooked something.
I have deactivated the authentication on the CCU as I read that this is sometimes the issue. Anywhere else where I need to look?

Best,
RenΓ©

It took me the night but I fixed the issue.
The issue was that Home-assistant can not handle password with a β€˜#’ in it… .
I figured this out by enabling the debug-mode thanks to danielperna84: https://github.com/danielperna84/pyhomematic/issues/123.
Debug-mode showed:

2019-10-05 09:00:40 INFO (SyncWorker_19) [pyhomematic._hm] Creating proxy rf. Connecting to 192.168.1.27:2001
2019-10-05 09:00:40 WARNING (SyncWorker_19) [pyhomematic._hm] Failed connecting to proxy at http://192.168.1.27:2001
2019-10-05 09:00:40 DEBUG (SyncWorker_19) [pyhomematic._hm] __init__: Exception: invalid literal for int() with base 10: '8tZDZwnwU92MB4msZko2FVgyH!hzy'

As the password was not complete but stopped before the coming β€˜#’, my guess is that home-assistant or pyhomematic can not handle passwords with a β€˜#’ in it.
I created a new password without any special characters and it works fine now :wink:

3 Likes