CloudMQTT bridge in Mosquitto broker

I have searched a lot of topics but couln’t find the solution to my error. What I have is the Mosquitto core add on from Hassio and set up a password and username. Everything is local so I have no SSL.

In CloudMQTT I created 3 users, were two users for the phones in our home and one for Hassio. The phones send locations from Owntracks to CloudMQTT and that works, I can see the incoming messages. And when I use a MQTT subscriber tool on the computer I can even monitor the messages when logging into the adress:sslport from cloudmqtt and subscribe to #hass-io

Now i created the file in share/mosquitto/cloudmqtt.conf with the following:

connection cloudmqtt
address xxxxxx:xxxxxx
remote_username xxxxx
remote_password xxxxxx
clientid xxxxxxx
try_private false
start_type automatic
topic # in

That get’s me the following error everytime I restart Mosquitto:

Connecting bridge cloudmqtt (xxxxxxxx:xxxxxxxx)
Socket error on client xxxxxxxxxx, disconnecting.

What I found is that it maby has something to do with the authentication, but I just can’t find the solution for it to get it to work.

I hope someone else knows what i’m doing wrong.

What version of mosquitto are you using? I had an issue because the bridge config changed with the latest version, so the docs didn’t match what I needed to do. I thought I had the latest version because I was on raspbian jessie, but there was a newer version available for raspbian stretch.

1 Like

Thank you for your reply. I’m using version 2.0 from the addon for Hassio. I’m using the image for hassio and not a raspbian image. I don’t know exactly how I can update mosquitto.

This was fixed by using some extra rules extra in my config:

connection cloudmqtt
address xxxxxxxx:xxxxxxx
remote_username xxxxxxxxxx
remote_password xxxxxxxx
clientid xxxxxxxx
try_private false
start_type automatic
notifications false
cleansession true
bridge_cafile /etc/ssl/certs/ca-certificates.crt
bridge_insecure false
bridge_protocol_version mqttv311
topic # in

1 Like