MQTT discovery help

I have devices reporting their state in MQTT. I have HA setup to connect to MQTT.
And I enabled debug logging in Home Assistant for homeassistant.components.mqtt. With debug logging on, I can see the messages in MQTT show up in the HA logs.

My problem, is how do I now see those devices in HA?

I tried creating a switch in the configuration.yaml that matches the device in MQTT, but it still doesn’t appear.

What am I missing?

Do you see your switch under developer tools -> states ? If so, you can use it. Manual configured mqtt devices don’t show under entities or the mqtt integration.

I see the manually configure switch in developer tools > states. But I don’t see all the MQTT switches in dev tool > states. Should I see the MQTT ones?

You should see the MQTT ones

Post its configuration here so we can review it.

Sorry, I’m stealing this thread because it seems close to my issue… last night I got tasmota on a couple switches… I’ve never done anything with MQTT lights/switches before… I did SetOption19 and HA added sensors for the RSSI of each… am I reading correctly that it should also be creating the switch entities automatically? I have no idea what I am missing… I definitely need to do a little more reading but wanted to make sure that it is supposed to be making the switch entities automatically.

A good troubleshooting tool is MQTT explorer. Just add your HA mqtt server info and you’ll be able to see all the messages from your devices.

How did you configure them in Tasmota ?

I do have mqtt explorer, sorry about the screen shots but I’m guessing that’s the easiest way to show you since im not really sure what exact info you need…

12 PM

In looking at some other examples… should the topic just be Tasmota for all of them? and all future switches will come up under same topic? I was confused about that.

and these came up under the MQTT integration:
34 PM

IF you want to post a screenshot, post the screenshot from ‘configure module’. I suspect there is no switch defined in Tasmota.

The topic should be different for each switch.

That was it… thanks so much… it’s an off brand that I don’t see listed exactly, would the ESP switch be fine and just find out what actually works? The entities showed up as soon as I selected one and cycled option 19 off and on.

This is a great site to find your device :

Thank you, I also found this https://tasmota.github.io/docs/#/installation/Initial-Configuration in my search for info on the MQTT discovery… it also contains the step about the templates/module that I had missed… I should have been using instructions from the source rather than whatever guide I had found. Thanks again!

Gonna hijack this one.:slight_smile: I’ve tried setting up a new R2 Sonoff switch with Tasmota and I have several already working. I can’t seem to get the new one discovered in HA. SetOption19 is 1, I see the messages getting sent in the Tasmota console for the new switch both in the honmeassistant and the stat topics. I also looked at MQTT explorer and see them there.

The Module Config has a switch set (GPIO14 sensor is Switch 1 (9)). I’m at a loss. Running 0.108.1 and Tasmota 8.2.0

Any thoughts?

Set SetOption19 0 deleted it with MQTT Explorer out of the homeassistant path. Restart HA and then go for
SetOption19 1 again. Sometimes it didn’t work for me too, this is helping me

Greeting