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
73.41k stars 30.65k forks source link

ZHA devices became unavailable and available. #95771

Closed spo0n125 closed 9 months ago

spo0n125 commented 1 year ago

The problem

Since the last updates from home assistant the zigbee devices using a usb conbee became unavailable and available from time to time, some devices even don´t became online.

I´ve tried delete the devices or doing a reconfiguration and nothing works. Tried another USB port and it´s the same. Rebooting the system to and dont work.

What version of Home Assistant Core has the issue?

core-2023.6.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

ZHA

Link to integration documentation on our website

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

Diagnostics information

home-assistant_zha_2023-07-03T12-49-30.962Z.log

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 1 year ago

Hey there @dmulcahey, @adminiuga, @puddly, 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.

(message by CodeOwnersMention)


zha documentation zha source (message by IssueLinks)

puddly commented 1 year ago

The startup warnings point to the issue:

2023-07-01 03:02:18.707 WARNING (MainThread) [zigpy.application] Failed to send startup broadcast: Failed to deliver packet: <TXStatus.MAC_CHANNEL_ACCESS_FAILURE: 225>
2023-07-01 03:02:18.731 WARNING (MainThread) [zigpy.application] If you are having problems joining new devices, are missing sensor updates, or have issues keeping devices joined, ensure your coordinator is away from interference sources such as USB 3.0 devices, SSDs, WiFi routers, etc.

Specifically:

If you are having problems joining new devices, are missing sensor updates, or have issues keeping devices joined, ensure your coordinator is away from interference sources such as USB 3.0 devices, SSDs, WiFi routers, etc.

phil-lipp commented 1 year ago

ay from interference sources such as USB 3.0 devices, SSDs, WiFi routers, etc.

I'm having the same problem as OP, but curiously it only happens at night. During the day there are no issues whatsoever even though my wifi and external USB HDD activity are much higher during daytime. And it only started happening recently (4 days ago) all the time before it was fine

donburch888 commented 1 year ago

@puddly is that the ONLY possible cause ?

Looking at OP's log file, and choosing one of his zigbee devices at random (0x8F37 Tradfri bulb), I see that: 14:21:04 Device seen - marking device available and resetting counter 14:22:12 Sending request header 3 times and failed to get attributes 14:22:24 Device seen 14:23:44 device seen 14:25:04 missed checkins:1 14:25:04 sending request header 14:26:24 missed checkins:2 14:27:44 last seen 7369.0265 seconds ago and ping attempt exhausted, marking device as unavailable 14:29:04 last seen 7449.0282 seconds ago 14:30:24 last seen 7529.0295 seconds ago

My calculation is that from 14:21:04 (when the device was last reported as seen) to 14:27:44 (when marked unavailable) is only 400 seconds. Subtracting 7369 seconds from 14:27:44 take us back to 12:24:55, which was when the device joined the network and there was a flurry of ZCL frames and Attribute reports received.

Oh, and there are also coding errors in zigpy/topology.py

And finally at 19:13:43 Received a ZigbeePacket, and device joined the network several zigbee interactions, then 00:18:26 Device seen - marking available and resetting counter 00:19:46 missed checkins:1 00:21:06: missed checkins:2 00:22:26 last_seen 7434.1536 seconds ago marking unavailable and sure enough 22:18:32 was the last actual ZCL frames received

So, what does the "Device seen - marking the device available and resetting counter" message in log actually signify ?

donburch888 commented 1 year ago

In my own case I have 3 Tradfri Signal Repeaters which are becoming unavailable and available simultaneously on a 2 hour on, 2 hour off schedule. Seems too much to be coincidence ... but OP's log doesn't look like the same synchronicity. image

issue-triage-workflows[bot] commented 1 year ago

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.

donburch888 commented 1 year ago

Sorry git, but a lack of activity to investigate and fix is NOT the same thing as there being no problem.

I have since determined that my Tradfri devices all still appear to drop of the zigbee network every 4 hours, but the time offline can be reduced through a setting. Of course it could be that the network is fine, but the recordkeeping is failing ?

issue-triage-workflows[bot] commented 9 months ago

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.