Movatterモバイル変換


[0]ホーム

URL:


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 AC DC ElectricalMeasurement support#11384

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

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

@P-R-O-C-H-YP-R-O-C-H-Y commentedMay 21, 2025
edited
Loading

Description of Change

This pull request introduces a new Zigbee Electrical measurement endpoint support, containing support for both DC and AC(single or multi phase).

Added 3 new examples showing how the Electrical Measurement can be configured and used.

Tests scenarios

Tested using the new examples flashed on ESP32-C6 and connecting to a coordinator running on HomeAssistant ZHA.

NOTE: DC measurement is currently not supported by HA ZHA - pending PR here:zigpy/zha#453

Screenshot of AC multiphase example in HA
Screenshot 2025-05-21 at 8 25 03

Related links

Closes#11277

lboue reacted with thumbs up emoji
@P-R-O-C-H-YP-R-O-C-H-Y self-assigned thisMay 21, 2025
@P-R-O-C-H-YP-R-O-C-H-Y added Status: Review neededIssue or PR is awaiting review Area: ZigbeeIssues and Feature Request about Zigbee labelsMay 21, 2025
@github-actionsGitHub Actions
Copy link
Contributor

github-actionsbot commentedMay 21, 2025
edited
Loading

Messages
📖This PR seems to be quite large (total lines of code: 1855), 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'sContributions Guide for key guidelines on code, documentation, testing, and more.

🖊️ Please also make sure you haveread and signed theContributor License Agreement for this project.

Click to see more instructions ...


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

DangerJS is triggered with eachpush 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 isnot 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 manuallyretry these Danger checks, please navigate to theActions 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 against565150b

@github-actionsGitHub Actions
Copy link
Contributor

github-actionsbot commentedMay 21, 2025
edited
Loading

Test Results

 76 files   76 suites   12m 42s ⏱️
 38 tests  38 ✅ 0 💤 0 ❌
241 runs  241 ✅ 0 💤 0 ❌

Results for commit565150b.

♻️ This comment has been updated with latest results.

@P-R-O-C-H-YP-R-O-C-H-Y requested a review fromCopilotMay 21, 2025 08:38
Copy link
Contributor

@CopilotCopilotAI 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 Electrical Measurement (both DC and AC, single- and multi-phase) in the Zigbee library, along with example sketches, configuration files, and documentation updates.

  • IntroducesZigbeeElectricalMeasurement endpoint class with DC and AC measurement APIs
  • Registers the new endpoint in core headers/CMakeLists and provides three fully documented examples (DC, AC single-phase, AC multi-phase)
  • Supplies CI configs and README updates for each example

Reviewed Changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.

Show a summary per file
FileDescription
libraries/Zigbee/src/ep/ZigbeeElectricalMeasurement.hDefines new endpoint class and measurement enums/APIs
libraries/Zigbee/src/Zigbee.hIncludes new ElectricalMeasurement endpoint header
CMakeLists.txtAdds implementation source to build
libraries/Zigbee/examples/Zigbee_Electrical_DC_Sensor/*DC example sketch, CI config, and README
libraries/Zigbee/examples/Zigbee_Electrical_AC_Sensor/*AC single-phase example sketch, CI config, and README
libraries/Zigbee/examples/Zigbee_Electrical_AC_Sensor_MultiPhase/*AC multi-phase example sketch, CI config, and README
Comments suppressed due to low confidence (2)

libraries/Zigbee/src/ep/ZigbeeElectricalMeasurement.h:1

  • Update the class-level comment to reference ElectricalMeasurement rather than Pressure sensor to accurately describe the new endpoint.
/* Class of Zigbee Pressure sensor endpoint inherited from common EP class */

libraries/Zigbee/src/ep/ZigbeeElectricalMeasurement.h:98

  • [nitpick] The field namemeasure_type is ambiguous; consider renaming tomeasurement_types_bitmask ormeasured_types for clarity.
  uint32_t measure_type = 0x0000;

Copy link
Collaborator

@lucasssvazlucasssvaz left a comment

Choose a reason for hiding this comment

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

LGTM

@P-R-O-C-H-YP-R-O-C-H-Y added Status: Pending MergePull Request is ready to be merged and removed Status: Review neededIssue or PR is awaiting review labelsMay 23, 2025
@P-R-O-C-H-YP-R-O-C-H-Yforce-pushed thefeat/zigbee-electrical-meas branch fromdba16c3 tob50d3fbCompareMay 23, 2025 13:56
@me-no-devme-no-dev merged commit7bafc1b intoespressif:masterMay 27, 2025
56 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

Copilot code reviewCopilotCopilot left review comments

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

@lucasssvazlucasssvazlucasssvaz approved these changes

@SuGliderSuGliderSuGlider approved these changes

Assignees

@P-R-O-C-H-YP-R-O-C-H-Y

Labels
Area: ZigbeeIssues and Feature Request about ZigbeeStatus: Pending MergePull Request is ready to be merged
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Add support for Zigbee Electrical Measurement
4 participants
@P-R-O-C-H-Y@me-no-dev@lucasssvaz@SuGlider

[8]ページ先頭

©2009-2025 Movatter.jp