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

Start up even when the permit(0) broadcast fails due to interference #1194

Merged

Conversation

puddly
Copy link
Collaborator

@puddly puddly commented Apr 10, 2023

Mostly for the Conbee. Currently, what happens is this:

2023-04-10 18:52:58.538 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry ConBee II for zha
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 383, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/usr/src/homeassistant/homeassistant/components/zha/__init__.py", line 122, in async_setup_entry
    await zha_gateway.async_initialize()
  File "/usr/src/homeassistant/homeassistant/components/zha/core/gateway.py", line 220, in async_initialize
    raise exc
  File "/usr/src/homeassistant/homeassistant/components/zha/core/gateway.py", line 205, in async_initialize
    self.application_controller = await app_controller_cls.new(
  File "/usr/local/lib/python3.10/site-packages/zigpy/application.py", line 191, in new
    await app.startup(auto_form=auto_form)
  File "/usr/local/lib/python3.10/site-packages/zigpy/application.py", line 166, in startup
    await self.initialize(auto_form=auto_form)
  File "/usr/local/lib/python3.10/site-packages/zigpy/application.py", line 126, in initialize
    await self.permit(0)
  File "/usr/local/lib/python3.10/site-packages/zigpy/application.py", line 1043, in permit
    await zigpy.zdo.broadcast(
  File "/usr/local/lib/python3.10/site-packages/zigpy/device.py", line 519, in broadcast
    return await app.broadcast(
  File "/usr/local/lib/python3.10/site-packages/zigpy/application.py", line 822, in broadcast
    await self.send_packet(
  File "/usr/local/lib/python3.10/site-packages/zigpy_deconz/zigbee/application.py", line 441, in send_packet
    raise zigpy.exceptions.DeliveryError(
zigpy.exceptions.DeliveryError: Failed to deliver packet: <TXStatus.MAC_CHANNEL_ACCESS_FAILURE: 225>

It's nicer to let the integration start up but log a bunch of warnings on startup (to become repairs in the future).

@codecov-commenter
Copy link

codecov-commenter commented Apr 10, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (0d2b222) 99.53% compared to head (efbdc7c) 99.53%.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #1194   +/-   ##
=======================================
  Coverage   99.53%   99.53%           
=======================================
  Files          48       48           
  Lines        7873     7882    +9     
=======================================
+ Hits         7836     7845    +9     
  Misses         37       37           
Impacted Files Coverage Δ
zigpy/application.py 98.68% <100.00%> (+0.02%) ⬆️
zigpy/const.py 100.00% <100.00%> (ø)
zigpy/exceptions.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@puddly puddly force-pushed the puddly/allow-startup-with-broadcast-permit-failure branch from d6e8277 to 28a1473 Compare April 10, 2023 22:05
@puddly puddly merged commit 90c6ed2 into zigpy:dev Apr 10, 2023
18 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.

None yet

2 participants