Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@elupus
Copy link
Contributor

@elupus elupus commented Nov 29, 2025

Avoid waiting on the Default_Response for a checkin_response request. There is no use for the reply data.

Ensure we set disable_default_response on the frames whenever we are not expecting a reply. It does not matter if this is a client or server request, what matters is if we are going to be waiting for a reply.

This avoid these type of errors:

Loggare: homeassistant
Källa: /usr/src/homeassistant/homeassistant/runner.py:238
Inträffade först: 10 november 2025 kl. 07:47:15 (95 förekomster)
Senast loggade: 28 november 2025 kl. 21:11:41

Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
  File "/usr/local/lib/python3.13/site-packages/zigpy/device.py", line 593, in request
    return await future
           ^^^^^^^^^^^^
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.13/site-packages/zigpy/device.py", line 359, in poll_control_checkin_callback
    await poll_control.checkin_response(
    ...<3 lines>...
    )
  File "/usr/local/lib/python3.13/site-packages/zigpy/zcl/__init__.py", line 405, in request
    return await self._endpoint.request(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<9 lines>...
    )
    ^
  File "/usr/local/lib/python3.13/site-packages/zigpy/endpoint.py", line 233, in request
    return await self.device.request(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<11 lines>...
    )
    ^
  File "/usr/local/lib/python3.13/site-packages/zigpy/device.py", line 592, in request
    async with asyncio_timeout(timeout):
               ~~~~~~~~~~~~~~~^^^^^^^^^
  File "/usr/local/lib/python3.13/asyncio/timeouts.py", line 116, in __aexit__
    raise TimeoutError from exc_val
TimeoutError

Note. We should likely also catch these errors and add device iee context so we can see what fails.

Avoid waiting on the Default_Response for a checkin_response request. There is no use for
the reply data.

Ensure we set disable_default_response on the frames whenever we are not expecting a reply.
It does not matter if this is a client or server request,
what matters is if we are going to be waiting for a
reply.
@codecov
Copy link

codecov bot commented Nov 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.29%. Comparing base (7c805e0) to head (88ffb65).
⚠️ Report is 3 commits behind head on dev.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #1714   +/-   ##
=======================================
  Coverage   99.29%   99.29%           
=======================================
  Files          63       63           
  Lines       12263    12263           
=======================================
  Hits        12177    12177           
  Misses         86       86           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@MattWestb
Copy link
Contributor

I have one device that is offline (Aquara with CR1632 batty dead) and is getting some errors that can being from that device but is impossible to knowing:

Logger: homeassistant
Source: /usr/src/homeassistant/homeassistant/runner.py:238
First occurred: 08:00:46 (1 occurrence)
Last logged: 08:00:46

Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
  File "/usr/local/lib/python3.13/site-packages/zigpy/device.py", line 359, in poll_control_checkin_callback
    await poll_control.checkin_response(
    ...<3 lines>...
    )
  File "/usr/local/lib/python3.13/site-packages/zigpy/zcl/__init__.py", line 405, in request
    return await self._endpoint.request(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<9 lines>...
    )
    ^
  File "/usr/local/lib/python3.13/site-packages/zigpy/endpoint.py", line 233, in request
    return await self.device.request(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<11 lines>...
    )
    ^
  File "/usr/local/lib/python3.13/site-packages/zigpy/device.py", line 591, in request
    await send_request()
  File "/usr/local/lib/python3.13/site-packages/zigpy/application.py", line 898, in request
    await self.send_packet(
    ...<14 lines>...
    )
  File "/usr/local/lib/python3.13/site-packages/bellows/zigbee/application.py", line 1070, in send_packet
    raise zigpy.exceptions.DeliveryError(
        f"Failed to deliver message: {send_status!r}", send_status
    )
zigpy.exceptions.DeliveryError: Failed to deliver message: <sl_Status.ZIGBEE_DELIVERY_FAILED: 3074>

I think its not related to the checkin issue you is fixing here then Aquara is not good behaving Zigbee 3 devics and do not do checkins but the system must giving one clue of the devices that have problems in the log and not only its one problem and perhaps with ZHA.
Look if you can putting in the IEEE also for this kind of error so it being possible for user to see what device that is having problems.
And i have also seen your error with checking im my production system but have not getting any real problems of it beside the offline device.

@elupus
Copy link
Contributor Author

elupus commented Nov 29, 2025

Logging info fix is here: #1715

@puddly puddly merged commit 4d02a39 into zigpy:dev Dec 17, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants