Last Updated on : 2024-01-11 06:00:19download
Based on the device ID, query the device details, including properties and the latest status of the specified device.
GET: /v1.0/devices/{deviceId}
| Parameter name | Type | IN | Required | Description |
|---|---|---|---|---|
| device_id | String | uri | true | The device ID. |
| Parameter name | Type | Description |
|---|---|---|
| result | DeviceRes | The returned result. |
Description of result
| Parameter name | Type | Description |
|---|---|---|
| id | String | The device ID. |
| uuid | String | The universally unique identifier (UUID) of the specified device. |
| uid | String | The user ID. |
| biz_type | Integer | The application type. |
| name | String | The device name. |
| time_zone | String | The time zone. |
| ip | String | The IP address of the specified device. |
| local_key | String | The secret key. |
| sub | Boolean | Indicates whether the specified device is a sub-device. Valid values:
|
| model | String | The product model. |
| create_time | Long | The time when the device was first paired. |
| update_time | Long | The time when the device status was last updated. |
| active_time | Long | The time when the device was last paired. |
| status | List | The status of the specified device data point. |
| owner_id | String | The ID of the device owner. |
| product_id | String | The product ID. |
| product_name | String | The product name. |
| category | String | The product category. |
| icon | String | The URL of the device icon. |
| online | Boolean | Indicates whether the device is online. Valid values:
|
| node_id | String | The ID of the specified sub-device. Returns a value when the value of sub is true, that is, if a sub-device exists. |
Description of status
| Parameter name | Type | Description |
|---|---|---|
| code | String | The name of the specified data point. |
| value | Object | The value of the specified data point. |
GET: /v1.0/devices/60613135b121cddc294****
{
"tid": "d8260b1f7d3d11ee82c7664ef4d3e193",
"result": {
"sub": true,
"create_time": 1669898482,
"local_key": "bf69a****54779",
"owner_id": "169****15",
"biz_type": 0,
"ip": "",
"icon": "smart/icon/ay15502****4fadc37ee90.png",
"lon": "120.2961",
"time_zone": "+08:00",
"product_name": "Fingerbot Plus",
"uuid": "tuyaac9****4d253",
"active_time": 1669898482,
"uid": "ay15913****677KZlj2",
"update_time": 1699341447,
"product_id": "yii***zh",
"name": "Fingerbot Plus",
"online": true,
"model": "ADFB0301",
"id": "6cf0ca****ab76bfjntj",
"category": "szjqr",
"lat": "30.3663",
"node_id": "tuyaac9***253",
"status": [
{
"code": "switch",
"value": true
},
{
"code": "mode",
"value": "click"
},
{
"code": "arm_down_percent",
"value": 96
},
{
"code": "click_sustain_time",
"value": 1
},
{
"code": "battery_percentage",
"value": 70
},
{
"code": "arm_up_percent",
"value": 3
},
{
"code": "tap_enable",
"value": true
}
]
},
"t": 1699341506949,
"success": true
}
For more information, see error code.
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback