Skip to content

Commit

Permalink
Merge branch 'docs/remote_control' into 'master'
Browse files Browse the repository at this point in the history
matter_controller: Docs to test remote control feature.

See merge request app-frameworks/esp-rainmaker!419
  • Loading branch information
dhrishi committed Jan 18, 2024
2 parents 539e3a8 + 66dd3f9 commit eaa455d
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions examples/matter/matter_controller_on_esp32_s3_box/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,36 @@
- Please check the board (ESP32-S3-BOX / ESP32-S3-BOX-3) by `idf.py menuconfig`, default is ESP32-S3-BOX-3.
- To commission the Controller on ESP32-S3-BOX, scan the QR Code shown on the screen using ESP RainMaker app.
- After commissioning successfully, the Controller could control the other devices (supporting On/Off cluster server) in the same fabric locally by clicking the button on the screen.
- The devices in the fabric can also be controlled remotely using the Rainmaker iOS app.
- Besides the [Matter + Rainmaker light](../matter_light/), a Matter-only light at '$ESP_MATTER_PATH/examples/light' can also be commissioned by using a similar method. The QR code for Matter-only light is in the [website](https://docs.espressif.com/projects/esp-matter/en/latest/esp32/developing.html#commissioning-and-control).
- Long click the BOOT button (on the upper left side of the screen) will reset factory, then the device can be commissioned again.

> Please refer to the [README in the parent folder](../README.md) for instructions.
## Fetching the details of the devices commissioned in the RainMaker Fabric:

```
$ cd $RMAKER_PATH/cli
$ ./rainmaker.py login --email <rainmaker-account-email>
$ ./rainmaker.py getparams <rainmaker-node-id-of-controller>
```
**Note**:
1) Please use the same account credentials that are used to claim the controller and signed into the Rainmaker app.
2) Get the rainmaker-node-id-of-controller by logging into [ESP Rainmaker Dashboard](https://dashboard.rainmaker.espressif.com/login).

## Controlling the devices remotely using rainmaker cli:

```
$ cd $RMAKER_PATH/cli
$ ./rainmaker.py login --email <rainmaker-account-email>
```
_Toggle command:_
```
$ ./rainmaker.py setparams --data '{"matter-controller":{"matter-controller-data":{"matter-nodes":[{"matter-node-id": "<matter-node-id-of-device>","endpoints":[{"endpoint-id":"0x1","clusters":[{"cluster-id":"0x6","commands":[{"command-id":"0x2"}]}]}]}]}}}' <rainmaker-node-id-of-controller>
```
_Set Brightness command:_
```
./rainmaker.py setparams --data '{"matter-controller":{"matter-controller-data":{"matter-nodes":[{"matter-node-id":"<matter-node-id-of-device>","endpoints":[{"endpoint-id":"0x1","clusters":[{"cluster-id":"0x8","commands":[{"command-id":"0x0","data":{"0":"10","1":"0","2":"0","3":"0"}}]}]}]}]}}}' <rainmaker-node-id-of-controller>
```
**Note**:
1) Get the matter-node-id-of-device from the details reported by the controller using getparams command.

0 comments on commit eaa455d

Please sign in to comment.