Home Assistant homematic integration - especially wired components

Hi there,

I just installed home assistant on a raspberry pi4 and nearly everything is fine (roborock integration, samsung smartthings, synology, fritzbox, wled, etc.).

My only problem is the homematic integration. Homematic runs on a separate raspberry pi3 with rasberrymatic (latest version). The wireless components (HM-IP and old normal RF) have no problems, they are visible. But every HM-IP wired component (DRBL4, DRI32, DRS8) with a configuration in raspberrymatic isn´t visible in Home Assistant …

my configuration yaml:

homematic:

interfaces:

Funk:

  host: 192.168.178.20

  port: 2001

  resolvenames: json

  username: xxxxxxxx

  password: yyyyyyyy

HMIP:

  host: 192.168.178.20

  port: 2010

  resolvenames: json

  username: xxxxxxxx

  password: yyyyyyyyyy

Wired:

  host: 192.168.178.20

  port: 2000

  resolvenames: json

  username: xxxxxxxxxx

  password: yyyyyyyyyyy

groups:

  host: 192.168.178.20

  port: 9292

  resolvenames: json

  username: xxxxxxxxxxx

  password: yyyyyyyyyyy

  path: /groups

hosts:

ccu3:

  host: 192.168.178.20

  port: 2001

  username: xxxxxxxx

  password: yyyyyyyyyyyy

I got some warnings and mistakes in the log files, f.e.:

Logger: pyhomematic._hm
Source: /usr/local/lib/python3.9/site-packages/pyhomematic/_hm.py:706
First occurred: 19:28:13 (1 occurrences)
Last logged: 19:28:13

Failed to initialize proxy for homeassistant-Wired

Hope you could help me to solve my problem? :slight_smile:

Best
Frank

Port 2000 is for the old wired devices. HmIP-Wired devices should already be visible with your HMIP section.

Which devices do you have? Not all HmIP-Wired devices are supported.

Hi Daniel,

thanks for your answer!

@ the moment there are 3 x DRBL4, 3 x DRI32, 4 x DRS8 and 3 x HmIPW-SPI. Not all ready configured at all ports.

On the picture you see, the configured port on a DRBL4 like the “Rollladen Essbereich” is missed (cover / “Abdeckung”)

That´s mostly the same with every configured port

sorry, forgot the screenshot form Home Assistant

So your devices are already detected. And all of them should be supported. As I don’t know the devices myself I can’t say too much about them. But looking at the code the HmIPW-DRI32 might not appear as entities in the UI, but instead generated PRESS-events like other devices with buttons. Have a look at the documentation on how to handle devices with buttons.

Hi Daniel,

thanks for your hints. Now I got mostly of the components and could configure them :wink:

One problem is still a used channel on one of the DRBL4 (channel 2 with a shutter). It´s missed in HA, the other channels appear.

I have a look at the logs and found something:

Logger: homeassistant.components.cover
Source: components/homematic/cover.py:86
Integration: Abdeckung (documentation, issues)
First occurred: 16:15:13 (2 occurrences)
Last logged: 16:15:13

Error adding entities for domain cover with platform homematic
Error while setting up homematic platform for cover
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 383, in async_add_entities
await asyncio.gather(*tasks)
File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 500, in _async_add_entity
supported_features=entity.supported_features,
File “/usr/src/homeassistant/homeassistant/components/cover/init.py”, line 242, in supported_features
if self.current_cover_tilt_position is not None:
File “/usr/src/homeassistant/homeassistant/components/homematic/cover.py”, line 86, in current_cover_tilt_position
return int(self._data.get(“LEVEL_2”, 0) * 100)
ValueError: invalid literal for int() with base 10: ‘’

Cover entities aren’t perfectly supported by Home Assistant. At least the HmIP ones, because eq3 introduced some changes which can’t be handled by the current implementation. Therefore you just have to live with how it is now until a new integration is published. But there’s no estimate when this is going to happen, so don’t hold your breath.

Not wired here, but I have added the integration recently as well and struggling with some information I’ve found.

a. For the hosts, I found in the docs

  hosts:
    ccu2:
      host: 127.0.0.1
      port: 2001
      username: "Admin"
      password: "secret"

But is there a need for a port as well (here CCU3)? Why? And/or always 2001 to choose? And if not, which one to choose when …

b. The docs say

You have to grant full access for the XML-RPC API or specify the IP-address of the Home Assistant instance and allowlist it, inside the CCU’s security settings.

b1. Is access to the Remote Homematic-Script API needed as well (Firewall settings in CCU3)?

b2. Do I have to open the ports as well? I didn’t do and HA founds the devices, but if I do not have to open them, why do I have to set them in the interfaces part? Of is it only running partly without opening the ports and I miss whatever?

c. I have e.g. a HmIP-SWDO-I (but the following is the same for all devices until now). If I want to template.

{{ states.light.wohnzimmer }}

results in <template TemplateState(<state light.wohnzimmer=off; supported_color_modes=[‘onoff’], is_hue_group=True, friendly_name=Wohnzimmer, supported_features=40 @ 2021-08-05T22:16:14.018204+02:00>)>

but for all HMIP devices it is throwing an error:

{{ states.binary_sensor.0815_state }}

results everywhere TemplateSyntaxError: expected token ‘end of print statement’, got ‘integer’

a) You don’t need to configure the port (it is flagged as optional in the documentation). If you don’t configure it, it will use 2001 (the default). And yes, in general access to some XML-RPC API port required because it’s using the XML-RPC API to fetch the number of service messages. Which port you are using doesn’t matter as long as it is a valid one.
b) 1. No. If this was necessary, the documentation would tell you about it.
b) 2. No. If this was necessary, the documentation would tell you about it.
c) That’s a template-specific question I don’t have an answer to. Maybe someone else can explain.

1 Like

Great. Thanks a lot.

Regarding b I was only not sure because “full access” is in die documentation. And this could be Homematic-Script API and/or opening ports as well. That was behind my questions.

I do not understand how this is working, if I have to set the ports in the HA-config and they are not or do not have to be open, but as long this is working … :wink:

Regarding c: O.k. Perhaps and hopefully, other ones can help here. If I open in developer menu, e.g. light brings:

min_mireds: 153
max_mireds: 500
effect_list:
  - colorloop
  - random
supported_color_modes:
  - color_temp
  - hs
is_hue_group: true
friendly_name: Ablage
supported_features: 63

whereas HMIP-entities bring

id: abc
interface: ip
battery: High
sabotage: 'No'
rssi_device: -75
voltage: 1.5
friendly_name: Test
icon: mdi:window-closed-variant

which is not that different, that I can see, why states. etc. is not working.

hi again,

after some day of renovation, yesterday I configured another DRBL4 in homematic with 4 covers:

drbl4_2

and I was a little bit confused, they work nearly perfect in home assistant - for now.

You can control them, they show the positions “open” and “closed”, you can customize the name. Only the positions between “0 - 100” aren´t working, but that´s not so important for me at the moment.

Then I try to get the two “old” covers for running - but it´s the same old problem with the log files above.

Has anyone an idea?

All my DRBL4 have the same latest firmware and are configured identical. The only difference is the run time of the covers.

Best
Frank

hi

I have Homematic wired and try to integrate it, but it doesn’t work. Is there any specials for wired?

homematic:
  interfaces:
    Funk:
      host: 192.168.136.91
      port: 2001
      resolvenames: json
      username: Admin
      password: ***
    HMIP:
      host: 192.168.136.91
      port: 2010
      resolvenames: json
      username: Admin
      password: ***
    Wired:
      host: 192.168.136.91
      port: 2000
      resolvenames: json
      username: Admin
      password: ***
    groups:
      host: 192.168.136.91
      port: 9292
      resolvenames: json
      username: Admin
      password: ***
      path: /groups
  hosts:
    ccu3:
      host: 192.168.136.91
      username: Admin
      password: ***

Hi Daniel

Thank you for your great contributions.

Almost all works for me, I only don’t see the motion information from HMIPW-SPI. I’ve added this as a comment HmIPW(ired) Device Support - Discussion concerning multi-input-devices · Issue #219 · danielperna84/pyhomematic · GitHub, but I assume that it’s better when I add this information here.

(another minor issue: from HMIPW-WTH, I only see the temperature, not the humidity. But this is less important for me as that I get the motion information the HMIPW-SPI device)

If there are any additional information that I can support, please let me know.
Thank you!

Best, Ivo

After trying some things, I solved the problem and find the “error” … :slight_smile:

DRBL4: you have to configure every channel as a “cover” - also the unused ones. Then they work perfectly :slight_smile:

Hi Fwendt.
How did you integrate the Wired Components to the HOAS?
Can you give me an example so i can figure it out?

Thanks