Homematic not showing on UI

Hi there,

I set up a testing Ubuntu VM and installed the latest Home Assistant on it. UI works fine, also tested PLEX integration which also works as expected. My main use case would be Homematic, but I am struggeling to find a “starting point”.

I added the needed lines to my configuration and provided

  • local ip
  • remote ip
  • resolvenames xml (I have the RPC-XML installed on the CCU2)

When starting HA, I can see that it initializes successfully:

16-07-24 17:29:48 pyhomematic.connection: HMConnection: Creating server object 16-07-24 17:29:48 pyhomematic._hm: ServerThread.__init__ 16-07-24 17:29:48 pyhomematic._hm: Creating proxy. Connecting to http://192.168.0.104:2001 16-07-24 17:29:48 pyhomematic._hm: RPCFunctions.__init__ 16-07-24 17:29:48 pyhomematic._hm: RPCFunctions.__init__: devices_raw = [] 16-07-24 17:29:48 pyhomematic._hm: ServerThread.__init__: Setting up server 16-07-24 17:29:48 pyhomematic._hm: ServerThread.__init__: Registering RPC functions 16-07-24 17:29:48 pyhomematic._hm: Starting server at http://192.168.0.115:8943 16-07-24 17:29:48 pyhomematic._hm: ServerThread.proxyInit: init(http://192.168.0.115:8943, 'homeassistant') 16-07-24 17:29:48 pyhomematic._hm: RPCFunctions.listDevices: interface_id = homeassistant, _devices_raw = [] 16-07-24 17:29:49 pyhomematic._hm: Proxy initialized

It also seems that it starts to retrieve all of my devices, for example:

16-07-24 16:30:55 pyhomematic._hm: RPCFunctions.createDeviceObjects: create LEQXXXXXXX as SUPPORTED device for HM-Sec-RHS 16-07-24 16:30:55 pyhomematic.devicetypes.generic: HMGeneric.__init__: device_description: MEQXXXXXXX : {'CHILDREN': ['MEQXXXXXXX :0', 'MEQXXXXXXX :1', 'MEQXXXXXXX :2', 'MEQXXXXXXX :3', 'MEQXXXXXXX :6', 'MEQXXXXXXX :7'], 'TYPE': 'HM-TC-IT-WM-W-EU', 'ROAMING': 0, 'RX_MODE': 6, 'PARAMSETS': ['MASTER'], 'RF_ADDRESS': 3572145, 'VERSION': 22, 'ADDRESS': 'MEQXXXXXXX ', 'FIRMWARE': '1.3', 'UPDATABLE': 1, 'INTERFACE': 'MEQXXXXXXX ', 'PARENT': '', 'AVAILABLE_FIRMWARE': '1.3', 'FLAGS': 1} 16-07-24 16:30:55 pyhomematic._hm: RPCFunctions.createDeviceObjects: create MEQXXXXXXX as SUPPORTED device for HM-TC-IT-WM-W-EU 16-07-24 16:30:55 pyhomematic.devicetypes.generic: HMGeneric.__init__: device_description: MEQXXXXXXX : {'CHILDREN': ['MEQXXXXXXX :0', 'MEQXXXXXXX :1', 'MEQXXXXXXX :2', 'MEQXXXXXXX :3'], 'TYPE': 'HM-LC-Dim1TPBU-FM', 'ROAMING': 0, 'RX_MODE': 1, 'PARAMSETS': ['MASTER'], 'RF_ADDRESS': 3573801, 'VERSION': 13, 'ADDRESS': 'MEQXXXXXXX ', 'FIRMWARE': '2.9', 'UPDATABLE': 1, 'INTERFACE': 'MEQXXXXXXX ', 'PARENT': '', 'AVAILABLE_FIRMWARE': '2.9', 'FLAGS': 1}

And also logs stuff like this:

16-07-24 18:06:08 pyhomematic._hm: RPCFunctions.event: interface_id = homeassistant, address = MEQXXXXXXX :1, value_key = BOOT, value = True 16-07-24 18:06:08 pyhomematic._hm: RPCFunctions.event: interface_id = homeassistant, address = MEQXXXXXXX :1, value_key = ENERGY_COUNTER, value = 368736.5 16-07-24 18:06:08 pyhomematic._hm: RPCFunctions.event: interface_id = homeassistant, address = MEQXXXXXXX :1, value_key = POWER, value = 315.0 16-07-24 18:06:42 pyhomematic._hm: RPCFunctions.event: interface_id = homeassistant, address = MEQXXXXXXX :1, value_key = STATE, value = True 16-07-24 18:06:42 pyhomematic._hm: RPCFunctions.event: interface_id = homeassistant, address = MEQXXXXXXX :1, value_key = ERROR, value = 0 16-07-24 18:06:42 pyhomematic._hm: RPCFunctions.event: interface_id = homeassistant, address = MEQXXXXXXX :1, value_key = LOWBAT, value = False

So I assume that the connection and push via RPC is working fine. My only issue is now to actually see those components on the UI, which I don’t. I may have overlooked something but most info on this is out-dated as the component merged with HA.

Could any1 please give ma a pointer on how to get started, e.g. showing temps or the energy meter data reported?

Thanks in advance,
Christoph

Solved in current dev-branch.

Hi FitzZZ, where do you see these logs? I can only find three lines:

16-09-23 13:44:18 INFO (MainThread) [pyhomematic._hm] Creating proxy. Connecting to http://192.168.1.100:2001
16-09-23 13:44:18 INFO (Thread-2) [pyhomematic._hm] Starting server at http://127.0.0.1:8943
16-09-23 13:44:18 INFO (MainThread) [pyhomematic._hm] Proxy initialized

I don’t see HA retrieving my devices …

I enabled debug logging:

logger:
  default: warn
  logs:
    homeassistant.components.homematic: debug

I also switched to json:

   resolvenames: json
   username: "myuser"
   password: "secret"

Thanks, I’ll give it a try. The JSON API is based on HMCompanion, right?

It’s based on https://github.com/danielperna84/pyhomematic and also maintained by the same dev in HA.

Hi Torsten,

there seems to be an error in your Homematic configuration. You’ve set the local IP to 127.0.0.1 or not at all. That only works when using Homegear on the same machine. If you use a CCU, you have to specify the IP of the machine where HA is running on, because the CCU will try to connect to that IP so it can send the events to it.

Here we go - that did help. At least partially. I can see a first switch :slight_smile:

However, still doesn’t work. First let me check, the last line has to be pyhomematic, right?

logger:
default: warn
logs:
homeassistant.components.pyhomematic: debug

Oh wait - pyhomematic only supports BidCOS while most of my devices are Wired. With your tip I can see the BidCOS switch now, none of the others :frowning:

Which XML-API is supported 1.1 or 1.0? I get an time-out error:
16-09-23 15:49:20 WARNING (Thread-2) [pyhomematic._hm] RPCFunctions.addDeviceNames: Could not access XML-API: timed out
16-09-23 15:49:22 ERROR (ThreadPool Worker 0) [pyhomematic.devicetypes.generic] HMGeneric.getValue: Exception: <Fault -1: ‘Failure’>
16-09-23 15:49:23 ERROR (ThreadPool Worker 0) [pyhomematic.devicetypes.generic] HMGeneric.getValue: Exception: <Fault -1: ‘Failure’>

EDIT: I tried both API, problem remains, switching from “xml” to “json” solved it

Like mentioned in the other thread you’ve posted today, we currently don’t support wired devices. We may be able to add support to pyhomematic with your help though. Until now nobody involved with pyhomematic was using wired devices.

Regarding your error: We don’t really differentiate between API versions. We just use the XML-RPC client provided by Python and connect to port 2001 of the CCU or Homegear. So if your configuration is correct, timeouts may be a result of restrictive firewall rules.

How exactly does your config look like? Do you use a CCU (1 or 2?) or Homegear? And what’s the machine HA (with pyhomematic) is running on?

I’m using CCU2, the HA machine is a ubuntu 16.04 server. I only have that issue configuring the XML API, switching to JSON solves it

Oh, you meant the API for resolving names. I thought you meant the one the CCU exposes for communicating with devices.
To generally check Homematic-functionality in HA, it would be better to not try to resolve the names from the CCU, since this might lead to all kinds of errors. Not resolving is the “safe” way to setup Homematic within HA.