Просмотр исходного кода

添加读卡器和浴霸设备

miricy 1 год назад
Родитель
Сommit
9dce0543db
1 измененных файлов с 306 добавлено и 120 удалено
  1. 306 120
      product/deviceconfig.md

+ 306 - 120
product/deviceconfig.md

@@ -108,21 +108,25 @@ Authorization: Bearer {{token}}
         "description":    "设备描述",//可选,可为空
         "config":  //所有设备整体配置
         {
-            "address": "12345678", //地址
-            "ports": [
+            "bus":    "canbus",//设备接入总线或协议类型,canbus/network/serial/RS485/gpio/zigbee/bluetooth/dali/knx/plc-iot
+            "control_type": "protocol",//protocol协议类型,relay为继电器,门禁门锁时有single和keep,为窗帘single单信号窗帘相当于按键,off继电器断信号,double继电器双信号窗帘用,touch为干节点按键,可选
+            "address": "12345678", //地址,canbus或485,蓝牙,zegbee,地址
+            "port": 1, //端口号,1-16,协议转换器的端口号,或开关,灯对应的单个继电器的端口号
+            "control_bits": [//继电器或协议转换器关联端口控制位,可选,不传为空
                  {
-                   "type":"on",//on开,off关,open打开,close关闭,speed1风速1档,speed2风力2档,speed3风力3档,
+                   "name":"curtain_on_port",//curtain_on_port开,curtain_off_port关,//speed1_port风速1档端口,speed1-speed6风速1到6档端口配置,valve_switch_port 冷热阀门控制开关
+                   "type":"touch",//touch为干节点按键,switch为开关
+                   "keep_time":1000,//延时时间,0-65535毫秒
+                   "address":"12",//485或canbus继电器地址,没有此项为上级adress定义的设备配置地址
+                   "associated_scene":[],//关联的场景列表,可选,不传为空
                    "value":1,//端口号
-                },
-                 {
-                   "type":"off",//on开,off关,open打开,close关闭,speed1风速1档,speed2风力2档,speed3风力3档,
-                   "value":2,//端口号
-                }
-              ], //多端口 当为继电器窗帘时,继电器按顺序排列1为开,2为关端口,当为空调时,按数组顺序 1,2,3为一二三档对应的继电器端口,4为制冷,5为制热端口,当为风扇或新风时,1,2,3为一二三档对应的继电器端口,当为浴霸时,1,2为灯光,3,4为取暖,5,6为排风
+                 }
+              ],
             "broadcast":    false,//跨网关是否广播  false为不广播,true为广播
-            "sub_address":[22,33,44],  //如485协议窗帘,第一个即窗帘485地址,当为空调时,第一个为空调外机地址,第二个为内机地址,433协议窗帘时为遥控器id,433设备对应的遥控码,3字节16进制字符串格式, 取值范围 0-16777215(小端在后比如20:000014)
-            "device_control":"protocol", //protocol(协议),central(继电器)
-            "control_type":    2,  //控制类型 0协议类型,1为继电器,当为窗帘时1为单信号,2继电器断信号,3继电器双信号,4为干节点
+            "control_addr":33,  //协议窗帘或空调的设备地址(空调是内机地址,窗帘为电机地址0-255),433协议窗帘时为遥控器id,433设备对应的遥控码,3字节取值范围 0-16777215(小端在后比如20:000014)
+            "hvac_addr":    22,//暖通空调外机地址,0-255
+            // "device_control":"protocol", //protocol(协议),central(继电器)
+            
             "keep_time": 5, //--门锁为单信号时,控制延时上锁时间,默认值为5秒,范围(1到30秒)如门禁开后5秒后自动上锁
             "icons":["internal://array_light","http://www.abc.com/img/light.png"],//设备图标列表,默认数组第一个下标图标
             "order":    1,//排序,值越小越靠前,相同的值按设备先后顺序
@@ -130,12 +134,12 @@ Authorization: Bearer {{token}}
             "humidity":    60,//默认湿度
             "speed":3 ,//空调,风扇风力档位数量,默认为3档,低,中,高
             "auto_speed":true,//风力是否支持自动档,针对空调,新风空调
-            "main":    true,//网关设备使用,主网关为true,无或false时为从属网关
+            "is_main":    true,//网关设备使用,主网关为true,无或false时为从属网关
+            "is_gateway":    false,//是否为网关设备,如:面板,网关设备不支持控制,只支持场景,如:面板,面板不支持控制,只支持场景,如:面板
             "modes": ["","","",""],//支持模式列表 fan,cool,heat,auto,saving,dehumidify,sleeping,fan_inner(内循环),fan_side(旁通)/heat_exchange(热交换)
-            "bus":"canbus",//设备接入总线或协议类型,canbus/network/serial/RS485/gpio/zigbee/bluetooth/dali/knx/plc-iot
             "associated_sensor":    //关联传感器,如温湿度传感器,第一个为环境温湿度传感器,当为地暖时,第二个为报警温度传感器,默认45度
                           [
-                            {"name":"humiture1","calibration":10},
+                            {"name":"humiture1","calibration":10,"type":"humiture"},
                                      {"name":"humiture2", //关联传感器2,设备唯一的名称
                                              "calibration":5,  //校正温度度数
                                              "alarm_temp":45//报警温度
@@ -155,7 +159,7 @@ Authorization: Bearer {{token}}
                      ],
             "card_format":1,//卡数据格式 0为无,1为10位10进制,2为10位10进制反向输出,3为8位16进制,4为8位16进制反向输出,5为8位10进制(id后3字节转换),6为00+8位10进制,7为8位10进制(id后4字节转换),8为5位10进制
             "associated_device":[{"name":"lockdevice1","action":"unlock"}],    //关联要开的锁,如门锁,窗锁,干节点关联设备
-            "":"", //面板是否连接外网作为app网关代理
+            "is_gateway":"", //面板是否连接外网作为app网关代理
             //智能控制面板配置 panel
             "display_device":    //面板上要显示的设备列表
                 [{
@@ -191,19 +195,8 @@ Authorization: Bearer {{token}}
             "mask_detection":    false,//是否开启口罩检测
             "background":["internal://background1","http://www.abc.com/img/background.png"] //背景图列表,本地没有指定时显示默认第一个下标背景图,网关或面板要下载的背景图列表
         }
-    },
-    // 继电器灯光配置,
-    {
-        "id": 1, "pid": 1,"areaId": "CAN区域", "area": "区域名称", "name": "0001", "displayName": "灯光",
-        "type":    "light",
-        "subtype":    "light_common",
-        "config":  
-        {
-            "address": "12345678", //地址
-            "ports": [1],  //端口,只用一个端口的设备取数组第一个值
-            "broadcast":    false //跨网关是否广播  false为不广播,true为广播,废弃状态
-        }
-    }]
+    }
+]
 ```
 
 ### 温湿度传感器配置数据示例
@@ -211,26 +204,26 @@ Authorization: Bearer {{token}}
 ```json
 [
    {
-    "id": 1, "pid": 1,"areaId": "CAN区域", "area": "区域名称", "name": "0001", "displayName": "灯光",
+    "id": 1, "pid": 1,"area_id": "CAN区域", "area": "区域名称", "name": "0001", "display_name": "灯光",
     "type":    "humiture",
     "subtype":    "humiture_common", //humiture_common,默认值,通用温湿度
     "config":  
     {
-        "address": "A5", //地址
-        "ports": [1],  //端口,只用一个端口的设备取数组第一个值
         "bus":"canbus",//设备接入总线或协议类型,canbus/network/serial/RS485/zigbee/bluetooth/dali/knx/plc-iot,默认canbus
+        "address": "A5", //地址
+        "port": 1,  //端口,只用一个端口的设备取数组第一个值
         "temp": 26,//默认温度
         "humidity":    50//默认湿度
     }
   },
   {
-    "id": 1, "pid": 1,"areaId": "CAN区域", "area": "区域名称", "name": "0001", "displayName": "灯光",
+    "id": 1, "pid": 1,"area_id": "CAN区域", "area": "区域名称", "name": "0001", "display_name": "灯光",
     "type":    "humiture",
     "subtype":    "humiture_common", //humiture_common,默认值,通用温湿度
     "config":  
     {
         "address": "A5A812344545", //地址蓝牙设备mac地址
-        "ports": [1],  //端口,只用一个端口的设备取数组第一个值,保留,暂时没有使用
+        "port": 1,  //端口,只用一个端口的设备取数组第一个值,保留,蓝牙设备配置时可为空
         "bus":"bluetooth",//设备接入总线或协议类型,canbus/network/serial/RS485/zigbee/bluetooth/dali/knx/plc-iot,默认canbus
         "temp": 26,//默认温度
         "humidity":    50//默认湿度
@@ -244,36 +237,36 @@ Authorization: Bearer {{token}}
 
 ```json
 [
-   {//通用灯光开关配置
-    "id": 1, "pid": 1,"areaId": "CAN区域", "area": "区域名称", "name": "0001", "displayName": "灯光",
+   {
+    "id": 1, "pid": 1,"area_id": "CAN区域", "area": "区域名称", "name": "0001", "display_name": "灯光",
     "type":    "light",
     "subtype":    "light_common", //subtype为子类型,light_common为普通灯光,默认值
     "config":  
     {
+        "bus":"canbus",
         "address": "A5", //地址
-        "ports": [1],  //端口,只用一个端口的设备取数组第一个值
-        "bus":"canbus",//设备接入总线或协议类型,canbus/network/serial/RS485/zigbee/bluetooth/dali/knx/plc-iot,默认canbus
+        "port": 1,  //设备端口
     }
   },
   {
-    "id": 1, "pid": 1,"areaId": "CAN区域", "area": "区域名称", "name": "0001", "displayName": "灯光",
+    "id": 1, "pid": 1,"area_id": "CAN区域", "area": "区域名称", "name": "0001", "display_name": "灯光",
     "type":    "lightdim",//调光灯,
     "subtype":    "dimming_single", //"dimming_single", "单路调光灯"/"dimming_color_temp", "调亮度调色温灯"
     "config":  
     {
-        "address": "F012345678FF", //地址
-        "ports": [1],  //端口,只用一个端口的设备取数组第一个值
-        "bus":"bluetooth",//设备接入总线或协议类型,canbus/network/serial/RS485/zigbee/bluetooth/dali/knx/plc-iot,默认canbus
+        "bus":"bluetooth",
+        "address": "F012345678FF", 
+        "port": 1,  
     }
   },
   {
-    "id": 1, "pid": 1,"areaId": "CAN区域", "area": "区域名称", "name": "0001", "displayName": "灯光",
+    "id": 1, "pid": 1,"area_id": "CAN区域", "area": "区域名称", "name": "0001", "display_name": "灯光",
     "type":    "lightrgb",//彩光灯,
     "subtype":    "lightrgb_common", // "lightrgb_common", "彩灯"/"lightrgb_rgbw", "带白光彩灯"
     "config":  
     {
         "address": "F012345678FF", //地址
-        "ports": [1],  //端口,只用一个端口的设备取数组第一个值
+        "port": 1,  //端口,只用一个端口的设备取数组第一个值
         "bus":"bluetooth",//设备接入总线或协议类型,canbus/network/serial/RS485/zigbee/bluetooth/dali/knx/plc-iot,默认canbus
     }
   }
@@ -285,103 +278,210 @@ Authorization: Bearer {{token}}
 ```json
 [
    {//继电器窗帘
-    "id": 1, "pid": 1,"areaId": "CAN区域", "area": "区域名称", "name": "0001", "displayName": "窗帘",
+    "id": 1, "pid": 1,"area_id": "CAN区域", "area": "区域名称", "name": "0001", "display_name": "窗帘",
     "type":    "curtain",
     //curtain_horizontal 横窗帘  curtain_horizontal_double 双层横窗帘 curtain_vertical 卷帘 curtain_shutter 百页窗
     //curtain_position_horizontal 可定位置开合帘  curtain_position_vertical 可定位置升降帘
     "subtype":    "curtain_horizontal", //subtype为子类型,light_common为普通灯光,默认值
     "config":  
     {
+        "bus":"canbus",
+        "control_type":    2,  //控制类型 0协议类型,1为继电器,当为窗帘时1为继电器单信号,2继电器断信号,3继电器双信号
         "address": "A5", //地址继电器地址或协议转换器地址
-        "ports": [1,2],  //继电器按顺序排列1为开,2为关端口,can协议转换窗帘为协议转换器端口
-        "control_type":    2,  //控制类型 0协议类型,1为继电器,当为窗帘时1为单信号,2继电器断信号,3继电器双信号
-        "bus":"canbus",//设备接入总线或协议类型,canbus/network/serial/RS485/zigbee/bluetooth/dali/knx/plc-iot,默认canbus
+        "control_bits":[{
+                   "name":"curtain_on_port",//common_port通用开关,protocol_transition协议转换器端口,curtain_on_port开,curtain_off_port关,speed1风速1档,speed2风速2档,speed3风速3档,valve_switch 阀门控制开关
+                   "value":1,//端口号
+                 },
+                 {
+                   "name":"curtain_off_port",
+                   "value":2,
+                }], 
     }
   },
   {//协议窗帘
-    "id": 1, "pid": 1,"areaId": "CAN区域", "area": "区域名称", "name": "0001", "displayName": "窗帘",
+    "id": 1, "pid": 1,"area_id": "CAN区域", "area": "区域名称", "name": "0001", "display_name": "窗帘",
     "type":    "curtain",
-    //curtain_horizontal 横窗帘  curtain_horizontal_double 双层横窗帘 curtain_vertical 卷帘 curtain_shutter 百页窗
-    //curtain_position_horizontal 可定位置开合帘  curtain_position_vertical 可定位置升降帘
-    "subtype":    "curtain_horizontal", //subtype为子类型,light_common为普通灯光,默认值
+    "subtype":    "curtain_horizontal", 
     "config":  
     {
-        "address": "A5", //地址继电器地址或协议转换器地址
-        "ports": [1,2],  //继电器按顺序排列1为开,2为关端口,can协议转换窗帘为协议转换器端口
-        "sub_address":[225533],  //如485协议窗帘,第一个即窗帘485地址,或433窗帘的遥控器id,433设备对应的遥控码,3字节16进制字符串格式, 取值范围 0-16777215(小端在后比如0x112233)
+        "bus":"canbus",
         "control_type":    0,  //控制类型 0协议类型,1为继电器,当为窗帘时1为单信号,2继电器断信号,3继电器双信号
-        "bus":"canbus",//设备接入总线或协议类型,canbus/network/serial/RS485/zigbee/bluetooth/dali/knx/plc-iot,默认canbus
+        "address": "A5", //地址继电器地址或协议转换器地址
+        "port": 1,  //对应为协议转换器端口,取值范围1-4
+        "control_addr":33, //485窗帘为电机地址,0-255,433协议窗帘时为遥控器id,433设备对应的遥控码,3字节16进制字符串格式, 取值范围 0-16777215(小端在后比如20:000014)
     }
   },
 ]
 ```
 
+### 门锁设备配置数据示例
+
+```json
+[
+   {//继电器门锁窗户锁
+    "id": 1, "pid": 1,"area_id": "CAN区域", "area": "区域名称", "name": "0001", "display_name": "窗帘",
+    "type":    "lock", //智能锁
+    "subtype":    "door", //subtype为子类型,door为门锁,默认值,window为窗锁
+    "config":  
+    {
+        "bus":"canbus",
+        "control_type":   "single",  //控制类型 protocol协议类型,single为单次,keep为保持
+        "address": "A5", //地址继电器地址或协议转换器地址
+        "port": 1,
+        "keep_time":10,//保持时间,单位为秒
+    }
+  }
+]
+```
+
+### 刷卡器设备配置数据示例
+
+```json
+[
+   {
+    "id": 1, "pid": 1,"area_id": "CAN区域", "area": "区域名称", "name": "0001", "display_name": "窗帘",
+    "type":    "card_machine", 
+    "subtype":    "common", 
+    "config":  
+    {
+        "bus":"canbus",
+        "address": "A5", //地址继电器地址或协议转换器地址
+        "port": 1,
+        "card_format":1,//卡数据格式 0为无,1为10位10进制,2为10位10进制反向输出,3为8位16进制,4为8位16进制反向输出,5为8位10进制(id后3字节转换),6为00+8位10进制,7为8位10进制(id后4字节转换),8为5位10进制
+        "control_addr":  12,  //485协议时为刷卡器地址,0-255
+    }
+  }
+]
+```
+
+### 浴霸设备配置数据示例
+
+```json
+[
+   {
+    "id": 1, "pid": 1,"area_id": "CAN区域", "area": "区域名称", "name": "0001", "display_name": "空调",
+    "type":    "bathheater",
+    "subtype":    "bathheater_default", //subtype为子类型,bathheater_default为默认值
+    "config":  
+    {
+        "bus":"canbus",
+        "control_type": "protocol",  //控制类型 protocol协议类型,relay为继电器
+        "address": "A5", //canbus总线时,地址为继电器地址或协议转换器地址
+        "speed":6 ,//空调,风扇风力档位数量,默认为3档,低,中,高,取值1-6
+        "auto_speed":false,//风力是否支持自动档,true支持,false不支持针对空调,新风空调
+        "control_bits": [//继电器或协议转换器关联端口
+                 {
+                   "name":"speed1_port",//speed1_port风速1档端口,speed1-speed6风速1到6档端口配置,valve_switch_port 冷热水阀门控制开关
+                   "value":1,//端口号
+                 },
+                 {
+                   "name":"speed2_port",//speed1_port风速1档端口,speed1-speed6风速1到6档端口配置,valve_switch_port 冷热水阀门控制开关
+                   "value":2,//端口号
+                 },
+                 {
+                   "name":"speed3_port",//speed1_port风速1档端口,speed1-speed6风速1到6档端口配置,valve_switch_port 冷热水阀门控制开关
+                   "value":3,
+                 },
+                 {
+                   "name":"heater1_port",
+                   "address":"A5",
+                   "value":1,
+                },
+              ],
+        "temp": 30,//默认温度
+        "modes": ["fan","cool","heat","auto"],//支持模式列表 fan,cool,heat,auto,saving,dehumidify,sleeping
+        
+        "associated_sensor":    //关联传感器,如温湿度传感器,第一个为环境温湿度传感器,当为地暖时,第二个为报警温度传感器,默认45度
+        [{"name":"humiture1","calibration":10,"type":"humiture"},//type为传感器类型
+         ],
+    }
+  },
+]
+
 ### 暖通设备,空调新风地暖配置数据示例
 
 ```json
 [
    {//继电器空调
-    "id": 1, "pid": 1,"areaId": "CAN区域", "area": "区域名称", "name": "0001", "displayName": "空调",
+    "id": 1, "pid": 1,"area_id": "CAN区域", "area": "区域名称", "name": "0001", "display_name": "空调",
     "type":    "aircon",
     //aircon_common 默认类型 aircon_fcu 风机盘管 aircon_daikin 大金空调 aircon_haier 海尔空调
     //aircon_gree 格力空调 aircon_hisense 海信空调 aircon_midea 美的空调 aircon_hitachi 日立空调
     "subtype":    "aircon_common", //subtype为子类型,aircon_common为默认值,通用空调
     "config":  
     {
-        "address": "A5", //canbus总线时,地址为继电器地址或协议转换器地址,网络总线时,地址为网络设备mac地址
-        "ports": [1,2,3,4,5],  //按数组顺序 1,2,3为一二三档对应的风力档位,4为制冷,5为制热端口
+        "bus":"canbus",
         "control_type":    1,  //控制类型 0协议类型,1为继电器
-        "bus":"canbus",//设备接入总线或协议类型,canbus/network/serial/RS485/zigbee/bluetooth/dali/knx/plc-iot,默认canbus
+        "address": "A5", //canbus总线时,地址为继电器地址或协议转换器地址,网络总线时,地址为网络设备mac地址
+        "control_bits": [//继电器或协议转换器关联端口
+                 {
+                   "name":"speed1_port",//speed1_port风速1档端口,speed1-speed6风速1到6档端口配置,valve_switch_port 冷热水阀门控制开关
+                   "type":"aircon",//窗帘类型
+                   "value":1,//端口号
+                 },
+                 {
+                   "name":"speed2_port",//speed1_port风速1档端口,speed1-speed6风速1到6档端口配置,valve_switch_port 冷热水阀门控制开关
+                   "type":"aircon",//窗帘类型
+                   "value":2,//端口号
+                 },
+                 {
+                   "name":"speed3_port",//speed1_port风速1档端口,speed1-speed6风速1到6档端口配置,valve_switch_port 冷热水阀门控制开关
+                   "type":"aircon",//窗帘类型
+                   "value":3,
+                 },
+                 {
+                   "name":"valve_switch_port",
+                   "type":"aircon",
+                   "address":"A5",
+                   "value":1,
+                }
+              ],
         "temp": 30,//默认温度
         "speed":3 ,//空调,风扇风力档位数量,默认为3档,低,中,高,取值1-6
         "auto_speed":true,//风力是否支持自动档,true支持,false不支持针对空调,新风空调
-        "modes": ["fan","cool","heat",""],//支持模式列表 fan,cool,heat,auto,saving,dehumidify,sleeping
-        "bus":"canbus",//设备接入总线或协议类型,canbus/network/serial/RS485/zigbee/bluetooth/dali/knx/plc-iot
+        "modes": ["fan","cool","heat","auto"],//支持模式列表 fan,cool,heat,auto,saving,dehumidify,sleeping
+        
         "associated_sensor":    //关联传感器,如温湿度传感器,第一个为环境温湿度传感器,当为地暖时,第二个为报警温度传感器,默认45度
-        [{"name":"humiture1","calibration":10},
-         {"name":"humiture2", //关联传感器2,设备唯一的名称
-                                             "calibration":5  //校正温度度数
-                                             }],
+        [{"name":"humiture1","calibration":10,"type":"humiture"},//type为传感器类型
+         {"name":"humiture2", "calibration":5,  //校正温度度数
+                                             "type":"temperature"}],
     }
   },
   {//协议空调
-    "id": 1, "pid": 1,"areaId": "CAN区域", "area": "区域名称", "name": "0001", "displayName": "空调",
+    "id": 1, "pid": 1,"area_id": "CAN区域", "area": "区域名称", "name": "0001", "display_name": "空调",
     "type":    "aircon",
-    //aircon_common 默认类型 aircon_fcu 风机盘管 aircon_daikin 大金空调 aircon_haier 海尔空调
-    //aircon_gree 格力空调 aircon_hisense 海信空调 aircon_midea 美的空调 aircon_hitachi 日立空调
     "subtype":    "aircon_common", //subtype为子类型,aircon_common为默认值,通用空调
     "config":  
-    {
-        "address": "A5", //canbus总线时,地址为继电器地址或协议转换器地址,网络总线时,地址为网络设备mac地址
-        "ports": [1],  //按数组顺序 1为对应的协议转换器端口,取值范围1-4
-        "sub_address":[22,33],  //第一个为空调外机地址,第二个为内机地址
+      {
+        "bus":"canbus",
         "control_type":    0,  //控制类型 0协议类型,1为继电器
-        "bus":"canbus",//设备接入总线或协议类型,canbus/network/serial/RS485/zigbee/bluetooth/dali/knx/plc-iot,默认canbus
-        "temp": 30,//默认温度
+        "address": "A5", //canbus总线时,地址为继电器地址或协议转换器地址,网络总线时,地址为网络设备mac地址
+        "port": 1,  //按数组顺序 1为对应的协议转换器端口,取值范围1-4
+        "control_addr":"22",  //空调内机地址
+        "hvac_addr":    22,//暖通设备外机地址,0-255
+        "temp": 26,//默认温度
         "speed":3 ,//空调,风扇风力档位数量,默认为3档,低,中,高,取值1-6
         "auto_speed":true,//风力是否支持自动档,true支持,false不支持针对空调,新风空调
         "modes": ["fan","cool","heat",""],//支持模式列表 fan,cool,heat,auto,saving,dehumidify,sleeping
-        "bus":"canbus",//设备接入总线或协议类型,canbus/network/serial/RS485/zigbee/bluetooth/dali/knx/plc-iot
         "associated_sensor":    //关联传感器,如温湿度传感器,第一个为环境温湿度传感器,当为地暖时,第二个为报警温度传感器,默认45度
         [{"name":"humiture2", //关联传感器,设备唯一的名称
           "calibration":5,  //校正温度度数 
           }],
-    }
+      }
   },
   {//继电器地暖
-    "id": 1, "pid": 1,"areaId": "CAN区域", "area": "区域名称", "name": "0001", "displayName": "空调",
+    "id": 1, "pid": 1,"area_id": "CAN区域", "area": "区域名称", "name": "0001", "display_name": "空调",
     "type":    "heater",
     //aircon_common 默认类型 aircon_fcu 风机盘管 aircon_daikin 大金空调 aircon_haier 海尔空调
     //aircon_gree 格力空调 aircon_hisense 海信空调 aircon_midea 美的空调 aircon_hitachi 日立空调
     "subtype":    "heater_floor", //subtype为子类型,aircon_common为默认值,通用空调
     "config":  
     {
+        "bus":"canbus",
+        "control_type":    0,  //控制类型 0协议类型,1为继电器
         "address": "A5", //canbus总线时,地址为继电器地址或协议转换器地址,网络总线时,地址为网络设备mac地址
-        "ports": [1,2,3,4,5],  //按数组顺序 1,2,3为一二三档对应的继电器端口,4为制冷,5为制热端口
-        "control_type":    1,  //控制类型 0协议类型,1为继电器
-        "bus":"canbus",//设备接入总线或协议类型,canbus/network/serial/RS485/zigbee/bluetooth/dali/knx/plc-iot,默认canbus
+        "port": 1,  
         "temp": 30,//默认温度
-        "bus":"canbus",//设备接入总线或协议类型,canbus/network/serial/RS485/zigbee/bluetooth/dali/knx/plc-iot
         "associated_sensor":    //关联传感器,如温湿度传感器,第一个为环境温湿度传感器,当为地暖时,第二个为报警温度传感器,默认45度
         [{"name":"humiture1","calibration":10},//关联传感器,设备唯一的名称,代表关联的环境温湿度传感器
          {"name":"humiture2", //关联传感器2,设备唯一的名称,代表关联的地暖地下环境温度传感器,安全控制用
@@ -391,20 +491,23 @@ Authorization: Bearer {{token}}
     }
   },
   {//新风
-    "id": 1, "pid": 1,"areaId": "CAN区域", "area": "区域名称", "name": "0001", "displayName": "空调",
+    "id": 1, "pid": 1,"area_id": "CAN区域", "area": "区域名称", "name": "0001", "display_name": "空调",
     "type":    "airfresh", //airfresh_common 默认类型 airfresh_home 新风家用 airfresh_work 新风大楼用
        //airfresh_daikin 大金新风 airfresh_net_relay 网络面板继电器新风 airfresh_can_relay canbus继电器新风
     "subtype":    "airfresh_common", //airfresh_common为默认值,通用新风
     "config":  
     {
-        "bus":"canbus",//设备接入总线或协议类型,canbus/network/serial/RS485/zigbee/bluetooth/dali/knx/plc-iot,默认canbus
+        "bus":"canbus",
+        "control_type":    0,  //控制类型 0协议类型,1为继电器
         "address": "A5", //canbus总线时,地址为继电器地址或协议转换器地址,网络总线时,地址为网络设备mac地址
-        "ports": [1,2,3,4],  //按数组顺序 1为对应的协议转换器端口,取值范围1-4,当为继电器新风时,1,2,3分别为1,2,3档对应继电器端口
-        "sub_address":[22,33],  //第一个为新风外机地址,第二个为新风内机地址,继电器新风不存在子地址
+        "port": 1,  //按数组顺序 1为对应的协议转换器端口,取值范围1-4,当为继电器新风时,1,2,3分别为1,2,3档对应继电器端口
+        "control_addr":"22",  //新风机地址
+        "hvac_addr":    22,//暖通设备外机地址,0-255
         "control_type":    0,  //控制类型 0协议类型,1为继电器
-        "temp": 30,//默认温度
+        "temp": 26,//默认温度
         "speed":3 ,//空调,风扇风力档位数量,默认为3档,低,中,高,取值1-6
-        "modes": ["fan","cool","heat",""],//模式列表 fan,cool,heat,auto,saving,dehumidify,sleeping,fan_inner(内循环),fan_side(旁通)/heat_exchange(热交换)
+        "auto_speed":true,//风力是否支持自动档,true支持,false不支持针对空调,新风空调
+        "modes": ["fan","cool","heat","auto"],//模式列表 fan,cool,heat,auto,saving,dehumidify,sleeping,fan_inner(内循环),fan_side(旁通)/heat_exchange(热交换)
         "bus":"canbus",//设备接入总线或协议类型,canbus/network/serial/RS485/zigbee/bluetooth/dali/knx/plc-iot
         "associated_sensor":    //关联传感器,如温湿度传感器,第一个为环境温湿度传感器,当为地暖时,第二个为报警温度传感器,默认45度
         [{"name":"humiture2", //关联传感器,设备唯一的名称,代表关联的环境温湿度传感器
@@ -413,7 +516,7 @@ Authorization: Bearer {{token}}
     }
   },
   {//空调外机
-    "id": 1, "pid": 1,"areaId": "CAN区域", "area": "区域名称", "name": "0001", "displayName": "空调",
+    "id": 1, "pid": 1,"area_id": "CAN区域", "area": "区域名称", "name": "0001", "display_name": "空调",
     "type":    "aircon-outside",
     //airconout_common 默认类型 airconout_onoff 状态外机,只线时外机状态 airconout_home 家用外机 airconout_work 大楼外机
     "subtype":    "airconout_common", //subtype为子类型,aircon_common为默认值,通用空调
@@ -421,15 +524,13 @@ Authorization: Bearer {{token}}
     {
         "bus":"canbus",//设备接入总线或协议类型,canbus/network/serial/RS485/zigbee/bluetooth/dali/knx/plc-iot
         "address": "A5", //canbus总线时,地址为继电器地址或协议转换器地址,网络总线时,地址为网络设备mac地址
-        "ports": [1],  //按数组顺序 1为对应的协议转换器端口,取值范围1-4
-        "sub_address":[22,33],  //第一个为空调外机地址,第二个为内机地址
-        "control_type":    0,  //控制类型 0协议类型,1为继电器
-        "temp": 30,//默认温度
-        "speed":3 ,//空调,风扇风力档位数量,默认为3档,低,中,高,取值1-6
-        "modes": ["fan","cool","heat",""],//支持模式列表 fan,cool,heat,auto
+        "port": 1,  //按数组顺序 1为对应的协议转换器端口,取值范围1-4
+        "temp": 26,//默认温度
+        "modes": ["fan","cool","heat"],//支持模式列表 fan,cool,heat,auto
         "associated_sensor":    //关联传感器,如温湿度传感器,第一个为环境温湿度传感器,当为地暖时,第二个为报警温度传感器,默认45度
         [{"name":"humiture2", //关联传感器,设备唯一的名称,代表关联的环境温湿度传感器
           "calibration":5,  //校正温度度数 
+          "type":"humiture",
           }],
     }
   },
@@ -449,14 +550,14 @@ Authorization: Bearer {{token}}
 ```json
 [
 {//触摸控制面板
-    "id": 1, "pid": 1,"areaId": "CAN区域", "area": "区域名称", "name": "0001", "displayName": "空调",
+    "id": 1, "pid": 1,"area_id": "CAN区域", "area": "区域名称", "name": "0001", "display_name": "空调",
     "type":    "panel",
     "subtype":    "panel_common", //panel_common为默认值,canbus/serial/network/network_gpio/dry_contact
     "config":  
     {
         "bus":"canbus",//设备接入总线或协议类型,canbus/network/serial/RS485/zigbee/bluetooth/dali/knx/plc-iot
         "address": "A51234F85667", //地址为网络设备mac地址
-        "ports": [1],  //端口为canbus或485本机地址,纯网络面板,端口保留
+        "is_gateway":true,//是否为网关,true为网关,false为普通面板
         "associated_sensor":    //关联传感器,如温湿度传感器,第一个为环境温湿度传感器,当为地暖时,第二个为报警温度传感器,默认45度
         [{"name":"humiture2", //关联传感器,设备唯一的名称
           "calibration":5,  //校正温度度数 
@@ -500,14 +601,14 @@ Authorization: Bearer {{token}}
 ```json
 [
 {
-    "id": 1, "pid": 1,"areaId": "CAN区域", "area": "区域名称", "name": "0001", "displayName": "空调",
+    "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
     "config":  
     {
         "bus":"network",//设备接入总线或协议类型,canbus/network/serial/RS485/zigbee/bluetooth/dali/knx/plc-iot
         "address": "A51234F85667", //地址为网络设备mac地址
-        "ports": [1],  //端口为canbus或485本机地址,纯网络面板,端口保留
+        "port": 1,  //端口为canbus或485本机地址,纯网络面板,端口保留
         //门禁面板配置 entrance_guard
         "camera_type": "IR",// 门禁摄像头类型,IR红外,RGB为全彩,RGB_IR为红外+彩
         "brightness":    100,//亮度
@@ -541,27 +642,46 @@ Authorization: Bearer {{token}}
 ```json
 [
 {//干节点面板
-    "id": 1, "pid": 1,"areaId": "CAN区域", "area": "区域名称", "name": "0001", "displayName": "空调",
+    "id": 1, "pid": 1,"area_id": "CAN区域", "area": "区域名称", "name": "0001", "display_name": "空调",
     "type":    "panel",
     "subtype":    "dry_contact", 
     "config":  
     {
-        "bus":"gpio",//设备接入总线或协议类型,canbus/network/serial/gpio/RS485/zigbee/bluetooth/dali/knx/plc-iot
-        "address": "11", //地址为网络设备mac地址
-        "ports": [1],  //端口为canbus或485本机地址,纯网络面板,端口保留
+        "bus":"canbus",
         "control_type":    0,  //控制类型 4为干节点开关switch,5为干节点轻触touch
-        "associated_device":[{"name":"dry_contact_device1"}],    //关联要开的锁,如门锁,窗锁,干节点关联设备
+        "address": "11", //地址为网络设备mac地址
+        "port": 1,  //端口为canbus或485本机地址,纯网络面板,端口保留
+        "control_number":1,//普通面板控制位数,比如2位,4位面板
+        "control_bits": [
+          {
+            "name":"dry_contact",
+            "address":"12",
+            "port": 1,
+            "associated_scene": //-设备关联的场景,一般是输入类型设备,如干节点输入,按键,传感器等,场景数组中每次只出发一个场景
+                    [
+                      {"name":"scene1",//场景名称
+                       "mode":"order",//
+                       "expression":"order",//场景执行条件,表达式为真执行,order为执行顺序和下标一致时执行,其他为表达式判断为真时执行
+                      },
+                      {
+                        "name":"scene2",
+                        "expression":"value=10",//value为设备属性的某个键,取值后和具体数字或字符串比较,为真时执行
+                      }
+                     ]
+          }
+        ],
+        // "associated_device":[{"name":"dry_contact_device1"}],    //关联要开的锁,如门锁,窗锁,干节点关联设备
     }
   },
-  {//干节点面板关联的设备
-    "id": 1, "pid": 1,"areaId": "CAN区域", "area": "区域名称", "name": "dry_contact_device1", "displayName": "空调",
+  {//干节点面板关联的设备,这部分合并到上面,不再自动创建每个键位对应的设备
+    "id": 1, "pid": 1,"area_id": "CAN区域", "area": "区域名称", "name": "dry_contact_device1", "display_name": "空调",
     "type":    "dry_contact",
     "subtype":    "common", 
     "config":  
     {
         "bus":"canbus",//设备接入总线或协议类型,canbus/network/serial/gpio/RS485/zigbee/bluetooth/dali/knx/plc-iot
         "address": "11", //地址为网络设备mac地址
-        "ports":[1],
+        "port":1,
         "associated_scene": //-设备关联的场景,一般是输入类型设备,如干节点输入,按键,传感器等,场景数组中每次只出发一个场景
                     [
                       {"name":"scene1",//场景名称
@@ -583,13 +703,12 @@ Authorization: Bearer {{token}}
 ```json
 [
 {
-    "id": 1, "pid": 1,"areaId": "CAN区域", "area": "区域名称", "name": "0001", "displayName": "空调",
+    "id": 1, "pid": 1,"area_id": "CAN区域", "area": "区域名称", "name": "0001", "display_name": "空调",
     "type":    "gateway",
     "subtype":    "YG001", //YG001为默认值,第一代网关,YG003为第二代网关
     "config":  
     {
-        "address": "A51234F85667", //地址为网络设备mac地址
-        "ports": [1],  //端口为canbus或485本机地址,纯网络面板,端口保留,或为网关本地id,跨网关时使用
+        "address": "A51234F85667", //地址为网络设备mac地址,或can地址或虚拟id
         "background":["http://192.168.0.1/bg.jpg", "http://192.168.0.1/bg.jpg"],//要下载同步缓存的背景图片,数组
         "master":true,//是否为主网关,主网关为true,其他网关为false,主网关可对各子网关进行转发,主网关包含mqtt本地服务
         "city":{
@@ -607,9 +726,7 @@ Authorization: Bearer {{token}}
                 "Latitude": "40.465324",
                 "Longitude": "115.985008",
                 "Adcode": "110119"
-              },
-      "season":"common", //summer/winter/common(不区分时令),第一次配置的默认值,或者时令只能本地配置
-
+              }
     }
   },
 ]
@@ -622,10 +739,10 @@ Authorization: Bearer {{token}}
         {
         "id":    1,
         "pid":    1,
-        "areaId":    "区域id",
+        "area_id":    "区域id",
         "area":    "区域名称",
         "name":    "0001",
-        "displayName":    "设备显示名称",
+        "display_name":    "设备显示名称",
         "type":    "scene",
         "subtype":    "work",
         "actions":  //场景动作执行项
@@ -654,6 +771,73 @@ Authorization: Bearer {{token}}
 
 ```
 
+### 展板配置数据格式
+
+```json
+[
+{
+    "id": 1, "pid": 1,"area_id": "CAN区域", "area": "区域名称", "name": "0001", "display_name": "空调",
+    "type":    "display_board",
+    "subtype":    "display_board_common", //
+    "config":  
+    {
+        "bus":"canbus",//设备接入总线或协议类型,canbus/network/serial/RS485/zigbee/bluetooth/dali/knx/plc-iot
+        "address": "A51234F85667", //地址为网络设备mac地址
+        "control_bits": [
+            {
+                "type":"canbus", //端口为canbus或485本机地址,纯网络面板,端口保留
+                "value": 1
+            }
+        ],  //端口为canbus或485本机地址,纯网络面板,端口保留,或为网关本地id,跨网关时使用
+        "background":["url1","url2"],//要下载同步缓存的背景图片
+        "associated_device":[
+            {
+                "name":"0001",
+                "action":"on"
+            }
+        ],
+        "associated_scene":[
+            {
+                "name":"0001",
+                "mode":"order",
+                "expression": "value=10"
+            }
+        ]
+    }
+  },
+{
+    "id": 1, "pid": 1,"area_id": "CAN区域", "area": "区域名称", "name": "0001", "display_name": "空调",
+    "type":    "central_control",
+    "subtype":    "central_control_common", //
+    "config":  
+    {
+        "bus":"canbus",//设备接入总线或协议类型,canbus/network/serial/RS485/zigbee/bluetooth/dali/knx/plc-iot
+        "address": "A51234F85667", //地址为网络设备mac地址
+        "control_bits": [
+            {
+                "type":"canbus", //端口为canbus或485本机地址,纯网络面板,端口保留
+                "value": 1
+            }
+        ],  //端口为canbus或485本机地址,纯网络面板,端口保留,或为网关本地id,跨网关时使用
+        "background": "http://192.168.0.1/bg.jpg",//要下载同步缓存的背景图片
+        "associated_device":[
+            {
+                "name":"0001",
+                "action":"on"
+            }
+        ],
+        "associated_scene":[
+            {
+                "name":"0001",
+                "mode":"order",
+                "expression": "value=10"
+            }
+        ]
+    }
+  }
+]
+```
+
 ### 智能系统区域数据格式
 
 ```json
@@ -663,12 +847,14 @@ Authorization: Bearer {{token}}
             "pid":"1",
             "name":"区域名称",
             "groupable":true,//true可分组为分类目录,不可分组为叶目录
+            "description":"区域描述"
         },
         {
             "id":"2",
             "pid":"1",
             "name":"区域名称",
             "groupable":false,//false不可分组为分类目录,为叶目录,不可创建子区域,可在区域下创建设备
+            "description":"区域描述"
         }
 ]
 ```
@@ -679,7 +865,7 @@ Authorization: Bearer {{token}}
  {
   "devices":[
     {
-      "id": 1, "pid": 1,"areaId": "CAN区域", "area": "区域名称", "name": "0001", "displayName": "灯光",
+      "id": 1, "pid": 1,"area_id": "CAN区域", "area": "区域名称", "name": "0001", "display_name": "灯光",
       "type":    "light",
       "subtype":    "light_common", //subtype为子类型,light_common为普通灯光,默认值
       "config":  
@@ -692,10 +878,10 @@ Authorization: Bearer {{token}}
     {
         "id":    1,
         "pid":    1,
-        "areaId":    "CAN区域",
+        "area_id":    "CAN区域",
         "area":    "区域名称",
         "name":    "0001",
-        "displayName":    "灯光",
+        "display_name":    "灯光",
         "type":    "light",
         "subtype":    "light_plat",
         "config":  
@@ -709,10 +895,10 @@ Authorization: Bearer {{token}}
         {
         "id":    1,
         "pid":    1,
-        "areaId":    "区域id",
+        "area_id":    "区域id",
         "area":    "区域名称",
         "name":    "0001",
-        "displayName":    "设备显示名称",
+        "display_name":    "设备显示名称",
         "type":    "scene",
         "subtype":    "work",
         "actions":  //场景动作执行项