-
Notifications
You must be signed in to change notification settings - Fork 7.7k
feat(matter): esp32-c6 matter over thread example #11980
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
base: master
Are you sure you want to change the base?
Conversation
This is a Enhanced Color Light example using Thread over Matter with Arduino Matter Library code. The example shall be built using Arduino as IDF Component.
👋 Hello SuGlider, 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 ...
Review and merge process you can expect ...
|
There was a problem hiding this 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 a new Arduino ESP-Matter over Thread example for ESP32-C6, demonstrating how to build a Matter-enabled RGB light that operates exclusively over Thread (without Wi-Fi). The example showcases integration of Arduino Core with ESP-Matter using an Enhanced Color Light endpoint.
Key changes:
- Introduces a complete Matter-over-Thread RGB light implementation using Arduino APIs
- Configures Thread-only connectivity (Wi-Fi disabled) with OpenThread and BLE for commissioning
- Implements persistent state storage using Preferences library for OnOff and HSV color states
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| sdkconfig.defaults | Configures ESP32-C6 for Thread-only operation with Matter support, disabling Wi-Fi and enabling OpenThread |
| partitions.csv | Defines custom partition table with OTA support, encrypted NVS, and factory partitions |
| idf_component.yml | Specifies dependencies for ESP-Matter (>=1.3.0) and Arduino-ESP32 (>=3.0.5) |
| MatterEnhancedColorLight.cpp | Main application implementing RGB color light with button control and Matter integration |
| CMakeLists.txt | Top-level build configuration with C++20 and Matter-specific compiler flags |
| main/CMakeLists.txt | Component-level build configuration |
| README.md | Documentation with setup instructions and usage guidelines |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
idf_component_examples/Arduino_ESP-Matter-over-Thread_ESP32-C6/sdkconfig.defaults
Outdated
Show resolved
Hide resolved
...component_examples/Arduino_ESP-Matter-over-Thread_ESP32-C6/main/MatterEnhancedColorLight.cpp
Outdated
Show resolved
Hide resolved
...component_examples/Arduino_ESP-Matter-over-Thread_ESP32-C6/main/MatterEnhancedColorLight.cpp
Outdated
Show resolved
Hide resolved
...component_examples/Arduino_ESP-Matter-over-Thread_ESP32-C6/main/MatterEnhancedColorLight.cpp
Outdated
Show resolved
Hide resolved
idf_component_examples/Arduino_ESP-Matter-over-Thread_ESP32-C6/README.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
idf_component_examples/Arduino_ESP-Matter-over-Thread_ESP32-C6/sdkconfig.defaults
Show resolved
Hide resolved
idf_component_examples/Arduino_ESP-Matter-over-Thread_ESP32-C6/README.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
idf_component_examples/Arduino_ESP-Matter-over-Thread_ESP32-C6/main/idf_component.yml
Outdated
Show resolved
Hide resolved
|
@SuGlider should this go into 3.3.3 or wait for 3.4.0? |
| targets: | ||
| esp32s2: false | ||
| esp32s3: false | ||
| esp32c2: false | ||
| esp32c3: false | ||
| esp32p4: false | ||
|
|
||
| requires: | ||
| - CONFIG_OPENTHREAD_ENABLED=y | ||
| - CONFIG_ESP_MATTER_ENABLE_DATA_MODEL=y | ||
| - CONFIG_MBEDTLS_HKDF_C=y |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To avoid having to edit this list everytime a new SoC is released you can add the SoC config to the requirements:
| targets: | |
| esp32s2: false | |
| esp32s3: false | |
| esp32c2: false | |
| esp32c3: false | |
| esp32p4: false | |
| requires: | |
| - CONFIG_OPENTHREAD_ENABLED=y | |
| - CONFIG_ESP_MATTER_ENABLE_DATA_MODEL=y | |
| - CONFIG_MBEDTLS_HKDF_C=y | |
| requires: | |
| - CONFIG_IDF_TARGET_ESP32C6=y | |
| - CONFIG_OPENTHREAD_ENABLED=y | |
| - CONFIG_ESP_MATTER_ENABLE_DATA_MODEL=y | |
| - CONFIG_MBEDTLS_HKDF_C=y |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually it could run wihtin the ESP32C5 and ESP32H2 too.
Maybe just
- CONFIG_OPENTHREAD_ENABLED=y
- CONFIG_ESP_MATTER_ENABLE_DATA_MODEL=y
- CONFIG_MBEDTLS_HKDF_C=y
Shall be enough.
I can remove the TARGET=C6 in sdkconfig to get it open for any OPENTHREAD compatible device.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I remove the targets: clause, it fails CI with different errors with S2, S3, P4 and C2.
Passes ESP32 and C3 (plus C5, C6 and H2.
Errors are related to BT, I2S IDF Component within ESP-SR and CHIP (matter) with C2 + IDF 5.5
3.3.3 is better. I was not sure if we eould realease a 3.3.x version before 3.4.0 |
Removed unsupported target configurations for ESP32.
Updated README to reflect support for ESP32-C5, ESP32-C6, and ESP32-H2. Adjusted Arduino and IDF version compatibility information.
Description of Change
This is a Enhanced Color Light example using Thread over Matter with Arduino Matter Library code.
The example shall be built using Arduino as IDF Component.
Test Scenarios
Using ESP32-C6, build the example and use some Matter Environment to commission the C6 Light.
Related links
closes #11820
#11777