Skip to content

Conversation

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

@P-R-O-C-H-Y P-R-O-C-H-Y commented Jul 7, 2025

Description of Change

This pull request introduces enhancements to the Zigbee library by adding support for binary output functionality alongside the existing binary input features. This enables to create a custom switches without the need of binding.

Tests scenarios

Tested using Binary_Input_Output example with HomeAsisstant ZHA.
Screenshot 2025-07-07 at 11 14 18

Related links

Please provide links to related issue, PRs etc.

(eg. Closes #number of issue)

@P-R-O-C-H-Y P-R-O-C-H-Y self-assigned this Jul 7, 2025
@P-R-O-C-H-Y P-R-O-C-H-Y requested a review from lucasssvaz as a code owner July 7, 2025 09:21
@P-R-O-C-H-Y P-R-O-C-H-Y added Status: Blocked upstream 🛑 PR is waiting on upstream changes to be merged first Area: Zigbee Issues and Feature Request about Zigbee labels Jul 7, 2025
Copy link
Contributor

github-actions bot commented Jul 7, 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 7d37b7d

Copy link
Contributor

github-actions bot commented Jul 7, 2025

Test Results

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

Results for commit 7d37b7d.

♻️ This comment has been updated with latest results.

@me-no-dev me-no-dev marked this pull request as draft July 9, 2025 10:25
Copy link
Contributor

github-actions bot commented Sep 4, 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
ESP32C5000.000.00000.000.00
ESP32S30⚠️ +1960.00⚠️ +0.03000.000.00
ESP32S20⚠️ +1960.00⚠️ +0.03000.000.00
ESP32C3000.000.00000.000.00
ESP32C6000.000.00000.000.00
ESP32H2000.000.00000.000.00
ESP320⚠️ +1960.00⚠️ +0.03000.000.00
Click to expand the detailed deltas report [usage change in BYTES]
TargetESP32C5ESP32S3ESP32S2ESP32C3ESP32C6ESP32H2ESP32
ExampleFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAM
libraries/Zigbee/examples/Zigbee_Analog_Input_Output00⚠️ +1960⚠️ +1960000000⚠️ +1960
libraries/Zigbee/examples/Zigbee_Binary_Input_Output--------------
libraries/Zigbee/examples/Zigbee_CarbonDioxide_Sensor00------0000--
libraries/Zigbee/examples/Zigbee_Color_Dimmable_Light00------0000--
libraries/Zigbee/examples/Zigbee_Color_Dimmer_Switch00⚠️ +1960⚠️ +1960000000⚠️ +1960
libraries/Zigbee/examples/Zigbee_Contact_Switch00------0000--
libraries/Zigbee/examples/Zigbee_Dimmable_Light00------0000--
libraries/Zigbee/examples/Zigbee_Electrical_AC_Sensor00⚠️ +1960⚠️ +1960000000⚠️ +1960
libraries/Zigbee/examples/Zigbee_Electrical_AC_Sensor_MultiPhase00⚠️ +1960⚠️ +1960000000⚠️ +1960
libraries/Zigbee/examples/Zigbee_Electrical_DC_Sensor00------0000--
libraries/Zigbee/examples/Zigbee_Fan_Control00⚠️ +1960⚠️ +1960000000⚠️ +1960
libraries/Zigbee/examples/Zigbee_Gateway00⚠️ +1960⚠️ +196000----⚠️ +1960
libraries/Zigbee/examples/Zigbee_Illuminance_Sensor00------0000--
libraries/Zigbee/examples/Zigbee_OTA_Client00------0000--
libraries/Zigbee/examples/Zigbee_Occupancy_Sensor00------0000--
libraries/Zigbee/examples/Zigbee_On_Off_Light00------0000--
libraries/Zigbee/examples/Zigbee_On_Off_MultiSwitch00⚠️ +1960⚠️ +1960000000⚠️ +1960
libraries/Zigbee/examples/Zigbee_On_Off_Switch00⚠️ +1960⚠️ +1960000000⚠️ +1960
libraries/Zigbee/examples/Zigbee_PM25_Sensor00------0000--
libraries/Zigbee/examples/Zigbee_Power_Outlet00⚠️ +1960⚠️ +1960000000⚠️ +1960
libraries/Zigbee/examples/Zigbee_Pressure_Flow_Sensor00------0000--
libraries/Zigbee/examples/Zigbee_Range_Extender00⚠️ +1960⚠️ +1960000000⚠️ +1960
libraries/Zigbee/examples/Zigbee_Scan_Networks00------0000--
libraries/Zigbee/examples/Zigbee_Temp_Hum_Sensor_Sleepy00------0000--
libraries/Zigbee/examples/Zigbee_Temperature_Sensor00------0000--
libraries/Zigbee/examples/Zigbee_Thermostat00⚠️ +1960⚠️ +1960000000⚠️ +1960
libraries/Zigbee/examples/Zigbee_Vibration_Sensor00------0000--
libraries/Zigbee/examples/Zigbee_Wind_Speed_Sensor00------0000--

@P-R-O-C-H-Y P-R-O-C-H-Y marked this pull request as ready for review September 4, 2025 13:52
@P-R-O-C-H-Y P-R-O-C-H-Y added Status: Review needed Issue or PR is awaiting review and removed Status: Blocked upstream 🛑 PR is waiting on upstream changes to be merged first labels Sep 4, 2025
@P-R-O-C-H-Y P-R-O-C-H-Y moved this from Todo to In Review in Arduino ESP32 Core Project Roadmap Sep 4, 2025
@me-no-dev me-no-dev requested a review from Copilot September 4, 2025 14:55
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 adds binary output functionality to the existing Zigbee binary input implementation, enabling bidirectional control of binary devices. The enhancement allows creation of custom switches without requiring binding, complementing the existing binary input sensor capabilities.

Key Changes

  • Implementation of binary output cluster support alongside existing binary input functionality
  • Addition of callback mechanism for handling binary output state changes
  • Updated example demonstrating both input and output capabilities with multiple endpoint configurations

Reviewed Changes

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

Show a summary per file
File Description
libraries/Zigbee/src/ep/ZigbeeBinary.h Adds binary output constants, method declarations, and private members for output functionality
libraries/Zigbee/src/ep/ZigbeeBinary.cpp Implements complete binary output functionality including cluster creation, attribute handling, and state management
libraries/Zigbee/examples/Zigbee_Binary_Input_Output/Zigbee_Binary_Input_Output.ino Updates example to demonstrate both input and output capabilities with callback functions
libraries/Zigbee/examples/Zigbee_Binary_Input_Output/README.md Updates documentation to reflect new binary input/output capabilities
docs/en/zigbee/ep_binary.rst Comprehensive documentation update covering binary output API and usage examples
Comments suppressed due to low confidence (1)

libraries/Zigbee/src/ep/ZigbeeBinary.cpp:1

  • [nitpick] The method name binaryOutputChanged is misleading as it suggests the method is called when the output has already changed, but it's actually the method that triggers the callback. Consider renaming to triggerBinaryOutputCallback or notifyBinaryOutputChange to better reflect its purpose.
// Copyright 2025 Espressif Systems (Shanghai) PTE LTD

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

@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 5, 2025
@github-actions github-actions bot added the Status: Pre-commit fixes required ⚠️ The pre-commit bot can't fix the issues automatically. Please fix the issues manually. label Sep 5, 2025
@github-actions github-actions bot removed the Status: Pre-commit fixes required ⚠️ The pre-commit bot can't fix the issues automatically. Please fix the issues manually. label Sep 5, 2025
@me-no-dev me-no-dev merged commit c3f9513 into master Sep 5, 2025
55 checks passed
@me-no-dev me-no-dev deleted the feaz/zigbee-binary-output branch September 5, 2025 09:11
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
Development

Successfully merging this pull request may close these issues.

4 participants