Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HA loses connection to Zigbee Door Sensors every few minutes. State between unavailable and open/closed #115627

Closed
majurgens opened this issue Apr 15, 2024 · 12 comments

Comments

@majurgens
Copy link

The problem

HA seems to be losing connection to all my door sensors (devices like this: lumi.sensor_magnet.aq2) every 3-4 minutes. The sensors will become unavailable, then approx 12 seconds later will become opened or closed (depending on the actual status), then nearly 4 minutes later will become unavailable and the cycle continues. An example logbook is shown below:

image

I do recall last year that this was working fine, but I can't remember the version. At some point late last year (Ithink) I did an upgrade and it all broke as per above. I backed out the upgrade and it worked again. I have done a few upgrades since then and now it is not working again. It has possibly been like this for months.

What version of Home Assistant Core has the issue?

core-2024.4.3

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Zigbee

Link to integration documentation on our website

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

Diagnostics information

config_entry-zha-fbba85b6c18916134c9d2f5e526649f6.json

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@home-assistant
Copy link

Hey there @dmulcahey, @Adminiuga, @puddly, @TheJulianJES, mind taking a look at this issue as it has been labeled with an integration (zha) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of zha 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 zha 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)


zha documentation
zha source
(message by IssueLinks)

@majurgens
Copy link
Author

This problem seems similar in symptoms to #102637

@majurgens
Copy link
Author

Additionally, I note that the door sensors do show the correct status (when they are available) and the batteries do not appear to be draining any quicker than normal

@rrooggiieerr
Copy link
Contributor

Have you changed the unavailable timeout in your ZHA settings? Generaly battery powered devices don't make connection very often, only when there is an actual change to report.

Screenshot 2024-04-17 at 14 28 40

@majurgens
Copy link
Author

Mine is set to 21600 seconds. That seems quite a bit longer than the 4 minute cycle that I am experiencing. Would this really be the problem?
I have changed it to 200,000 to try it out

@rrooggiieerr
Copy link
Contributor

No, 21600 (6 hours) is the default value and should generally be good enough. I have doubled the value because some of my window sensors became unavailable with the default value.

@majurgens
Copy link
Author

Confirmed the 200,000 does not make any difference. Value now set back to 21,600

@majurgens
Copy link
Author

I changed to HA Core Version 2023.10.1 and the connections are stable. I will try and find the version at which they go unstable

@majurgens
Copy link
Author

The last version that is ok is 2023.11.3
Everything from and including 2023.12.0 exhibits the issue

@puddly
Copy link
Contributor

puddly commented Apr 20, 2024

The only relevant change in 2023.12.0 is #104335. Before this change, your coordinator crashing and going offline for 30s would not be shown. Now, it is. It seems like your coordinator crashes every few minutes. What are you using? Can you enable ZHA debug logging to record what is happening?

@majurgens
Copy link
Author

There are these entries every 4 minutes:

2024-04-20 18:14:00.307 DEBUG (MainThread) [bellows.uart] Connection lost: ConnectionResetError('Remote server closed connection')
2024-04-20 18:14:00.308 ERROR (MainThread) [bellows.uart] Lost serial connection: ConnectionResetError('Remote server closed connection')
2024-04-20 18:14:00.308 DEBUG (MainThread) [bellows.ezsp] socket://192.168.7.90:8888 connection lost unexpectedly: Remote server closed connection
2024-04-20 18:14:00.308 ERROR (MainThread) [bellows.ezsp] NCP entered failed state. Requesting APP controller restart

I have a Silvercrest gateway on my ethernet network. Looks like a I need to get something else. Any recommendations for an ethernet connected one?

@issue-triage-workflows
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@issue-triage-workflows issue-triage-workflows bot closed this as not planned Won't fix, can't repro, duplicate, stale Jul 26, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Aug 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants