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"
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.