Switching a tasmota'ed sonoff basic on and off

Raspi3+, Buster, OpenHAB2, Mosquitto, Sonoff Basic-Tasmota, all paper UI configs.

Installed nicely, and have Philips Hue lights working well.
Installed Mosquitto and it is up and running.
Tasmota’ed a sonoff basic and that went well.
I can control the sonoff (as in on and off) via http (
When I toggle the OpenHAB2 switch it shows the switch changing from OFF to ON
The sonoff showing a stat/tasmota_A017D/POWER
and MQTT Explorer showing a stat, but no cmnd
So, OpenHab is communicating with Mosquitto, and Mosquitto with the Sonoff. Hence I feel i have a command config problem.


(can provide logs, but limited to one picture per post!)

and advice suggestion pointers tips appreciated. I would like to get the switch to turn on and off via OpenHAB2!

How did you setup your thing and item, and could you show those to us?

1 Like

I used paper UI. Item was a simple switch

Thing isCaptureThings1

For MQTT State Topic use: stat/tasmota_AA017D/POWER

For Custom On/Open Value use: ON

For Custom Off/Closed Value use: OFF

Then, I may have missed it, but nowhere in your Item screenshot does it show that you’ve connected it to this Tasmota Thing?

1 Like

If you are using Mosquitto AND the systemBroker of openHAB you are using two MQTT brokers!

Your systemBroker Thing is not what you think it is, all.
It’s a bridge for cummunication between openHAB and the embedded (moquette) broker, for admin purposes, like broker settings.
It’s of no use at all for MQTT messages to/from external devices.
You may have named it mqtt:systemBroker:mosquitto but it has nothing to do with your actual mosquitto broker.

So in PaperUI, delete that Thing, uninstall the (misc) Embedded MQTT Broker if you have it

Start over by adding an MQTT Broker Thing to your MQTT binding, point that at your Mosquitto.

I think I am just using the external Mosquitto broker. I had the internal one installed by uninstalled and installed Mosquitto totally separately!

No, definitely the external mosquitto

Thank you hafniumzincT. I suspected it was a simple configuration setting, but knowing which one was the trick! It works perfectly. Many thanks. :slight_smile: