MQTT sonoff don't update

Hi all,

I have a new Sonoff Mini R2 flashed with Tasmota firmware 3.6.0.
I also have integrated it in openHab using MQTT binding and Mosquito.

I can turn on and off my switch from openHab, but if I change the status outside openHab (for example from tasmota web interface or using a phisical switch) I can’t get the item updated in openHab.

This is my things configuration.

Bridge mqtt:broker:myMqttBroker [ host="192.168.1.11", secure=false ]

Thing mqtt:topic:mythings "AllThings" (mqtt:broker:myMqttBroker) {
    Channels:
    Type switch : PowerSwitch "Mini" [ stateTopic="stat/sonoff-switch/POWER", commandTopic="cmnd/sonoff-switch/POWER"]
}

I have configured an external client to see the messages, this is the output:

stat/sonoff-switch/RESULT {"POWER":"ON"}
stat/sonoff-switch/POWER ON
stat/sonoff-switch/RESULT {"POWER":"OFF"}
stat/sonoff-switch/POWER OFF

Where is the problem?

Thanks

One thing that I noticed when comparing my config to yours is that I have an open curly brace after the bridge but before the first Thing definition. I don’t know if that is an issue but you might try adding a curly brace pair around your Things. Here’s a sample of what I have.

Thing file

Bridge mqtt:broker:MqttBroker [ 
       host="192.168.0.5", 
       port="1883", 
       secure=false,
       username="xxxxxxxx", password="xxxxxxxx",
       clientID="OpenHab"]
{
Thing topic FireplaceThing "Fireplace" {
    Channels:
        Type switch : power   "Power"  
  stateTopic="Fireplace/stat/POWER",commandTopic="Fireplace/cmnd/POWER"]
    }
}

Item

Switch Fireplace  "Fireplace [%s]"  {channel="mqtt:topic:MqttBroker:FireplaceThing:power"}

Jim