用于 OUT / IN 主题过滤器的 mqtt 桥接配置
mqtt bridge config for OUT / IN topic filter
我正在尝试将 MQTT 网桥设置为 cloudmqtt.com。 raspbian.
上的本地网桥 运行
我想按原样将本地主题 (UP/site1/#
) 推送到 cloudmqtt 代理,并将远程主题 ('Down/site1/#') 拉到本地网桥。
尝试了以下配置,但没有成功
topic UP/site1/# out 2
topic Down/site1/# in 2
topic UP/site1/# out 2 UP/site1/ UP/site1/
topic Down/site1/# in 2 Down/site1/ Down/site1/
topic UP/site1/# out 2 "" ""
topic Down/site1/# in 2 "" ""
这是完整的配置
connection cloudmqtt
address *****.cloudmqtt.com:1883
bridge_protocol_version mqttv311
remote_username ****
remote_password ****
try_private false
start_type automatic
notifications false
cleansession false
topic UP/site1/# out 2
topic Down/site1/# in 2
网桥日志消息:
1545695073: Received PINGREQ from 8de7c6e8-4c6a-49b0-9aaa-5816aa9504901545604132782
1545695073: Sending PINGRESP to 8de7c6e8-4c6a-49b0-9aaa-5816aa9504901545604132782
1545695073: Received PUBLISH from pod01 (d0, q0, r0, m0, 'UP/site01/pod01', ... (191 bytes))
1545695076: Received PUBLISH from pod01 (d0, q0, r0, m0, 'UP/site01/pod01', ... (190 bytes))
1545695079: Received PUBLISH from pod01 (d0, q0, r0, m0, 'UP/site01/pod01', ... (190 bytes))
1545695082: Received PUBLISH from pod01 (d0, q0, r0, m0, 'UP/site01/pod01', ... (191 bytes))
1545695083: Received PINGREQ from 8de7c6e8-4c6a-49b0-9aaa-5816aa9504901545604132782
1545695083: Sending PINGRESP to 8de7c6e8-4c6a-49b0-9aaa-5816aa9504901545604132782
1545695085: Received PUBLISH from pod01 (d0, q0, r0, m0, 'UP/site01/pod01', ... (189 bytes))
1545695089: Bridge ff001.cloudmqtt sending CONNECT
1545695089: Received CONNACK on connection local.ff001.cloudmqtt.
1545695089: Bridge local.ff001.cloudmqtt sending UNSUBSCRIBE (Mid: 12, Topic: UP/site1/#)
1545695089: Bridge local.ff001.cloudmqtt sending SUBSCRIBE (Mid: 13, Topic: Down/site1/#, QoS: 2)
1545695089: Bridge local.ff001.cloudmqtt doing local SUBSCRIBE on topic UP/site1/#
1545695089: Received UNSUBACK from local.ff001.cloudmqtt
1545695089: Received SUBACK from local.ff001.cloudmqtt
1545695090: No will message specified.
1545695090: Sending CONNACK to pod01 (0, 0)
1545695090: No will message specified.
1545695090: Sending CONNACK to 8de7c6e8-4c6a-49b0-9aaa-5816aa9504901545604132782 (0, 0)
1545695092: Received PUBLISH from pod01 (d0, q0, r0, m0, 'UP/site01/pod01', ... (190 bytes))
1545695095: Received PUBLISH from pod01 (d0, q0, r0, m0, 'UP/site01/pod01', ... (190 bytes))
1545695098: Received PUBLISH from pod01 (d0, q0, r0, m0, 'UP/site01/pod01', ... (191 bytes))
1545695100: Received PINGREQ from 8de7c6e8-4c6a-49b0-9aaa-5816aa9504901545604132782
1545695100: Sending PINGRESP to 8de7c6e8-4c6a-49b0-9aaa-5816aa9504901545604132782
1545695101: Received PUBLISH from pod01 (d0, q0, r0, m0, 'UP/site01/pod01', ... (191 bytes))
1545695104: Received PUBLISH from pod01 (d0, q0, r0, m0, 'UP/site01/pod01', ... (192 bytes))
1545695107: Received PUBLISH from pod01 (d0, q0, r0, m0, 'UP/site01/pod01', ... (191 bytes))
1545695110: Received PINGREQ from 8de7c6e8-4c6a-49b0-9aaa-5816aa9504901545604132782
1545695110: Sending PINGRESP to 8de7c6e8-4c6a-49b0-9aaa-5816aa9504901545604132782
1545695110: Received PUBLISH from pod01 (d0, q0, r0, m0, 'UP/site01/pod01', ... (191 bytes))
1545695113: Received PUBLISH from pod01 (d0, q0, r0, m0, 'UP/site01/pod01', ... (192 bytes))
我有mosquitto_1.5.5
如果我删除 out/in 通配符并将其替换为 topic # both 2
它会起作用。但我不想提取所有远程主题,只针对特定站点 (Down/site1/#
) 并将所有本地主题推送到远程。在上面来自桥的日志中,看起来它没有将本地主题发布到远程 cloudMQTT。
有人知道我在这里遗漏了什么我需要更改远程 MQTT(cloudmqtt 实例)上的任何内容吗?
您正在使用 UP/site1/#
设置桥接并发布到 UP/site01/...
问题是 site1
!= site01
我正在尝试将 MQTT 网桥设置为 cloudmqtt.com。 raspbian.
上的本地网桥 运行我想按原样将本地主题 (UP/site1/#
) 推送到 cloudmqtt 代理,并将远程主题 ('Down/site1/#') 拉到本地网桥。
尝试了以下配置,但没有成功
topic UP/site1/# out 2
topic Down/site1/# in 2
topic UP/site1/# out 2 UP/site1/ UP/site1/
topic Down/site1/# in 2 Down/site1/ Down/site1/
topic UP/site1/# out 2 "" ""
topic Down/site1/# in 2 "" ""
这是完整的配置
connection cloudmqtt
address *****.cloudmqtt.com:1883
bridge_protocol_version mqttv311
remote_username ****
remote_password ****
try_private false
start_type automatic
notifications false
cleansession false
topic UP/site1/# out 2
topic Down/site1/# in 2
网桥日志消息:
1545695073: Received PINGREQ from 8de7c6e8-4c6a-49b0-9aaa-5816aa9504901545604132782
1545695073: Sending PINGRESP to 8de7c6e8-4c6a-49b0-9aaa-5816aa9504901545604132782
1545695073: Received PUBLISH from pod01 (d0, q0, r0, m0, 'UP/site01/pod01', ... (191 bytes))
1545695076: Received PUBLISH from pod01 (d0, q0, r0, m0, 'UP/site01/pod01', ... (190 bytes))
1545695079: Received PUBLISH from pod01 (d0, q0, r0, m0, 'UP/site01/pod01', ... (190 bytes))
1545695082: Received PUBLISH from pod01 (d0, q0, r0, m0, 'UP/site01/pod01', ... (191 bytes))
1545695083: Received PINGREQ from 8de7c6e8-4c6a-49b0-9aaa-5816aa9504901545604132782
1545695083: Sending PINGRESP to 8de7c6e8-4c6a-49b0-9aaa-5816aa9504901545604132782
1545695085: Received PUBLISH from pod01 (d0, q0, r0, m0, 'UP/site01/pod01', ... (189 bytes))
1545695089: Bridge ff001.cloudmqtt sending CONNECT
1545695089: Received CONNACK on connection local.ff001.cloudmqtt.
1545695089: Bridge local.ff001.cloudmqtt sending UNSUBSCRIBE (Mid: 12, Topic: UP/site1/#)
1545695089: Bridge local.ff001.cloudmqtt sending SUBSCRIBE (Mid: 13, Topic: Down/site1/#, QoS: 2)
1545695089: Bridge local.ff001.cloudmqtt doing local SUBSCRIBE on topic UP/site1/#
1545695089: Received UNSUBACK from local.ff001.cloudmqtt
1545695089: Received SUBACK from local.ff001.cloudmqtt
1545695090: No will message specified.
1545695090: Sending CONNACK to pod01 (0, 0)
1545695090: No will message specified.
1545695090: Sending CONNACK to 8de7c6e8-4c6a-49b0-9aaa-5816aa9504901545604132782 (0, 0)
1545695092: Received PUBLISH from pod01 (d0, q0, r0, m0, 'UP/site01/pod01', ... (190 bytes))
1545695095: Received PUBLISH from pod01 (d0, q0, r0, m0, 'UP/site01/pod01', ... (190 bytes))
1545695098: Received PUBLISH from pod01 (d0, q0, r0, m0, 'UP/site01/pod01', ... (191 bytes))
1545695100: Received PINGREQ from 8de7c6e8-4c6a-49b0-9aaa-5816aa9504901545604132782
1545695100: Sending PINGRESP to 8de7c6e8-4c6a-49b0-9aaa-5816aa9504901545604132782
1545695101: Received PUBLISH from pod01 (d0, q0, r0, m0, 'UP/site01/pod01', ... (191 bytes))
1545695104: Received PUBLISH from pod01 (d0, q0, r0, m0, 'UP/site01/pod01', ... (192 bytes))
1545695107: Received PUBLISH from pod01 (d0, q0, r0, m0, 'UP/site01/pod01', ... (191 bytes))
1545695110: Received PINGREQ from 8de7c6e8-4c6a-49b0-9aaa-5816aa9504901545604132782
1545695110: Sending PINGRESP to 8de7c6e8-4c6a-49b0-9aaa-5816aa9504901545604132782
1545695110: Received PUBLISH from pod01 (d0, q0, r0, m0, 'UP/site01/pod01', ... (191 bytes))
1545695113: Received PUBLISH from pod01 (d0, q0, r0, m0, 'UP/site01/pod01', ... (192 bytes))
我有mosquitto_1.5.5
如果我删除 out/in 通配符并将其替换为 topic # both 2
它会起作用。但我不想提取所有远程主题,只针对特定站点 (Down/site1/#
) 并将所有本地主题推送到远程。在上面来自桥的日志中,看起来它没有将本地主题发布到远程 cloudMQTT。
有人知道我在这里遗漏了什么我需要更改远程 MQTT(cloudmqtt 实例)上的任何内容吗?
您正在使用 UP/site1/#
设置桥接并发布到 UP/site01/...
问题是 site1
!= site01