Query Real-Time Environmental Indicators of Assets

Last Updated on : 2023-06-21 07:13:05download

Based on the asset ID and the indicator code, query the latest real-time data of various environmental indicators under the specified asset.

API address

GET: /v1.0/iot-03/assets/{asset_id}/environment-status

Request parameter

Parameter nameTypeINRequiredDescription
asset_idStringuritrueThe ID of the asset.
codesStringqueryfalseThe code of a specified indicator. Valid values:
  • voc_value: volatile organic compound (VOC).
  • pm25_value: PM2.5.
  • pm10_value: PM1.0.
  • pm100_value: PM10.
  • co2_value: carbon dioxide.
  • ch2o_value: formaldehyde.
  • temperature_value: temperature.
  • humidity_value: humidity.
  • tds_in_value: Total dissolved solids (TDS) in the raw water.
  • tds_out_value: Total dissolved solids (TDS) in the purified water.
  • cbpa_filtertime_day: CBPA service life.
  • ro_filtertime_day: RO service life.
  • cto_filtertime_day: CTO service life.
  • pp_filtertime_day: PP service life.
  • lux_value: brightness.
  • color_temperature_value: color temperature.

Return parameter

Parameter nameTypeDescription
resultAssetEnvironmentIndicatorRes

Description of result

Parameter nameTypeDescription
asset_nameStringThe name of the asset.
codesListThe list of indicator codes.

Description of codes

Parameter nameTypeDescription
codeStringThe code of a specified indicator.
avgStringThe average value of the indicators.
maxStringThe maximum value of the indicators.
minStringThe minimum value of the indicators.
unitStringThe unit of the indicator values.

Request example

GET: /v1.0/iot-03/assets/189382697123****/environment-status?codes=lux_value

Return example

{
    "result": {
        "codes": [
            {
                "code": "lux_value",
                "max": "36",
                "unit": "",
                "avg": "19.00",
                "min": "2"
            }
        ],
        "asset_name": "Office 1"
    },
    "t": 1626838069297,
    "success": true
}

Error code

For more information, see error code.