I am trying to setup MQTT bridge to cloudmqtt.com. Local bridge running on raspbian.
I want to push local topics (UP/site1/#
) to cloudmqtt broker as it is & pull remote topics ('Down/site1/#') to local bridge.
Tried following configs, but didn't work
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 "" ""
Here is the full config
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
Bridge log messages :
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))
I have mosquitto_1.5.5
If I remove out/in wildcard and replace it with topic # both 2
it works. But I don't want to pull all remote topics, only specific to site (Down/site1/#
) and push all local topics to remote. in above logs from bridge, looks like its not publishing local topics to remote cloudMQTT.
anyone know what I am missing here do I need to change anything on remote MQTT (cloudmqtt instance) ?
You are setting the bridge up with UP/site1/#
and publishing to UP/site01/...
The problem is the site1
!= site01