Explorar el Código

添加开关类型

miricy hace 1 año
padre
commit
521b02797c
Se han modificado 1 ficheros con 30 adiciones y 24 borrados
  1. 30 24
      product/deviceconfig.md

+ 30 - 24
product/deviceconfig.md

@@ -662,36 +662,20 @@ Authorization: Bearer {{key}}
 ]
 ```
 
-### 灯光开关设备配置数据示例
-
-light 灯光子类型代码列表:
-
-| 子类型代码      | 名称       | 说明       |
-|----------------|------------|------------|
-| light_common   | 灯         | -          |
-| light_desk     | 台灯       | -          |
-| light_bar      | 条形灯     | -          |
-| light_ceiling  | 吸顶灯     | -          |
-| light_belt     | 灯带       | -          |
-| light_wall     | 壁灯       | -          |
-| light_corridor | 廊灯       | -          |
-| light_pendent  | 吊灯       | -          |
-| light_downlight| 筒灯       | -          |
-| light_spot     | 射灯       | -          |
-| light_flat     | 平板灯     | -          |
-| light_night    | 夜灯       | -          |
-| light_motif    | 造型灯     | -          |
-| light_bedside  | 床头灯     | -          |
-| light_floor    | 落地灯     | -          |
-| light_street   | 路灯       | -          |
-| light_mood     | 氛围灯     | -          |
-| light_mirror   | 镜灯       | -          |
+### 灯光设备配置数据示例
+
 
 ```json
 [
    {
     "id": "1", "pid": "1","area_id": "区域ID", "area": "区域名称", "name": "0001", "display_name": "灯光",
     "type":    "light",
+    //     light,灯,light_common,普通灯 // light,灯,light_desk,台灯 // light,灯,light_bar,条形灯
+    // light,灯,light_ceiling,吸顶灯 // light,灯,light_belt,灯带 // light,灯,light_wall,壁灯
+    // light,灯,light_corridor,廊灯 // light,灯,light_pendent,吊灯 // light,灯,light_downlight,筒灯
+    // light,灯,light_spot,射灯 // light,灯,light_flat,平板灯 // light,灯,light_night,夜灯
+    // light,灯,light_motif,造型灯 // light,灯,light_bedside,床头灯 // light,灯,light_floor,落地灯
+    // light,灯,light_street,路灯 // light,灯,light_mood,氛围灯 // light,灯,light_mirror,镜灯
     "subtype":    "light_common", //subtype为子类型,light_common为普通灯光,默认值
     "opr": "操作模式", // addOrUpd 添加或者更新 |del 删除
     "config":  
@@ -758,6 +742,28 @@ light 灯光子类型代码列表:
 ]
 ```
 
+### 开关设备配置数据示例
+
+```json
+[
+   {
+    "id": "1", "pid": "1","area_id": "区域ID", "area": "区域名称", "name": "0001", "display_name": "开关",
+    "type":    "switch",
+    "subtype":    "switch", // ventilator(换气开关)/switch(通用开关)/touch(轻触开关)/socket(插座)/power(电源)/rocker(翘板开关)
+    "opr": "操作模式", // addOrUpd 添加或者更新 |del 删除
+    "config":  
+    {
+    
+        "bus":"canbus",
+        "address": "A5", //地址
+        "port": "1",  //设备端口
+        "control_type": "protocol",//protocol协议类型,relay为继电器
+        
+    }
+   }
+]
+```
+
 ### 窗帘设备配置数据示例
 
 ```json