MQTT 连接器
本章介绍 MQTT Connector 的特定信息. 上行链路主题中的 Pan ID(网络 ID)是可选的,可以通过调整配置设置来排除.
上行链路
主题 |
描述 |
---|---|
{prefix}/server |
Leaps 服务器的最后遗嘱. 当服务器与代理断开连接时,将发布空信息.
|
主题 |
描述 |
---|---|
{prefix}/gateway/{device Id}/uplink |
设备配置信息.
参见 网关状态和配置.
示例:
话题: dwm/gateway/deca1e1cef720714/uplink
{
"networkId": 1,
"bridgeNodeId":
"-2393067142368852204",
"version": {
"release": "2.2.2",
"firmware": [
"1.4.2.0",
"1.4.8.1"
]
},
"uwb": "CONNECTED_BH",
"configuration": {
"ipAddress": [
"10.0.1.10"
],
"ipMask": [
"255.255.255.0"
],
"ipGateway": [
"10.0.1.138"
],
"dns": [
"8.8.8.8"
],
"interface": "ETHERNET",
"dhcp": true,
"tls": "OFF",
"server": "10.0.1.13",
"port": 7777,
"macFilter": false,
"label": "0714",
"uwbMode":
"UWB_MODE_ACTIVE", "leds":
true,
"uwbFirmwareUpdate": true,
"initiator": false,
"uwbBridge": true,
"position": {
"x": -0.2,
"y": 0.5,
"z": 1,
"quality": 100
},
"mac": [
{
"address":
"1e:1c:ef:72:07:14", "type":
"UWB, Mutable Default"
},
{
"address":
"dd:04:ed:c5:c7:f5", "type":
"BLE, Mutable Default"
},
{
"address":
"02:04:25:30:30:35", "type":
"Ethernet, Mutable Default"
},
{
"address":
"00:00:00:00:00:00", "type":
"Wi-Fi, Empty"
}
]
},
"timestamp":"1679494386282429"
}
|
主题 |
描述 |
---|---|
{prefix}/node/{deviceId}/ uplink/status |
设备状态. 此主题只读. 参见 NodeStatusUplink.
示例:
topic: dwm/node/0f07/uplink/status
{
"present": true,
"downlink": true,
"batt": 100,
"temp": 25,
"timestamp":"1679494411479191"
}
|
主题 |
描述 |
---|---|
{prefix}/node/{deviceId}/ uplink/config |
{
"configuration": {
"label": "DW0F07",
"nodeType": "ANCHOR",
"ble": true,
"leds": true,
"uwbFirmwareUpdate": true,
"anchor": {
"initiator": true,
"position": {
"x": 0,
"y": 0,
"z": 0,
"quality": 0
},
"routingConfig":
"ROUTING_CFG_OFF",
"routingStatus":
"ROUTING_STAT_INACTIVE"
}
},
"timestamp":"1679494543479526"
}
|
主题 |
描述 |
---|---|
{prefix}/node/{deviceId}/ uplink/data |
示例:
topic: dwm/node/0012/uplink/data
{
"data": "q80=",
"superFrameNumber": 673,
"timestamp":"1679495576782275"
}
{
"data": "ASNFZ4mrze8=",
"superFrameNumber": 1028,
"timestamp":"1679495612282922"
}
|
主题 |
描述 |
---|---|
{prefix}/node/{deviceId}/ uplink/service |
示例:
topic:
dwm/node/204c/uplink/service
{
"type": "TLV_API_ACK",
"data": "QAEARgJexA==",
"timestamp":"1679495457581967"
}
|
主题 |
描述 |
---|---|
{prefix}/node/{deviceId}/ uplink/location |
{
"position": {
"x": 3.25238609,
"y": -0.00895162672,
"z": 0.42510426,
"quality": 21
},
"superFrameNumber": 1144,
"timestamp":"1679495047880989"
}
|
下行链路
主题 |
描述 |
---|---|
{prefix}/server |
向 LEAPS 服务器发出请求. 参见 服务器消息. 示例:
topic: dwm/server
{
"request":"REFRESH_TOPICS"
}
|
主题 |
描述 |
---|---|
{prefix}/gateway/{devi ceId}/downlink |
参见 网关状态和配置. 示例:
topic:
dwm/gateway/DECAFA9FC2B38B86/downlink
{
"configuration": {
"ipAddress": [
"10.0.0.202",
"2001:0db8:85a3::1319:8a2e:0370:7344"
],
"ipMask": [
"255.255.255.0",
"64"
],
"ipGateway": [
"10.0.0.1",
"fe80::1"
],
"dns": [
"8.8.8.8",
"2001:4860:4860::8888"
],
"dhcp": true,
"interface": "ETHERNET",
"tls": "OFF",
"server": "10.0.0.35",
"port": 7777,
"macFilter": false,
"wifi": {
"ssid": "mywifi",
"password": "pass",
"region": "EUROPE"
},
"label": "0123456789abcdef",
"uwbMode":
"UWB_MODE_ACTIVE",
"leds": true,
"uwbFirmwareUpdate": false,
"initiator": false,
"uwbBridge": true,
"position": {
"x": 0,
"y": 1,
"z": 2.5,
"quality": 100
}
}
}
|
主题 |
描述 |
---|---|
{prefix}/node/{deviceI d}/downlink/config |
参见 节点配置下行链路. 示例:
topic:
dwm/node/0f07/downlink/config
{
"configuration": {
"label": "DW0F07",
"nodeType": "ANCHOR",
"ble": true,
"leds": true,
"uwbFirmwareUpdate": true,
"anchor": {
"initiator": true,
"position": {
"x": 0,
"y": 0,
"z": 0,
"quality": 0
},
"routingConfig":
"ROUTING_CFG_OFF",
"routingStatus":
"ROUTING_STAT_INACTIVE"
}
}
}
|
主题 |
描述 |
---|---|
{prefix}/node/{deviceI d}/downlink/service |
参见 节点配置下行链路. 示例:
topic: dwm/node/204c/downlink/service
{
"data": "CAA=",
"type": "TLV_API_CMD"
}
|
主题 |
描述 |
---|---|
topic: dwm/node/204c/downlink/service |
示例:
topic: dwm/node/204c/downlink/data
{
"data": "QUJDREVGR0hJSktMTU5PUFFSU1Q=",
"overwrite": true
}
|