Control Air Conditioner with Multiple Keys

Last Updated on : 2023-06-15 05:17:16

Control an air conditioner through multiple commands.

API address

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

Request parameter

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

Description of body

Parameter nameTypeINRequiredDescription
remote_indexInteger falseThe ID of a specified remote control index.
category_idInteger falseThe ID of a specified category.
powerInteger trueThe power supply. Valid values:
  • 0: power off.
  • 1: power on.
modeInteger falseThe working mode. Valid values:
  • 0: cooling.
  • 1: heating.
  • 2: automatic.
  • 3: air supply.
  • 4: dehumidification.
tempInteger falseThe temperature.
swingInteger falseThe swing mode (not supported currently).
windInteger falseThe wind speed. Valid values:
  • 0: automatic.
  • 1: low speed.
  • 2: medium speed.
  • 3: high speed.

Return parameter

Parameter nameTypeDescription
resultBooleanThe operation result.

Request example

POST: /v2.0/infrareds/vdevo15345926009****/air-conditioners/d5s65ca55/scenes/command
{
  "power": 1,
  "mode": 0,
  "temp": 26,
  "wind": 1
}

Return example

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

Error code

For more information, see error code.