Problem with setting up Homematic Thermostat

Hello,

I am new to home assistant. I have a Rapberry PI3 with a communication module HM-MOD-RPI-PCB from ELV.

I have setup the Rapberry PI3 and it is working. I have installed Rasbian Stretch and Home Assistant 0.60.
Homegear is also installed in a docker container.

Communication with the HM-MOD-RPI-PCB module is working. I can pair the Homematic Thermostat with the Homematic Configuration utility. Homegear also sees the Thermostat. I can check this via RPC.

My problem is the Thermostat did not show up in HA. It will not be discovered. What I am doing wrong?

configuration.yaml

logger:
  logs:
    homeassistant.components.homematic: debug
    pyhomematic: debug

homematic:
  local_ip: 192.168.0.70
  local_port: 36845
  interfaces:
    wireless:
      host: 192.168.0.70 ->Raspberry with HA
      port: 2001
      callback_ip: 172.17.0.2 -> Docker Containter with Homegear
      callback_port: 36845
      resolvenames: metadata

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:

Any idea what’s wrong with my setup?

Can I use pyhomematic.py to access the Thermostat to check it is working? How can I do that?

EDIT: I just checked if I could communicate and check some values of the thermostat with an example python-script.

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)

Can’t get it to work. Seems the address is wrong…

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:9292
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’

What’s the correct device address?

regards Tom74

PS: You can also answer me in German if you like.