Sonoff Tasmota mqtt configuration

I am very new to programming so this will probably be very simple to solve!
I have put the Tasmota firmware on a Sonoff TH16, this went well and is working fine.
I use Node Red on another Pi and am able to subscribe and recieve messages from the sonoff, so I know that side of things is working.
The problem I am having is getting OpenHAB to see the temperature from the sonoff.
Configured item as

Number Sonoff1 "Sonoff: Temperature [%.1f °C]" (gTemperature)
{ mqtt="<[mosquitto:tele/sonoff1/SENSOR:state:JSONPATH($.AM2301.Temperature)]" }

and in the site map

Text item=Sonoff1 label="Livingroom [%.1f °C]" icon="temperature"

Where am I going wrong?

So if you subscribe from another client (not HestiaPi) to


do you read the values?
If yes, stop the OpenHAB running in the background as a service and start it in debug mode
If you do receive the temp correctly, backup those 2 lines in the items file (/etc/openhab2/items/default.items) and start trying to integrate the temp value received via MQTT in the “MyTempProxy” variable.

String MyTemp "Temperature" <temperature> { channel="exec:command:gettemp:output" }
Number MyTempProxy "Temperature [%.1f °C]" <temperature> { mqtt=">[mosquitto:hestia/local/temperature:state:*:default]" }

Please note the reference:


is linking to a “thing” item (/etc/openhab2/things/default.things) linking to the actual script that reads the value off the sensor.

Sorry I cannot be of any more help. Don’t have a TH16 anymore.

Got it working.
Not sure exactly what was going wrong!
As the mqtt appeared to be working ok for other things I thought it must be specific to the sonoff messages.
The Tasmota instruction say to install MQTT binding, MQTT action and the JsonPath transformation.
I had done that (already had MQTT binding installed).
I think the message from the sonoff contains some JSON ? so I suspected the JsonPath transformation had not installed correctly.
I uninstall and reinstalled JsonPath but nothing changed.
So I decided to uninstall and reinstall MQTT binding, now it works ok.

Please share here your items and sitemap to save others the trouble!
Well done :wink: