HA Discovery of a Tasmota Generic device

I have 4 Sonoff S31s flashed with Tasmota, in which I SetOption19 to on, and HA immediately picked them up. Worked great.

Now I’ve got a single NodeMCU, configured as a Generic module, which has a sensor, a switch, an analog inpit, and an RGB led set up. All of them appear to work correctly on the device. As usual, I enabled discovery with Setoption19 1 but the device doesn’t show up in HA. I used the same mqtt settings as I did for the Sonoffs, and I can see the packets from this device being posted on the mqtt broker (using a separate app to monitor the broker). They appear to be formatted the same as the Sonoff packets.

Googling, I have found several posts about similair issues with Generic modules, but no solutions.

So, does the Generic module work with HA discovery? Am I missing something?

I can probably do manual setup, but I like to keep the devices consistent if possible.

Is there a specific module setting you need to make in Tasmota?

I just saw a post today which suggested that if you set up the devive type in the tasmota web ui to sonoff-basic, then setoption 19 then switch it back to generic, the setting will stick.

I’m not sure I understand the question. I have the module set to “Generic”, as it’s a NodeMCU with some sensors and such attached (It’s basically the Bruh DIY Multisensor), so I need access to the various GPIO pins.

There’s 2 generic options… did you try them both?

Hold on you have a thread open on this topic already, please do not open new threads all over the place. Tasmota discovery. And I think the appropriate place for this is the tasmota support.

Yeah, just saw that last night. It took a bit more than that, but yes, that did it. I ended up reflashing fresh firmware, changing the device name, setting it to Sonoff Basic, turning on SetOption19. Then HA found it. After that, I was able to change it to Generic(18) and set the GPIO pins.

Thanks!

I didn’t start the other thread, just asked the same question there. Then decided to ask a more detailed version of the question in a new thread. If this is not a permitted usage, my apologies.

Had similar issue, that is the device wouldn’t appear in HA after a reboot

Not sure why they’re not getting discovered despite having MQTT discovery enabled in HA but this solved it for me:

The only difference,added a delay before the above was executed.

1 Like

I have that automation set already, from my prior Sonoffs. The soluition seems to be to set it to Sonoff Basic, then turn on SetOption19

I will leave this comment here in case it helps someone. i was having problems trying to get a generic device to work with discovery. It turns out that because I flashed the device with tuya convert that the standard firmware that it loads doesnt work with discovery (sonoff-basic and sonoff-classic) you need to update the firmware with sonoff.bin . Hope this helps some people, it frustrated me for several days. FYI it is written in the tasmota page but I must have missed it.

1 Like

Thank you! 2 hours into trying to get mine going after flashing over some power plugs with tuya convert and now they’re working.

It appears that for HomeAssistant (HASS) to detect switches as a binary sensor (input) I had to use

setoption114 1

so they would autodetect. Versions: tasmota 11.1.0.1(sensors) Home Assistant 2022.4.6
I also fought this for hours.