Get Device Details

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.

API address

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

Request parameter

Parameter nameTypeINRequiredDescription
device_idStringuritrueThe device ID.

Return parameter

Parameter nameTypeDescription
resultDeviceResThe returned result.

Description of result

Parameter nameTypeDescription
idStringThe device ID.
uuidStringThe universally unique identifier (UUID) of the specified device.
uidStringThe user ID.
biz_typeIntegerThe application type.
nameStringThe device name.
time_zoneStringThe time zone.
ipStringThe IP address of the specified device.
local_keyStringThe secret key.
subBooleanIndicates whether the specified device is a sub-device. Valid values:
  • true: yes.
  • false: no.
modelStringThe product model.
create_timeLongThe time when the device was first paired.
update_timeLongThe time when the device status was last updated.
active_timeLongThe time when the device was last paired.
statusListThe status of the specified device data point.
owner_idStringThe ID of the device owner.
product_idStringThe product ID.
product_nameStringThe product name.
categoryStringThe product category.
iconStringThe URL of the device icon.
onlineBooleanIndicates whether the device is online. Valid values:
  • true: The device is online.
  • false: The device is offline.
node_idStringThe 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 nameTypeDescription
codeStringThe name of the specified data point.
valueObjectThe value of the specified data point.

Request example

GET: /v1.0/devices/60613135b121cddc294****

Return example

{
    "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
}

Error code

For more information, see error code.