Repository navigation
Reply to IAS ACE keypad requests with the request's TSN - #1041
Draft
zigpy-review-bot wants to merge 1 commit into
Draft
zigpy-review-bot wants to merge 1 commit into
zigpy-review-bot wants to merge 1 commit into
Conversation
The Arm Response and the Get Panel Status Response were sent with a fresh ZCL transaction sequence number. ZCL R8 2.4.1.3 requires a frame generated in response to a request to copy the request's TSN, which is what a keypad uses to match the response to its request. Pass the TSN of the received Arm and Get Panel Status commands through to the responses. Arm requests issued from the consumer keep a fresh TSN.
Collaborator
Author
|
The red test jobs come from a flake unrelated to this change: on Python 3.14, Verified (5 checks)
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Severity: low (the audit's estimate)
When a keypad sends an IAS ACE Arm or Get Panel Status command, ZHA's Arm Response and Get Panel Status Response went out with a newly allocated ZCL transaction sequence number. ZCL R8 §2.4.1.3 requires a frame generated in response to a request to copy the request's TSN, which is how the keypad matches the response to its request. Zigbee2MQTT passes the request's transaction number back for both responses. The effect on real keypads hasn't been confirmed on hardware.
This sends both responses with the TSN of the request.
Changes
AlarmControlPanel.cluster_commandpasses the received TSN to the Arm and Get Panel Status handlers._disarm,_arm_day,_arm_night,_arm_away,_handle_arm) return theArmNotificationinstead of a ready-madearm_responsecoroutine, and_cmd_armsends thearm_responsewith the TSN. Arming from the consumer (Home Assistant) has no request, so its unsolicited Arm Response keeps a fresh TSN as before._send_panel_status_responsesends the Get Panel Status Response with the TSN.Testing
test_alarm_control_panel_responses_carry_request_tsnsends Arm (TSN 0x42) and Get Panel Status (TSN 0x43) from a frient KEPZB-110 and checks the TSN of ZHA's responses. It fails at dev 2da1a5b (the Arm Response has notsn) and passes with the fix.Opened by the scheduled code audit; not requested by a maintainer.
Fixes #1038