ITEAD Sonoff switches and sockets - cheap ESP8266 Wifi+MQTT hardware

Thank’s!
found there a blog entry from David Graf :+1:
secret revealed…
MQTT Arrives in the Modern openHAB 2.x Architecture

Hello everyone
I went crazy all afternoon behind this problem, I can’t see the ON OFF payload on OH2, I use Mosquitto as a broker.
The card is a NODEMCU with Tasmota 11, I need it to read the status of an MQ2 sensor (digitally) to detect any gas leaks.
The sensor is connected to the GPIO2 as Switch1. With MQTT.fx I read the payload ON / OFF … then the broker reads the payload. But not OH.
ITEMS:

Switch sensore_caldaia        "sensore caldaia "                        <sensore_fumo>	 (sensori)    		    {mqtt="<[mosquitto:stat/locale_caldaia/SWITCH1:state:default]"  }```

sitemap:
Switch item=sensore_caldaia	

rule:
rule "sensore gas caldaia"

when
Item sensore_caldaia changed  
then
   if (sensore_caldaia.state == ON ){
    Thread::sleep(3000)
	if  (sensore_caldaia.state == ON) {
	postUpdate (ON)
	playSound("RedAlert .mp3")
	Thread::sleep(1000)
	playSound("attenzione_fuga_di_gas_nel_locale_caldaia.mp3")	
	sendTelegram("bot1", "ALLARME LOCALE CALDAIA!")
	
	     }
   }   
  if (sensore_caldaia.state == CLOSED && timer === null) {
    timer = createTimer(now.plusMinutes(5)) [|     
	timer = null
	]
	postUpdate (OFF)
  } 
end

I ask you for help, thank you, sorry for the mistakes but I'm pretty tired

This is an rather old thread, you should have started a new onle for your problem!

Which MQTT binding are you using? The itme uses the Version 1 Syntax, confirm you are using this binding!

The syntax in your rule has several probems, solve those after the initial problem is cleared!