Last Updated on : 2023-06-19 07:06:07
Send commands to a device.
POST: /v1.0/iot-03/devices/{device_id}/commands
Parameter name | Type | IN | Required | Description |
---|---|---|---|---|
device_id | String | uri | true | Device ID |
Description of body
Parameter name | Type | IN | Required | Description |
---|---|---|---|---|
commands | List | true | The command to control a device |
Description of commands
Parameter name | Type | IN | Required | Description |
---|---|---|---|---|
code | String | true | Command code | |
value | Object | true | Command value |
Parameter name | Type | Description |
---|---|---|
result | Boolean |
POST: /v1.0/iot-03/devices/xxxid/commands
{
"commands": [
{
"code": "switch_led",
"value": true
}
]
}
{
"result": true,
"t": 1551851043862,
"success": true
}
For more information, see error code.
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback