Query Standard Instruction Set of IR Devices

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

Query the standard instruction set of infrared (IR) devices with the automation and tap-to-run features.

API address

GET: /v2.0/iot-03/automations/infrared/devices/{device_id}/specifications

Request parameter

Parameter name Type IN Required Description
device_id String uri true The device ID.

Return parameter

Parameter name Type Description
result InfraredSupportKeyRes The returned result.

Description of result

Parameter name Type Description
is_ac Boolean Indicates whether it is an air conditioner.
  • true: yes.
  • false: no.
functions List The IR instruction set.
mode_range List The value range of the mode. This field has a value only when the device type is the infrared air conditioner (is_ac is true). Otherwise, it is empty.

Description of functions

Parameter name Type Description
code String The code of the data point (DP).
name String The name of a specified instruction.
value String The command value.

Description of mode_range

Parameter name Type Description
mode Integer The mode supported by the air conditioner. Valid values:
  • 0: cooling.
  • 1: heating.
  • 2: automatic.
  • 3: air supply.
  • 4: dehumidification.
The modes might vary depending on the brands and models of the air conditioner.
mode_name String The mode name.
temperature_range List The value range of the temperature in the current mode. Air conditioners are relatively special. Its supported temperature range might vary in different modes. The value range is also subject to the brands and models of air conditioners. For example, the supported temperature range is 16°C to 22°C in the cooling mode, and 20°C to 30°C in the heating mode.

Description of temperature_range

Parameter name Type Description
temperature Integer The temperature.
temperature_name String The temperature name.
fan_range Set The value range of the wind speed under the current temperature. Similar to the relationship between mode and temperature, its supported wind speed might vary under different temperatures. The value range is also subject to the brands and models of air conditioners. For example, only low wind speed is supported in the cooling mode at 16°C. Both the low wind speed and medium wind speed are supported at 17°C.

Description of fan_range

Parameter name Type Description
fan Integer The wind speed. Valid values:
  • 0: automatic.
  • 1: low speed.
  • 2: medium speed.
  • 3: high speed.
The wind speed might vary depending on the brands and models of the air conditioner.
fan_name String The wind speed name.

Request example

GET: /v2.0/iot-03/automations/infrared/devices/6c819d650100a35f9e****/specifications

Return example

{ "result": { "functions": [ { "code": "F", "name": "Wind speed", "value": "F" }, { "code": "M", "name": "Mode", "value": "M" }, { "code": "PowerOff", "name": "Power-off", "value": "PowerOff" }, { "code": "PowerOn", "name": "Power-on", "value": "PowerOn" }, { "code": "T", "name": "Temperature", "value": "T" } ], "is_ac": true, "mode_range": [ { "mode": 0, "temperature_range": [ { "fan_range": [ { "fan_name": "Low speed", "fan": 1 } ], "temperature_name": "Temperature 16°C", "temperature": 16 }, { "fan_range": [ { "fan_name": "Medium speed", "fan": 2 }, { "fan_name": "Low speed", "fan": 1 } ], "temperature_name": "Temperature 17°C", "temperature": 17 } ], "mode_name": "Cooling mode" }, { "mode": 1, "temperature_range": [ { "fan_range": [ { "fan_name": "High speed", "fan": 3 }, { "fan_name": "Automatic speed", "fan": 0 }, { "fan_name": "Medium speed", "fan": 2 }, { "fan_name": "Low speed", "fan": 1 } ], "temperature_name": "Temperature 16°C", "temperature": 16 }, { "fan_range": [ { "fan_name": "High speed", "fan": 3 }, { "fan_name": "Automatic speed", "fan": 0 }, { "fan_name": "Medium speed", "fan": 2 }, { "fan_name": "Low speed", "fan": 1 } ], "temperature_name": "Temperature 17°C", "temperature": 17 } ], "mode_name": "Heating mode" }, { "mode": 2, "temperature_range": [ { "fan_range": [ { "fan_name": "High speed", "fan": 3 }, { "fan_name": "Automatic speed", "fan": 0 }, { "fan_name": "Medium speed", "fan": 2 }, { "fan_name": "Low speed", "fan": 1 } ] } ], "mode_name": "Automatic mode" }, { "mode": 3, "temperature_range": [ { "fan_range": [ { "fan_name": "High speed", "fan": 3 }, { "fan_name": "Automatic speed", "fan": 0 }, { "fan_name": "Medium speed", "fan": 2 }, { "fan_name": "Low speed", "fan": 1 } ], "temperature_name": "Temperature 16°C", "temperature": 16 }, { "fan_range": [ { "fan_name": "High speed", "fan": 3 }, { "fan_name": "Automatic speed", "fan": 0 }, { "fan_name": "Medium speed", "fan": 2 }, { "fan_name": "Low speed", "fan": 1 } ], "temperature_name": "Temperature 17°C", "temperature": 17 } ], "mode_name": "Air supply mode" }, { "mode": 4, "temperature_range": [ { "fan_range": [ { "fan_name": "Low speed", "fan": 1 } ], "temperature_name": "Temperature 16°C", "temperature": 16 }, { "fan_range": [ { "fan_name": "Low speed", "fan": 1 } ], "temperature_name": "Temperature 17°C", "temperature": 17 } ], "mode_name": "Dehumidification mode" } ] }, "t": 1635391392286, "success": true }

Error code

For more information, see error code.