English
English
简体中文
Contact Us
Register
Log In
Language
English
English
简体中文
Contact Us
Log In
Register
Go to main website
App Develop

App Development

Tuya provides multiple mobile app development methods such as no-code or IoT App SDK development to maximize the monetization of IoT apps.
layoutIndex

Get the status of a single device

Last Updated on : 2022-01-17 08:53:29download

Get the latest status of a single device.

API address

GET: /v1.0/iot-03/devices/{device_id}/status

Request parameter

Parameter nameTypeINRequiredDescription
device_idStringuritrueDevice ID

Return parameter

Parameter nameTypeDescription
resultList

Description of result

Parameter nameTypeDescription
codeStringStatus code
valueObjectStatus value

Request example

GET: /v1.0/iot-03/devices/xxxxId/status

Return example

{
    "result": [
        {
            "code": "switch_led",
            "value": true
        },
        {
            "code": "work_mode",
            "value": "scene_2"
        }
    ],
    "t": 1591872112140,
    "success": true
}

Error code

For more information, see error code.