Get Device Status

Last Updated on : 2024-01-11 05:55:39download

Query the latest status of the specified device based on the device ID. If you want to query the firmware to be updated, you can call the API Get Update Information.

API address

GET: /v1.0/devices/{deviceId}/status

Request parameter

Parameter nameTypeINRequiredDescription
device_idStringuritrueThe device ID.

Return parameter

Parameter nameTypeDescription
resultListThe returned result.

Description of result

Parameter nameTypeDescription
codeStringThe status code.
valueObjectThe current value.

Request example

GET: /v1.0/devices/****/status

Return example

{
    "tid": "39fb63917d3e11ee82c7664ef4d3e193",
    "result": [
        {
            "code": "switch",
            "value": true
        },
        {
            "code": "mode",
            "value": "click"
        }
    ],
    "t": 1699341671041,
    "success": true
}

Error code

For more information, see error code.