MQTT, Home Assistant, Mosquitto: Connection Refused

Dear All!

I promise, I did my Google research before posting this:
I use home assistant with the MQTT add on.
I try to configure my MQTT Broker to bridge to the TTN MQTT broker.

Here is an error-message I receive:

Connection Refused: unacceptable protocol version

Anyone had this issue and has a solution for me?

Thanks a lot!
Albert

My config for MQTT Broker:

# Bridge to The Things Network
connection bridge
address eu1.cloud.thethings.network:1883
bridge_protocol_version mqttv311
remote_username xxx
remote_password xxx
# topic # both 0 ttn/ APPID/devices/
bridge_insecure false
topic # out 0
topic # in 0
cleansession true

The log message:


1647188389: Connecting bridge bridge (eu1.cloud.thethings.network:1883)
1647188389: mosquitto version 1.6.12 running
1647188389: Connection Refused: unacceptable protocol version
1647188389: Socket error on client local.core-mosquitto.bridge, disconnecting.

Can you try a vanilla client - like MQTT Explorer - that will verify all the credentials, details etc and let us know how you get on.

If they work OK, we can look at the details of your Home Assistant - but to cut to the chase on that bit, is it up to date and what MQTT version does it support?

Hello!
Thank you for getting back to me on that issue.
I have already tried with MQTT Explorer with the same credentials and it works.

In Home Assistant I use the most recent versions.

MQTT add-on 6.0.1
Home-Assistant 2022.3.4

I appreciate that you try to help me with this.

Thanks

Albert

Even if the message indicates that the bridge is not possible I do receive MQTT messages…

… to be continued :slight_smile:

This post was moved from another topic because double-posted.

Don’t double-post!

bluejedi


Dear All!

Here is my mqtt.yaml - and the config I have in my mqtt.conf…
However the bridge to the MQTT Add-On is not working. I opened another thread as well for that.

addon config (yaml)

logins:
  - username: xxxxx
    password: xxxxx
  - username: xdddd
    password: sdfsdfdsf
customize:
  active: true
  folder: mosquitto
certfile: fullchain.pem
keyfile: privkey.pem
require_certificate: false
anonymous: false

on HA /share/mosquitto I stored a file Mosquitto.conf

# Bridge to The Things Network
connection bridge
address eu1.cloud.thethings.network:1883
remote_username user@ttn
remote_password NNSXSxxx
bridge_insecure false
topic # out 0
topic # in 0
cleansession true

Here is the error-message I receive in the MQTT Log

1647371076: Connection Refused: unacceptable protocol version

Any feedback appreciated

1 Like

@Adandl

The error message in your log:

1647188389: Connection Refused: unacceptable protocol version

Does not match the configuration you show in the top post:

bridge_protocol_version mqttv311

In your double post (post right above) the bridge_protocol_version is missing which can explain the error message but it does not match the configuration that you show on top.

You should now (with protocol version specified) probably see a different error message which is not shown in your posts. FYI: Filename should be mosquitto.conf (all lower case).

A possible solution for your problem was already described here:


Use the Forum Search option to find information on the forum.

I struggled with the same “unacceptable version” error, adding the bridge_protocol_version got rid of that error for me, thx,

However, i still get connection errors. A test with mosquitto_sub in Home Assistant Terminal worked fine, from my perspective the issue seems to be with the Mosquitto Addon itself.

Hello - this is my current (working) configuration:

MQTT - Config in HA (snipplet)

customize:
  active: true
  folder: mosquitto

mosquitto/mqtt.conf

# Bridge to The Things Network
connection bridge
address eu1.cloud.thethings.network:1883
remote_username ********@ttn
remote_password *******
bridge_insecure false
topic # out 0
topic # in 0
cleansession true
#autosave_interval 30
#autosave_on_changes false

I still get this message in the logs, but apparently has nothing to do with TTN-MQTT, because I receive all messages.
A hint - use MQTT Explorer to debug the messages

Kind regards
Albert

1 Like