Send Single Command

Last Updated on : 2023-06-20 14:54:03download

During pairing, a remote control can send infrared codes to control an air conditioner based on the single command received.

API address

POST: /v2.0/infrareds/{infrared_id}/air-conditioners/testing/command

Request parameter

Parameter nameTypeINRequiredDescription
infrared_idStringuritrueThe device ID.

Description of body

Parameter nameTypeINRequiredDescription
remote_indexIntegerbodytrueThe index ID of the specified remote control.
category_idIntegerbodytrueThe ID of the specified product category.
codeStringbodytrueThe command.
valueObjectbodytrueThe value of the specified command.

Return parameter

Parameter nameTypeDescription
resultBooleanThe operation result.

Request example

POST: /v2.0/infrareds/vdevo15345926009****/air-conditioners/testing/command
{
  "remote_index": 3327,
  "category_id": 5,
  "code": "temp",
  "value": 26
}

Return example

{
    "result": true,
    "t": 1630933424188,
    "success": true
}

Error code

For more information, see error code.