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.74k stars 30.86k forks source link

AttributeError: 'NoneType' object has no attribute 'aps_data_request' #103602

Closed mbo18 closed 6 months ago

mbo18 commented 1 year ago

The problem

Sometimes when I restart HA I have the following log (see below).

I use ZHA with a conbee II latest available firmware.

What version of Home Assistant Core has the issue?

core-2023.11.1

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

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2023-11-07 16:38:47.340 ERROR (MainThread) [zigpy.zcl] [0x337A:1:0x0000] Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/zigpy/zcl/__init__.py", line 411, in reply
return await self._endpoint.reply(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/zigpy/endpoint.py", line 278, in reply
return await self.device.reply(
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/zigpy/device.py", line 469, in reply
return await self.request(
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/zigpy/device.py", line 297, in request
await self._application.request(
File "/usr/local/lib/python3.11/site-packages/zigpy/application.py", line 768, in request
await self.send_packet(
File "/usr/local/lib/python3.11/site-packages/zigpy_deconz/zigbee/application.py", line 442, in send_packet
await self._api.aps_data_request(
^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'aps_data_request'

Additional information

No response

home-assistant[bot] commented 1 year ago

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.

(message by CodeOwnersMention)


zha documentation zha source (message by IssueLinks)

prilly-dev commented 1 year ago

i have the same problem, also conbee 2

2023-11-09 09:10:15.850 ERROR (MainThread) [zigpy.zcl] [0x8A39:1:0x0b04] Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/zigpy/zcl/__init__.py", line 411, in reply return await self._endpoint.reply( ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/zigpy/endpoint.py", line 278, in reply return await self.device.reply( ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/zigpy/device.py", line 469, in reply return await self.request( ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/zigpy/device.py", line 297, in request await self._application.request( File "/usr/local/lib/python3.11/site-packages/zigpy/application.py", line 768, in request await self.send_packet( File "/usr/local/lib/python3.11/site-packages/zigpy_deconz/zigbee/application.py", line 442, in send_packet await self._api.aps_data_request( ^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'aps_data_request'

I also see some random logs with this:

2023-11-09 09:35:38.928 WARNING (MainThread) [zigpy_deconz.api] No response to 'Command.aps_data_indication' command with seq id '0x80' 2023-11-09 09:35:45.333 WARNING (MainThread) [zigpy_deconz.api] No response to 'Command.aps_data_indication' command with seq id '0x8c' 2023-11-09 09:35:48.298 WARNING (MainThread) [zigpy_deconz.api] No response to 'Command.aps_data_indication' command with seq id '0x8f'

ivico94 commented 1 year ago

Hi !

same issue here: Intel NUC + Home assistant OS + Conbee 2 + ZHA

Its seems that the last HA update introduce this issue. I tried to:

None of these change the behavior but a cold boot does for a few hours.

The strange thing is that the issue affects only light. Sensor are still working.

When I want to turn light on whatever from UI, a button or automation it's often very slow (10 sec). Sometimes fast as expected.

Logs talks often about "command.aps-data-request"

Error while executing automation automation.turn_on_door_light_cave: Failed to send request: device did not respond Error while executing automation automation.turn_on_door_light_cave: Failed to send request: Failed to enqueue packet: CommandError('Command.aps_data_request, status: Status.BUSY')

QuentinRQTT commented 9 months ago

@ivico94 Did you manage to find a fix for this? I have pretty much exactly the problem you're describing (with rebooting fixing for a few hours and everything) on the exact same setup 3 months later. The only thing I changed recently was adding a few Tuya ZY-M100 sensors with a custom quirk I found on github.

issue-triage-workflows[bot] commented 6 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.