Homematic not working -> Unraid via HASS Docker + Letsencrypt Docker(Reverseproxy)

Hi Guys,

trying out two days, I need your help/Ideas please.

Setup:
CCU2
Unraid Server
HASS-Docker changed to Networktype how Letsencrypt Docker
Letsencrypt-Docker with extra Networktype

Reverseproxy with Domain/Subdomain is working.
I can reach the UI via Domain and local-IP

Now my problem:
Homematic with CCU2 is not working
No entities from homematic in the list. Only the CCU2 itself is on the entities list.
Before I had the Reverseproxy and only Unraid Docker via the 192.168.xxx local network, it works.
I think maybe something is wrong due the different IP Networks.

Hier is my config:

homematic:
  local_ip: 172.20.0.3 ->Reverseproxy IP from HASS Docker
  local_port: 8060
  interfaces:
    rf:
      host: homematic-ccu2    -> localhostname CCU2(192.168....)
      resolvenames: json
      callback_ip: 192.168.1.3 -> Unraid Server IP, not sure that is right
      callback_port: 8060
      username: xxx
      password: xxx
    ip:
      host: homematic-ccu2      -> localhostname (192.168....)
      resolvenames: json
      callback_ip: 192.168.1.3 -> Unraid Server IP, not sure that is right
      callback_port: 8060
      port: 2010
      username: xxx
      password: xxx
  hosts:
    ccu2:
      host: homematic-ccu2
      username: xxx
      password: xxx

Logger Debug output:

2019-03-27 19:40:03 DEBUG (SyncWorker_10) [pyhomematic.connection] HMConnection: Creating server object
2019-03-27 19:40:03 DEBUG (SyncWorker_10) [pyhomematic._hm] ServerThread.__init__
2019-03-27 19:40:03 DEBUG (SyncWorker_10) [pyhomematic._hm] __init__: Creating proxies
2019-03-27 19:40:03 INFO (SyncWorker_10) [pyhomematic._hm] Creating proxy rf. Connecting to 192.168.1.90:2001
2019-03-27 19:40:03 DEBUG (SyncWorker_10) [pyhomematic._hm] LockingServerProxy.__init__: Getting local ip
2019-03-27 19:40:03 DEBUG (SyncWorker_10) [pyhomematic._hm] LockingServerProxy.__init__: Got local ip 172.20.0.3
2019-03-27 19:40:03 INFO (SyncWorker_10) [pyhomematic._hm] Creating proxy ip. Connecting to 192.168.1.90:2010
2019-03-27 19:40:03 DEBUG (SyncWorker_10) [pyhomematic._hm] LockingServerProxy.__init__: Getting local ip
2019-03-27 19:40:03 DEBUG (SyncWorker_10) [pyhomematic._hm] LockingServerProxy.__init__: Got local ip 172.20.0.3
2019-03-27 19:40:03 INFO (SyncWorker_10) [pyhomematic._hm] Creating proxy ccu2. Connecting to 192.168.1.90:2001
2019-03-27 19:40:03 DEBUG (SyncWorker_10) [pyhomematic._hm] LockingServerProxy.__init__: Getting local ip
2019-03-27 19:40:03 DEBUG (SyncWorker_10) [pyhomematic._hm] LockingServerProxy.__init__: Got local ip 172.20.0.3
2019-03-27 19:40:03 DEBUG (SyncWorker_10) [pyhomematic._hm] RPCFunctions.__init__
2019-03-27 19:40:03 DEBUG (SyncWorker_10) [pyhomematic._hm] RPCFunctions.__init__: iterating proxy = homeassistant-rf
2019-03-27 19:40:03 DEBUG (SyncWorker_10) [pyhomematic._hm] RPCFunctions.__init__: iterating proxy = homeassistant-ip
2019-03-27 19:40:03 DEBUG (SyncWorker_10) [pyhomematic._hm] RPCFunctions.__init__: iterating proxy = homeassistant-ccu2
2019-03-27 19:40:03 DEBUG (SyncWorker_10) [pyhomematic._hm] ServerThread.__init__: Setting up server
2019-03-27 19:40:03 DEBUG (SyncWorker_10) [pyhomematic._hm] ServerThread.__init__: Registering RPC functions
2019-03-27 19:40:03 INFO (Thread-2) [pyhomematic._hm] Starting server at http://172.20.0.3:8060
2019-03-27 19:40:03 DEBUG (SyncWorker_10) [pyhomematic._hm] ServerThread.proxyInit: init('http://192.168.1.3:8060', 'homeassistant-rf')
2019-03-27 19:40:03 INFO (SyncWorker_10) [pyhomematic._hm] Proxy initialized
2019-03-27 19:40:03 DEBUG (SyncWorker_10) [pyhomematic._hm] ServerThread.proxyInit: init('http://192.168.1.3:8060', 'homeassistant-ip')
2019-03-27 19:40:03 INFO (SyncWorker_10) [pyhomematic._hm] Proxy initialized
2019-03-27 19:40:04 DEBUG (SyncWorker_31) [pyhomematic._hm] ServerThread.getAllSystemVariables: Getting all System variables via JSON-RPC
2019-03-27 19:40:04 DEBUG (SyncWorker_31) [pyhomematic._hm] RPCFunctions.jsonRpcPost: Method: Session.login
2019-03-27 19:40:04 DEBUG (SyncWorker_31) [pyhomematic._hm] RPCFunctions.jsonRpcPost: API-Endpoint: http://192.168.1.90:80/api/homematic.cgi
2019-03-27 19:40:04 DEBUG (SyncWorker_31) [pyhomematic._hm] RPCFunctions.jsonRpcPost: Method: SysVar.getAll
2019-03-27 19:40:04 DEBUG (SyncWorker_31) [pyhomematic._hm] RPCFunctions.jsonRpcPost: API-Endpoint: http://192.168.1.90:80/api/homematic.cgi
2019-03-27 19:40:05 DEBUG (SyncWorker_31) [pyhomematic._hm] RPCFunctions.jsonRpcPost: Method: Session.logout
2019-03-27 19:40:05 DEBUG (SyncWorker_31) [pyhomematic._hm] RPCFunctions.jsonRpcPost: API-Endpoint: http://192.168.1.90:80/api/homematic.cgi

I can’t exactly pinpoint what the problem is, but I’m fairly sure your guess with the callback_ip option is correct. The CCU tries to establish a connection to Home Assistant, and if it fails at that, it can’t tell Home Assistant about the devices you have. So you somehow have to figure out what the correct destination address is for the CCU to talk to. Right now the target from the point of view of the CCU is http://192.168.1.3:8060. The line in the log with proxyInit in it is what is relevant here.