Send Key Command

Last Updated on : 2023-06-15 05:15:59

The remote control sends an infrared code to control the specified device through key commands.

API address

POST: /v2.0/infrareds/{infrared_id}/remotes/{remote_id}/raw/command

Request parameter

Parameter nameTypeINRequiredDescription
infrared_idStringuritrueThe device ID.
remote_idStringuritrueThe ID of the specified remote control.

Description of body

Parameter nameTypeINRequiredDescription
category_idInteger trueThe ID of the specified product category.
key_idInteger falseThe key ID.
keyString falseThe key.

Return parameter

Parameter nameTypeDescription
resultBooleanThe operation result.

Request example

POST: /v2.0/infrareds/vdevo15345926009****/remotes/d5s65ca55/raw/command
{
  "category_id": 2,
  "key": "power",
  "key_id": 1
}

Return example

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

Error code

For more information, see error code.