合规国际互联网加速 OSASE为企业客户提供高速稳定SD-WAN国际加速解决方案。 广告
# 数据属性事件上报 [TOC] ## 1、数据结构体: | 标签名 | 作用 | 类型| | --- | --- | --- | | schema| 路由 | varchar | | profile | 设备入网参数 | array | | properties | 属性 | array | | events| 事件 | array | | time | 时间戳 | int| ### profile 参数 | 标签名 | 作用 | 类型| | --- | --- | --- | | nodeType| 节点类型:dev设备,net网关 | | | idAcl| id认证标准:true使用,false,不使用 | | | iotKey | 设备入网Key|varchar | | iotSecret | 设备入网Secret |varchar | ### properties 属性参数 | 标签名 | 作用 | 类型| | --- | --- | --- | | swVersion| 软件版本 | varchar | | hwVersion| 硬件版本 | varchar | | connectType| 联网方式:wifi、gprs、ethernet| varchar | | location| 定位信息 |varchar | | altitude| 海拔信息 | varchar | | key/value| 其他参数 |varchar | ### events 事件参数 | 标签名 | 作用 | 类型| | --- | --- | --- | | key/value| 事件格式 |varchar | ***** ## 2、单个属性设备上传 *属性路由:`dev/properties`* ``` { "schema": "dev/properties", "profile": { "iotKey": "", "iotSecret": "", "nodeType": "", "idAcl": "" }, "properties": { "sw_version": "", "hw_version": "", "connect_type": "", "location": "", "altitude": "", "key": "value" }, "time": "" } ``` Example: ``` { "schema": "dev/properties", "profile": { "iotKey": "", "iotSecret": "", "nodeType": "", "idAcl": "" }, "properties": { "sw_version": "V1.0", "hw_version": "V1.0", "connect_type": "gprs", "location": "108.906796,34.180912", "altitude": "500" }, "time": "1558574467" } ``` ## 3、单个设备事件上传 *事件路由:`dev/events`* ``` { "schema": "dev/events", "profile": { "iotKey": "", "iotSecret": "", "nodeType": "", "idAcl": "" }, "events": { "key": "value", "key1": "value1" }, "time": "" } ``` Example: ``` { "schema": "dev/events", "profile": { "iotKey": "", "iotSecret": "", "nodeType": "", "idAcl": "" }, "events": { "temperature": "0" }, "time": "" } ``` ## 4、其他功能 对时 设备请求 *路由:`dev/Timing`* ``` { "schema":"dev/Timing", "time":"" } ``` 心跳 设备请求 *路由:`dev/Jumping`* ``` { "schema":"dev/Jumping", "time":"" } ```