Sonoff Mini auto discovery

Hi everyone
I’m new HA and I’ve had problems with the Mqtt Broker addon auto discovery feature with a Sonoff Mini device.
I found a lot of heated discussions about the mqtt integration in HA but nothing on here about my solution… if I’m wrong please let know…
The sonoff Mini would not show up in mqtt broker integration until I added the correct sonoff mini template https://blakadder.github.io/templates/sonoff_mini.html
So the setoption19=1 is important but its also crucial that the device flashed with tasmota has the correct template that matches the device.
Is there any high ranking members that could add the info to the Hassio Mqtt Integration documentation, would save some time for new members.
Thanks to all for contributing to this community
Nicko

1 Like

Hey, Nicko, I’m actually having the same issue now. I do have a couple of Sonoff Pow R2 - working normally with MQTT auto-discovery and some Sonoff Mini’s which do not work with auto-discovery.

  • Latest HA - 0.101.3
  • Sonoff-Tasmota 6.7.1
  • MQTT is enabled
  • MQTT logs show proper telemetry
  • SetOption19 is “ON”

I’m going to try for a bit more, but i’m not 100% sure that template is or is not relevant atm.

If you flashed the sonoff mini OTA, it will be using sonoff-basic.bin. That version does not support autodiscovery. Go to the tasmota console and upgrade to sonoff.bin. Then do ‘setoption19 1’

Hi Francis
Your right the basic.bin does not allow settings to be changed.
The last thing that finely worked for me was the template tried all possible ways and nothing worked until i pasted the template into the web console.
Thanks

Hi Alexandr
I tried for 8hrs to get the son mini the auto discover in HA the one thing that worked was copying the line of code on the template page and pasting it in the web console in the sonoff mini.
setoption19 1
restarted the mini
and restarted HA
And bang there it was.
This guy on youtube helped me https://youtu.be/KOg5qwO3Rh4

You mean like step 3 of the tasmota setup instructions

1 Like

There’s nothing magical about the templates. It is important to select the correct (discovery capable) firmware to use discovery and then selecting the right module type (which is similar to the template) to set the right outputs. I made my own templates as the Blackadder one was setting stuff I didn’t need or use…

Hi,

I am also struggling with this one… sonoff mini flashed with tasmota…all ok and connected with mqtt broker (in log of broker says connected), but home assistant does not discover it.

Did you enable discovery in Tasmota? (SetOption19 ON)?
Which firmware did you flash? Is it one that includes Discovery?
Did you add the MQTT integration and check the box to enable discovery?

I did enable discovery by setoption19 1. I flashed sonoff-basic.bin…where can I see if that one includes Discovery?
mqtt integration is working fine for my other devices (15 other zigbees using zigbee2mqtt). As i read in documentation that one is enabled by default isn’t? if you put write discovery: false in configuration.yaml then it is disabled.

That one definitely does not include discovery

I installed tasmota-lite.bin and then tasmota.bin
Discovery now works.

4 Likes

Hello,
first of all I would like to state that I’m quite new on HA, but in the meantime all my HA integrations works, also Tasmota, besides the SonOff Mini R2s.
I tried several firmwares and everything mentioned ablove.

Maybe someone here can tell me which formware is the right one for auto detection?

Would be very helpful, thx
Christoph