Configure mqtt

Hi all,
After I managed to install hass on a nuc using image, I set up zigbee2mqtt on a raspberypi4 and I am using LAUNCHXL-CC26X2R1 where I connected 4 aqara temperature sensors.
If I go to Configuration -> Integrations -> MQTT and here select Reconfigure mqtt I have a popup where I have the IP (the same with nuc - HA) , Port - 1883 , Username which seems to be default created “homeassistant” and a random password.
How can I change this user and password because if I put something else there I get “Failed to connect”. ?

Thank you very much

You can’t and you shouldn’t. This setting is for is for home assistant to connect to the broker. In fact you shouldn’t even be asked if you are using the Mosquitto addon.

If you want to change the user and password that your devices use to connect to the broker, do it in the broker settings. Which broker are you using?

If it is the home assistant addon for Mosquitto, you go to the Mosquitto addon configuration page and change the settings there.

1 Like

I am using Mosquitto addon yes.
I am using home assistant addon yes. You mean to this config ?

“logins:
anonymous: false
customize:
active: false
folder: mosquitto
certfile: fullchain.pem
keyfile: privkey.pem
require_certificate: false”

I am not sure how to add user / pass here , I guess i have to put them between ?
Thanks

Read the included documentation tab in the addon:

Untitled

1 Like

So basically the user/pass which I will add here I have to put them on the zigbee2mqtt config as well right? Is the one that other devices connect to HA.
If yes, then the user from the configuration / integrations what is used for?

Thanks

I don’t know anything about zigbee2mqtt. Does it need a password?

If so then yes.

1 Like

I am having much the same issues. But because we have jumped ahead 3 years it looks like I am seeing different screens than what is mentioned here.
My yaml code is as follows for the broker:

logins: []
require_certificate: false
certfile: fullchain.pem
keyfile: privkey.pem
customize:
  active: false
  folder: mosquitto

I am just trying to set up a plain jane broker. With as little configurations and adjustments as needed.

When I run the command: mosquitto_pub -h 127.0.0.1 -t homeassistant/switch/1/on -m “Switch is ON”
I get the following error message:
Connection error: Conection Refused: not authorised.
Error: The connection was refused.

Not sure what I need to change or where.