As per pic I can see the full SENSOR MQTT string being returned on control page of Paper UI, but can’t for the life of me figure out syntax to get just temperature reading presented. I did try mqtt.things file but no joy.Using a Wifi8266 with Tasmota and DHT11 sensor attached.
MQTT broker is mqtt:systemBroker:MQTT2Thingbroker
Wifi8266 is labeled Tasmota_87_26-2 mqtt:topic:9e5040d6 showing as online.
I created a channel called Temperature1 - mqtt:topic:9e504d6:9e50406:Temperature1 type is String
Incoming Transformation Value set to JSONPATH:$.temperature
I have tried numerous variants on this including “JSONPATH:$.tele/tasmota_0D354A/SENSOR.DHT11.temperature” etc etc
Temperature1 is linked to Temperature-N (Tasmota_87_26_Temperature) type is Number.
Also did try type as String which is when I get the full SENSOR output being displayed including Temperature.
Please someone put me out of my misery
I’m assuming it is possible to do this all via PaperUI and I don’t have to use txt files, was going to move towards those once I got this working in any case.
Well done on getting it working! For completeness, when/if you do move over to using files, the syntax I showed is the correct one for your eventual temperature channel.
Thanks, unfortunately in "tidying the Paper UI I’ve managed to kill in again…everytime I add the JSONPATH($.DHT11.Temperature) to the Thing it gives the
“Error - offline message” if I put “JSONPATH($.DHT11.Temperature)” I get the full string back with Temperature and everything…
One question, when you link a thing to an item I see there is a transformation code component there which has JSON path Transformation and a example with $.device.status.temperature is the what I should have in there and be using the JSON transformation or is this where I’ve messed up perhaps?
Sorted just had used $.device.status.temperature as per the example however it needs to be a capital T in temperature so changing to $.device.Temperature did the trick. Thanks for the support!
Maybe interesting for others with similar problems for a tasmota device with a SI7021 sensor attached.
This is the working setup for MQTT.
I am just one step ahead and trying to include the same device using “setoption19 1” to get the automatic detection up and running. After setting this command this is shown and detected as a homeassistant device and of course I am struggling to get the sensors working:-)
I just opened another topic for this issue.
works now, for others maybe interesting when using a TH03 with a SI7021 sensor
Items:
Switch TH03 {channel=“mqtt:topic:5f4a663f:TH03”}
Number TH03TEMP {channel=“mqtt:topic:5f4a663f:TH03Temp”}
Number TH03HUM {channel=“mqtt:topic:5f4a663f:TH03Hum”}
Sitemap for the sensors:
Text item=TH03TEMP label=“TH03Temp [%.1f °C]” icon=“temperature”
Text item=TH03HUM label=“TH03Hum [%.1f %% ]” icon=“humidity”