I have a RPI 4 running Home Assistant Supervised. Using the supervisor I added the Mosquitto broker add-on.
The overall plan, is to design some devices of my own and connect them to HA.
In the purpose to understand more I downloaded a Mqtt client app to my tablet.
Using this app I can connect to the Mosquitto broker but I can’t either subscribe neither publish to any topic on the Mosquitto broker. The response from the Mosquitto broker is always “refused”
The configuration file in the supervisor panel looks like this:
Did you create a user in the home assistant mqtt integration?
I think local anonymous logins were disabled in version 5 of the addon.
So either create a user when adding the Home Assistant MQTT integration (noting the one username you cant use as specified in the Mosquitto addon docs) or add a local user in the addon config you’ve shown above.
Okay, I found another way to do it. I just added a user to HA, and then used that user in the tablet app when I connect to the broker.
Regarding requirement to login to the broker.
I was planning to use WPS to connect my small devices to the wifi netwwork and then just let them search for the home assistant using mDns.
Now I must provide them with a hardcoded user/password or create some kind of configuration process.
Do you have any ideas how to handle this in the simplest and most robust way ??