Sonoff basic running Tasmota in OH2

Hi All,

First time user of these products.

Ive got my Openhab2 and MQTT broker working as a service.

Ive flashed Tasmota onto my sonoff basic and can toggle the power to the Sonoff via the web browser.
Attached is the output of my Sonoff MQTT information

For some reason, I cannot toggle the relay via openHab2 site map. Ive created the items and sitemap and I can see the switch but I cannot triggle it. Commands to the sonoff via the console work fine. Please help :frowning:

item:

Switch GarageAVReceiver “Garage AV Receiver” (LR,gLight)
{ mqtt=">[localhost:cmnd/garage/POWER:command:*:default],
<[localhost:stat/garage/POWER:state:default]" }

sitemap:

Switch item=GarageAVReceiver        label="Garage AV Receiver"         icon="light"

Output from Sonoff Tasmota console:

netstat from Broker/OpenHab2 machine (192.168.0.3)

C:\Users\sydney desktop PC>netstat

Active Connections

Proto Local Address Foreign Address State
TCP 192.168.0.3:1883 KK:50819 ESTABLISHED
TCP 192.168.0.3:1883 KK:51246 ESTABLISHED
TCP 192.168.0.3:1883 192.168.0.240:3865 ESTABLISHED (THIS IS THE SONOFF)
TCP 192.168.0.3:3389 KK:64747 ESTABLISHED

![mqtt|243x500](upload://wgdX0IHqmO66aDUdNv7Zc8smcXN.jpg)

Can you post your mqtt.cfg file (It is in the services folder), please?

1 Like

Pretty sure the given name for the MQTT broker is not “localhost”!

1 Like