{"name":"Namron-Gateway","ty":2,"categ": "GateWay","prot":"3","mod_ver":"1.2.34","mcu_ver":"1.0.0","sn":"xxxx-xxxx-xxxx","mfr":"HZC","model":"Gateway","attrs":[{"id":"Onoff","acc":2,"dty":7,"val":0},{"id":"Level","acc":2,"dty":7,"val":50,"min":0,"max":100}]}{
"name": "Namron-Gateway",
"ty": 2,
"prot": "3",
"categ": "GateWay",
"mod_ver": "1.2.34",
"mcu_ver": "1.0.0",
"sn": "xxxx-xxxx-xxxx",
"mfr": "HZC",
"model": "Gateway",
"attrs": [
{
"id": "Onoff",
"acc": 2,
"dty": 7,
"val": 0
},
{
"id": "Level",
"acc": 2,
"dty": 7,
"val": 50,
"min": 0,
"max": 100
}
]
}Y:指的是Yes,必填项。O:指的是Option,可选项。{device_id}:指的是设备ID,即设备证书的CN值,32位的UUID字符串。{mid}:指的是主设备ID,即网关ID{mac}:指的是网关设备下的子设备MAC地址。{sid}:指的是网关设备下的子设备ID,通常是MAC地址+端点。比如:14B457FFFECFFCEA_01{device_id}/time/sync{device_id}/data_sync/sub_device{
"flag": 1,
"completed": false,
"data": [
{
"name": "abcdefg",
"categ": "0101",
"sid": "203e_00",
"mac": "1a6b8f8f3938",
"mod_ver": "0005",
"prot": "1,5",
"mfr": "HZC",
"model": "00809-B",
"attrs": "[{\"id\":\"Onoff\",\"acc\":2,\"dty\":7,\"val\":0},{\"id\":\"Level\",\"acc\":2,\"dty\":7,\"val\":50,\"min\":0,\"max\":100}]"
}
]
}| 参数名称 | 参数类型 | 是否必填 | 参数说明 |
|---|---|---|---|
flag | uint | Y | 标志位; |
completed | bool | Y | 所有数据是否已发送完毕; |
| 参数名称 | 参数类型 | 是否必传 | 参数说明 |
|---|---|---|---|
name | string | Y | 设备名称; |
categ | string | O | 品类; |
sid | string | Y | 子设备 ID |
mac | string | Y | MAC 地址 |
mod_ver | string | Y | 模块固件版本号; |
mcu_ver | string | O | MCU 固件版本号; |
prot | string(4bytes) | Y | 通讯协议; 多协议设备使用","分隔; 比如:"1,2,3,4" 1:Zigbee 2:Zwave 3:Matter 4:WiFi 5:Thread 6:Bluetooth 7:4G 8:NB-IoT |
sn | string(4bytes) | O | 序列号; |
mfr | string(8bytes) | Y | 制造商; |
model | string(8bytes) | Y | 型号; |
attrs | string | Y | 属性 JSON 字符串数据; |
{device_id}/data_sync/automation{
"flag": 1,
"completed": false,
"data": [
{
"automation_id": "123456",
"name": "自动化",
"conditions": "{\"if_conditions\":[{\"time_condition\":{\"time\":\"1514\",\"date\":\"20240205\",\"repeat\":{\"ty\":\"Min\",\"val\":1}}},{\"astro_condition\":{\"at_sunrise\":true,\"sunrise_in_minutes\":{\"ty\":\"GT\",\"val\":5},\"at_sunset\":true,\"sunset_in_minutes\":{\"ty\":\"LT\",\"val\":5}}},{\"mode_condition\":{\"mode_id\":\"3ade50e302ad4ea6975372017194fa8c\"}},{\"device_condition\":{\"sid\":\"14B457FFFECFFCEA_01\",\"id\":\"Onoff\",\"val\":0,\"ty\":\"EQ\"}}],\"and_conditions\":[{\"time_condition\":{\"time\":\"1514\",\"date\":\"20240205\",\"repeat\":{\"ty\":\"Min\",\"val\":1}}},{\"astro_condition\":{\"at_sunrise\":true,\"sunrise_in_minutes\":{\"ty\":\"GT\",\"val\":5},\"at_sunset\":true,\"sunset_in_minutes\":{\"ty\":\"LT\",\"val\":5}}},{\"mode_condition\":{\"mode_id\":\"3ade50e302ad4ea6975372017194fa8c\"}},{\"device_condition\":{\"sid\":\"14B457FFFECFFCEA_01\",\"id\":\"Onoff\",\"val\":0,\"ty\":\"EQ\"}}]}",
"actions": "{\"actions_true\":[{\"sid\":\"14B457FFFECFFCEA_01\",\"id\":\"Onoff\",\"val\":1,\"prot\":\"1,4\",\"categ\":\"0002\"},{\"groups_id\":\"3ade50e302ad4ea6975372017194fa8c\",\"id\":\"Onoff\",\"val\":0}],\"actions_false\":[{\"sid\":\"14B457FFFECFFCEA_02\",\"id\":\"Level\",\"val\":10,\"prot\":\"1,4\",\"categ\":\"0002\"},{\"groups_id\":\"3ade50e302ad4ea6975372017194fa8c\",\"id\":\"Level\",\"val\":10}]}"
}
]
}| 参数名称 | 参数类型 | 是否必填 | 参数说明 |
|---|---|---|---|
flag | uint | Y | 标志位; |
completed | bool | Y | 所有数据是否已发送完毕; |
| 参数名称 | 参数类型 | 是否必传 | 参数说明 |
|---|---|---|---|
automation_id | string(4bytes) | Y | 自动化 ID; |
name | string | Y | 自动化名称; |
conditions | string | Y | 条件 JSON 字符串数据 |
actions | string | Y | 动作 JSON 字符串数据 |
{device_id}/data_sync/groups{
"flag": 1,
"completed": false,
"data": [
{
"groups_id": "123456",
"name": "群组",
"prot": "1,2,3",
"categ": "aaabbbccc",
"sids": "[\"aaa_111\",\"bbb_222\",\"ccc_333\"]",
"attrs": "[{\"id\":\"1000_0000\",\"val\":\"0\",\"acc\":2,\"dty\":5}]",
"model": "4512792"
}
]
}| 参数名称 | 参数类型 | 是否必填 | 参数说明 |
|---|---|---|---|
flag | uint | Y | 标志位; |
completed | bool | Y | 所有数据是否已发送完毕; |
| 参数名称 | 参数类型 | 是否必传 | 参数说明 |
|---|---|---|---|
groups_id | string(4bytes) | Y | 群组 ID; |
name | string | Y | 群组名称; |
prot | string(4bytes) | Y | 通讯协议; 多协议设备使用"," |