Hi all,
I am having some problems with a Sonoff TH10. I get the relay to switch on and off and I can see the status in OH but I cannot get the temperature to display.
My item :
Number temp "Temperature [%.1f °C]" <temperature> (GP) { mqtt="<[broker:%kitchen%/sonoff-AA1/SENSOR:state:JSONPATH($.DS18x20.Temperature)]" }
First thing I’m seeing that is a bit odd is “%ktichen%”. There shouldn’t be any percent characters in your topic. You probably did a mistake while configuring the Sonoff. The real issue: Your jsonpath selector is wrong. It has to be $.DS18x20.DS1.Temperature
Btw. Next time please remember to put your code into code fences.
Hi Thom,
Thank you very much for the reply. I have changed my MQTT topic to sonoff-AA1 and my Full Topic to kitchen/sonoff-AA1 but I still get no temperature reading on my sitemap.
My item code is :
Number temp "Temperature [%.1f °C]" <temperature> (GP) { mqtt="<[broker:kitchen/sonoff-AA1/SENSOR:state:JSONPATH($.DS18x20.DS1.Temperature)]" }
ans my mosquito is like this
kitchen/sonoff-AA1/SENSOR {"Time":"1970-01-01T00:27:40","DS18x20":{"DS1":{"Type":"DS18B20","Address":"28FF9D31A21603C9","Temperature":19.9}},"TempUnit":"C"}```
Do I need to configure anything else besides from the item file code and the sitemap file code ? As I said, I can see the switch function and feedback.
Best regards
Brian Holst