Sonoff Tasmota MQTT Error

Hi,

As per a recent post, I am a newbie to all this, but am learning!!
I have managed to get my Sonoff switch flashed with Tasmota and set up my Raspberry Pi with Home Assistant / HassIO. Both seem to work fine. However, I can’t seem to get the MQTT to connect the sonoff device without getting this message;

1570126574: New connection from 192.168.1.92 on port 1883.
1570126574: Socket error on client , disconnecting.

MQTT on the sonoff is setup as follows;

and the MQTT is the HA Configurator is;

image

What am I missing?
Thanks in advance for any help. If you need anymore information just let me know

I suggest that you install a Mqtt client like mqtt-fx, Mqtt explorer, Mqtt lens, … and see if you can get connection this way. Should give more useful information.

Hi francisp,

I’m using the Mosquitto MQTT thats provided as an add on in the Home assistant. Are you saying I should use a different one?
Would this be an add on from the HassIO tab in Home Assisatant or do I need to do something different?
Apologies for the daft question, but as I say, I’m quite new to this stuff

Are you using the Mosquitto MQTT addon broker, or the embedded broker? (note the embedded broker has been marked as deprecated)

Have you created the ACL file list as per the warning form this page?

direct link to ACL instructions.:

Hope it helps.

You have test as username in the credentials, but used Test (capital T) in tasmota. Might that be it?

Hi Akriss & Prankousky,

Thanks for your responses. I’ve worked through your suggestions, and think I’m getting somewhere. However, I’m not quite there yet.
Looking at the MQTT Log (from the Add On page) it looks like the sonoff is connecting to the MQTT;

1570134198: New connection from 192.168.1.92 on port 1883.
[INFO] found test on Home Assistant
1570134200: New client connected from 192.168.1.92 as DVES_068CAF (p2, c1, k30, u’test’).

Having set up MQTT in integrations, it does not seem to show the device ie the sonoff, (but maybe its not supposed to?).

But I cannot see the Sonoff switch anywhere within Home assistant?
Any ideas what I’m missing?

Thanks again

Have you set the tasmato’d device to enable auto discovery?

SetOption19 1

more info here: https://github.com/arendst/Sonoff-Tasmota/wiki/Commands#setoption-overview

And make sure the check box is checked for Discovery in the Mqtt integration from Hass’s integration page.

Hope its of help.

Hi Akriss,

Funnily enough I managed to find the same answer here;

That seems to have done the trick!! I can now see the Sonoff in the Home Assistant Overview page and can operate it too. So Thank you very much!

There are still a few things I’m not understanding about the command side of things, but will play with what I’ve got for now and hopefully I’ll learn a bit more.

Thanks again!