I have got a new Home Assistant Green. I am trying to install Zigbee2MQTT for my Sanoff USB Zigbee dongle. At the moment this dongle does not work.
I have a question to the MQTT configuration. In some posts I found that I don’t have to create and specify some user in MQTT. (Some default users will be used). Other documentation suggests to create a new user and use it in the configuration for both MQTT and Zigbee2MQTT.
What is the current answer for the current version of Home Assistant? Do I have to create a user and specify it in both MQTT and Zigbee2MQTT configuration?
Yes and no.
If you are using the Mosquitto MQTT broker add-on, then yes it has to use user/password authentication for clients to connect to it.
If you are using any other broker then most likely you will not have to use authentication, but it is a good idea.
Saying “this doesn’t work” doesn’t help us help you.
Look at the errors from Z2M. One of those error lines will tell you to check Zigbee2MQTT fails to start/crashes runtime | Zigbee2MQTT. Right below it is the exact error which you can find on that page.
Spoiler alert: it’s usually because ZHA has been autodiscovered & you need to disable/ignore it for Z2M to work.
This is Mosquitto MQTT broker with Zigbee2MQTT. I use Sanoff Dongle Max over cable. I can connect to this dongle using its static IP address and see the Sanoff configuration website. But there is no error in Zigbee2MQTT log of Home Assistant. There no message about successful configuration. So I was trying to do my basic work and re-check all components.
This my first Home Assistant installation with Zigbee2MQTT, that’s why I am not sure, if the error is in Zigbee2MQTT or already “before” it in the wrong configuration of Mosquito MQTT broker.
Thanks for the hint with ZHA discovery. I “ignored” it.
If you don’t see any errors in Z2M, then check if you have homeassistant: true in the Z2M config. If you already do, then it might be indeed a MQTT user issue, but I believe that would cause an error in the logs too.
Can you control your devices from the Z2M interface directly?