|
|
@@ -87,6 +87,8 @@ Authorization: Bearer {{token}}
|
|
|
|
|
|
### 所有设备具有的配置属性返回数据格式示例
|
|
|
|
|
|
+为支持增量同步机制;所有对象新增操作模式字段:opr;枚举有:addOrUpd|del
|
|
|
+
|
|
|
```json
|
|
|
[
|
|
|
//第一个模板为所有配置,包含必选配置和可选配置,不同设备类型的配置都有说明
|
|
|
@@ -99,6 +101,7 @@ Authorization: Bearer {{token}}
|
|
|
"display_name": "设备显示名称",
|
|
|
"type": "设备类型", //entrance_guard 门禁,light ,switch,aircon,curtain,fan,airrefresh
|
|
|
"subtype": "设备子类型",
|
|
|
+ "opr": "操作模式", // addOrUpd 添加或者更新 |del 删除
|
|
|
"channels":[{//缓存的设备状态,或初始默认值,可选,不传时为空,具体项看设备控制协议定义
|
|
|
"name": "action",
|
|
|
"type": "STRING",
|
|
|
@@ -208,6 +211,7 @@ Authorization: Bearer {{token}}
|
|
|
"id": 1, "pid": 1,"area_id": "CAN区域", "area": "区域名称", "name": "0001", "display_name": "灯光",
|
|
|
"type": "humiture",
|
|
|
"subtype": "humiture_common", //humiture_common,默认值,通用温湿度
|
|
|
+ "opr": "操作模式", // addOrUpd 添加或者更新 |del 删除
|
|
|
"config":
|
|
|
{
|
|
|
"bus":"canbus",//设备接入总线或协议类型,canbus/network/serial/RS485/zigbee/bluetooth/dali/knx/plc-iot,默认canbus
|
|
|
@@ -221,6 +225,7 @@ Authorization: Bearer {{token}}
|
|
|
"id": 1, "pid": 1,"area_id": "CAN区域", "area": "区域名称", "name": "0001", "display_name": "灯光",
|
|
|
"type": "humiture",
|
|
|
"subtype": "humiture_common", //humiture_common,默认值,通用温湿度
|
|
|
+ "opr": "操作模式", // addOrUpd 添加或者更新 |del 删除
|
|
|
"config":
|
|
|
{
|
|
|
"address": "A5A812344545", //地址蓝牙设备mac地址
|
|
|
@@ -242,6 +247,7 @@ Authorization: Bearer {{token}}
|
|
|
"id": 1, "pid": 1,"area_id": "CAN区域", "area": "区域名称", "name": "0001", "display_name": "灯光",
|
|
|
"type": "light",
|
|
|
"subtype": "light_common", //subtype为子类型,light_common为普通灯光,默认值
|
|
|
+ "opr": "操作模式", // addOrUpd 添加或者更新 |del 删除
|
|
|
"config":
|
|
|
{
|
|
|
"bus":"canbus",
|
|
|
@@ -254,6 +260,7 @@ Authorization: Bearer {{token}}
|
|
|
"id": 1, "pid": 1,"area_id": "CAN区域", "area": "区域名称", "name": "0001", "display_name": "灯光",
|
|
|
"type": "lightdim",//调光灯,
|
|
|
"subtype": "dimming_single", //"dimming_single", "单路调光灯"/"dimming_color_temp", "调亮度调色温灯",
|
|
|
+ "opr": "操作模式", // addOrUpd 添加或者更新 |del 删除
|
|
|
"config":
|
|
|
{
|
|
|
"bus":"bluetooth",
|
|
|
@@ -265,6 +272,7 @@ Authorization: Bearer {{token}}
|
|
|
"id": 1, "pid": 1,"area_id": "CAN区域", "area": "区域名称", "name": "0001", "display_name": "灯光",
|
|
|
"type": "lightdim",//调光灯,
|
|
|
"subtype": "dimming_color_temp", //"dimming_single", "单路调光灯"/"dimming_color_temp", "调亮度调色温灯",
|
|
|
+ "opr": "操作模式", // addOrUpd 添加或者更新 |del 删除
|
|
|
"config":
|
|
|
{
|
|
|
"bus":"canbus",
|
|
|
@@ -285,6 +293,7 @@ Authorization: Bearer {{token}}
|
|
|
"id": 1, "pid": 1,"area_id": "CAN区域", "area": "区域名称", "name": "0001", "display_name": "灯光",
|
|
|
"type": "lightrgb",//彩光灯,
|
|
|
"subtype": "lightrgb_common", // "lightrgb_common", "彩灯"/"lightrgb_rgbw", "带白光彩灯"
|
|
|
+ "opr": "操作模式", // addOrUpd 添加或者更新 |del 删除
|
|
|
"config":
|
|
|
{
|
|
|
"address": "F012345678FF", //地址
|
|
|
@@ -305,6 +314,7 @@ Authorization: Bearer {{token}}
|
|
|
//curtain_horizontal 横窗帘 curtain_horizontal_double 双层横窗帘 curtain_vertical 卷帘 curtain_shutter 百页窗
|
|
|
//curtain_position_horizontal 可定位置开合帘 curtain_position_vertical 可定位置升降帘
|
|
|
"subtype": "curtain_horizontal", //subtype为子类型,light_common为普通灯光,默认值
|
|
|
+ "opr": "操作模式", // addOrUpd 添加或者更新 |del 删除
|
|
|
"config":
|
|
|
{
|
|
|
"bus":"canbus",
|
|
|
@@ -324,6 +334,7 @@ Authorization: Bearer {{token}}
|
|
|
"id": 1, "pid": 1,"area_id": "CAN区域", "area": "区域名称", "name": "0001", "display_name": "窗帘",
|
|
|
"type": "curtain",
|
|
|
"subtype": "curtain_horizontal",
|
|
|
+ "opr": "操作模式", // addOrUpd 添加或者更新 |del 删除
|
|
|
"config":
|
|
|
{
|
|
|
"bus":"canbus",
|
|
|
@@ -345,6 +356,7 @@ Authorization: Bearer {{token}}
|
|
|
"id": 1, "pid": 1,"area_id": "CAN区域", "area": "区域名称", "name": "0001", "display_name": "窗帘",
|
|
|
"type": "lock", //智能锁
|
|
|
"subtype": "door", //subtype为子类型,door为门锁,默认值,window为窗锁
|
|
|
+ "opr": "操作模式", // addOrUpd 添加或者更新 |del 删除
|
|
|
"config":
|
|
|
{
|
|
|
"bus":"canbus",
|
|
|
@@ -363,7 +375,8 @@ Authorization: Bearer {{token}}
|
|
|
{
|
|
|
"id": 1, "pid": 1,"area_id": "CAN区域", "area": "区域名称", "name": "0001", "display_name": "窗帘",
|
|
|
"type": "card_machine",
|
|
|
- "subtype": "common",
|
|
|
+ "subtype": "card_machine_common",
|
|
|
+ "opr": "操作模式", // addOrUpd 添加或者更新 |del 删除
|
|
|
"config":
|
|
|
{
|
|
|
"bus":"canbus",
|
|
|
@@ -385,6 +398,7 @@ Authorization: Bearer {{token}}
|
|
|
"id": 1, "pid": 1,"area_id": "CAN区域", "area": "区域名称", "name": "0001", "display_name": "空调",
|
|
|
"type": "bathheater",
|
|
|
"subtype": "bathheater_default", //subtype为子类型,bathheater_default为默认值
|
|
|
+ "opr": "操作模式", // addOrUpd 添加或者更新 |del 删除
|
|
|
"config":
|
|
|
{
|
|
|
"bus":"canbus",
|
|
|
@@ -431,6 +445,7 @@ Authorization: Bearer {{token}}
|
|
|
//aircon_common 默认类型 aircon_fcu 风机盘管 aircon_daikin 大金空调 aircon_haier 海尔空调
|
|
|
//aircon_gree 格力空调 aircon_hisense 海信空调 aircon_midea 美的空调 aircon_hitachi 日立空调
|
|
|
"subtype": "aircon_common", //subtype为子类型,aircon_common为默认值,通用空调
|
|
|
+ "opr": "操作模式", // addOrUpd 添加或者更新 |del 删除
|
|
|
"config":
|
|
|
{
|
|
|
"bus":"canbus",
|
|
|
@@ -472,6 +487,7 @@ Authorization: Bearer {{token}}
|
|
|
"id": 1, "pid": 1,"area_id": "CAN区域", "area": "区域名称", "name": "0001", "display_name": "空调",
|
|
|
"type": "aircon",
|
|
|
"subtype": "aircon_common", //subtype为子类型,aircon_common为默认值,通用空调
|
|
|
+ "opr": "操作模式", // addOrUpd 添加或者更新 |del 删除
|
|
|
"config":
|
|
|
{
|
|
|
"bus":"canbus",
|
|
|
@@ -495,6 +511,7 @@ Authorization: Bearer {{token}}
|
|
|
//aircon_common 默认类型 aircon_fcu 风机盘管 aircon_daikin 大金空调 aircon_haier 海尔空调
|
|
|
//aircon_gree 格力空调 aircon_hisense 海信空调 aircon_midea 美的空调 aircon_hitachi 日立空调
|
|
|
"subtype": "heater_floor", //subtype为子类型,aircon_common为默认值,通用空调
|
|
|
+ "opr": "操作模式", // addOrUpd 添加或者更新 |del 删除
|
|
|
"config":
|
|
|
{
|
|
|
"bus":"canbus",
|
|
|
@@ -515,6 +532,7 @@ Authorization: Bearer {{token}}
|
|
|
"type": "airfresh", //airfresh_common 默认类型 airfresh_home 新风家用 airfresh_work 新风大楼用
|
|
|
//airfresh_daikin 大金新风 airfresh_net_relay 网络面板继电器新风 airfresh_can_relay canbus继电器新风
|
|
|
"subtype": "airfresh_common", //airfresh_common为默认值,通用新风
|
|
|
+ "opr": "操作模式", // addOrUpd 添加或者更新 |del 删除
|
|
|
"config":
|
|
|
{
|
|
|
"bus":"canbus",
|
|
|
@@ -537,6 +555,7 @@ Authorization: Bearer {{token}}
|
|
|
"type": "aircon-outside",
|
|
|
//airconout_common 默认类型 airconout_onoff 状态外机,只线时外机状态 airconout_home 家用外机 airconout_work 大楼外机
|
|
|
"subtype": "airconout_common", //subtype为子类型,aircon_common为默认值,通用空调
|
|
|
+ "opr": "操作模式", // addOrUpd 添加或者更新 |del 删除
|
|
|
"config":
|
|
|
{
|
|
|
"bus":"canbus",//设备接入总线或协议类型,canbus/network/serial/RS485/zigbee/bluetooth/dali/knx/plc-iot
|
|
|
@@ -575,6 +594,7 @@ Authorization: Bearer {{token}}
|
|
|
"id": 1, "pid": 1,"area_id": "CAN区域", "area": "区域名称", "name": "0001", "display_name": "空调",
|
|
|
"type": "panel",
|
|
|
"subtype": "canbus", //canbus为默认值,canbus/serial/network/network_gpio/dry_contact
|
|
|
+ "opr": "操作模式", // addOrUpd 添加或者更新 |del 删除
|
|
|
"config":
|
|
|
{
|
|
|
"bus":"canbus",//设备接入总线或协议类型,canbus/network/serial/RS485/zigbee/bluetooth/dali/knx/plc-iot
|
|
|
@@ -622,7 +642,9 @@ Authorization: Bearer {{token}}
|
|
|
{
|
|
|
"id": 1, "pid": 1,"area_id": "CAN区域", "area": "区域名称", "name": "0001", "display_name": "空调",
|
|
|
"type": "entrance_guard",
|
|
|
- "subtype": "guard_face", //guard_face(人脸)/guard_face_card(人脸+刷卡)/guard_face_keypad(人脸+键盘)/guard_face_card_keypad
|
|
|
+ "subtype": "guard_face", //guard_face(人脸)/guard_face_card(人脸+刷卡)/guard_face_keypad(人脸+
|
|
|
+ 键盘)/guard_face_card_keypad
|
|
|
+ "opr": "操作模式", // addOrUpd 添加或者更新 |del 删除
|
|
|
"config":
|
|
|
{
|
|
|
"bus":"network",//设备接入总线或协议类型,canbus/network/serial/RS485/zigbee/bluetooth/dali/knx/plc-iot
|
|
|
@@ -664,6 +686,7 @@ Authorization: Bearer {{token}}
|
|
|
"id": 1, "pid": 1,"area_id": "CAN区域", "area": "区域名称", "name": "0001", "display_name": "空调",
|
|
|
"type": "panel",
|
|
|
"subtype": "dry_contact",
|
|
|
+ "opr": "操作模式", // addOrUpd 添加或者更新 |del 删除
|
|
|
"config":
|
|
|
{
|
|
|
"bus":"canbus",
|
|
|
@@ -700,6 +723,7 @@ Authorization: Bearer {{token}}
|
|
|
"id": 1, "pid": 1,"area_id": "CAN区域", "area": "区域名称", "name": "0001", "display_name": "空调",
|
|
|
"type": "gateway",
|
|
|
"subtype": "YG003", //YG001为默认值,第一代网关YG001,YG002为第二代网关,YG003为第三代网关,
|
|
|
+ "opr": "操作模式", // addOrUpd 添加或者更新 |del 删除
|
|
|
"config":
|
|
|
{
|
|
|
"address": "A51234F85667", //地址为网络设备mac地址,或can地址或虚拟id
|
|
|
@@ -722,6 +746,7 @@ Authorization: Bearer {{token}}
|
|
|
"display_name": "设备显示名称",
|
|
|
"type": "scene",
|
|
|
"subtype": "work",
|
|
|
+ "opr": "操作模式", // addOrUpd 添加或者更新 |del 删除
|
|
|
"actions": //场景动作执行项
|
|
|
{
|
|
|
"common":[
|
|
|
@@ -756,6 +781,7 @@ Authorization: Bearer {{token}}
|
|
|
"id": 1, "pid": 1,"area_id": "CAN区域", "area": "区域名称", "name": "0001", "display_name": "空调",
|
|
|
"type": "display_board",
|
|
|
"subtype": "display_board_common", //display_board_common,display_board_meeting
|
|
|
+ "opr": "操作模式", // addOrUpd 添加或者更新 |del 删除
|
|
|
"config":
|
|
|
{
|
|
|
"bus":"canbus",//设备接入总线或协议类型,canbus/network/serial/RS485/zigbee/bluetooth/dali/knx/plc-iot
|
|
|
@@ -772,6 +798,7 @@ Authorization: Bearer {{token}}
|
|
|
"id": 1, "pid": 1,"area_id": "CAN区域", "area": "区域名称", "name": "0001", "display_name": "空调",
|
|
|
"type": "central_control",
|
|
|
"subtype": "central_control_common", //中控
|
|
|
+ "opr": "操作模式", // addOrUpd 添加或者更新 |del 删除
|
|
|
"config":
|
|
|
{
|
|
|
"bus":"canbus",//设备接入总线或协议类型,canbus/network/serial/RS485/zigbee/bluetooth/dali/knx/plc-iot
|
|
|
@@ -803,14 +830,16 @@ Authorization: Bearer {{token}}
|
|
|
"pid":"1",
|
|
|
"name":"区域名称",
|
|
|
"groupable":true,//true可分组为分类目录,不可分组为叶目录
|
|
|
- "description":"区域描述"
|
|
|
+ "description":"区域描述",
|
|
|
+ "opr": "操作模式" // addOrUpd 添加或者更新 |del 删除
|
|
|
},
|
|
|
{
|
|
|
"id":"2",
|
|
|
"pid":"1",
|
|
|
"name":"区域名称",
|
|
|
"groupable":false,//false不可分组为分类目录,为叶目录,不可创建子区域,可在区域下创建设备
|
|
|
- "description":"区域描述"
|
|
|
+ "description":"区域描述",
|
|
|
+ "opr": "操作模式" // addOrUpd 添加或者更新 |del 删除
|
|
|
}
|
|
|
]
|
|
|
```
|
|
|
@@ -819,11 +848,43 @@ Authorization: Bearer {{token}}
|
|
|
|
|
|
```json
|
|
|
{
|
|
|
+ "city": {
|
|
|
+ "location_id": "101010100",
|
|
|
+ "location_name_en": "Beijing",
|
|
|
+ "location_name_zh": "北京",
|
|
|
+ "iso_3166_1": "CN",
|
|
|
+ "country_region_en": "China",
|
|
|
+ "country_region_zh": "中国",
|
|
|
+ "adm1_name_en": "Beijing",
|
|
|
+ "adm1_name_zh": "北京市",
|
|
|
+ "adm2_name_en": "Beijing",
|
|
|
+ "adm2_name_zh": "北京市",
|
|
|
+ "timezone": "Asia/Shanghai",
|
|
|
+ "latitude": "116.405289",
|
|
|
+ "adcode": "110000"
|
|
|
+ },
|
|
|
+ "areas":[
|
|
|
+ {
|
|
|
+ "id":"1",
|
|
|
+ "pid":"1",
|
|
|
+ "name":"区域名称",
|
|
|
+ "groupable":true,//是否可分组显示,true可分组为分类目录,可创建子目录,不可创建设备
|
|
|
+ "opr": "操作模式", // addOrUpd 添加或者更新 |del 删除
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "id":"2",
|
|
|
+ "pid":"1",
|
|
|
+ "name":"区域名称",
|
|
|
+ "groupable":false,//是否可分组显示,false不可可分组为分类目录,为叶目录,不可创建子区域,可在区域下创建设备
|
|
|
+ "opr": "操作模式", // addOrUpd 添加或者更新 |del 删除
|
|
|
+ }
|
|
|
+ ],
|
|
|
"devices":[
|
|
|
{
|
|
|
"id": 1, "pid": 1,"area_id": "CAN区域", "area": "区域名称", "name": "0001", "display_name": "灯光",
|
|
|
"type": "light",
|
|
|
"subtype": "light_common", //subtype为子类型,light_common为普通灯光,默认值
|
|
|
+ "opr": "操作模式", // addOrUpd 添加或者更新 |del 删除
|
|
|
"config":
|
|
|
{
|
|
|
"address": "A5", //地址
|
|
|
@@ -840,6 +901,7 @@ Authorization: Bearer {{token}}
|
|
|
"display_name": "灯光",
|
|
|
"type": "light",
|
|
|
"subtype": "light_plat",
|
|
|
+ "opr": "操作模式", // addOrUpd 添加或者更新 |del 删除
|
|
|
"config":
|
|
|
{
|
|
|
"address": "12345678", //地址
|
|
|
@@ -857,6 +919,7 @@ Authorization: Bearer {{token}}
|
|
|
"display_name": "设备显示名称",
|
|
|
"type": "scene",
|
|
|
"subtype": "work",
|
|
|
+ "opr": "操作模式", // addOrUpd 添加或者更新 |del 删除
|
|
|
"actions": //场景动作执行项
|
|
|
{
|
|
|
"common":[
|
|
|
@@ -879,21 +942,6 @@ Authorization: Bearer {{token}}
|
|
|
"winter":[],//冬季配置,处理温控类设备,冬季要执行的场景
|
|
|
}
|
|
|
}
|
|
|
- ],
|
|
|
-
|
|
|
- "areas":[
|
|
|
- {
|
|
|
- "id":"1",
|
|
|
- "pid":"1",
|
|
|
- "name":"区域名称",
|
|
|
- "groupable":true,//是否可分组显示,true可分组为分类目录,可创建子目录,不可创建设备
|
|
|
- },
|
|
|
- {
|
|
|
- "id":"2",
|
|
|
- "pid":"1",
|
|
|
- "name":"区域名称",
|
|
|
- "groupable":false,//是否可分组显示,false不可可分组为分类目录,为叶目录,不可创建子区域,可在区域下创建设备
|
|
|
- }
|
|
|
]
|
|
|
}
|
|
|
```
|