Skip to content

Revert "Support APS_Encryption transmit option (#277)" - #284

Open
puddly wants to merge 1 commit into
zigpy:devfrom
puddly:puddly/drop-aps-encryption
Open

puddly wants to merge 1 commit into
zigpy:devfrom
puddly:puddly/drop-aps-encryption

Conversation

@puddly

@puddly puddly commented Nov 20, 2026

Copy link
Copy Markdown
Member

This reverts commit 7547a5e.


Conbee adapters don't meaningfully implement APS security: they don't generate unique link keys per device from some sort of seed via HMAC and they can only hold four imported APS link keys. The bot thinks home-assistant/core#188325 might be related and I concur, it looks like RX can get stuck on the Conbee II independently from TX. This probably has something to do with the recent addition of clusters to zigpy that always use encryption, like KeepAlive.

Copilot AI balanced review requested due to automatic review settings November 20, 2026 23:31
@codecov

codecov Bot commented Nov 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.17%. Comparing base (0a6de21) to head (930505c).

Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #284      +/-   ##
==========================================
- Coverage   99.17%   99.17%   -0.01%     
==========================================
  Files           7        7              
  Lines         973      971       -2     
==========================================
- Hits          965      963       -2     
  Misses          8        8              

☔ View full report in Codecov by Harness.
📢 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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The revert removes the only test covering APS_Encryption, leaving the changed behavior untested; retain it with the expected USE_NWK_KEY_SECURITY | USE_APS_ACKS flags to catch regressions.

1 open issue
What changed in this PR

This PR reverts APS-encryption transmit-option support in zigpy’s deCONZ adapter as a workaround for suspected Conbee receive stalls.

Changes:

  • Always select network-key security, including when callers request APS encryption.
  • Remove the test that expected APS encryption requests to select link-key security.
File Description
zigpy_deconz/​zigbee/​application.py Restores unconditional network-key security selection while preserving ACK handling.
tests/​test_send_receive.py Removes the test for the reverted APS-encryption behavior.

Review effort: Balanced

)


async def test_send_packet_source_route(app, tx_packet): # noqa: F811
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix This PR fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants