Query Standard Instruction Set of IR Devices

Last Updated on : 2023-07-06 08:27:50download

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 nameTypeINRequiredDescription
device_idStringuritrueThe device ID.

Return parameter

Parameter nameTypeDescription
resultInfraredSupportKeyResThe returned result.

Description of result

Parameter nameTypeDescription
is_acBooleanIndicates whether it is an air conditioner.
  • true: yes.
  • false: no.
functionsListThe IR instruction set.
mode_rangeListThe 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 nameTypeDescription
codeStringThe code of the data point (DP).
nameStringThe name of a specified instruction.
valueStringThe command value.

Description of mode_range

Parameter nameTypeDescription
modeIntegerThe 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_nameStringThe mode name.
temperature_rangeListThe 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 nameTypeDescription
temperatureIntegerThe temperature.
temperature_nameStringThe temperature name.
fan_rangeSetThe 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 nameTypeDescription
fanIntegerThe 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_nameStringThe 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.