Show only tempc Value - ESP32 Bluetooth with XIAOMI Mi Jia 2

Hi,
after one day of trial and error I managed it to flash the ESP32 bluetooth with openMQTT Gateway and integrated it in openHab :partying_face: as a Generic MQTT.

When XIAOMI Mi Jia 2 the little Thermometer Thing is sending the values I´m able to see the hole message like this:

{"id":"A4:C1:38:18:8A:BA","name":"ATC_188ABA","rssi":-56,"model":"LYWSD03MMC_PVVX","tempc":25.34,"tempf":77.612,"hum":43.02,"batt":88,"volt":2.997}"

So last step in openHab3 the item is showing NULL - what to do now to filter only the tempc Value. I thing it´s a json hack.

How is the right code to get the temps value

Thank you

As shown in several hundred MQTT examples in this forum, use a JSONPATH transformation. This is an installable add-on. Like other transformation services, it can be used in different places within openHAB. Here you would use it in your channel settings.

Hi,

thank you. Yes I know that it have to JSONPATH - but I´ve Problems with the syntax.

transformationPattern: JSONPATH:$.tempc 

Is the solution.

Crystal ball failure.

1 Like

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.