Query Device Status

Last Updated on : 2023-07-06 08:28:01download

Query the current status of a specified device. Currently, only infrared air-conditioners are supported.

API address

GET: /v2.0/iot-03/automations/infrared/ac/{device_id}/status

Request parameter

Parameter nameTypeINRequiredDescription
device_idStringuritrueThe device ID.

Return parameter

Parameter nameTypeDescription
resultAcStatusExtsResThe returned result.

Description of result

Parameter nameTypeDescription
power_openBooleanIndicates whether a specified air conditioner is powered on. Valid values:
  • true: yes.
  • false: no.
power_nameStringThe name of power-on status.
modeIntegerThe mode.
mode_nameStringThe mode name.
temperatureIntegerThe temperature.
temperature_nameStringThe temperature name.
fanIntegerThe fan.
fan_nameStringThe wind speed name.

Request example

GET: /v2.0/iot-03/automations/infrared/ac/6c819d650100a35f9e****/status

Return example

{
    "result": {
        "fan_name": "Low speed",
        "power_name": "Power-on",
        "power_open": true,
        "mode": 1,
        "temperature_name": "temperature 22°C",
        "fan": 1,
        "temperature": "22",
        "mode_name": "Heating mode"
    },
    "t": 1635734252399,
    "success": true
}

Error code

For more information, see error code.