home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.15k stars 29.82k forks source link

Homematic integration for Homegear fails since 2023.12.4 #106958

Closed ih8ms closed 6 months ago

ih8ms commented 8 months ago

The problem

I am running Home Assistant 2023.12.3 in Docker, where everything works fine.

After upgrading to 2023.12.4, the Homematic integration frequently breaks, making all entities unavailable etc.

Sometimes triggering the Homematic reconnect service will fix things, sometimes not. After a restart (of Home Assistant), things work again.

Breaking may be as frequent as <1h after the last restart.

I have not seen anything suspicious in the normal log files.

What version of Home Assistant Core has the issue?

core-2023.12.4

What was the last working version of Home Assistant Core?

core-2023.12.3

What type of installation are you running?

Home Assistant Container

Integration causing the issue

homematic

Link to integration documentation on our website

https://www.home-assistant.io/integrations/homematic

Diagnostics information

Integration doesn't provide diagnostic data from GUI

Example YAML snippet

Just the config:

homematic:
  local_ip: homeassistant
  local_port: 36845
  interfaces:
    wireless:
      host: homegear
      port: 2001
      callback_ip: homeassistant
      callback_port: 36845

Anything in the logs that might be useful for us?

I didn't see anything in the logs related to this issue.

Additional information

The integration connects to Homegear in my setup. I don't have any issues with Homegear. Also, rolling back Homegear to an earlier version didn't change anything, so I don't think it's an issue in Homegear at this time.

home-assistant[bot] commented 8 months ago

Hey there @pvizeli, @danielperna84, mind taking a look at this issue as it has been labeled with an integration (homematic) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `homematic` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign homematic` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


homematic documentation homematic source (message by IssueLinks)

ih8ms commented 8 months ago

Will keep this updated in case I find any new evidence.

danielperna84 commented 8 months ago

I recommend to switch to the new integration, available as a custom component: https://github.com/danielperna84/custom_homematic

The new integration automatically reconnects on lost connections, and maybe it provides more insights to the underlying issue with its logs.

ih8ms commented 8 months ago

Ah, advertising. Just kidding ;)

I actually talked to a friend who already did this the other day. The issue was that ALL entities changed, which meant he needed to (painfully) update his configuration.

Has this changed or are there any tools/hints that would make the transition less painful?

In principle else worked satisfactory (at least to me) with the "official" integration.

danielperna84 commented 8 months ago

No, sadly there's no way to automate the process with the changed entity IDs. The old integration provides multiple ways for naming the entities automatically (serial number, names via JSON API, names via XML-API). And users are also able to change those IDs manually. So there's no way to know for sure what the equivalent would be in the new integration.

I do have to admit though, that as a Homegear user you won't see as much of the benefits of the new integration, as all the old HM-devices (which are the only ones Homegear supports AFAIK) are supported. The automatic reconnect and the devices (within the Home Assistant context) might not be that much of a bonus for you.

So coming back to your initial issue: without logs there's no foundation to help. I don't assume that anything has changed, that would break the integration in such a way. The new integration would report if there were some specific types of errors. But maybe also not those you are having.

If you have the infrastructure I would recommend to spin up a separate Home Assistant (VM, or a RaspberryPi you're not using) with the new integration, and configure it to work with Homegear as well. Homegear should support multiple clients. Then monitor the testing-environment for errors, and if they match the faulty behavior of your production instance.

Maybe this will provide some insights on what is happening. My best guess is that you have some sort of communication issue on the network level. Dropped packets or similar.

ih8ms commented 6 months ago

It was quite hard to find a root cause for this issue. I did a lot of (debug) logging, but never found something so suspicious that I could point my finger at as a culprit.

So, I'm not sure what fixed it, but I assume it was one of the latest HA updates. The integration broke less and less often, and for 10 days now, I haven't observed any issues whatsoever.

I hope this has been fixed ;) I'll therefore close this one.