MQTT working on some devices but not on others. Settings are exactly the same

UPDATE:
I managed to get this sorted.
I reinstalled the MQTT server and broker as well as created a new user specifically for MQTT.
Took a bit of time to reconfigure the rest of the devices, but all good now.

Hi Amazing people of Home Assistant

I’m about a month into my HA and Tasmota journey and been able to setup a great system using the forums and tutorials that are so graciously provided.

I have a mix of about 20 sonoff devices running Tasmota. They all connect seamlessly to MQTT with the exception of 5 devices.

I was getting an error “MQT: Connect failed to homeassistant.local:1883, rc -5. Retry in 10 sec”

I’ve searched through the forums with no luck until a friend helped me with a solution. I changed the host from host name to the host IP address.

This resolved the issue for 3 of the devices but on the remaining 2, I’m now getting an error “MQT: Connect failed to 192.168.5.186:1883, rc 5. Retry in 10 sec”

According to the error codes this is caused by “the client was not authorized to connect”

I’ve reset the devices configuration, reconfigured the module, force changed the IP address and numerous other attempts to get the settings right.

In the beginning when I was setting up HA these devices were working on MQTT, but for some reason I deleted them. I have a feeling that their MAC address’s are being blocked by HA.

Is there perhaps a config file that does this and I can remove the block.

I’m at my wits end with this and I know its probably a small configuration issue.

Please Please can a smart person out there look at this and help me continue with my journey.

Thanking you in advance!

1 Like