tree: 48d97b7a54927a3da07083f173ee71657cb86a75 [path history] [tgz]
  1. main/
  2. third_party/
  3. .gitignore
  4. CMakeLists.txt
  5. partitions.csv
  6. README.md
  7. sdkconfig.defaults
  8. sdkconfig.defaults.esp32c2
  9. sdkconfig.defaults.esp32c3
  10. sdkconfig.defaults.esp32c6
  11. sdkconfig.defaults.esp32h2
  12. sdkconfig_m5stack.defaults
  13. sdkconfig_m5stack_rpc.defaults
examples/all-clusters-app/esp32/README.md

Matter ESP32 All Clusters Example

A prototype application that demonstrates device commissioning and cluster control.

Please setup ESP-IDF and CHIP Environment and refer building and commissioning guides to get started.



Cluster control

onoff

To use the Client to send Matter commands, run the built executable and pass it the target cluster name, the target command name as well as an endpoint id.

$ ./out/debug/chip-tool onoff on <NODE ID> <ENDPOINT>

The client will send a single command packet and then exit.

levelcontrol

Usage:
  $ ./out/debug/chip-tool levelcontrol move-to-level Level=10 TransitionTime=0 OptionMask=0 OptionOverride=0 <NODE ID> <ENDPOINT>

Multiple Network Interfaces

The data model of this example includes a secondary NetworkCommissioning Endpoint with another NetworkCommissioning cluster. The Endpoint Id for the secondary NetworkCommissioning Endpoint is 65534. The secondary NetworkCommissioning Endpoint can be used to manage the driver of extra network interface.

For ESP32-C6 DevKits, if CHIP_DEVICE_CONFIG_ENABLE_WIFI and CHIP_DEVICE_CONFIG_ENABLE_THREAD are both enabled, please set CONFIG_THREAD_NETWORK_ENDPOINT_ID to 0 and set CONFIG_WIFI_NETWORK_ENDPOINT_ID to 65534, which presents that the NetworkCommissioning cluster in Endpoint 0 will be used for Thread network driver and the same cluster on Endpoint 65534 will be used for Wi-Fi network driver. Or vice versa.

For ESP32-Ethernet-Kits, if CHIP_DEVICE_CONFIG_ENABLE_WIFI and CHIP_DEVICE_CONFIG_ENABLE_ETHERNET are both enabled, please set CONFIG_ETHERNET_NETWORK_ENDPOINT_ID to 0 and set CONFIG_WIFI_NETWORK_ENDPOINT_ID to 65534, which presents that the NetworkCommissioning cluster in Endpoint 0 will be used for Ethernet network driver and the same cluster on Endpoint 65534 will be used for Wi-Fi network driver. Or vice versa.


This demo app illustrates controlling OnOff cluster (Server) attributes of an endpoint. For ESP32-DevKitC, ESP32-WROVER-KIT_V4.1 and ESP32C3-DevKitM, a GPIO (configurable through STATUS_LED_GPIO_NUM in main/main.cpp) is updated through the on/off/toggle commands from the python-controller. For M5Stack, a virtual Green LED on the display is used for the same.

If you wish to see the actual effect of the commands on ESP32-DevKitC, ESP32-WROVER-KIT_V4.1, you will have to connect an external LED to GPIO STATUS_LED_GPIO_NUM. For ESP32C3-DevKitM, the on-board LED will show the actual effect of the commands.