MQTT Broker addon on Hassio - Unable to connect to the broker

Hi all new to home assistant. i’m having a problem trying to get MQTT working on home assistant using the addon. i keep getting the below error

i have reinstalled home assistant and tried configuring on a fresh install but same error

i can see on the broker logs on HA that my sensor is connected fine

Hoping you guys can advise me what i am doing wrong

Mosquitto Broker version: 4.2
Home Assistant version0.93.2

I have the same issue. I had this working previously, but I reinstalled my HA recently and had to configure the mqtt broker again.

I eventually got it working

  • Mosquitto Broker version: 4.3
  • Home Assistant version: 0.93.2

This was a newish setup (i.e. I never had MQTT setup before, apparently if you have the mqtt section in your configuration.yaml you should remove it before installing the new version)

Steps I took (rough):

  1. Created a new user in Home Assistant (NOTE: Username cannot be “homeassistant” or “addon”)
  2. Go to --> “Add-On Store”
  3. Under official add-ons, clicked on “Mosquitto broker”
  4. Ensure “Start on boot” is enabled
  5. In the Config card:
  "logins": [],
  "anonymous": false,
  "quiet_logs": true,
  "customize": {
    "active": true,
    "folder": "mosquitto"
  "certfile": "fullchain.pem",
  "keyfile": "privkey.pem"

5.1. Click “Save”
6. In the Network card, left all as default
NOTE: As per the documentation, I tried setting 1883 to blank to disable the insecure ports, however during setup I kept getting the “Unable to connect to the broker.” error
7. Follow steps 2 and 3 from this part of the doc
8. Click “Start”
9. Check “Logs” for any errors (should not get any)
10. Reboot Hassio
11. Go to “Configuration” --> “Integrations”
NOTE: You might see MQTT under the “Discovered” section, do not use this one
12. Click the “plus” button (bottom right) - this will allow you to setup the details manually
13. Find “MQTT” and click it
14. Configure the settings as per below:

Broker: core_mosquitto
Port: 1883
Enable discovery: [Up to You]

NOTE: The 1883 port above is where I tried to use other ports (step 6 above) but failed

Hope this helps someone

1 Like

Thanks for getting back i have followed your guide but still getting unable to connect to broker

the thing i am unsure with is the acl part
i have my access controll set up as below is this correct?

user MQTTUser
topic #

That looks correct, can you share the logs?

Other things to try:

  • Use the local IP address instead of core_mosquito as the broker (heard some people mention this worked for them)
  • Create a new user (make username all lowercase) and use this use - not sure if this will make any difference, but mine is all lowercase

Same problem here.

New install (a few hours ago)

Having the same issue…but I don’t have a new installation. Mine just stopped working. Trying to reintegrate the broker but no luck.

having the same problem. Tried the same recommendations. Whats weird is earlier today it integrated no problem but I couldn’t get my Tasmota device to connect it kept seeing the server but couldnt log on. So i tried removing the integration removing the add on. Now the integration is having the broker not found issue.

system log shows
19-06-25 11:38:09 INFO (MainThread) [hassio.auth] Success login from mqtt
19-06-25 11:38:34 INFO (MainThread) [hassio.auth] Auth request from core_mosquitto for mqtt
19-06-25 11:38:34 INFO (MainThread) [hassio.auth] Success login from mqtt
19-06-25 11:39:00 INFO (MainThread) [hassio.auth] Auth request from core_mosquitto for mqtt
19-06-25 11:39:00 INFO (MainThread) [hassio.auth] Success login from mqtt
19-06-25 11:39:26 INFO (MainThread) [hassio.auth] Auth request from core_mosquitto for mqtt
19-06-25 11:39:26 INFO (MainThread) [hassio.auth] Success login from mqtt

Tried the mosquitto with webinterface add on and created a log in credentials in the add on and now the tasmota devices connect. Still cant get discovery to work though.

This is identical to the fault I’ve been banging my head against a wall with for weeks… for me I narrowed it down to being something to do with my network but I’ve yet to find the solution…

See my post for details

I was struggling with this as well. I used most of rob196’s instructions. Everything finally worked when I decided to use the MQTT under the “Discovered” section.

everything rob196 says above works, except for the broker name.

With the MQTT docker addon, the name is core-mosquitto. Not core_mosquitto.

1 Like

It’s been a while since anyone has posted but there doesnt seen to be an answer anywhere, so for anyone else browsing who has the same code/error, try:

  active: false