{"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 | 通讯协议; 多协议设备使用","分隔; 比如:"1,2,3,4" 1:Zigbee 2:Zwave 3:Matter 4:WiFi 5:Thread 6:Bluetooth 7:4G 8:NB-IoT |
categ | string(8bytes) | Y | 品类 |
sids | string | Y | 子设备 ID;JSON字符串数据 |
attrs | string | Y | 属性;JSON字符串数据 |
model | string | Y | 型号 |
{device_id}/ota/reply{
"prog": 1,
"exec_id": "b6d008dff2bf4247ad8b1e3a31ffacf0",
"ota_id": "93da3f974a3044f5877343b12aa1829e"
}
或者
{
"mac": "14B457FFFECFFCEA",
"prog": 1,
"exec_id": "b6d008dff2bf4247ad8b1e3a31ffacf0"
"ota_id": "93da3f974a3044f5877343b12aa1829e"
}| 参数名称 | 参数类型 | 是否必填 | 参数说明 |
|---|---|---|---|
prog | uint | Y | 0~100:下载文件进度; 101:升级中; 102:OTA成功; 103:OTA失败; |
exec_id | string(4bytes) | Y | 执行ID; |
ota_id | string(4bytes) | Y | OTA ID; |
reason | string(32bytes) | O | 失败原因; |
mac | string(4bytes) | O | 子设备 MAC 地址; 当mac不为空时,则回复的是子设备的 OTA 消息 |
{device_id}/settings/reply{
"set_id": 1732588374776,
"rs": 1
}| 参数名称 | 参数类型 | 是否必填 | 参数说明 |
|---|---|---|---|
set_id | uint | Y | 设置ID; |
rs | uint | Y | 设置结果; 0:失败; 1:成功; |
{device_id}/ctrl/reply{
"set_id": 1732588374776,
"rs": 1
}| 参数名称 | 参数类型 | 是否必填 | 参数说明 |
|---|---|---|---|
set_id | uint | Y | 设置ID; |
rs | uint | Y | 设置结果; 0:失败; 1:成功; |
{device_id}/gateway_transfer/reply{
"transfer_id": "b17b0f06070e496a860cb78fe57b43e6",
"ty": Groups,
"flag": 1,
"completed": true
}
或者
{
"transfer_id": "b17b0f06070e496a860cb78fe57b43e6",
"ty": Automation,
"flag": 1,
"completed": true
}| 参数名称 | 参数类型 | 是否必填 | 参数说明 |
|---|---|---|---|
transfer_id | string | Y | 转移ID; |
ty | string | Y | 类型; Groups Automation |
flag | uint | Y | 标志位; |
completed | bool | Y | 平台侧的数据,是否已经全部发送完毕 |
{device_id}/register{
"name": "Namron-Gateway",
"ty": 2,
"categ": "GateWay",
"prot": "3",
"mod_ver": "1.2.34",
"mcu_ver": "1.0.0",
"sn": "xxxx-xxxx-xxxx",
"mac": "14B457FFFECFFCEA",
"mfr": "HZC",
"model": "Gateway",
"reseted": false,
"attrs": [
{
"id": "Onoff",
"acc": 2,
"dty": 7,
"val": 0
},
{
"id": "Level",
"acc": 2,
"dty": 7,
"val": 50,
"min": 0,
"max": 100
}
]
}| 参数名称 | 参数类型 | 是否必填 | 参数说明 |
|---|---|---|---|
name | string(64bytes) | Y | 设备名称 |
ty | uint | Y | 设备类型; 1:直连设备 2:网关设备 |
categ | string(64bytes) | O | 品类; |
prot | string(32bytes) | Y | 通讯协议; 多协议设备使用","分隔; 比如:"1,2,3,4" 1:Zigbee 2:Zwave 3:Matter 4:WiFi 5:Thread 6:Bluetooth 7:4G 8:NB-IoT |
mod_ver | string(16bytes) | O | 模块固件版本号; |
mcu_ver | string(16bytes) | O | MCU固件版本号; |
sn | string(32bytes) | O | 序列号; |
mac | string(32bytes) | O | MAC地址; |
mfr | string(32bytes) | Y | 制造商; |
model | string(64bytes) | Y | 型号; |
reseted | bool | O | 设备是否已重置; 当此字段为true时,平台会删除掉所有与设备、家庭相关的数据 |
attrs | array | Y | 属性; |
| 参数名称 | 参数类型 | 是否必填 | 参数说明 |
|---|---|---|---|
id | string(64bytes) | Y | 标识符; |
acc | uint | Y | 访问模式; 1:ReadOnly 2:ReadWrite |
dty | uint | Y | 数据类型; 详见附录data_type |
val | any | Y | 当前值; 与dty对应 |
max | int | O | 最大值; |
min | int | O | 最小值; |
def | any | O | 默认值; 与dty对应 |
mul | int | O | 乘数; |
div | int | O | 除数; |
{device_id}/report{
"attrs": [
{
"id": "onoff",
"val": 1
},
{
"id": "level",
"val": 2
}
]
}
或者
{
"attrs": [
{
"id": "onoff",
"val": 1
},
{
"id": "level",
"val": 2
}
],
"sid": "14B457FFFECFFCEA_01"
}| 参数名称 | 参数类型 | 是否必填 | 参数说明 |
|---|---|---|---|
attrs | array | Y | 属性; |
sid | string(32bytes) | O | 子设备ID; 当sid不为空时,则上报的是子设备的属性 |
| 参数名称 | 参数类型 | 是否必填 | 参数说明 |
|---|---|---|---|
id | string(64bytes) | Y | 标识符; |
val | any | Y | 当前值; 与data_type对应 |
{device_id}/reset {
"mac": "14B457FFFECFFCEA",
}| 参数名称 | 参数类型 | 是否必填 | 参数说明 |
|---|---|---|---|
mac | string(32bytes) | O | 子设备MAC地址; 当mac不为空时,则重置的是子设备 |
{device_id}/exception{device_id}/sub/reg{
"name": "调光灯",
"mac": "14B457FFFECFFCEA",
"sid": "14B457FFFECFFCEA_01",
"categ": "Dimmer",
"prot": "3",
"mod_ver": "1.2.34",
"mcu_ver": "1.0.0",
"sn": "xxxx-xxxx-xxxx",
"mfr": "HZC",
"model": "Dimmer-D581-ZB",
"attrs": [
{
"id": "Onoff",
"acc": 2,
"dty": 7,
"val": 0
},
{
"id": "Level",
"acc": 2,
"dty": 7,
"val": 50,
"min": 0,
"max": 100
}
]
}| 参数名称 | 参数类型 | 是否必填 | 参数说明 |
|---|---|---|---|
name | string(64bytes) | Y | 子设备名称; |
mac | string(32bytes) | Y | 子设备MAC地址; |
sid | string(32bytes) | Y | 子设备ID; 需确保唯一性,建议使用MAC地址编号; 比如:14B457FFFECFFCEA_01 |
categ | string(64bytes) | O | 品类; |
prot | string(32bytes) | Y | 通讯协议; 多协议设备使用","分隔; 比如:"1,2,3,4" 1:Zigbee 2:Zwave 3:Matter 4:WiFi 5:Thread 6:Bluetooth 7:4G 8:NB-IoT |
mod_ver | string(16bytes) | O | 模块固件版本号; |
mcu_ver | string(16bytes) | O | MCU固件版本号; |
sn | string(32bytes) | O | 序列号; |
mfr | string(32bytes) | Y | 制造商; |
model | string(64bytes) | Y | 型号; |
attrs | array | Y | 属性; |
| 参数名称 | 参数类型 | 是否必填 | 参数说明 |
|---|---|---|---|
id | string(64bytes) | Y | 标识符; |
acc | uint | Y | 访问模式; 1:ReadOnly 2:ReadWrite |
dty | uint | Y | 数据类型; 详见附录data_type |
val | any | Y | 当前值; 与dty对应 |
max | int | O | 最大值; |
min | int | O | 最小值; |
def | any | O | 默认值; 与dty对应 |
mul | int | O | 乘数; |
div | int | O | 除数; |
{device_id}/sub/online{
"macs": [
"14B457FFFECFFCEA",
"155632FFFECFFCEB",
"16Q25VFLFECFFCEC"
]
}| 参数名称 | 参数类型 | 是否必填 | 参数说明 |
|---|---|---|---|
macs | array | Y | N个子设备的MAC地址; |
{device_id}/sub/offline{
"macs": [
"14B457FFFECFFCEA",
"155632FFFECFFCEB",
"16Q25VFLFECFFCEC"
]
}| 参数名称 | 参数类型 | 是否必填 | 参数说明 |
|---|---|---|---|
macs | array | Y | N个子设备的MAC地址; |
{device_id}/sub/join {
"rs": 1,
}| 参数名称 | 参数类型 | 是否必填 | 参数说明 |
|---|---|---|---|
rs | uint | Y | 0:入网失败; 1:入网成功; |
{device_id}/exec/log {
"id": "3ade50e302ad4ea6975372017194fa8c",
"ty": 1,
"rs": 1
"ts": "1736927423665",
}| 参数名称 | 参数类型 | 是否必填 | 参数说明 |
|---|---|---|---|
id | string | Y | ID; 模式或自动化的 ID |
ty | uint | Y | 类型; 1:模式 2:自动化 |
rs | uint | Y | 执行结果; 0:失败 1:成功 |
ts | uint | Y | 执行时间;UTC毫秒时间戳 |
{device_id}/connected/rc{device_id}/gateway/notify {
"rs": 1,
"ops": "Join"
}
或
{
"rs": 1,
"ops": "Join",
"reason": "failed reason content"
}
或
{
"rs": 1,
"ops": "Join",
"reason": "failed reason content",
"mac": "14B457FFFECFFCEA",
}
或
{
"rs": 1,
"ops": "Join",
"reason": "failed reason content",
"mac": "14B457FFFECFFCEA",
"ext_params": {
"groups_id": "abcd123456"
}
}| 参数名称 | 参数类型 | 是否必填 | 参数说明 |
|---|---|---|---|
rs | uint | Y | 结果; 0:失败 1:成功 |
ops | string | Y | 操作类型; Join:入网 Bind:绑定 Status:获取状态 Cfg:配网 FastPollTimeout:网关收到唤醒时间 CfgBut:遥控器绑定 GroupAdd:添加群组(遥控器) GroupCreate:群组创建 GroupRemove:移除群组 MeshCfgGet:网关收到mesh 网络配置 MeshCfgSet:网关配置完成 WiFiConnect:WiFi是否连接成功 |
reason | string | Y | 失败原因; 当rs为0时,才有此字段 |
mac | string | O | 子设备 MAC 地址 |
ext_params | object | O | 扩展参数; |
{device_id}/fw_ver {
"ty": 1,
"ver": "1.0.0"
}
或者
{
"ty": 1,
"ver": "1.0.0",
"mac": "14B457FFFECFFCEA"
}| 参数名称 | 参数类型 | 是否必填 | 参数说明 |
|---|---|---|---|
ty | uint | Y | 固件类型; 1:模块 2:MCU |
ver | string | Y | 固件版本号; |
mac | string | O | 子设备 MAC 地址; 此字段不为空时 ,则是子设备的固件版本号 |
{device_id}/bind_ble_mesh{
"device_ids": [
"D8A90EEF3A7249239B29446D2526B4C5",
"126A000000030329000CC26A8F8F3938",
"126A000000030329000E096A8F8F3938",
"126A00000002005B0004D560C05FAE0C",
"126A00000002005B0004DB61C05FAE0C"
]
}| 参数名称 | 参数类型 | 是否必填 | 参数说明 |
|---|---|---|---|
device_ids | array | Y | 设备ID; 即:Mesh 网络配置主题,mesh_cfg字段内容里的nodes节点下面所有的UUID |
{device_id}/mesh_seq_no{
"val": 10
}| 参数名称 | 参数类型 | 是否必填 | 参数说明 |
|---|---|---|---|
val | uint | Y | 当前值 |
{device_id}/custom_msg{
"title": "title_111",
"content": "content_111",
"home_id": "home_id_111",
"user_ids": [
"user_id_111",
"user_id_222",
"user_id_333"
],
"type": 1
}
或者
{
"title": "title_111",
"content": "content_111",
"home_id": "home_id_111",
"user_ids": [
"user_id_111",
"user_id_222",
"user_id_333"
],
"type": 1,
"delay_time": 3600
}| 参数名称 | 参数类型 | 是否必填 | 参数说明 |
|---|---|---|---|
title | string | Y | 标题 |
content | string | Y | 内容 |
home_id | string | Y | 家庭 ID |
user_ids | array(string) | Y | 用户 ID |
type | uint | Y | 消息类型; 1:push_notify 2:msg_center |
delay_time | uint | O | 延迟时间;单位:秒 |
{device_id}/system_action {
"type": "DisableHomeMember",
"home_id": "home_id_111",
"values": [
"1234567890",
"9876543210"
],
"delay_time": 120
}| 参数名称 | 参数类型 | 是否必填 | 参数说明 |
|---|---|---|---|
type | string | Y | 类型; 禁用家庭成员:HomeMemberDisable 启用家庭成员:HomeMemberEnable 禁用自动化:AutomationDisable 启用自动化:AutomationEnable |
home_id | string | Y | 家庭 ID; |
values | array(string) | O | 类型;ID 列表; |
delay_time | uint | O | 延迟时间;单位:秒 |
{device_id}/register/reply{
"tz": "America/New_York",
"ts": 1735609714,
"is_dst": true,
"jet_lag": -3600,
"offset": -4
"account_deleted": false,
"home_deleted": false,
"lon": "114.228463",
"lat": "22.695586",
"mesh_cfg": {\"aaa\":\"123\",\"bbb\":456}
}| 参数名称 | 参数类型 | 是否必填 | 参数说明 |
|---|---|---|---|
tz | string | Y | 设备时区; |
lon | string | Y | 经度; |
lat | string | Y | 纬度; |
ts | uint | Y | UTC秒级时间戳; |
is_dst | bool | Y | 是否为夏令时; |
jet_lag | int | Y | 时差;单位:秒 如果为【负数】,则说明比正常时间慢了,通常只有夏令时才会这样 |
offset | int | Y | 时间偏移量; |
account_deleted | bool | O | 绑定设备的【账号】是否已删除; 为 true 时,网关需要 恢复出厂设置,删除掉所有数据 |
home_deleted | bool | O | 绑定设备的【家庭】是否已删除; 为 true 时,网关需要恢复出厂设置,删除掉所有数据 |
mesh_cfg | string | O | 家庭的 Mesh 网络配置内容; JSON字符串;需转义 |
{device_id}/time/sync/reply{
"tz": "America/New_York",
"ts": 1735609714,
"is_dst": true,
"jet_lag": -18000,
"offset": -5,
"new_offset": -5.00
}| 参数名称 | 参数类型 | 是否必填 | 参数说明 |
|---|---|---|---|
tz | string(64bytes) | Y | 设备时区; |
ts | uint | Y | UTC秒级时间戳; |
is_dst | bool | Y | 是否为夏令时; |
jet_lag | int | Y | 时差;单位:秒 如果为【负数】,则说明比正常时间慢了,通常只有夏令时才会这样 |
offset | int | Y | 时间偏移量;单位:小时 因缺少精度,该参数已弃用;改用 new_offset |
new_offset | double | Y | 时间偏移量;单位:小时 |
{device_id}/data_sync/reply{
"ty": "Device",
"flag": 10,
"completed": true
}| 参数名称 | 参数类型 | 是否必填 | 参数说明 |
|---|---|---|---|
ty | string | Y | 类型; Device Groups Automation |
flag | uint | Y | 标志位; |
completed | bool | Y | 是否处理完成; |
{device_id}/transfer/automation{
"transfer_id": "b17b0f06070e496a860cb78fe57b43e6",
"flag": 1,
"completed": false,
"data": []
}| 参数名称 | 参数类型 | 是否必填 | 参数说明 |
|---|---|---|---|
transfer_id | string | Y | 转移ID; 回复时需带上此字段值一起返回给平台 |
flag | uint | Y | 标志位; |
completed | bool | Y | 平台侧的数据,是否已经全部发送完毕; |
data | array | Y | 参见创建自动化,有可能会是空列表data:[]; |
{device_id}/transfer/groups{
"transfer_id": "b17b0f06070e496a860cb78fe57b43e6",
"flag": 1,
"completed": false,
"data": [
{
"groups_id": "123456",
"prot": "1,4",
"categ": "0002",
"sids": [
"14B457FFFECFFCEA_01",
"14B457FFFECFFCEA_02"
],
"attrs": [
{
"id": "StUpOnOff",
"val": "0"
},
{
"id": "Onoff",
"val": "1"
}
],
"mesh_addr": 123456
}
]
}| 参数名称 | 参数类型 | 是否必填 | 参数说明 |
|---|---|---|---|
transfer_id | string | Y | 转移ID; 回复时需带上此字段值一起返回给平台 |
flag | uint | Y | 标志位; |
completed | bool | Y | 所有数据是否已发送完毕; |
data | array | Y | 参见Mesh网络,有可能会是空列表data:[]; |
{device_id}/mesh_cfg{
"mesh_cfg": {\"aaa\":\"123\",\"bbb\":456}
}
或者
{
"mesh_seq_no": 100,
"mesh_cfg": {\"aaa\":\"123\",\"bbb\":456}
}| 参数名称 | 参数类型 | 是否必填 | 参数说明 |
|---|---|---|---|
mesh_seq_no | uint | O | 家庭的 Mesh 网络序列号 |
mesh_cfg | string | Y | 家庭的 Mesh 网络配置内容; JSON字符串;需转义 |
{device_id}/kick_out{device_id}/settings{
"id": "Onoff",
"val": 0,
"prot": "4",
"set_id": 1732529590807,
"categ": "Gateway",
"model": "model"
}
或者
{
"id": "Onoff",
"val": 0,
"prot": "4",
"sid": "14B457FFFECFFCEA_01",
"set_id": 1732529590807,
"categ": "Gateway",
"model": "model"
}
或者
{
"set_id": 1732529590807,
"groups_id": "365f5549cd0a4c01a4b0ed496871d730",
"id": "Onoff",
"val": 0,
"is_mesh": false,
"model": "model"
}
或者
{
"set_id": 1732529590807,
"groups_id": 123456,
"id": "Onoff",
"val": 0,
"is_mesh": true,
"mesh_addr": 123456,
"model": "model"
}| 参数名称 | 参数类型 | 是否必填 | 参数说明 |
|---|---|---|---|
set_id | uint | Y | 设置消息ID; 回复时需带上此字段值一起返回给平台 |
groups_id | string(32bytes) | O | 群组 ID 此字段不为空时,控制的则是【群组】 |
is_mesh | bool | O | 是否为 Mesh 网络; |
mesh_addr | uint | O | Mesh 网络地址; |
id | string(64bytes) | Y | 属性ID; |
val | any | Y | 属性值; |
prot | string(32bytes) | O | 通讯协议; 多协议设备使用,分隔; 比如:"1,2,3,4" 1:Zigbee 2:Zwave 3:Matter 4:WiFi 5:Thread 6:Bluetooth 7:4G 8:NB-IoT |
sid | string(32bytes) | O | 子设备 ID; |
categ | string(64bytes) | O | 品类; |
model | string(64bytes) | Y | 型号; |
{device_id}/ctrl{
"id": "Onoff",
"val": 0,
"prot": "4",
"set_id": 1732529590807,
"categ": "Gateway",
"model": "model"
}
或者
{
"id": "Onoff",
"val": 0,
"prot": "4",
"sid": "14B457FFFECFFCEA_01",
"set_id": 1732529590807,
"categ": "Gateway",
"model": "model"
}
或者
{
"set_id": 1732529590807,
"groups_id": "365f5549cd0a4c01a4b0ed496871d730",
"id": "Onoff",
"val": 0,
"is_mesh": false,
"model": "model"
}
或者
{
"set_id": 1732529590807,
"groups_id": 123456,
"id": "Onoff",
"val": 0,
"is_mesh": true,
"mesh_addr": 123456,
"model": "model"
}| 参数名称 | 参数类型 | 是否必填 | 参数说明 |
|---|---|---|---|
set_id | uint | Y | 设置消息ID; 回复时需带上此字段值一起返回给平台 |
groups_id | string(32bytes) | O | 群组 ID 此字段不为空时,控制的则是【群组】 |
is_mesh | bool | O | 是否为 Mesh 网络; |
mesh_addr | uint | O | Mesh 网络地址; |
id | string(64bytes) | Y | 属性ID; |
val | any | Y | 属性值; |
prot | string(32bytes) | O | 通讯协议; 多协议设备使用,分隔; 比如:"1,2,3,4" 1:Zigbee 2:Zwave 3:Matter 4:WiFi 5:Thread 6:Bluetooth 7:4G 8:NB-IoT |
sid | string(32bytes) | O | 子设备 ID; |
categ | string(64bytes) | O | 品类; |
model | string(64bytes) | Y | 型号; |
{device_id}/batch_ctrl{
"set_id": 1732529590807,
"cmds": [
{
"sid": "14B457FFFECFFCEA_01",
"id": "Onoff",
"val": 1,
"prot": "4",
"categ": "0003",
"model": "model"
}
},
{
"sid": "14B457FFFECFFCEA_02",
"id": "Onoff",
"val": 1,
"prot": "4",
"categ": "0003",
"model": "model"
}
},
{
"sid": "2032_00",
"id": "Onoff",
"val": 1,
"prot": "4",
"categ": "0003",
"model": "model"
}
]
}| 参数名称 | 参数类型 | 是否必填 | 参数说明 |
|---|---|---|---|
set_id | uint | Y | 设置消息ID; 回复时需带上此字段值一起返回给平台 |
| 参数名称 | 参数类型 | 是否必填 | 参数说明 |
|---|---|---|---|
sid | string(32bytes) | O | 子设备 ID; |
id | string(64bytes) | Y | 属性ID; |
val | any | Y | 属性值; |
prot | string(32bytes) | O | 通讯协议; 多协议设备使用,分隔; 比如:"1,2,3,4" 1:Zigbee 2:Zwave 3:Matter 4:WiFi 5:Thread 6:Bluetooth 7:4G 8:NB-IoT |
categ | string(64bytes) | O | 品类; |
model | string(64bytes) | O | 型号; |
{device_id}/ota {
"ty": 1,
"size": 100000,
"url": "https://xxxxxxxxxxxxxxxxx.com",
"ver": "1.03",
"checksum": 65535,
"exec_id": "b6d008dff2bf4247ad8b1e3a31ffacf0",
"ota_id": "93da3f974a3044f5877343b12aa1829e"
}
或者
{
"ty": 1,
"size": 100000,
"url": "https://xxxxxxxxxxxxxxxxx.com",
"ver": "1.03",
"checksum": 65535,
"ota_id": "0125872915094ad38b95290347c5f61b",
"sub_devices": [
{
"exec_id": "f293bb24ceef4cc0b265b471d07e380e",
"mac": "0CAE5FFFFEBF7808",
"prot": "1,6",
},
{
"exec_id": "41ce9ccfde5341318e0cb96024c98369",
"mac": "38398FFFFE8F717F",
"prot": "1,6",
},
{
"exec_id": "e7747c697884469da77a320a4ae76e15",
"mac": "F4B3B1FFFE63BB03",
"prot": "1,6",
},
{
"exec_id": "601acc354bdd43d5af6342d4053af840",
"mac": "A4C1383C358488C3",
"prot": "1,6",
}
]
}| 参数名称 | 参数类型 | 是否必填 | 参数说明 |
|---|---|---|---|
ty | uint | Y | OTA类型; 1:模块; 2:MCU; |
size | uint | Y | 固件文件大小; 单位:字节 |
url | string(255bytes) | Y | 固件下载地址; |
ver | string(16bytes) | Y | 固件版本; |
checksum | uint | Y | CRC16校验和; 多项式:0x1021 |
exec_id | string(32bytes) | O | 执行ID; 给子设备OTA时,此字段缺失 回复时,需带上此字段值一起返回给平台 |
ota_id | string(32bytes) | Y | 任务ID; |