Skip to content

Conversation

P-R-O-C-H-Y
Copy link
Member

Description of Change

This pull request introduces support for multi-endpoint binding in the Zigbee core, and adds handling for Zigbee write attribute response messages. The changes improve the flexibility of Zigbee device binding and enhance attribute response handling, making it easier to support advanced Zigbee features. The multi-endpoint binding option is disabled by default, to keep backward compatibility and also its not standard for Smart Home devices when using HA, only for specific scenarios.

Test Scenarios

Tested using custom example with 2 ESP-C6 (Coordinator + End Device)

Related links

@P-R-O-C-H-Y P-R-O-C-H-Y self-assigned this Sep 10, 2025
@P-R-O-C-H-Y P-R-O-C-H-Y added Status: Review needed Issue or PR is awaiting review Area: Zigbee Issues and Feature Request about Zigbee labels Sep 10, 2025
@P-R-O-C-H-Y P-R-O-C-H-Y requested a review from Copilot September 10, 2025 19:52
Copy link
Contributor

github-actions bot commented Sep 10, 2025

Messages
📖 🎉 Good Job! All checks are passing!

👋 Hello P-R-O-C-H-Y, we appreciate your contribution to this project!


📘 Please review the project's Contributions Guide for key guidelines on code, documentation, testing, and more.

🖊️ Please also make sure you have read and signed the Contributor License Agreement for this project.

Click to see more instructions ...


This automated output is generated by the PR linter DangerJS, which checks if your Pull Request meets the project's requirements and helps you fix potential issues.

DangerJS is triggered with each push event to a Pull Request and modify the contents of this comment.

Please consider the following:
- Danger mainly focuses on the PR structure and formatting and can't understand the meaning behind your code or changes.
- Danger is not a substitute for human code reviews; it's still important to request a code review from your colleagues.
- To manually retry these Danger checks, please navigate to the Actions tab and re-run last Danger workflow.

Review and merge process you can expect ...


We do welcome contributions in the form of bug reports, feature requests and pull requests.

1. An internal issue has been created for the PR, we assign it to the relevant engineer.
2. They review the PR and either approve it or ask you for changes or clarifications.
3. Once the GitHub PR is approved we do the final review, collect approvals from core owners and make sure all the automated tests are passing.
- At this point we may do some adjustments to the proposed change, or extend it by adding tests or documentation.
4. If the change is approved and passes the tests it is merged into the default branch.

Generated by 🚫 dangerJS against 93c5e9f

Copy link
Contributor

github-actions bot commented Sep 10, 2025

Test Results

 76 files   76 suites   13m 8s ⏱️
 38 tests  38 ✅ 0 💤 0 ❌
241 runs  241 ✅ 0 💤 0 ❌

Results for commit 93c5e9f.

♻️ This comment has been updated with latest results.

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request introduces support for Zigbee write attribute response handling and adds an option to allow multi-endpoint binding in the Zigbee core. The write response handler enables applications to receive and process attribute write confirmations, while the multi-endpoint binding option (disabled by default) allows endpoints to bind to multiple devices for advanced use cases.

Key changes:

  • Added write attribute response handler with callback mechanism
  • Introduced multi-endpoint binding configuration option
  • Enhanced device binding logic to support multiple endpoints when enabled

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
ZigbeeHandlers.cpp Added write attribute response handler function and callback registration
ZigbeeEP.h Added virtual zbWriteAttributeResponse method for endpoint implementations
ZigbeeCore.h Added multi-endpoint binding configuration methods
ZigbeeCore.cpp Enhanced binding logic with multi-endpoint support and configuration initialization

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Contributor

github-actions bot commented Sep 10, 2025

Memory usage test (comparing PR against master branch)

The table below shows the summary of memory usage change (decrease - increase) in bytes and percentage for each target.

MemoryFLASH [bytes]FLASH [%]RAM [bytes]RAM [%]
TargetDECINCDECINCDECINCDECINC
ESP32C50⚠️ +12980.00⚠️ +0.09000.000.00
ESP32S30⚠️ +10760.00⚠️ +0.09000.000.00
ESP32S20⚠️ +10480.00⚠️ +0.09000.000.00
ESP32C30⚠️ +14600.00⚠️ +0.11000.000.00
ESP32C60⚠️ +2160.00⚠️ +0.04000.000.00
ESP32H20⚠️ +2220.00⚠️ +0.04000.000.00
ESP320⚠️ +11800.00⚠️ +0.09000.000.00
Click to expand the detailed deltas report [usage change in BYTES]
TargetESP32C5ESP32S3ESP32S2ESP32C3ESP32C6ESP32H2ESP32
ExampleFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAM
libraries/Zigbee/examples/Zigbee_Analog_Input_Output⚠️ +2140⚠️ +1280⚠️ +1320⚠️ +2140⚠️ +2140⚠️ +2140⚠️ +1360
libraries/Zigbee/examples/Zigbee_Binary_Input_Output⚠️ +2140------⚠️ +2140⚠️ +2140--
libraries/Zigbee/examples/Zigbee_CarbonDioxide_Sensor⚠️ +2160------⚠️ +2160⚠️ +2160--
libraries/Zigbee/examples/Zigbee_Color_Dimmable_Light⚠️ +2160------⚠️ +2160⚠️ +2160--
libraries/Zigbee/examples/Zigbee_Color_Dimmer_Switch⚠️ +2140⚠️ +1520⚠️ +1400⚠️ +2140⚠️ +2140⚠️ +2140⚠️ +1680
libraries/Zigbee/examples/Zigbee_Contact_Switch⚠️ +2160------⚠️ +2160⚠️ +2160--
libraries/Zigbee/examples/Zigbee_Dimmable_Light⚠️ +2160------⚠️ +2160⚠️ +2160--
libraries/Zigbee/examples/Zigbee_Electrical_AC_Sensor⚠️ +2140⚠️ +1520⚠️ +1440⚠️ +2140⚠️ +2140⚠️ +2140⚠️ +1360
libraries/Zigbee/examples/Zigbee_Electrical_AC_Sensor_MultiPhase⚠️ +2140⚠️ +1320⚠️ +1480⚠️ +2140⚠️ +2140⚠️ +2140⚠️ +1360
libraries/Zigbee/examples/Zigbee_Electrical_DC_Sensor⚠️ +2140------⚠️ +2140⚠️ +2140--
libraries/Zigbee/examples/Zigbee_Fan_Control⚠️ +2160⚠️ +1120⚠️ +1400⚠️ +2160⚠️ +2160⚠️ +2160⚠️ +1480
libraries/Zigbee/examples/Zigbee_Gateway⚠️ +12980⚠️ +10760⚠️ +10480⚠️ +14600----⚠️ +11800
libraries/Zigbee/examples/Zigbee_Illuminance_Sensor⚠️ +2160------⚠️ +2160⚠️ +2160--
libraries/Zigbee/examples/Zigbee_Multistate_Input_Output⚠️ +2140⚠️ +1240⚠️ +1360⚠️ +2140⚠️ +2140⚠️ +2140⚠️ +1520
libraries/Zigbee/examples/Zigbee_OTA_Client⚠️ +2160------⚠️ +2160⚠️ +2160--
libraries/Zigbee/examples/Zigbee_Occupancy_Sensor⚠️ +2160------⚠️ +2160⚠️ +2160--
libraries/Zigbee/examples/Zigbee_On_Off_Light⚠️ +2160------⚠️ +2160⚠️ +2160--
libraries/Zigbee/examples/Zigbee_On_Off_MultiSwitch⚠️ +2140⚠️ +1480⚠️ +1440⚠️ +2140⚠️ +2140⚠️ +2140⚠️ +1680
libraries/Zigbee/examples/Zigbee_On_Off_Switch⚠️ +2160⚠️ +1400⚠️ +1440⚠️ +2160⚠️ +2160⚠️ +2160⚠️ +1600
libraries/Zigbee/examples/Zigbee_PM25_Sensor⚠️ +2160------⚠️ +2160⚠️ +2160--
libraries/Zigbee/examples/Zigbee_Power_Outlet⚠️ +2160⚠️ +1360⚠️ +1400⚠️ +2160⚠️ +2160⚠️ +2160⚠️ +1360
libraries/Zigbee/examples/Zigbee_Pressure_Flow_Sensor⚠️ +2220------⚠️ +2140⚠️ +2220--
libraries/Zigbee/examples/Zigbee_Range_Extender⚠️ +2160⚠️ +1280⚠️ +1320⚠️ +2160⚠️ +2160⚠️ +2160⚠️ +1320
libraries/Zigbee/examples/Zigbee_Scan_Networks⚠️ +1860------⚠️ +1840⚠️ +1860--
libraries/Zigbee/examples/Zigbee_Temp_Hum_Sensor_Sleepy⚠️ +2140------⚠️ +2140⚠️ +2140--
libraries/Zigbee/examples/Zigbee_Temperature_Sensor⚠️ +2160------⚠️ +2160⚠️ +2140--
libraries/Zigbee/examples/Zigbee_Thermostat⚠️ +2160⚠️ +1360⚠️ +1280⚠️ +2160⚠️ +2160⚠️ +2140⚠️ +1400
libraries/Zigbee/examples/Zigbee_Vibration_Sensor⚠️ +2160------⚠️ +2160⚠️ +2160--
libraries/Zigbee/examples/Zigbee_Wind_Speed_Sensor⚠️ +2160------⚠️ +2160⚠️ +2160--
libraries/Zigbee/examples/Zigbee_Window_Covering⚠️ +2140------⚠️ +2140⚠️ +2140--

@me-no-dev me-no-dev added Status: Pending Merge Pull Request is ready to be merged and removed Status: Review needed Issue or PR is awaiting review labels Sep 10, 2025
@me-no-dev me-no-dev merged commit 4ce23ce into master Sep 11, 2025
54 checks passed
@me-no-dev me-no-dev deleted the feat/zigbee-write-handler-multiendpoint branch September 11, 2025 07:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Zigbee Issues and Feature Request about Zigbee Status: Pending Merge Pull Request is ready to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants