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

Commit 295ff48

Browse files
SuGliderCopilotpre-commit-ci-lite[bot]
authored
feature(matter): improves Matter testing/status functions and documentation (#12140)
* feat(matter): adds ways to check matter features in execution time * feat(matter): necesary IDE options to build matter * feat(matter): implements Thread connected function and add feature enabled functions * feat(matter): adds Matter Status example and documentation * feat(matter): adds necessary Arduino IDE options to all README files * feat(matter): creates individual exmaple link/URL set in documentation * feat(matter): fixes IDE tools option images in documentation * fix(matter_docs): typo Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix(matter_docs): typo Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix(matter): typo Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix(matter): leftover commentary * fix(matter): fixes window blind terms * fix(matter): fixes window blind terms in code and readme file * fix(matter): removes not existing MACRO * fix(matter): if CHIPoBLE is not defined, it doesn't support it * fix(matter): fix commentary * fix(matter): better commentary Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix(matter): better commentary Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix(matter): identation * ci(pre-commit): Apply automatic fixes * fix(CI): Vale check * fix(CI): Vale check * fix(CI): Vale check * fix(CI): docs check * fix(CI): docs check * fix(CI): docs check * fix(CI): docs check * fix(CI): docs check --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
1 parent 3e3d47d commit 295ff48

File tree

39 files changed

+659
-89
lines changed

39 files changed

+659
-89
lines changed

‎docs/_static/matter_erase_flash.png‎

1.46 KB
Loading[フレーム]
3.25 KB
Loading[フレーム]

‎docs/en/matter/matter.rst‎

Lines changed: 79 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,30 @@ The Matter library provides support for creating Matter-compatible devices inclu
1616

1717
The Matter library is built on top of `ESP Matter SDK <https://github.com/espressif/esp-matter>`_ and provides a high-level Arduino-style interface for creating Matter devices.
1818

19+
Building and Flashing Matter Examples
20+
--------------------------------------
21+
22+
Before uploading any Matter example sketch, it is necessary to configure the Arduino IDE with the following settings:
23+
24+
1. **Partition Scheme**: Select **"Huge APP (3 MB No OTA / 1 MB SPIFFS)"** from **Tools > Partition Scheme** menu.
25+
26+
.. figure:: ../../_static/matter_partition_scheme.png
27+
:align: center
28+
:alt: "Partition Scheme: Huge APP (3 MB No OTA / 1 MB SPIFFS)" Arduino IDE menu option
29+
:figclass: align-center
30+
31+
2. **Erase Flash**: Enable **"Erase All Flash Before Sketch Upload"** option from **Tools** menu.
32+
33+
.. figure:: ../../_static/matter_erase_flash.png
34+
:align: center
35+
:alt: "Erase All Flash Before Sketch Upload: Enabled" Arduino IDE menu option
36+
:figclass: align-center
37+
38+
These settings are required for the following reasons:
39+
40+
* **Partition Scheme**: Matter firmware requires a large application partition (3 MB) to accommodate the Matter stack and application code.
41+
* **Erase Flash**: Erasing flash is necessary to remove any leftover Wi-Fi or Matter configuration from the NVS (Non-Volatile Storage) partition. Without erasing, previous network credentials, Matter fabric information, or device commissioning data may interfere with the new firmware, causing commissioning failures or connectivity issues.
42+
1943
Matter Protocol Overview
2044
************************
2145

@@ -83,9 +107,13 @@ The ``Matter`` class provides the following key methods:
83107

84108
* ``begin()``: Initializes the Matter stack
85109
* ``isDeviceCommissioned()``: Checks if the device is commissioned
86-
* ``isWi-FiConnected()``: Checks Wi-Fi connection status (if Wi-Fi is enabled)
87-
* ``isThreadConnected()``: Checks Thread connection status (if Thread is enabled)
110+
* ``isWiFiConnected()``: Checks Wi-Fi connection status
111+
* ``isThreadConnected()``: Checks Thread connection status
88112
* ``isDeviceConnected()``: Checks overall device connectivity
113+
* ``isWiFiStationEnabled()``: Checks if Wi-Fi Station mode is supported and enabled
114+
* ``isWiFiAccessPointEnabled()``: Checks if Wi-Fi AP mode is supported and enabled
115+
* ``isThreadEnabled()``: Checks if Thread network is supported and enabled
116+
* ``isBLECommissioningEnabled()``: Checks if BLE commissioning is supported and enabled
89117
* ``decommission()``: Factory resets the device
90118
* ``getManualPairingCode()``: Gets the manual pairing code for commissioning
91119
* ``getOnboardingQRCodeUrl()``: Gets the QR code URL for commissioning
@@ -148,6 +176,55 @@ The library provides specialized endpoint classes for different device types. Ea
148176

149177
ep_*
150178

179+
Matter Examples
180+
---------------
181+
182+
The Matter library includes a comprehensive set of examples demonstrating various device types and use cases. All examples are available in the `ESP Arduino GitHub repository <https://github.com/espressif/arduino-esp32/tree/master/libraries/Matter/examples>`_.
183+
184+
**Basic Examples:**
185+
186+
* **Matter Minimum** - The smallest code required to create a Matter-compatible device. Ideal starting point for understanding Matter basics. `View Matter Minimum code on GitHub <https://github.com/espressif/arduino-esp32/tree/master/libraries/Matter/examples/MatterMinimum>`_
187+
* **Matter Status** - Demonstrates how to check enabled Matter features and connectivity status. Implements a basic on/off light and periodically reports capability and connection status. `View Matter Status code on GitHub <https://github.com/espressif/arduino-esp32/tree/master/libraries/Matter/examples/MatterStatus>`_
188+
* **Matter Events** - Shows how to monitor and handle Matter events. Provides a comprehensive view of all Matter events during device operation. `View Matter Events code on GitHub <https://github.com/espressif/arduino-esp32/tree/master/libraries/Matter/examples/MatterEvents>`_
189+
* **Matter Commission Test** - Tests Matter commissioning functionality with automatic decommissioning after a 30-second delay for continuous testing cycles. `View Matter Commission Test code on GitHub <https://github.com/espressif/arduino-esp32/tree/master/libraries/Matter/examples/MatterCommissionTest>`_
190+
191+
**Lighting Examples:**
192+
193+
* **Matter On/Off Light** - Creates a Matter-compatible on/off light device with commissioning, device control via smart home ecosystems, and manual control using a physical button with state persistence. `View Matter On/Off Light code on GitHub <https://github.com/espressif/arduino-esp32/tree/master/libraries/Matter/examples/MatterOnOffLight>`_
194+
* **Matter Dimmable Light** - Creates a Matter-compatible dimmable light device with brightness control. `View Matter Dimmable Light code on GitHub <https://github.com/espressif/arduino-esp32/tree/master/libraries/Matter/examples/MatterDimmableLight>`_
195+
* **Matter Color Temperature Light** - Creates a Matter-compatible color temperature light device with adjustable color temperature control. `View Matter Color Temperature Light code on GitHub <https://github.com/espressif/arduino-esp32/tree/master/libraries/Matter/examples/MatterTemperatureLight>`_
196+
* **Matter Color Light** - Creates a Matter-compatible color light device with RGB color control (HSV color model). `View Matter Color Light code on GitHub <https://github.com/espressif/arduino-esp32/tree/master/libraries/Matter/examples/MatterColorLight>`_
197+
* **Matter Enhanced Color Light** - Creates a Matter-compatible enhanced color light with color temperature and brightness control. `View Matter Enhanced Color Light code on GitHub <https://github.com/espressif/arduino-esp32/tree/master/libraries/Matter/examples/MatterEnhancedColorLight>`_
198+
* **Matter Composed Lights** - Creates a Matter node with multiple light endpoints (On/Off Light, Dimmable Light, and Color Light) in a single node. `View Matter Composed Lights code on GitHub <https://github.com/espressif/arduino-esp32/tree/master/libraries/Matter/examples/MatterComposedLights>`_
199+
* **Matter On Identify** - Implements the Matter Identify cluster callback for an on/off light device, making the LED blink when the device is identified from a Matter app. `View Matter On Identify code on GitHub <https://github.com/espressif/arduino-esp32/tree/master/libraries/Matter/examples/MatterOnIdentify>`_
200+
201+
**Sensor Examples:**
202+
203+
* **Matter Temperature Sensor** - Creates a Matter-compatible temperature sensor device with sensor data reporting to smart home ecosystems. `View Matter Temperature Sensor code on GitHub <https://github.com/espressif/arduino-esp32/tree/master/libraries/Matter/examples/MatterTemperatureSensor>`_
204+
* **Matter Humidity Sensor** - Creates a Matter-compatible humidity sensor device with sensor data reporting. `View Matter Humidity Sensor code on GitHub <https://github.com/espressif/arduino-esp32/tree/master/libraries/Matter/examples/MatterHumiditySensor>`_
205+
* **Matter Pressure Sensor** - Creates a Matter-compatible pressure sensor device with automatic simulation of pressure readings. `View Matter Pressure Sensor code on GitHub <https://github.com/espressif/arduino-esp32/tree/master/libraries/Matter/examples/MatterPressureSensor>`_
206+
* **Matter Contact Sensor** - Creates a Matter-compatible contact sensor device (open/closed state). `View Matter Contact Sensor code on GitHub <https://github.com/espressif/arduino-esp32/tree/master/libraries/Matter/examples/MatterContactSensor>`_
207+
* **Matter Occupancy Sensor** - Creates a Matter-compatible occupancy sensor device with automatic simulation of occupancy state changes. `View Matter Occupancy Sensor code on GitHub <https://github.com/espressif/arduino-esp32/tree/master/libraries/Matter/examples/MatterOccupancySensor>`_
208+
* **Matter Water Leak Detector** - Creates a Matter-compatible water leak detector device with automatic simulation of water leak detection state changes. `View Matter Water Leak Detector code on GitHub <https://github.com/espressif/arduino-esp32/tree/master/libraries/Matter/examples/MatterWaterLeakDetector>`_
209+
* **Matter Water Freeze Detector** - Creates a Matter-compatible water freeze detector device with automatic simulation of water freeze detection state changes. `View Matter Water Freeze Detector code on GitHub <https://github.com/espressif/arduino-esp32/tree/master/libraries/Matter/examples/MatterWaterFreezeDetector>`_
210+
* **Matter Rain Sensor** - Creates a Matter-compatible rain sensor device with automatic simulation of rain detection state changes. `View Matter Rain Sensor code on GitHub <https://github.com/espressif/arduino-esp32/tree/master/libraries/Matter/examples/MatterRainSensor>`_
211+
212+
**Control Examples:**
213+
214+
* **Matter Fan** - Creates a Matter-compatible fan device with speed and mode control. `View Matter Fan code on GitHub <https://github.com/espressif/arduino-esp32/tree/master/libraries/Matter/examples/MatterFan>`_
215+
* **Matter Thermostat** - Creates a Matter-compatible thermostat device with temperature setpoint management and simulated heating/cooling systems with automatic temperature regulation. `View Matter Thermostat code on GitHub <https://github.com/espressif/arduino-esp32/tree/master/libraries/Matter/examples/MatterThermostat>`_
216+
* **Matter Temperature Controlled Cabinet** - Creates a Matter-compatible temperature controlled cabinet device with precise temperature setpoint control with min/max limits (temperature_number mode). `View Matter Temperature Controlled Cabinet code on GitHub <https://github.com/espressif/arduino-esp32/tree/master/libraries/Matter/examples/MatterTemperatureControlledCabinet>`_
217+
* **Matter Temperature Controlled Cabinet Levels** - Creates a Matter-compatible temperature controlled cabinet device using predefined temperature levels (temperature_level mode). `View Matter Temperature Controlled Cabinet Levels code on GitHub <https://github.com/espressif/arduino-esp32/tree/master/libraries/Matter/examples/MatterTemperatureControlledCabinetLevels>`_
218+
* **Matter On/Off Plugin** - Creates a Matter-compatible on/off plugin unit (power relay) device with state persistence for power control applications. `View Matter On/Off Plugin code on GitHub <https://github.com/espressif/arduino-esp32/tree/master/libraries/Matter/examples/MatterOnOffPlugin>`_
219+
* **Matter Dimmable Plugin** - Creates a Matter-compatible dimmable plugin unit (power outlet with level control) device with state persistence for dimmable power control applications. `View Matter Dimmable Plugin code on GitHub <https://github.com/espressif/arduino-esp32/tree/master/libraries/Matter/examples/MatterDimmablePlugin>`_
220+
* **Matter Smart Button** - Creates a Matter-compatible smart button (generic switch) device that sends button click events to smart home ecosystems and triggers automations. `View Matter Smart Button code on GitHub <https://github.com/espressif/arduino-esp32/tree/master/libraries/Matter/examples/MatterSmartButton>`_
221+
* **Matter Window Covering** - Creates a Matter-compatible window covering device with lift and tilt control (blinds, shades) with manual control using a physical button. `View Matter Window Covering code on GitHub <https://github.com/espressif/arduino-esp32/tree/master/libraries/Matter/examples/MatterWindowCovering>`_
222+
* **Matter Simple Blinds** - A minimal example that only controls lift percentage using a single onGoToLiftPercentage() callback. `View Matter Simple Blinds code on GitHub <https://github.com/espressif/arduino-esp32/tree/master/libraries/Matter/examples/MatterSimpleBlinds>`_
223+
224+
**Advanced Examples:**
225+
226+
* **Matter Lambda Single Callback Many Endpoints** - Demonstrates how to create multiple Matter endpoints in a single node using a shared lambda function callback with capture for efficient callback handling. `View Matter Lambda Single Callback Many Endpoints code on GitHub <https://github.com/espressif/arduino-esp32/tree/master/libraries/Matter/examples/MatterLambdaSingleCallbackManyEPs>`_
227+
151228
Common Problems and Issues
152229
--------------------------
153230

‎libraries/Matter/examples/MatterColorLight/README.md‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,12 @@ Before uploading the sketch, configure the following:
7878

7979
1. Open the `MatterColorLight.ino` sketch in the Arduino IDE.
8080
2. Select your ESP32 board from the **Tools > Board** menu.
81-
3. Connect your ESP32 board to your computer via USB.
82-
4. Click the **Upload** button to compile and flash the sketch.
81+
<!-- vale off -->
82+
3. Select **"Huge APP (3MB No OTA/1MB SPIFFS)"** from **Tools > Partition Scheme** menu.
83+
<!-- vale on -->
84+
4. Enable **"Erase All Flash Before Sketch Upload"** option from **Tools** menu.
85+
5. Connect your ESP32 board to your computer via USB.
86+
6. Click the **Upload** button to compile and flash the sketch.
8387

8488
## Expected Output
8589

‎libraries/Matter/examples/MatterCommissionTest/README.md‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,12 @@ Before uploading the sketch, configure the following:
5959

6060
1. Open the `MatterCommissionTest.ino` sketch in the Arduino IDE.
6161
2. Select your ESP32 board from the **Tools > Board** menu.
62-
3. Connect your ESP32 board to your computer via USB.
63-
4. Click the **Upload** button to compile and flash the sketch.
62+
<!-- vale off -->
63+
3. Select **"Huge APP (3MB No OTA/1MB SPIFFS)"** from **Tools > Partition Scheme** menu.
64+
<!-- vale on -->
65+
4. Enable **"Erase All Flash Before Sketch Upload"** option from **Tools** menu.
66+
5. Connect your ESP32 board to your computer via USB.
67+
6. Click the **Upload** button to compile and flash the sketch.
6468

6569
## Expected Output
6670

‎libraries/Matter/examples/MatterComposedLights/README.md‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,12 @@ Before uploading the sketch, configure the following:
7474

7575
1. Open the `MatterComposedLights.ino` sketch in the Arduino IDE.
7676
2. Select your ESP32 board from the **Tools > Board** menu.
77-
3. Connect your ESP32 board to your computer via USB.
78-
4. Click the **Upload** button to compile and flash the sketch.
77+
<!-- vale off -->
78+
3. Select **"Huge APP (3MB No OTA/1MB SPIFFS)"** from **Tools > Partition Scheme** menu.
79+
<!-- vale on -->
80+
4. Enable **"Erase All Flash Before Sketch Upload"** option from **Tools** menu.
81+
5. Connect your ESP32 board to your computer via USB.
82+
6. Click the **Upload** button to compile and flash the sketch.
7983

8084
## Expected Output
8185

‎libraries/Matter/examples/MatterContactSensor/README.md‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,12 @@ Before uploading the sketch, configure the following:
7878

7979
1. Open the `MatterContactSensor.ino` sketch in the Arduino IDE.
8080
2. Select your ESP32 board from the **Tools > Board** menu.
81-
3. Connect your ESP32 board to your computer via USB.
82-
4. Click the **Upload** button to compile and flash the sketch.
81+
<!-- vale off -->
82+
3. Select **"Huge APP (3MB No OTA/1MB SPIFFS)"** from **Tools > Partition Scheme** menu.
83+
<!-- vale on -->
84+
4. Enable **"Erase All Flash Before Sketch Upload"** option from **Tools** menu.
85+
5. Connect your ESP32 board to your computer via USB.
86+
6. Click the **Upload** button to compile and flash the sketch.
8387

8488
## Expected Output
8589

‎libraries/Matter/examples/MatterDimmableLight/README.md‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,12 @@ Before uploading the sketch, configure the following:
7979

8080
1. Open the `MatterDimmableLight.ino` sketch in the Arduino IDE.
8181
2. Select your ESP32 board from the **Tools > Board** menu.
82-
3. Connect your ESP32 board to your computer via USB.
83-
4. Click the **Upload** button to compile and flash the sketch.
82+
<!-- vale off -->
83+
3. Select **"Huge APP (3MB No OTA/1MB SPIFFS)"** from **Tools > Partition Scheme** menu.
84+
<!-- vale on -->
85+
4. Enable **"Erase All Flash Before Sketch Upload"** option from **Tools** menu.
86+
5. Connect your ESP32 board to your computer via USB.
87+
6. Click the **Upload** button to compile and flash the sketch.
8488

8589
## Expected Output
8690

‎libraries/Matter/examples/MatterDimmablePlugin/README.md‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,12 @@ Before uploading the sketch, configure the following:
8282

8383
1. Open the `MatterDimmablePlugin.ino` sketch in the Arduino IDE.
8484
2. Select your ESP32 board from the **Tools > Board** menu.
85-
3. Connect your ESP32 board to your computer via USB.
86-
4. Click the **Upload** button to compile and flash the sketch.
85+
<!-- vale off -->
86+
3. Select **"Huge APP (3MB No OTA/1MB SPIFFS)"** from **Tools > Partition Scheme** menu.
87+
<!-- vale on -->
88+
4. Enable **"Erase All Flash Before Sketch Upload"** option from **Tools** menu.
89+
5. Connect your ESP32 board to your computer via USB.
90+
6. Click the **Upload** button to compile and flash the sketch.
8791

8892
## Expected Output
8993

‎libraries/Matter/examples/MatterEnhancedColorLight/README.md‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,12 @@ Before uploading the sketch, configure the following:
8181

8282
1. Open the `MatterEnhancedColorLight.ino` sketch in the Arduino IDE.
8383
2. Select your ESP32 board from the **Tools > Board** menu.
84-
3. Connect your ESP32 board to your computer via USB.
85-
4. Click the **Upload** button to compile and flash the sketch.
84+
<!-- vale off -->
85+
3. Select **"Huge APP (3MB No OTA/1MB SPIFFS)"** from **Tools > Partition Scheme** menu.
86+
<!-- vale on -->
87+
4. Enable **"Erase All Flash Before Sketch Upload"** option from **Tools** menu.
88+
5. Connect your ESP32 board to your computer via USB.
89+
6. Click the **Upload** button to compile and flash the sketch.
8690

8791
## Expected Output
8892

0 commit comments

Comments
(0)

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