Sonoff RF won't connect to HA MQTT

Hello,

after I was trying 6 hrs yesterday to connect my Sonoff RF Tasmota, I quit and going to ask the nice community for some help. I tried all types of confifurations without success, but I am also really new to all of this.

Here is my setup:

Synology DS916 running HA v69.1 in Docker
Sonoff RF running Tasmota v5.91

Thanks in advance…

It looks like HA is having difficulty contacting your mqtt server. Your sonoff is probably connecting fine to the mqtt server.

I found when up setting mqtt devices, its handy to use a mqtt client on my machine. Google chrome has one built in as an extension or there are a lot of stand alone programs. I then subscribe to my sonoff topic with the wildcard # to get all the mqtt traffic or just subscribe to all topics on the mqtt server if its not too busy.

image

It says connection failed? I know it might sound stupid but is the IP correct? Can you ping the IP address?

And like RobDIY said, have you tried to use any other MQTT client to connect to the MQTT server? Do you have other devices that use MQTT?

List of MQTT clients

Sorry for all the question but with this little information is hard to guess :slight_smile:

Yes the IP is correct and I also can Ping it. I dont have other MQTT Clients or server to try. Right niw I am tryinf to setup a Mqtt in docker to see how this works.

Just ried with Mqttlens. Also no connection at all.

Ok, dumb question: Is the Docker Image based on Hass.io? I haven’t used Docker (yet).

If it is based on Hass.io, did you activate the MQTT Server? Hass.io Mosquitto Add-On

it’s image based running in docker.

Do you have an entry hass.io in your side bar? Like in this screenshot?

No. I am not using hass.io.

OK, did you install a MQTT Server somewhere? Home Assistant does not come with a MQTT Server by default.

I added to the configuration file from HA the mqtt:

Thats it. like I understood this will already run all i need. Correct?

When you run Hass.io, you can install a MQTT Server as an add-on. Without Hass.io, you have to manually install the MQTT Server. It’s an extra piece of software that needs to be installed first. The configuration in configuration.yaml only tells HA where to find the server - but it does not install or run the MQTT server.

I got it thanks. Problem I cant find any explaination how to install hass.io on Synology.

This is correct. To set up the embedded broker, you just need the following line in your configuration.yaml

mqtt:

It is limited in functionality, but will do the job to get you going. You do not need hass.io. See this page

Edit:
The default configuration for the embedded broker is here.. As you can see, if you just have mqtt: in the configuration file, the user is homeassistant, so you need to set that as the user in your sonoff. Everything else looks ok, but try that first.

1 Like

Thx gpbenton. That was the glue. I totally missed to see this. So my fault was I did not put the User (homeassistan) and my API Pasword. After inserting this to my Sonoff, connected directly. Thanks everybody for the help…

1 Like

Sorry for my faulty information then :slight_smile:
I thought the MQTT broker was only available in hass.io - guess I learned sth. new as well!

No problem Daniel. At least you tried to help :wink: