获取单个设备详情

更新时间:2023-06-21 07:12:55下载pdf

本文介绍获取单个设备详情的 API。

接口描述

获取单个设备的详细信息,包括设备基本信息、功能点列表和扩展信息。

接口地址

GET: /v1.0/iot-02/lighting/devices/detail

请求参数

body 说明

参数名类型参数位置是否必填说明
deviceIdStringbodytrue设备 ID

返回参数

参数名类型说明
deviceIdString设备 ID
deviceNameString设备默认名称
customNameString客户自定义名称
topCategoryCodeString产品所属大级分类。
  • dgzm
  • zm
  • djd
  • xjd
  • cfdq
  • jjaf
  • hjjk
  • sxj
  • wgzk
  • jnny
  • jyyl
  • gny
  • qt
secondCategoryString产品所属二级分类
thirdCategoryString产品所属三级分类
capabilitylong设备能力
devicePowerdouble设备功率
installTimelong设备安装时间
activeTimelong设备活跃时间
productIdString产品 ID
spaceIdString设备所属空间 ID
spaceNameString设备所属空间名称
pointIdString设备所在点位 ID
ownerIdString所属设备家庭组 ID
iconString设备图标
uuidString设备 UUID
uidString用户 ID
modelString产品型号
macStringMAC 地址
dpsObject[]功能点列表
deviceExtObject设备扩展信息
projectIdString项目 ID

请求示例

GET: /v1.0/iot-02/lighting/devices/detail
{
  "deviceId": "vdevo16393775054****"
}

返回示例

{
    "result": {
        "thirdCategory": "wf_ble_xdd",
        "productId": "wobsckg5p6os****",
        "secondCategory": "xdd",
        "dps": [
            {
                "code": "switch_led",
                "defaultValue": "",
                "dpId": 20,
                "iconname": "icon-dp_power",
                "standarded": true,
                "type": "obj",
                "required": true,
                "mode": "rw",
                "valueObject": true,
                "subtype": "bool",
                "schemaId": "000003ozvg",
                "scope": "",
                "name": "开关",
                "property": "{\"type\":\"bool\"}",
                "attr": 643,
                "extContent": "",
                "value": "true",
                "selected": true,
                "desc": "",
                "status": true
            },
            {
                "code": "work_mode",
                "defaultValue": "",
                "dpId": 21,
                "iconname": "icon-dp_mode",
                "standarded": true,
                "type": "obj",
                "required": true,
                "mode": "rw",
                "valueObject": "white",
                "subtype": "enum",
                "schemaId": "000003ozvg",
                "scope": "",
                "name": "模式",
                "property": "{\"range\":[\"white\",\"colour\",\"scene\",\"music\"],\"type\":\"enum\"}",
                "attr": 640,
                "extContent": "",
                "value": "white",
                "selected": true,
                "desc": "",
                "status": true
            },
            {
                "code": "bright_value",
                "defaultValue": "",
                "dpId": 22,
                "iconname": "icon-liangdu1",
                "standarded": true,
                "type": "obj",
                "required": true,
                "mode": "rw",
                "valueObject": 380,
                "subtype": "value",
                "schemaId": "000003ozvg",
                "scope": "",
                "name": "亮度值",
                "property": "{\"min\":10,\"max\":1000,\"scale\":0,\"step\":1,\"type\":\"value\"}",
                "attr": 642,
                "extContent": "",
                "value": "380",
                "selected": true,
                "desc": "",
                "status": true
            },
            {
                "code": "temp_value",
                "defaultValue": "",
                "dpId": 23,
                "iconname": "icon-dp_half",
                "standarded": true,
                "type": "obj",
                "required": true,
                "mode": "rw",
                "valueObject": 0,
                "subtype": "value",
                "schemaId": "000003ozvg",
                "scope": "",
                "name": "冷暖值",
                "property": "{\"min\":0,\"max\":1000,\"scale\":0,\"step\":1,\"type\":\"value\"}",
                "attr": 642,
                "extContent": "",
                "value": "0",
                "selected": true,
                "desc": "",
                "status": true
            },
            {
                "code": "colour_data",
                "defaultValue": "",
                "dpId": 24,
                "iconname": "icon-yanse",
                "standarded": true,
                "type": "obj",
                "required": true,
                "mode": "rw",
                "valueObject": "008d026201fe",
                "subtype": "string",
                "schemaId": "000003ozvg",
                "scope": "",
                "name": "彩光",
                "property": "{\"type\":\"string\",\"maxlen\":255}",
                "attr": 640,
                "extContent": "",
                "value": "008d026201fe",
                "selected": true,
                "desc": "",
                "status": true
            },
            {
                "code": "scene_data",
                "defaultValue": "",
                "dpId": 25,
                "iconname": "icon-shoucang",
                "standarded": true,
                "type": "obj",
                "required": true,
                "mode": "rw",
                "subtype": "string",
                "schemaId": "000003ozvg",
                "scope": "",
                "name": "场景",
                "property": "{\"type\":\"string\",\"maxlen\":255}",
                "attr": 640,
                "extContent": "",
                "value": "",
                "selected": true,
                "desc": "",
                "status": true
            },
            {
                "code": "countdown",
                "defaultValue": "",
                "dpId": 26,
                "iconname": "icon-a_nav_timer",
                "standarded": true,
                "type": "obj",
                "required": true,
                "mode": "rw",
                "subtype": "value",
                "schemaId": "000003ozvg",
                "scope": "",
                "name": "倒计时",
                "property": "{\"unit\":\"s\",\"min\":0,\"max\":86400,\"scale\":0,\"step\":1,\"type\":\"value\"}",
                "attr": 642,
                "extContent": "",
                "value": "0",
                "selected": true,
                "desc": "",
                "status": true
            },
            {
                "code": "control_data",
                "defaultValue": "",
                "dpId": 28,
                "iconname": "icon-dp_box2",
                "standarded": true,
                "type": "obj",
                "required": true,
                "mode": "wr",
                "subtype": "string",
                "schemaId": "000003ozvg",
                "scope": "",
                "name": "调节",
                "property": "{\"type\":\"string\",\"maxlen\":255}",
                "attr": 640,
                "extContent": "",
                "value": "",
                "selected": true,
                "desc": "",
                "status": true
            }
        ],
        "activeTime": 1639377505,
        "icon": "smart/icon/bay1591620233561etUp/****.png",
        "customName": "",
        "installTime": 1639377505821,
        "ownerId": "45360622",
        "deviceId": "vdevo16393775054****",
        "deviceName": "灯具1-vdevo",
        "uuid": "vdevo16393775054****",
        "spaceId": "146886924268113****",
        "uid": "bay1633683638972****",
        "capability": 1025,
        "pointId": "147028651497700****",
        "model": "",
        "devicePower": 0,
        "projectId": "146883549152368****"
    },
    "t": 1640588162385,
    "success": true
}

错误码

参考 错误码