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(matter): Adds Matter Events callback plus example#11465

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
SuGlider merged 10 commits intoespressif:masterfromSuGlider:matter_events
Jun 20, 2025

Conversation

@SuGlider
Copy link
Collaborator

@SuGliderSuGlider commentedJun 13, 2025
edited
Loading

Description of Change

Adds a new feature to ESP32 Arduino Matter Library that allows users to add a Matter Event Callback function.
All possible ESP32 Matter Events are covered in this implementation.

An example sketch is provided.

Tests scenarios

Using the provided example sketch.

Related links

None

@SuGliderSuGlider self-assigned thisJun 13, 2025
@github-actions
Copy link
Contributor

github-actionsbot commentedJun 13, 2025
edited
Loading

Messages
📖🎉 Good Job! All checks are passing!

👋Hello SuGlider, 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.
- 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 againstea67066

@github-actions
Copy link
Contributor

github-actionsbot commentedJun 13, 2025
edited
Loading

Test Results

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

Results for commitea67066.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

github-actionsbot commentedJun 13, 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
ESP32S30⚠️ +1560.00⚠️ +0.010⚠️ +160.00⚠️ +0.02
ESP32S20⚠️ +1560.00⚠️ +0.010⚠️ +160.00⚠️ +0.02
ESP32C30⚠️ +1400.00⚠️ +0.010⚠️ +160.00⚠️ +0.02
ESP32C60⚠️ +1400.00⚠️ +0.010⚠️ +160.00⚠️ +0.02
ESP320⚠️ +1600.00⚠️ +0.010⚠️ +160.00⚠️ +0.02
Click to expand the detailed deltas report [usage change in BYTES]
TargetESP32S3ESP32S2ESP32C3ESP32C6ESP32
ExampleFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAM
libraries/Matter/examples/MatterColorLight⚠️ +148⚠️ +16⚠️ +148⚠️ +16⚠️ +134⚠️ +16⚠️ +134⚠️ +16⚠️ +148⚠️ +16
libraries/Matter/examples/MatterCommissionTest⚠️ +152⚠️ +16⚠️ +156⚠️ +16⚠️ +134⚠️ +16⚠️ +134⚠️ +16⚠️ +160⚠️ +16
libraries/Matter/examples/MatterComposedLights⚠️ +148⚠️ +16⚠️ +148⚠️ +16⚠️ +134⚠️ +16⚠️ +134⚠️ +16⚠️ +148⚠️ +16
libraries/Matter/examples/MatterContactSensor⚠️ +152⚠️ +16⚠️ +156⚠️ +16⚠️ +134⚠️ +16⚠️ +134⚠️ +16⚠️ +156⚠️ +16
libraries/Matter/examples/MatterDimmableLight⚠️ +144⚠️ +16⚠️ +148⚠️ +16⚠️ +136⚠️ +16⚠️ +136⚠️ +16⚠️ +160⚠️ +16
libraries/Matter/examples/MatterEnhancedColorLight⚠️ +128⚠️ +16⚠️ +148⚠️ +16⚠️ +134⚠️ +16⚠️ +134⚠️ +16⚠️ +152⚠️ +16
libraries/Matter/examples/MatterEvents----------
libraries/Matter/examples/MatterFan⚠️ +152⚠️ +16⚠️ +148⚠️ +16⚠️ +134⚠️ +16⚠️ +134⚠️ +16⚠️ +152⚠️ +16
libraries/Matter/examples/MatterHumiditySensor⚠️ +148⚠️ +16⚠️ +148⚠️ +16⚠️ +134⚠️ +16⚠️ +134⚠️ +16⚠️ +152⚠️ +16
libraries/Matter/examples/MatterMinimum⚠️ +152⚠️ +16⚠️ +156⚠️ +16⚠️ +134⚠️ +16⚠️ +134⚠️ +16⚠️ +148⚠️ +16
libraries/Matter/examples/MatterOccupancySensor⚠️ +148⚠️ +16⚠️ +148⚠️ +16⚠️ +134⚠️ +16⚠️ +134⚠️ +16⚠️ +152⚠️ +16
libraries/Matter/examples/MatterOnIdentify⚠️ +148⚠️ +16⚠️ +144⚠️ +16⚠️ +138⚠️ +16⚠️ +138⚠️ +16⚠️ +144⚠️ +16
libraries/Matter/examples/MatterOnOffLight⚠️ +136⚠️ +16⚠️ +148⚠️ +16⚠️ +138⚠️ +16⚠️ +138⚠️ +16⚠️ +132⚠️ +16
libraries/Matter/examples/MatterOnOffPlugin⚠️ +132⚠️ +16⚠️ +152⚠️ +16⚠️ +140⚠️ +16⚠️ +140⚠️ +16⚠️ +128⚠️ +16
libraries/Matter/examples/MatterPressureSensor⚠️ +148⚠️ +16⚠️ +148⚠️ +16⚠️ +134⚠️ +16⚠️ +134⚠️ +16⚠️ +152⚠️ +16
libraries/Matter/examples/MatterSmartButon⚠️ +156⚠️ +16⚠️ +148⚠️ +16⚠️ +134⚠️ +16⚠️ +134⚠️ +16⚠️ +148⚠️ +16
libraries/Matter/examples/MatterTemperatureLight⚠️ +148⚠️ +16⚠️ +148⚠️ +16⚠️ +134⚠️ +16⚠️ +134⚠️ +16⚠️ +148⚠️ +16
libraries/Matter/examples/MatterTemperatureSensor⚠️ +148⚠️ +16⚠️ +148⚠️ +16⚠️ +134⚠️ +16⚠️ +134⚠️ +16⚠️ +152⚠️ +16
libraries/Matter/examples/MatterThermostat⚠️ +152⚠️ +16⚠️ +152⚠️ +16⚠️ +134⚠️ +16⚠️ +136⚠️ +16⚠️ +148⚠️ +16
libraries/Matter/examples/WiFiProvWithinMatter⚠️ +148⚠️ +16⚠️ +148⚠️ +16⚠️ +134⚠️ +16⚠️ +134⚠️ +16⚠️ +148⚠️ +16

@SuGliderSuGlider requested review froma team andlucasssvazJune 13, 2025 16:13
@SuGliderSuGlider added the Area: MatterIssues and Feature Request about Matter Protocol labelJun 13, 2025
@SuGliderSuGlider added this to the3.2.1 milestoneJun 13, 2025
@SuGliderSuGlider added the Status: Review neededIssue or PR is awaiting review labelJun 13, 2025
Copy link
Member

@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

This comment was marked as outdated.

This comment was marked as outdated.

@lucasssvazlucasssvaz requested a review fromCopilotJune 16, 2025 14:04

This comment was marked as outdated.

@espressifespressif deleted a comment fromCopilotAIJun 16, 2025
@espressifespressif deleted a comment fromCopilotAIJun 16, 2025
SuGliderand others added4 commitsJune 18, 2025 15:48
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Contributor

CopilotAI 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

Adds a Matter event callback API and example to the ESP32 Arduino Matter library, enabling users to register for and handle all supported Matter device events.

  • IntroducematterEvent_t enum andmatterEventCB type, withonEvent() registration API.
  • Wire up event dispatch inapp_event_cb() and initialize the static callback variable.
  • Provide a complete example sketch and updatekeywords.txt for editor highlighting.

Reviewed Changes

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

Show a summary per file
FileDescription
libraries/Matter/src/MatterEndPoint.hModernizedNULL returns tonullptr.
libraries/Matter/src/Matter.hAddedmatterEvent_t enum,matterEventCB alias andonEvent() API.
libraries/Matter/src/Matter.cppInitialized_matterEventCB, dispatch user callback in event handler.
libraries/Matter/keywords.txtRegistered new keywords for event types and API symbols.
libraries/Matter/examples/MatterEvents/ci.jsonAdded CI config for the new example.
libraries/Matter/examples/MatterEvents/MatterEvents.inoNew example sketch demonstrating the event callback.
Comments suppressed due to low confidence (2)

libraries/Matter/src/Matter.h:159

  • [nitpick] Add a brief Doxygen-style comment explaining the purpose and usage ofmatterEventCB and theonEvent registration method to improve API discoverability.
  using matterEventCB = std::function<void(matterEvent_t, const chip::DeviceLayer::ChipDeviceEvent*)>;

libraries/Matter/src/Matter.cpp:127

  • [nitpick] Consider adding unit or integration tests for the Matter event callback mechanism to ensure that_matterEventCB is invoked correctly for all supportedmatterEvent_t values.
  if (ArduinoMatter::_matterEventCB != nullptr) {

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@SuGliderSuGlider added Status: Pending MergePull Request is ready to be merged and removed Status: Review neededIssue or PR is awaiting review labelsJun 20, 2025
@SuGliderSuGlider merged commitccda9c5 intoespressif:masterJun 20, 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

@lucasssvazlucasssvazlucasssvaz approved these changes

@P-R-O-C-H-YP-R-O-C-H-YP-R-O-C-H-Y approved these changes

@me-no-devme-no-devAwaiting requested review from me-no-dev

Assignees

@SuGliderSuGlider

Labels

Area: MatterIssues and Feature Request about Matter ProtocolStatus: Pending MergePull Request is ready to be merged

Projects

Milestone

3.2.1

Development

Successfully merging this pull request may close these issues.

4 participants

@SuGlider@me-no-dev@lucasssvaz@P-R-O-C-H-Y

[8]ページ先頭

©2009-2025 Movatter.jp