Control Device

Last Updated on : 2023-12-07 03:33:55download

Control the specified device with a standard instruction.

API address

POST: /v1.0/devices/{deviceId}/commands

Request parameter

Parameter nameTypeINRequiredDescription
device_idStringuritrueThe device ID.

Description of body

Parameter nameTypeINRequiredDescription
commandsString trueThe instruction to be sent.

Return parameter

Parameter nameTypeDescription
resultBooleanThe returned result.

Request example

POST: /v1.0/devices/vdevo*****/commands
{
  "commands": "[{\"code\": \"switch_led\",\"value\": true},{\"code\": \"bright\",\"value\": 30}]"
}

Return example

{
    "tid": "ea0605487d3e11ee82c7664ef4d3e193",
    "result": true,
    "t": 1699341966429,
    "success": true
}

Error code

For more information, see error code.