Homematic CCU3 jsonport ignored

Running following Homematic config:

homematic:
  interfaces:
    rf:
      host: ccu.wupp
      port: 32001
      ssl: true
      jsonport: 4443
      resolvenames: json
      username: haus03
      password: '**********************'
  hosts:
    ccu2:
      host: ccu.wupp
      port: 42001
      username: haus03
      password: '**********************'

But jsonport seems to be ignored, because I see connections on port 80 on my CCU:

00:26:06.495610 IP 192.168.2.153.58650 > 192.168.2.151.80: Flags [S], seq 29425164, win 64240, options [mss 1460,sackOK,TS val 42408749 ecr 0,nop,wscale 6], length 0
00:26:22.002561 IP 192.168.2.153.58658 > 192.168.2.151.80: Flags [S], seq 1087487598, win 64240, options [mss 1460,sackOK,TS val 42424255 ecr 0,nop,wscale 6], length 0
00:26:23.007636 IP 192.168.2.153.58658 > 192.168.2.151.80: Flags [S], seq 1087487598, win 64240, options [mss 1460,sackOK,TS val 42425261 ecr 0,nop,wscale 6], length 0

config/home-assistant.log sows:

2020-04-17 00:25:51 ERROR (SyncWorker_0) [pyhomematic._hm] RPCFunctions.jsonRpcPost: Exception: <urlopen error [Errno 110] Operation timed out>
2020-04-17 00:25:51 WARNING (SyncWorker_0) [pyhomematic._hm] ServerThread.jsonRpcLogin: Unable to open session.
2020-04-17 00:26:22 ERROR (SyncWorker_1) [pyhomematic._hm] RPCFunctions.jsonRpcPost: Exception: <urlopen error [Errno 110] Operation timed out>
2020-04-17 00:26:22 WARNING (SyncWorker_1) [pyhomematic._hm] ServerThread.jsonRpcLogin: Unable to open session.
2020-04-17 00:26:53 ERROR (SyncWorker_4) [pyhomematic._hm] RPCFunctions.jsonRpcPost: Exception: <urlopen error [Errno 110] Operation timed out>
2020-04-17 00:26:53 WARNING (SyncWorker_4) [pyhomematic._hm] ServerThread.jsonRpcLogin: Unable to open session.

Have tried a slightly modified version of the ccu_test_jsonrpc.py

It is working with:
PORT = 32001
and
apiendpoint = "https://%s:4443%s" % (host, JSONRPC_URL)

My CCU HTTPS interface is reachable on port 4443 instead of the default 443.
Any ideas why it is accessing the CCU at port 80?

Thanks Thomas

I’m running into the exact same issue! I’ve set jsonport to 8080, but HA keeps connecting to port 80:

homematic:
  interfaces:
    HMIP:
      host: 192.168.178.78
      port: 2010
      jsonport: 8080
      resolvenames: json
    groups:
      host: 192.168.178.78
      port: 9292
      jsonport: 8080
      resolvenames: json
      username: xxx
      password: xxx
      path: /groups
  hosts:
    ccu3:
      host: 192.168.178.78
      port: 2010
      username: xxx
      password: xxx
2021-08-24 11:49:50 DEBUG (SyncWorker_6) [pyhomematic._hm] ServerThread.getAllSystemVariables: Getting all System variables via JSON-RPC
2021-08-24 11:49:50 DEBUG (SyncWorker_6) [pyhomematic._hm] RPCFunctions.jsonRpcPost: Method: Session.login
2021-08-24 11:49:50 DEBUG (SyncWorker_6) [pyhomematic._hm] RPCFunctions.jsonRpcPost: API-Endpoint: http://192.168.178.78:80/api/homematic.cgi
2021-08-24 11:49:50 ERROR (SyncWorker_6) [pyhomematic._hm] RPCFunctions.jsonRpcPost: Exception: <urlopen error [Errno 111] Connection refused>
2021-08-24 11:49:50 WARNING (SyncWorker_6) [pyhomematic._hm] ServerThread.jsonRpcLogin: Unable to open session.

Is there any solution to this?

Thanks,
Florian

That’s a known issue that can’t be fixed. Have a look at this pull request for more information.

1 Like

Thanks @danielperna84 for the pointer. If i read the PR correct. It can be fixed and there is a fix but the core developers don’t accept the fix until the complete configuration code of this integration is refactored.

In theory you can patch your local installation with the code in the PR, but this is a pain if you don’t run in dev installation.

Not that much of a pain.

Just copy the homematic subdirectory from HA core into you “custom_component” directory, add a “version” tag to the manifest.json, and add the 2 lines from the PR.

The version from custom component will take precedence.