Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(zigbee): Add multistate endpoint support #11609

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

Merged
me-no-dev merged 12 commits into master from feat/zigbee-multistate
Sep 5, 2025
Merged

Conversation

Copy link
Member

@P-R-O-C-H-Y P-R-O-C-H-Y commented Jul 18, 2025
edited
Loading

Description of Change

This pull request adds support for Multistate input/output endpoint. Key changes include the implementation of a new ZigbeeMultistate class, updates to the example project to demonstrate its usage, and modifications to related configuration and documentation files.

Tests scenarios

Tested using C6 with provided Multistage Input/Output example using HA (Multistate clusters are not yet supported there, so it was just manual reading of the attributes).

Related links

lboue reacted with thumbs up emoji lboue reacted with hooray emoji
@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 18, 2025
Copy link
Contributor

github-actions bot commented Jul 18, 2025
edited
Loading

Messages
📖 This PR seems to be quite large (total lines of code: 1339), you might consider splitting it into smaller PRs

👋 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.
- Addressing info messages (📖) is strongly recommended; they're less critical but valuable.
- 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 f650c06

Copy link
Contributor

github-actions bot commented Jul 18, 2025
edited
Loading

Test Results

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

Results for commit f650c06.

♻️ This comment has been updated with latest results.

@P-R-O-C-H-Y P-R-O-C-H-Y removed the Status: Blocked upstream 🛑 PR is waiting on upstream changes to be merged first label Sep 4, 2025
Copy link
Contributor

github-actions bot commented Sep 4, 2025
edited
Loading

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⚠️ +5320.00⚠️ +0.08000.000.00
ESP32S20⚠️ +5320.00⚠️ +0.09000.000.00
ESP32C3000.000.00000.000.00
ESP32C6000.000.00000.000.00
ESP32H2000.000.00000.000.00
ESP320⚠️ +5320.00⚠️ +0.08000.000.00
Click to expand the detailed deltas report [usage change in BYTES]
TargetESP32C5ESP32S3ESP32S2ESP32C3ESP32C6ESP32H2ESP32
ExampleFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAM
libraries/Zigbee/examples/Zigbee_Analog_Input_Output00⚠️ +5320⚠️ +5320000000⚠️ +5320
libraries/Zigbee/examples/Zigbee_Binary_Input00------0000--
libraries/Zigbee/examples/Zigbee_CarbonDioxide_Sensor00------0000--
libraries/Zigbee/examples/Zigbee_Color_Dimmable_Light00------0000--
libraries/Zigbee/examples/Zigbee_Color_Dimmer_Switch00⚠️ +5320⚠️ +5320000000⚠️ +5320
libraries/Zigbee/examples/Zigbee_Contact_Switch00------0000--
libraries/Zigbee/examples/Zigbee_Dimmable_Light00------0000--
libraries/Zigbee/examples/Zigbee_Electrical_AC_Sensor00⚠️ +5320⚠️ +5320000000⚠️ +5320
libraries/Zigbee/examples/Zigbee_Electrical_AC_Sensor_MultiPhase00⚠️ +5320⚠️ +5320000000⚠️ +5320
libraries/Zigbee/examples/Zigbee_Electrical_DC_Sensor00------0000--
libraries/Zigbee/examples/Zigbee_Fan_Control00⚠️ +5320⚠️ +5320000000⚠️ +5320
libraries/Zigbee/examples/Zigbee_Gateway00⚠️ +5320⚠️ +532000----⚠️ +5320
libraries/Zigbee/examples/Zigbee_Illuminance_Sensor00------0000--
libraries/Zigbee/examples/Zigbee_Multistate_Input_Output--------------
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⚠️ +5320⚠️ +5320000000⚠️ +5320
libraries/Zigbee/examples/Zigbee_On_Off_Switch00⚠️ +5320⚠️ +5320000000⚠️ +5320
libraries/Zigbee/examples/Zigbee_PM25_Sensor00------0000--
libraries/Zigbee/examples/Zigbee_Power_Outlet00⚠️ +5320⚠️ +5320000000⚠️ +5320
libraries/Zigbee/examples/Zigbee_Pressure_Flow_Sensor00------0000--
libraries/Zigbee/examples/Zigbee_Range_Extender00⚠️ +5320⚠️ +5320000000⚠️ +5320
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⚠️ +5320⚠️ +5320000000⚠️ +5320
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 added the Status: Review needed Issue or PR is awaiting review label Sep 4, 2025
Currently, this example supports the following targets.

| Supported Targets | ESP32-C6 | ESP32-H2 |
| ----------------- | -------- | -------- |
Copy link
Member

@me-no-dev me-no-dev Sep 4, 2025

Choose a reason for hiding this comment

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

you should update all those to also include C5 or maybe find a better way to define what chips are supported

Copy link
Member Author

@P-R-O-C-H-Y P-R-O-C-H-Y Sep 4, 2025

Choose a reason for hiding this comment

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

Will update all examples before we release 3.3.1. Good point

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 PR adds support for Zigbee multistate input/output endpoints by implementing a new ZigbeeMultistate class. The implementation includes predefined application types following Zigbee specification standards and provides functionality for both input sensors and output actuators with discrete state values.

Key changes:

  • Implementation of complete ZigbeeMultistate class with input/output cluster support
  • Addition of comprehensive example demonstrating both standard and custom multistate devices
  • Integration of new class into the Zigbee library build system and documentation

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
libraries/Zigbee/src/ep/ZigbeeMultistate.h Header file defining the ZigbeeMultistate class with predefined application types and public API
libraries/Zigbee/src/ep/ZigbeeMultistate.cpp Implementation of multistate input/output functionality with cluster management and state control
libraries/Zigbee/src/Zigbee.h Adds include for the new ZigbeeMultistate header file
libraries/Zigbee/keywords.txt Adds Arduino IDE syntax highlighting for all ZigbeeMultistate methods and constants
libraries/Zigbee/examples/Zigbee_Multistate_Input_Output/ci.json CI configuration for the multistate example
libraries/Zigbee/examples/Zigbee_Multistate_Input_Output/Zigbee_Multistate_Input_Output.ino Complete example demonstrating standard and custom multistate device usage
libraries/Zigbee/examples/Zigbee_Multistate_Input_Output/README.md Documentation for the multistate example with setup and usage instructions
docs/en/zigbee/ep_multistate.rst Comprehensive API documentation for the ZigbeeMultistate class
CMakeLists.txt Adds ZigbeeMultistate.cpp to the build system

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
@me-no-dev me-no-dev merged commit 35dffda into master Sep 5, 2025
79 checks passed
@me-no-dev me-no-dev deleted the feat/zigbee-multistate branch September 5, 2025 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

Copilot code review Copilot Copilot left review comments

@pedrominatel pedrominatel pedrominatel approved these changes

@me-no-dev me-no-dev me-no-dev approved these changes

@lucasssvaz lucasssvaz lucasssvaz approved these changes

@SuGlider SuGlider Awaiting requested review from SuGlider SuGlider is a code owner

Labels
Area: Zigbee Issues and Feature Request about Zigbee Status: Pending Merge Pull Request is ready to be merged
Projects
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /