Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 20 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,26 @@ When the start_listening command is issued, the server will dump all existing no

**Send a command**

Because we use the datamodels of the Matter SDK, this is a little bit more involved. Here is an example of turning on a switch:
Here is an example of turning on a switch (OnOff cluster)

```json
{
"message_id": "example",
"command": "device_command",
"args": {
"endpoint_id": 1,
"node_id": 1,
"payload": {},
"cluster_id": 6,
"command_name": "On"
}
}
```

**Python script to send a command**

Because we use the datamodels of the Matter SDK, this is a little bit more involved.
Here is an example of turning on a switch:

```python
import json
Expand Down Expand Up @@ -275,21 +294,6 @@ message = {

print(json.dumps(message, indent=2))
```

```json
{
"message_id": "example",
"command": "device_command",
"args": {
"endpoint_id": 1,
"node_id": 1,
"payload": {},
"cluster_id": 6,
"command_name": "On"
}
}
```

You can also provide parameters for the cluster commands. Here's how to change the brightness for example:

```python
Expand Down