Homegear mit Home-Assistant.io - nun Hass.io

Hallo OzanU,

schrittweise komme ich jetzt voran. Die Homatic Konfiguration scheint jetzt zumindest von der Syntax zu stimmen.

Diese sieht jetzt wie folgt aus:

homematic:
  local_ip: 192.168.0.70
  local_port: 36845
  interfaces:
    wireless:
      host: 192.168.0.70
      port: 2001
      callback_ip: 172.17.0.2
      callback_port: 36845
      resolvenames: metadata

Log sieht auch gut aus ohne Fehler.

2017-12-26 17:01:03 INFO (MainThread) [homeassistant.setup] Setting up homematic
2017-12-26 17:01:03 DEBUG (Thread-12) [pyhomematic.connection] HMConnection: Creating server object 
2017-12-26 17:01:03 DEBUG (Thread-12) [pyhomematic._hm] ServerThread.__init__ 
2017-12-26 17:01:03 DEBUG (Thread-12) [pyhomematic._hm] __init__: Creating proxies 
2017-12-26 17:01:03 INFO (Thread-12) [pyhomematic._hm] Creating proxy wireless. Connecting to http://192.168.0.70:2001 
2017-12-26 17:01:03 DEBUG (Thread-12) [pyhomematic._hm] LockingServerProxy.__init__: Getting local ip 
2017-12-26 17:01:03 DEBUG (Thread-12) [pyhomematic._hm] LockingServerProxy.__init__: Got local ip 192.168.0.70 
2017-12-26 17:01:03 DEBUG (Thread-12) [pyhomematic._hm] RPCFunctions.__init__ 2017-12-26 17:01:03 DEBUG (Thread-12) [pyhomematic._hm] RPCFunctions.__init__: iterating proxy = homeassistant-wireless 
2017-12-26 17:01:03 DEBUG (Thread-12) [pyhomematic._hm] RPCFunctions.__init__: devices_raw = [] 
2017-12-26 17:01:03 DEBUG (Thread-12) [pyhomematic._hm] RPCFunctions.createDeviceObjects: iterating interface_id = wireless 
2017-12-26 17:01:03 DEBUG (Thread-12) [pyhomematic._hm] ServerThread.__init__: Setting up server 
2017-12-26 17:01:03 DEBUG (Thread-12) [pyhomematic._hm] ServerThread.__init__: Registering RPC functions 
2017-12-26 17:01:03 INFO (Thread-22) [pyhomematic._hm] Starting server at http://192.168.0.70:36845 
2017-12-26 17:01:03 DEBUG (Thread-12) [pyhomematic._hm] ServerThread.proxyInit: init('http://172.17.0.2:36845', 'homeassistant-wireless') 
2017-12-26 17:01:03 INFO (Thread-12) [pyhomematic._hm] Proxy initialized 
2017-12-26 17:01:03 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: service=virtualkey, domain=homematic> 
2017-12-26 17:01:03 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: service=set_variable_value, domain=homematic> 
2017-12-26 17:01:03 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: service=reconnect, domain=homematic> 
2017-12-26 17:01:03 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: service=set_device_value, domain=homematic> 
2017-12-26 17:01:03 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: service=set_install_mode, domain=homematic> 
2017-12-26 17:01:03 INFO (MainThread) [homeassistant.setup] Setup of domain homematic took 0.3 seconds. 
2017-12-26 17:01:03 INFO (MainThread) [homeassistant.core] Bus:Handling <Event component_loaded[L]: component=homematic> 
2017-12-26 17:01:03 INFO (MainThread) [homeassistant.setup] Setting up discovery 
2017-12-26 17:01:03 INFO (MainThread) [homeassistant.setup] Setup of domain discovery took 0.0 seconds. 
2017-12-26 17:01:03 INFO (MainThread) [homeassistant.core] Bus:Handling <Event component_loaded[L]: component=discovery>

Wie sehe ich jetzt den Thermostat HM-CC-RT-DN in Home Assistant?

Habe den Thermostat über das Homematic Konfigurationstools angelernt.

Hi Tom74,
hmm also mit dem Thermostat würde ich es wie auf der Component seite beschrieben ( hier ) versuchen.

homematic:
  local_ip: 192.168.0.70
  local_port: 36845
  interfaces:
    wireless:
      host: 192.168.0.70
      port: 2001
      callback_ip: 172.17.0.2
      callback_port: 36845
      resolvenames: metadata
    groups:
      host: 192.168.0.70
      port: 9292
      callback_ip: 172.17.0.2
      callback_port: 36845
      resolvenames: metadata
      path: /groups

Klappt nicht :frowning:

2017-12-26 20:05:43 INFO (MainThread) [homeassistant.setup] Setting up homematic
2017-12-26 20:05:43 DEBUG (Thread-4) [pyhomematic.connection] HMConnection: Creating server object
2017-12-26 20:05:43 DEBUG (Thread-4) [pyhomematic._hm] ServerThread.__init__
2017-12-26 20:05:43 DEBUG (Thread-4) [pyhomematic._hm] __init__: Creating proxies
2017-12-26 20:05:43 INFO (Thread-4) [pyhomematic._hm] Creating proxy wireless. Connecting to http://192.168.0.70:2001
2017-12-26 20:05:43 DEBUG (Thread-4) [pyhomematic._hm] LockingServerProxy.__init__: Getting local ip
2017-12-26 20:05:43 DEBUG (Thread-4) [pyhomematic._hm] LockingServerProxy.__init__: Got local ip 192.168.0.70
2017-12-26 20:05:43 INFO (Thread-4) [pyhomematic._hm] Creating proxy groups. Connecting to http://192.168.0.70:9292/groups
2017-12-26 20:05:43 DEBUG (Thread-4) [pyhomematic._hm] LockingServerProxy.__init__: Getting local ip
2017-12-26 20:05:43 DEBUG (Thread-4) [pyhomematic._hm] LockingServerProxy.__init__: Got local ip 192.168.0.70
2017-12-26 20:05:43 DEBUG (Thread-4) [pyhomematic._hm] RPCFunctions.__init__
2017-12-26 20:05:43 DEBUG (Thread-4) [pyhomematic._hm] RPCFunctions.__init__: iterating proxy = homeassistant-groups
2017-12-26 20:05:43 DEBUG (Thread-4) [pyhomematic._hm] RPCFunctions.__init__: devices_raw = []
2017-12-26 20:05:43 DEBUG (Thread-4) [pyhomematic._hm] RPCFunctions.createDeviceObjects: iterating interface_id = groups
2017-12-26 20:05:43 DEBUG (Thread-4) [pyhomematic._hm] RPCFunctions.__init__: iterating proxy = homeassistant-wireless
2017-12-26 20:05:43 DEBUG (Thread-4) [pyhomematic._hm] RPCFunctions.__init__: devices_raw = []
2017-12-26 20:05:43 DEBUG (Thread-4) [pyhomematic._hm] RPCFunctions.createDeviceObjects: iterating interface_id = wireless
2017-12-26 20:05:43 DEBUG (Thread-4) [pyhomematic._hm] ServerThread.__init__: Setting up server
2017-12-26 20:05:43 DEBUG (Thread-4) [pyhomematic._hm] ServerThread.__init__: Registering RPC functions
2017-12-26 20:05:43 INFO (Thread-22) [pyhomematic._hm] Starting server at http://192.168.0.70:36845
2017-12-26 20:05:43 DEBUG (Thread-4) [pyhomematic._hm] ServerThread.proxyInit: init('http://172.17.0.2:36845', 'homeassistant-groups')
2017-12-26 20:05:43 DEBUG (Thread-4) [pyhomematic._hm] proxyInit: Exception: [Errno 111] Connection refused
2017-12-26 20:05:43 WARNING (Thread-4) [pyhomematic._hm] Failed to initialize proxy
2017-12-26 20:05:43 CRITICAL (Thread-4) [pyhomematic.connection] Failed to start server
2017-12-26 20:05:43 DEBUG (Thread-4) [pyhomematic.connection] 
2017-12-26 20:05:43 DEBUG (Thread-4) [pyhomematic._hm] ServerThread.stop: init('http://172.17.0.2:36845')
2017-12-26 20:05:43 DEBUG (Thread-4) [pyhomematic._hm] proxyInit: Exception: [Errno 111] Connection refused
2017-12-26 20:05:43 WARNING (Thread-4) [pyhomematic._hm] Failed to de-initialize proxy
2017-12-26 20:05:43 ERROR (MainThread) [homeassistant.setup] Error during setup of component homematic
Traceback (most recent call last):
  File "/home/haadmin/.homeassistant/deps/lib/python3.5/site-packages/pyhomematic/_hm.py", line 534, in proxyInit
    (callbackip, callbackport), interface_id)
  File "/usr/lib/python3.5/xmlrpc/client.py", line 1092, in __call__
    return self.__send(self.__name, args)
  File "/home/haadmin/.homeassistant/deps/lib/python3.5/site-packages/pyhomematic/_hm.py", line 412, in __request
    return parent._ServerProxy__request(self, *args, **kwargs)
  File "/usr/lib/python3.5/xmlrpc/client.py", line 1432, in __request
    verbose=self.__verbose
  File "/usr/lib/python3.5/xmlrpc/client.py", line 1134, in request
    return self.single_request(host, handler, request_body, verbose)
  File "/usr/lib/python3.5/xmlrpc/client.py", line 1146, in single_request
    http_conn = self.send_request(host, handler, request_body, verbose)
  File "/usr/lib/python3.5/xmlrpc/client.py", line 1259, in send_request
    self.send_content(connection, request_body)
  File "/usr/lib/python3.5/xmlrpc/client.py", line 1289, in send_content
    connection.endheaders(request_body)
  File "/usr/lib/python3.5/http/client.py", line 1103, in endheaders
    self._send_output(message_body)
  File "/usr/lib/python3.5/http/client.py", line 934, in _send_output
    self.send(msg)
  File "/usr/lib/python3.5/http/client.py", line 877, in send
    self.connect()
  File "/usr/lib/python3.5/http/client.py", line 849, in connect
    (self.host,self.port), self.timeout, self.source_address)
  File "/usr/lib/python3.5/socket.py", line 712, in create_connection
    raise err
  File "/usr/lib/python3.5/socket.py", line 703, 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 "/home/haadmin/.homeassistant/deps/lib/python3.5/site-packages/pyhomematic/connection.py", line 74, in start
    self._server.proxyInit()
  File "/home/haadmin/.homeassistant/deps/lib/python3.5/site-packages/pyhomematic/_hm.py", line 539, in proxyInit
    raise Exception
Exception

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/haadmin/.homeassistant/deps/lib/python3.5/site-packages/pyhomematic/_hm.py", line 555, in stop
    proxy.init(remote)
  File "/usr/lib/python3.5/xmlrpc/client.py", line 1092, in __call__
    return self.__send(self.__name, args)
  File "/home/haadmin/.homeassistant/deps/lib/python3.5/site-packages/pyhomematic/_hm.py", line 412, in __request
    return parent._ServerProxy__request(self, *args, **kwargs)
  File "/usr/lib/python3.5/xmlrpc/client.py", line 1432, in __request
    verbose=self.__verbose
  File "/usr/lib/python3.5/xmlrpc/client.py", line 1134, in request
    return self.single_request(host, handler, request_body, verbose)
  File "/usr/lib/python3.5/xmlrpc/client.py", line 1146, in single_request
    http_conn = self.send_request(host, handler, request_body, verbose)
  File "/usr/lib/python3.5/xmlrpc/client.py", line 1259, in send_request
    self.send_content(connection, request_body)
  File "/usr/lib/python3.5/xmlrpc/client.py", line 1289, in send_content
    connection.endheaders(request_body)
  File "/usr/lib/python3.5/http/client.py", line 1103, in endheaders
    self._send_output(message_body)
  File "/usr/lib/python3.5/http/client.py", line 934, in _send_output
    self.send(msg)
  File "/usr/lib/python3.5/http/client.py", line 877, in send
    self.connect()
  File "/usr/lib/python3.5/http/client.py", line 849, in connect
    (self.host,self.port), self.timeout, self.source_address)
  File "/usr/lib/python3.5/socket.py", line 712, in create_connection
    raise err
  File "/usr/lib/python3.5/socket.py", line 703, 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.5/dist-packages/homeassistant/setup.py", line 193, in _async_setup_component
    component.setup, hass, processed_config)
  File "/usr/lib/python3.5/asyncio/futures.py", line 380, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
    future.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
    raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.5/dist-packages/homeassistant/components/homematic/__init__.py", line 318, in setup
    homematic.start()
  File "/home/haadmin/.homeassistant/deps/lib/python3.5/site-packages/pyhomematic/connection.py", line 79, in start
    self._server.stop()
  File "/home/haadmin/.homeassistant/deps/lib/python3.5/site-packages/pyhomematic/_hm.py", line 561, in stop
    raise Exception
Exception
2017-12-26 20:05:43 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: service_call_id=1962225744-2, service_data=title=Invalid config, notification_id=invalid_config, message=The following components and platforms could not be set up:

 - [homematic](https://home-assistant.io/components/homematic/)

Please check your config., service=create, domain=persistent_notification>
2017-12-26 20:05:43 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: old_state=None, new_state=<state persistent_notification.invalid_config=notifying; title=Invalid config, message=The following components and platforms could not be set up:

 - [homematic](https://home-assistant.io/components/homematic/)

Weshalb “ConnectionRefusedError: [Errno 111] Connection refused” ???

Passen die Firewall Regeln soweit? Ohne die Iptables-Eintrage kann ich mich nicht mit Home-Assistant verbinden,da dann auch die Verbindung nicht erlaubt ist.

-> http://192.168.0.70:8123

Chain INPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere
REJECT     all  --  anywhere             loopback/8           reject-with icmp-port-unreachable
ACCEPT     all  --  anywhere             anywhere             state RELATED,ESTABLISHED
ACCEPT     tcp  --  192.168.0.0/24       anywhere             tcp dpt:http
ACCEPT     tcp  --  192.168.0.0/24       anywhere             tcp dpt:https
ACCEPT     tcp  --  192.168.0.0/24       anywhere             tcp dpt:http-alt
ACCEPT     tcp  --  192.168.0.0/24       anywhere             tcp dpt:8123
ACCEPT     tcp  --  172.17.0.0/16        anywhere             tcp dpt:2001
ACCEPT     tcp  --  172.17.0.0/16        anywhere             tcp dpt:2002
ACCEPT     tcp  --  172.17.0.0/16        anywhere             tcp dpt:cfinger
ACCEPT     tcp  --  192.168.0.0/24       anywhere             tcp dpt:2869
ACCEPT     udp  --  192.168.0.0/24       anywhere             udp dpt:1900
ACCEPT     udp  --  172.17.0.0/16        anywhere             udp dpt:2001
ACCEPT     udp  --  172.17.0.0/16        anywhere             udp dpt:2002
ACCEPT     udp  --  172.17.0.0/16        anywhere             udp dpt:2003
ACCEPT     tcp  --  anywhere             anywhere             state NEW tcp dpt:ssh
ACCEPT     icmp --  anywhere             anywhere
LOG        all  --  anywhere             anywhere             limit: avg 5/min burst 5 LOG level debug prefix "iptables denied: "
DROP       all  --  anywhere             anywhere

Chain FORWARD (policy DROP)
target     prot opt source               destination
DOCKER-USER  all  --  anywhere             anywhere
DOCKER-ISOLATION  all  --  anywhere             anywhere
ACCEPT     all  --  anywhere             anywhere             ctstate RELATED,ESTABLISHED
DOCKER     all  --  anywhere             anywhere
ACCEPT     all  --  anywhere             anywhere
ACCEPT     all  --  anywhere             anywhere
DROP       all  --  anywhere             anywhere

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere
ACCEPT     all  --  anywhere             anywhere             ctstate ESTABLISHED

Chain DOCKER (1 references)
target     prot opt source               destination
ACCEPT     tcp  --  anywhere             172.17.0.2           tcp dpt:cfinger
ACCEPT     tcp  --  anywhere             172.17.0.2           tcp dpt:2002
ACCEPT     tcp  --  anywhere             172.17.0.2           tcp dpt:2001

Chain DOCKER-ISOLATION (1 references)
target     prot opt source               destination
RETURN     all  --  anywhere             anywhere

Chain DOCKER-USER (1 references)
target     prot opt source               destination
RETURN     all  --  anywhere             anywhere

Und hier bin ich jetzt irritiert -> docker0:172.17.0.1

ip addr show

 docker0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
    link/ether 02:42:6a:26:01:64 brd ff:ff:ff:ff:ff:ff
    inet 172.17.0.1/16 scope global docker0
       valid_lft forever preferred_lft forever
    inet 169.254.157.77/16 brd 169.254.255.255 scope global docker0
       valid_lft forever preferred_lft forever

Aber docker network inspect bridge zeigt

"NetworkSettings": {
            "Bridge": "",
            "SandboxID": "f6f5742b3ef2c14890c3ad4a6a1b2a49f42397bf04fd55acaa36f42617685806",
            "HairpinMode": false,
            "LinkLocalIPv6Address": "",
            "LinkLocalIPv6PrefixLen": 0,
            "Ports": {
                "2001/tcp": [
                    {
                        "HostIp": "0.0.0.0",
                        "HostPort": "2001"
                    }
                ],
                "2002/tcp": [
                    {
                        "HostIp": "0.0.0.0",
                        "HostPort": "2002"
                    }
                ],
                "2003/tcp": [
                    {
                        "HostIp": "0.0.0.0",
                        "HostPort": "2003"
                    }
                ]
            },
            "SandboxKey": "/var/run/docker/netns/f6f5742b3ef2",
            "SecondaryIPAddresses": null,
            "SecondaryIPv6Addresses": null,
            "EndpointID": "4718e360c1575703de21198ee93c4b960b24bb82a0b422acba409549ddfcd163",
            "Gateway": "172.17.0.1",
            "GlobalIPv6Address": "",
            "GlobalIPv6PrefixLen": 0,
            "IPAddress": "172.17.0.2",
            "IPPrefixLen": 16,
            "IPv6Gateway": "",
            "MacAddress": "02:42:ac:11:00:02",
            "Networks": {
                "bridge": {
                    "IPAMConfig": null,
                    "Links": null,
                    "Aliases": null,
                    "NetworkID": "33d3f0fee4ac3cf2b55483987a9c8aa4a3f4f771d151eb5792c0ccaf86652c00",
                    "EndpointID": "4718e360c1575703de21198ee93c4b960b24bb82a0b422acba409549ddfcd163",
                    "Gateway": "172.17.0.1",
                    "IPAddress": "172.17.0.2",
                    "IPPrefixLen": 16,
                    "IPv6Gateway": "",
                    "GlobalIPv6Address": "",
                    "GlobalIPv6PrefixLen": 0,
                    "MacAddress": "02:42:ac:11:00:02",
                    "DriverOpts": null

Laut docker0 wäre 172.17.0.1 die zugewiesene IP für den Container.

In der bridge Config steht aber

“Gateway”: “172.17.0.1”,
“IPAddress”: “172.17.0.2”

Was stimmt jetzt? Diese Angaben sind schon verwirrend…

Wie gesagt, konnte ich über das Homematic Utilty den Thermostat über das Funkmodul pairen.

Homegear im Docker Container sieht es ja auch über die RPC-Schnittstelle:

http://192.168.0.70:2001

Ich meine gelesen zu haben, dass der Thermostat von HA erkannt wird und in der Konfiguration auftaucht.

Irgendetwas mache ich also grundlegend falsch.

Probiere es erstmal überall nur mit der Raspberry IP, um zu sehen ob er das Thermostat überhaupt erkannt. Das er das docker intern steuert kann man ja später noch versuchen.

Oh und an deiner Firewall würde ich nicht die Ports freigeben außer du hast eine Netzwerk internen Firewall die die Kommunikation der Geräte untereinander beeinflusst. Normalerweise hat man nur eine Firewall zum Internet raus. Sonst drehe ich heute Abend die Heizung bei dir auf :joy:

Hallo klappt ebenfalls nicht.

Die Konfiguration mit “groups” scheint nicht zu stimmen.

Nach einen hass --script check_config bekomme ich bei den groups Fehler angezeigt

home-assistant.log

017-12-27 11:58:26 INFO (MainThread) [homeassistant.core] Bus:Handling <Event component_loaded[L]: component=updater>
2017-12-27 11:58:27 INFO (MainThread) [homeassistant.setup] Setting up discovery
2017-12-27 11:58:27 INFO (MainThread) [homeassistant.setup] Setup of domain discovery took 0.0 seconds.
2017-12-27 11:58:27 INFO (MainThread) [homeassistant.core] Bus:Handling <Event component_loaded[L]: component=discovery>
2017-12-27 11:58:27 INFO (MainThread) [homeassistant.setup] Setting up homematic
2017-12-27 11:58:27 DEBUG (Thread-14) [pyhomematic.connection] HMConnection: Creating server object
2017-12-27 11:58:27 DEBUG (Thread-14) [pyhomematic._hm] ServerThread.__init__
2017-12-27 11:58:27 DEBUG (Thread-14) [pyhomematic._hm] __init__: Creating proxies
2017-12-27 11:58:27 INFO (Thread-14) [pyhomematic._hm] Creating proxy wireless. Connecting to http://192.168.0.70:2001
2017-12-27 11:58:27 DEBUG (Thread-14) [pyhomematic._hm] LockingServerProxy.__init__: Getting local ip
2017-12-27 11:58:27 DEBUG (Thread-14) [pyhomematic._hm] LockingServerProxy.__init__: Got local ip 192.168.0.70
2017-12-27 11:58:27 DEBUG (Thread-14) [pyhomematic._hm] RPCFunctions.__init__
2017-12-27 11:58:27 DEBUG (Thread-14) [pyhomematic._hm] RPCFunctions.__init__: iterating proxy = homeassistant-wireless
2017-12-27 11:58:27 DEBUG (Thread-14) [pyhomematic._hm] RPCFunctions.__init__: devices_raw = []
2017-12-27 11:58:27 DEBUG (Thread-14) [pyhomematic._hm] RPCFunctions.createDeviceObjects: iterating interface_id = wireless
2017-12-27 11:58:27 DEBUG (Thread-14) [pyhomematic._hm] ServerThread.__init__: Setting up server
2017-12-27 11:58:27 DEBUG (Thread-14) [pyhomematic._hm] ServerThread.__init__: Registering RPC functions
2017-12-27 11:58:27 INFO (Thread-23) [pyhomematic._hm] Starting server at http://192.168.0.70:36845
2017-12-27 11:58:27 DEBUG (Thread-14) [pyhomematic._hm] ServerThread.proxyInit: init('http://172.17.0.2:36845', 'homeassistant-wireless')
2017-12-27 11:58:27 INFO (Thread-14) [pyhomematic._hm] Proxy initialized
2017-12-27 11:58:27 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: service=virtualkey, domain=homematic>
2017-12-27 11:58:27 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: service=set_variable_value, domain=homematic>
2017-12-27 11:58:27 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: service=reconnect, domain=homematic>
2017-12-27 11:58:27 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: service=set_device_value, domain=homematic>
2017-12-27 11:58:27 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: service=set_install_mode, domain=homematic>
2017-12-27 11:58:27 INFO (MainThread) [homeassistant.setup] Setup of domain homematic took 0.4 seconds.
2017-12-27 11:58:27 INFO (MainThread) [homeassistant.core] Bus:Handling <Event component_loaded[L]: component=homematic>
2017-12-27 11:58:27 INFO (MainThread) [homeassistant.setup] Setting up conversation
2017-12-27 11:58:27 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: service=process, domain=conversation>
2017-12-27 11:58:27 INFO (MainThread) [homeassistant.setup] Setup of domain conversation took 0.0 seconds.
2017-12-27 11:58:27 INFO (MainThread) [homeassistant.core] Bus:Handling <Event component_loaded[L]: component=conversation>
2017-12-27 11:58:27 INFO (MainThread) [homeassistant.bootstrap] Home Assistant initialized in 6.05s
2017-12-27 11:58:27 INFO (MainThread) [homeassistant.core] Starting Home Assistant core loop
2017-12-27 11:58:27 INFO (MainThread) [homeassistant.core] Starting Home Assistant
2017-12-27 11:58:27 INFO (MainThread) [homeassistant.core] Bus:Handling <Event homeassistant_start[L]>
2017-12-27 11:58:27 INFO (MainThread) [homeassistant.core] Timer:starting
2017-12-27 11:58:30 INFO (MainThread) [homeassistant.components.http] Serving /api/websocket to 192.168.0.1 (auth: True)
2017-12-27 11:58:30 DEBUG (MainThread) [homeassistant.components.websocket_api] WS 1748442288: Connected 
2017-12-27 11:58:30 DEBUG (MainThread) [homeassistant.components.websocket_api] WS 1748442288: Received {'type': 'subscribe_events', 'id': 2, 'event_type': 'state_changed'}
2017-12-27 11:58:30 DEBUG (MainThread) [homeassistant.components.websocket_api] WS 1748442288: Received {'type': 'subscribe_events', 'id': 3, 'event_type': 'component_loaded'}
2017-12-27 11:58:30 DEBUG (MainThread) [homeassistant.components.websocket_api] WS 1748442288: Sending {'success': True, 'type': 'result', 'result': None, 'id': 2}
2017-12-27 11:58:30 DEBUG (MainThread) [homeassistant.components.websocket_api] WS 1748442288: Sending {'success': True, 'type': 'result', 'result': None, 'id': 3}
2017-12-27 11:58:30 DEBUG (MainThread) [homeassistant.components.websocket_api] WS 1748442288: Received {'type': 'subscribe_events', 'id': 4, 'event_type': 'service_registered'}
2017-12-27 11:58:30 DEBUG (MainThread) [homeassistant.components.websocket_api] WS 1748442288: Received {'type': 'subscribe_events', 'id': 5, 'event_type': 'service_removed'}
2017-12-27 11:58:30 DEBUG (MainThread) [homeassistant.components.websocket_api] WS 1748442288: Received {'type': 'subscribe_events', 'id': 6, 'event_type': 'themes_updated'}
2017-12-27 11:58:30 DEBUG (MainThread) [homeassistant.components.websocket_api] WS 1748442288: Received {'type': 'get_states', 'id': 7}
2017-12-27 11:58:30 DEBUG (MainThread) [homeassistant.components.websocket_api] WS 1748442288: Received {'type': 'get_config', 'id': 8}
2017-12-27 11:58:30 DEBUG (MainThread) [homeassistant.components.websocket_api] WS 1748442288: Received {'type': 'get_panels', 'id': 9}
2017-12-27 11:58:30 DEBUG (MainThread) [homeassistant.components.websocket_api] WS 1748442288: Received {'type': 'get_services', 'id': 10}
2017-12-27 11:58:30 DEBUG (MainThread) [homeassistant.components.websocket_api] WS 1748442288: Sending {'success': True, 'type': 'result', 'result': None, 'id': 4}
2017-12-27 11:58:30 DEBUG (MainThread) [homeassistant.components.websocket_api] WS 1748442288: Sending {'success': True, 'type': 'result', 'result': None, 'id': 5}
2017-12-27 11:58:30 DEBUG (MainThread) [homeassistant.components.websocket_api] WS 1748442288: Sending {'success': True, 'type': 'result', 'result': None, 'id': 6}
2017-12-27 11:58:30 DEBUG (MainThread) [homeassistant.components.websocket_api] WS 1748442288: Sending {'success': True, 'type': 'result', 'result': [<state persistent_notification.notification=notifying; title=Welcome Home!, message=Here are some resources to get started:

So ich habe jetzt mal ausprobiert, ob ich überhaupt mit dem Thermostat kommunizieren kann.

Es gibt ein Beispiel Python-Script um dies zu testen. Das pyhomematic Interface wird von HA benutzt um mit Homematic Geräten zu kommunizieren.

Ich habe jetzt einmal die Daten des Thermostats mit Homegear ausgelesen.

Connected to Homegear (version 0.7.10-1397).

families select 0
Device family “HomeMatic BidCoS” selected.
For information about the family’s commands type: “help”
(Family)> pl

     ID │ Name                      │  Address │ Serial Number │ Type │ Type String               │ Firmware │ Config Pending │ Unreach │ Low Bat
      1 │ HM-CC-RT-DN OEQ16xxxxx    │   5FA1F6 │    OEQ16xxxxx │ 0095 │   HM-CC-RT-DN             │    1.4   │             No │     No  │      No

example.py

#!/usr/bin/python3
import time
import sys
import logging
from pyhomematic import HMConnection

logging.basicConfig(level=logging.INFO)

#DEVICE1 = 'address_of_rollershutter_device'  # e.g. KEQ7654321
#DEVICE2 = 'address_of_doorcontact'  # e.g. LEQ1234567
DEVICE3 =  '5FA1F6'

def systemcallback(src, *args):
    print(src)
    for arg in args:
        print(arg)

try:
    # Create a server that listens on 127.0.0.1:7080 and identifies itself as myserver.
    # Connect to Homegear at 127.0.0.1:2001
    # Automatically start everything. Without autostart, pyhomematic.start() can be called.
    # We add a systemcallback so we can see what else happens besides the regular events.
    pyhomematic = HMConnection(interface_id="myserver",
                               local="192.168.0.70",
                               localport=7080,
                               remote="192.168.0.70",
                               remoteport=2001,
                               autostart=True,
                               systemcallback=systemcallback)
except:
    sys.exit(1)

sleepcounter = 0

def eventcallback(address, interface_id, key, value):
    print("CALLBACK: %s, %s, %s, %s" % (address, interface_id, key, value))

while not pyhomematic.devices and sleepcounter < 20:
    print("Waiting for devices")
    sleepcounter += 1
    time.sleep(1)
print(pyhomematic.devices)


# Get Actual Temperature
print(pyhomematic.devices[DEVICE3].actual_temperature)

# Get Set Temperature
print(pyhomematic.devices[DEVICE3].set_temperature)

# Get Battery State
print(pyhomematic.devices[DEVICE3].battery_state)

# Stop the server thread so Python can exit properly.
pyhomematic.stop()

sys.exit(0)

Das Script funktioniert aber leider nicht. Die Geräte Adresse scheint falsch zu sein…

hass-pi:~ $ ./example.py
INFO:pyhomematic._hm:Creating proxy default. Connecting to http://192.168.0.70:2001
createDeviceObjects
INFO:pyhomematic._hm:Starting server at http://192.168.0.70:7080
INFO:pyhomematic._hm:Proxy initialized
{‘default’: {}}
Traceback (most recent call last):
File “./example.py”, line 46, in
print(pyhomematic.devices[DEVICE3].actual_temperature)
KeyError: ‘5FA1F6’

Was ist hier die korrekte Geräte Adresse? 5FA1F6 wird doch von Homegear ausgelesen.
Müsste also stimmen, oder?

Was mache ich falsch?


Vermutlich kommt hier erschwerend hinzu, dass es in Home Assistant 0.60 eine breaking change gab. Meine Config von oben muss also so angepasst werden wie @OzanU das bereits gezeigt hat. Bei mir steht da jetzt:

homematic:
  local_ip: 192.168.46.10
  local_port: 36845
  interfaces:
    wireless:
      host: 192.168.46.10
      port: 2001
      callback_ip: 192.168.46.10
      callback_port: 36845
      resolvenames: metadata

Also letztendlich:

  • interfaces: statt hosts:,
  • host: statt ip: und
  • primary: true weglassen.

Ob man über die interne Docker IP oder die externe IP vom Raspberry Pi geht, sollte egal sein. Da Homegear ohnehin auf der externen IP hört, dürfte eine lokale Verbindung nicht sicherer sein. So generell sollten wir uns nochmal Gedanken darüber machen, diesen Port nicht ohne Authentifizierung so offen zu lassen…

2 Likes

Hallo,

endlich ist mein 868MHz Modul gekommen und ich werde mich wieder an Homegear wagen. Leider kann ich mit hass.io 0.61.1 homegear v0.2 gar nicht mehr starten. Hat jemand eine Idee? Danke schon mal!

Hej Leute,

Da ich das Thema super interessant finde, habe ich mich auch mal an die Installation gemacht, jedoch erhalte in bereits bei der installation schon folgende Fehler:

18-02-10 20:47:18 INFO (SyncWorker_3) [hassio.docker.addon] Start build 89330960/armhf-addon-rpi-homegear:0.2
18-02-10 20:47:20 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/aiohttp/web_protocol.py", line 416, in start
    resp = yield from self._request_handler(request)
  File "/usr/lib/python3.6/site-packages/aiohttp/web.py", line 325, in _handle
    resp = yield from handler(request)
  File "/usr/lib/python3.6/site-packages/aiohttp/web_middlewares.py", line 93, in impl
    return (yield from handler(request))
  File "/usr/lib/python3.6/site-packages/hassio/api/security.py", line 34, in security_layer
    return await handler(request)
  File "/usr/lib/python3.6/site-packages/hassio/api/utils.py", line 33, in wrap_api
    answer = await method(api, *args, **kwargs)
  File "/usr/lib/python3.6/site-packages/hassio/addons/addon.py", line 554, in install
    if not await self.instance.install(self.last_version):
  File "/usr/lib/python3.6/site-packages/hassio/docker/utils.py", line 18, in wrap_api
    return await method(api, *args, **kwargs)
  File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/lib/python3.6/site-packages/hassio/docker/addon.py", line 259, in _install
    return self._build(tag)
  File "/usr/lib/python3.6/site-packages/hassio/docker/addon.py", line 274, in _build
    image.tag(self.image, tag='latest')
AttributeError: 'tuple' object has no attribute 'tag'

Setup: Raspberry Pi 3, Hass.io image for Raspberry Pi 3
alles auf Basic.

Was mache ich hier falsch, dass die Installation bei mir schon scheitert?

Danke euch im vorraus

Hallo @criationde,

frag da am besten noch einmal im Hass.io-Forum. Ich kann dazu leider überhaupt nichts sagen :.

Viele Grüße

Sathya

Hi,

ich hab mal die original Skripte versucht so anzupassen das sie auf HASS als Addon laufen.
Bei mir scheint es zu funktionieren, habe 5 MAX! Devices nun über mein Addon integriert.

Zugegeben, das wird nicht perfekt sein, habe mich zuvor kein Stück mit Docker beschäftigt und mit der Addon Entwicklung für HASS eben sowenig.
Wenn es trotz dem jemand ausprobieren will, sehr gerne, ihr findet das repo hier:

Getestet habe ich bisher lediglich MAX! Devices mit einem Arduino basierten CUL Stick.
Die Config habe ich nicht via Admin-UI gemacht, sondern ganz traditionell im config file.
Das pairing hat auf anhieb über die Admin-UI funktioniert.

Gruß
Bias

3 Likes

Hey Leute,

ich habe gerade Homegear als Docker Image installiert. Hat alles funktioniert. Ich kann neue HM Devices pairen und auch der HomeMatic Configurator kann sich verbinden. Leider funktioniert die COnfig im Hassio leider aber nicht.

Wie bekomme ich die Docker internen IP Adressen heraus?

Aktuell sieht meine Configuration.yaml so aus:

#Homematic (Homegear)
homematic:
local_ip: ***
local_port: 36845
interfaces:
wireless:
host: ***
port: 2001
callback_ip: ***
callback_port: 36845
resolvenames: metadata

Aktuell sind alle IPs auf die IP von Hassio gesetzt.

Hi,

es genügt die IP vom HASSIO anzugeben wenn es als Addon installiert ist.
Der Port 2001 verweist auf den Docker Container.

Kannst du auf die die Admin UI von Homegear zugreifen?
Meine Config:

homematic:
  interfaces:
    wireless:
      host: 10.4.4.113
      resolvenames: metadata
      port: 2001

Hi,

ich habe jetzt auch mal einen Container für HASSIO erstellt (von Deinem abgeleitet, BiasF), aber ich kann nicht darauf zugreifen. Will heissen, wenn ich via

192.168.178.32:2001/admin

darauf zugreife, bekomme ich das Admininterface und kann sehen, daß Homegear läuft und auch via cu1101 kommuniziert. Aber Homeassistant findet nichts. Eine Idee wo ich am besten nachschaue, um dem Problem auf die Spur zu kommen? Die Daten im configuration.yaml sind wie oben:

homematic:
  interfaces:
    wireless:
      host: 192.168.178.32
      port: 2001
      resolvenames: metadata

Irgendeine Idee?

Gruß und Dank im voraus,
Matze

Hi nochmal,

habe den Fehler selber gefunden. Wen es interessiert, aus dem homegear.log:

11/12/20 14:17:23.620 Info: Client with IP ::ffff:192.168.178.32 is calling “init”.

An dieser Stelle kam dann eine Fehlermeldung bezüglich fehlendem ca-certificate - und in der Tat, das war in der rpcclient.conf nicht konfiguriert. Kaum war es dort konfiguriert, schon hat es geklappt. :wink:

Gruss vom Matze

1 Like

Ich hab gestern das Repo aktualisiert.

Im ursprünglichen Commit war ein fehlerhaftes repo file, welches dazu führte das ein falsches Repo geladen wurde… Mit einer nicht funktionierenden Version (Der persistente Storage wurde nicht richtig eingebunden)

Das ist mir leider erst gestern aufgefallen, weil ich noch das lokale repository von homeassistant genutzt habe.

Nun sollte alles klappen :wink:

2 Likes

Beim Versuch das AddOn zu starten bekomme ich die Meldung:
Failed to to call /addons/ae73bafd_homegear4homeassistant/stats - 404 Client Error for http+docker://localhost/v1.41/containers/addon_ae73bafd_homegear4homeassistant/json: Not Found ("No such container: addon_ae73bafd_homegear4homeassistant")

Woran könnte dies liegen?

Um diesen uralten Thread nochmal aufzuwecken:
Seit dem letzten Update von Home Assistant 2023.4.6 lastet das Homegear Addon einen CPU-Kern voll aus und ist nicht mehr ansprechbar.
Ich habe mich deshalb entschlossen, den normalen Homegear-Docker auf meiner Docker-VM zu isntallieren.

Dank der Infos hier im Thread habe ich die Einstelungen in der Home Assistant configuration.yml wie folgt angepasst:

homematic:
  #local_ip: 172.16.30.36
  #local_port: 36845
  interfaces:
    wireless:
      host: 172.16.30.38
      port: 2002
      #callback_ip: 171.16.30.36
      #callback_port: 36845
      resolvenames: metadata
      username: homegear
      password: "pw is geheim"
      ssl: true

Wie man sieht, brauchts die local und Callback IP scheinbar nicht mehr.
Die Geräte sind sofort im Home Assistant wieder da.
Wens interessiert:
die .36 ist die HASSIO-VM, die .38 die Docker-VM.
Wenn ich die local und callback IPs drin lasse, verbindet sich HA zwar mit HG, aber HG wirft immer einen Timeout nach dem “init”-RPC Call von HA…
Ohne die beiden fluppts sofort.