MQTT JSONPath Transformation to extract values from multiple DS18B20

Hello Folks,

I am a silent reader sice few months.
My home automation is growing week by week. A lot of function I could implement by using this forum or other sources.
But now I am at a point where I need some support from an expert.

I am using a nodeMCU with tasmote FW and 3 DS18B20 Temp. Sensors.
All the sensors are connected to one GPIO.

So the MQTT topic contains all three sensors in it. All the have different temperatures to display.
An somehow I have to extract the right sensor and display it to the right value.

The topic looks like this:


Question: How does the transformation look like that I can extract each temperature value?

Thanks a lot in advance.
BR, KarMa

First in the tasmota console do:
setoption64 1

This will change the - into an _ for the DS18B20s

Then the transormation is:

Make sure you install the JSONPATH transform!!


Thanks for the quick reply and the >setoption64 1
I looks like that I got also an issue with the connection from MQTT to Openhab.
Let me first solve this, than I continue witht the transformation.
Thank you!

Hi KarMa,
did you solve your issue and get it working with 3 x DS18B20.
I had it working with one sensor and the following;
and it worked.
After vzorglub’s correction I did setoption64 1 and I now have underscores in stead of hyphens but the following only shows “-” on my sitemap.

1 Like

Solved my problem. See my other thread on extracting temprature from mqtt string.
I used the sensor id rather than DS18B20_n as the numbers can change automatically if one is disconnected.