Files
esp-matter/examples/rainmaker_light/README.md
T
Chirag Atal a270477e16 esp_matter: Adding data model APIs for endpoints, clusters, attributes and commands.
This is a middle layer between application and chip submodule.
esp_matter_core: Data model APIs in the form of linked lists. It also has the APIs for initialisations for matter.
esp_matter_endpoint: APIs for endpoint. This adds the mandatory clusters for the endpoint.
esp_matter_cluster: APIs for cluster. This adds the mandatory attributes and commands for the cluster.
esp_matter_attribute: APIs for attribute value. It also manages the attribute related matter callbacks.
esp_matter_command: Callback APIs for commands.
esp_matter_attribute: Giving 2 callbacks to the application, pre_attribute and post_attribute.

app_main: Dynamically creating the data model using the top level APIs.
app_matter: Moved to esp_matter_start() in esp_matter. Also moved the post_attribute_callback to esp_matter_attribute and moved the event_callback to app_main.
app_driver: Moved with app_main. Using IDs instead of macros.
app_driver: Changing the console usage from names to IDs.
app_rainmaker: Dynamically creating the rainmaker data model from the matter data model. The endpoint_id, cluster_id, attribute_id need to be handled accordingly.

cmake: Moved the chip submodule sources and includes from app_main to esp_matter.
zap-generated: Using esp_matter_command instead of IMClusterCommandHandler. Dynamically creating the data model instead of using macros from endpoint_config.
zap-generated: Regenerated using the zap tool with matter_root_node and matter_color_dimmable_light device types. Also enabled wifi and thread for network commissioning cluster.
device_hal: Added support for esp32s2 with hollow drivers.

zap_light: Adding another example which uses the zap-generated data model instead of the esp_matter data model.
ci: Added zap_light example to ci.
2022-01-10 14:19:50 +05:30

1.9 KiB

RainMaker Light Example

Building and Flashing the Firmware

See the README.md file for more information about building and flashing the firmware.

What to expect in this example?

This example showcases integration of ESP RainMaker with a Matter light device. ESP RainMaker is an end-to-end solution offered by Espressif to enable remote control and monitoring for ESP32 based products without any configuration required in the Cloud. Please refer the ESP RainMaker documentation here for more details.

Supported features:

  • Matter Commissioning
  • RainMaker Claiming and User-Node Association
  • On/Off, Brightness and Color (on ESP32-C3 for now) control over RainMaker app as well as Matter Controller
  • Updates through RainMaker reflected over Matter and vice versa

Make sure to follow these additional steps along with the steps in the top level README.

Getting the Repositories

This only needs to be done once:

$ git clone --recursive https://github.com/espressif/esp-rainmaker.git

Setup the RainMaker CLI from here: https://rainmaker.espressif.com/docs/cli-setup.html

Configuring the environment

This needs to be done everytime a new terminal is opened:

cd esp-matter/examples/rainmaker_light/

export ESP_RMAKER_PATH=/path/to/esp-rainmaker

RainMaker Claiming

This need to be done before flashing the firmware. Note the mac address of the device.

RainMaker CLI:

$ cd $ESP_RMAKER_PATH/cli
$ rainmaker.py claim --addr 0x3E0000 $ESPPORT

RainMaker User-Node Association

This need to be done after commissioning.

RainMaker CLI:

$ rainmaker.py test --addnode <node-id>

This will print the console command to be run on the device:

add-user <user-id> <secret-key>

Use these details in the below command on the device console.

matter esp rainmaker add-user <user-id> <secret-key>