Skip to content

Commit 716d639

Browse files
committed
update Arduino-IDF-Matter example
1 parent 74be2e3 commit 716d639

17 files changed

+248
-1068
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.pio
2+
.vscode/.browse.c_cpp.db*
3+
.vscode/c_cpp_properties.json
4+
.vscode/launch.json
5+
.vscode/ipch
Lines changed: 20 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,20 @@
1-
| Supported Targets | ESP32-C3 | ESP32-C6 |
2-
| ----------------- | -------- | -------- |
3-
4-
5-
# Managed Component Light
6-
7-
This example is configured by default to work with the ESP32-C6, which has the RGB LED GPIO set as pin 8 and the BOOT button on GPIO 9.
8-
9-
This example creates a Color Temperature Light device using the esp_matter component automatically downloaded from the [Espressif Component Registry](https://components.espressif.com/). See the [docs](https://docs.espressif.com/projects/esp-matter/en/latest/esp32/developing.html) for more information about matter.
10-
11-
The code is based on the Arduino API and uses Arduino as an IDF Component.
12-
13-
## How to use it
14-
15-
Once the device runs for the first time, it must be commissioned to the Matter Fabric of the available Matter Environment.
16-
Possible Matter Environments are:
17-
- Amazon Alexa
18-
- Google Home Assistant (*)
19-
- Apple Home
20-
- Open Source Home Assistant
21-
22-
(*) Google Home Assistant requires the user to set up a Matter Light using the [Google Home Developer Console](https://developers.home.google.com/codelabs/matter-device#2). It is necessary to create a Matter Light device with VID = 0xFFF1 and PID = 0x8000. Otherwise, the Light won't show up in the GHA APP. This action is necessary because the Firmware uses Testing credentials and Google requires the user to create the testing device before using it.
23-
24-
There is no QR Code to be used when the Smartphone APP wants to add the Matter Device.
25-
Please enter the code manually: `34970112332`
26-
27-
The devboard has a built-in LED that will be used as the Matter Light.
28-
The default setting of the code uses pin 8 for the ESP32-C6,
29-
Please change it in `main/matter_accessory_driver.h` or in the `sdkconfig.defaults` file.
30-
31-
## LED Status and Factory Mode
32-
33-
The WS2812b built-in LED will turn purple as soon as the device is flashed and runs for the first time.
34-
The purple color indicates that the Matter Accessory has not been commissioned yet.
35-
After using a Matter provider Smartphone APP to add a Matter device to your Home Application, it may turn orange to indicate that it has no WiFi connection.
36-
37-
Once it connects to the WiFi network, the LED will turn white to indicate that Matter is working and the device is connected to the Matter Environment.
38-
Please note that Matter over WiFi using an ESP32 device will connect to a 2.4GHz WiFi SSID, therefore the Commissioner APP Smartphone shall be connected to this SSID.
39-
40-
The Matter and WiFi configuration will be stored in NVS to ensure that it will connect to the Matter Fabric and WiFi Network again once it is reset.
41-
42-
The Matter Smartphone APP will control the light state (ON/OFF), temperature (Warm/Cold White), and brightness.
43-
44-
## On Board Light toggle button
45-
46-
The built-in BOOT button will toggle On/Off and replicate the new state to the Matter Environment, making it visible in the Matter Smartphone APP as well.
47-
48-
## Returning to the Factory State
49-
50-
Holding the BOOT button pressed for more than 10 seconds and then releasing it will erase all Matter and WiFi configuration, forcing it to reset to factory state. After that, the device needs to be commissioned again. Previous setups done in the Smartphone APP won't work again; therefore, the virtual device shall be removed from the APP.
51-
52-
## Building the Application using WiFi and Matter
53-
54-
This example has been tested with Arduino Core 3.2.0. It should work with newer versions too.
55-
56-
There is a configuration file for these SoCs: esp32c3, esp32c6.
57-
Those are the tested devices that have a WS2812 RGB LED and can run BLE, WiFi and Matter.
58-
59-
In case it is necessary to change the Button Pin or the REG LED Pin, please use the `menuconfig` and change the Menu Option `Light Matter Accessory`
60-
61-
## Using OpenThread with Matter
62-
63-
This is possible with the ESP32-C6.
64-
It is necessary to have a Thread Border Router in the Matter Environment. Check your Matter hardware provider.
65-
1+
# Arduino ESP-Matter over WiFi (Thread) example using ESP32-C6
2+
This is an Arduino as IDF Project to build an ESP-Matter over WiFi or Thread RGB Light using ESP32-C6 and ESP-Matter Arduino API \
3+
4+
Example from [ESP32 Matter Library examples](https://github.com/espressif/arduino-esp32/tree/master/libraries/Matter/examples)
5+
6+
The `main/idf_component.yml` file holds the ESP-Matter component.\
7+
8+
# Instructions:
9+
10+
1- Compile with `pio run`
11+
12+
2- Try to add the Matter RGB light to your Matter environment.
13+
14+
# Thread variant:
15+
16+
1- Rename `sdkconfig.defaults` to `sdkconfig.defaults.wifi` and `sdkconfig.defaults.thread` to `sdkconfig.defaults`
17+
18+
2- Compile with `pio run`
19+
20+
3- Try to add the Matter RGB light to your Matter environment.

examples/espidf-arduino-matter-light/include/README

Lines changed: 0 additions & 39 deletions
This file was deleted.

examples/espidf-arduino-matter-light/lib/README

Lines changed: 0 additions & 46 deletions
This file was deleted.
Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
# This file was automatically generated for projects
2-
# without default 'CMakeLists.txt' file.
1+
idf_component_register(SRC_DIRS "."
2+
INCLUDE_DIRS ".")
33

4-
FILE(GLOB_RECURSE app_sources ${CMAKE_SOURCE_DIR}/main/*.*)
5-
6-
idf_component_register(SRCS ${app_sources})
7-
8-
#set_property(TARGET ${COMPONENT_LIB} PROPERTY CXX_STANDARD 17)
9-
#target_compile_options(${COMPONENT_LIB} PRIVATE "-DCHIP_HAVE_CONFIG_H")

examples/espidf-arduino-matter-light/main/Kconfig.projbuild

Lines changed: 0 additions & 42 deletions
This file was deleted.

0 commit comments

Comments
 (0)