MQTT Help - First Time Setup for Devices

So I have flashed a Sonoff S20 and I can access the web ui for tasmota and click toggle and turn it on and off all day long. That part works.

I have configured the MQTT broker info as well and on the Hass.io/Mosquito Broker logs I can see the IP address of the Sonoff and it has connected to Mosquito.

1534567134: New connection from 192.168.0.171 on port 1883.

On my switch.yaml file I have added this:

 - platform: mqtt
   name: "Heater"
   // command_topic: "cmd/heater/power" // MISTAKE
   command_topic: "cmnd/heater/power"
   state_topic: "stat/heater/POWER"
   payload_on: "ON"
   payload_off: "OFF"
   qos: 1
   retain: true

The Tasmota MQTT setup looks like this:

I’m toggling the button in Home Assistant which shows up but nothing happening.
This is my first setup of Mosquito and first time adding a Sonoff to Home Assistant.

Thanks in advanced.

From looking at the Tasmota S20 wiki try changing your command topic to “cmd/heater/POWER”.

If that doesn’t work then open up a MQTT sniffer program (MQTTFx or such) and see what topic is being posted to when you click the on/off in the tasmota web ui.

So…
Just a spelling mistake thank goodness. After an hour of checking random things.

Wrong = cmd
Right! = cmnd

I missed that one too.

Glad you figured it out.

The MQTTFx suggestion is still a good one to remember, tho. I still use it quite a bit for testing purposes.

I was searching to download it and I looked at the console on the Tasmota page.
Just caught my eye “cmnd”

But yes I will be using that for sure as that was only Sonoff #1