Hi all, I have not found too much in the forums about Mosquitto bridge setup. Which might mean its really easy and no one has any issues
However I have been going through trying to set up a Broker and Bridge so two independent home assistant instances can share a small number of topics. Unfortunately Iām finding its not working for me yet.
Tiny bit of background for WHY use a bridge. I need to reduce and tightly control bandwidth use. Every bit and byte counts. The connection will be over mobile data with a low cost IOT sim card. So Iām looking to regulate the bit count carefully.
I have two Mosquitto test installs up and running. one on a Raspberry pi the other on a VM. MQTT Explorer connects perfect in each case.
A topic has been created on each eg homeassistant/sensor/test
homeaassistant/sensor/test2
and some small value added as payload.
On the bridge side:
The mosquitto.conf has a valid username and password (tested in MQTT explorer and the same values for both bridge and broker)
The IP address is for a VPN connection. (Tcailscale. And I can see the port 1883 is used. I cant see packets but its noted as a used port by both installs)
Customize section is set like this:
active: true
folder: mosquitto
logins:
- username: fred
password: "<pass>"
certfile: fullchain.pem
keyfile: privkey.pem
require_certificate: false
I have the password in quotes " " since it has a special character in it that may get interpreted strange.
mosquitto.conf has this:
connection bridge-1
address 100.127.132.116:1883
topic # out 0
topic # in 0
remote_username fred
remote_password "<pass>"
allow_anonymus true
log_type debug
I have confirmed the mosquitto.conf file is being read. Logs tell me and I can change the log level to debug etc.
on the Broker side I have a the same Customize section as above.
Again the mosquitto.conf file is being read as I can see in the logs and I can change the log level.
The conf file on the Broker side just has:
log_type debug
The acl.conf file has :
acl_file /share/mosquitto/accesscontrollist
and accesscontrollist has :
user mqtt
topic reaadwrite #
user addons
topic readwrite #
user fred
topic topic readwrite #
user homeassistant
topic readwrite #
I do not see the type of connection log records for fails or success I would like to see. I dont know what they should look like exactly but I would expect to see something referencing one instance being connected to by the other or attempting and failing.
I do not see the topics from on appearing on the other either. Using MQTT explorer to watch this.
What am I missing ?
Thanks for anyone with the patience to look over this.