How do you parse JSON in OH3 MQTT Thing?

Hi all. I am new to OH3. How do I get single values out of a JSON string?


I need temp1.

Is the Transformation like this?

`UID: mqtt:topic:c92e3237df:1a1866b5d8
label: Hot Water Temperature
thingTypeUID: mqtt:topic
configuration: {}
bridgeUID: mqtt:broker:c92e3237df

  • id: HotWater
    channelTypeUID: mqtt:number
    label: Hot Water Temperature
    description: “”
    stateTopic: Water/HeaterValues
    transformationPattern: JSONPATH:$.temp1
    unit: °C`


If I use it on the Channel I see nothing

If I change it all to string then I see the full JSON in the Item. So it seems like the transform does not happen

Is the JSONPath transformation installed on your system ?


Aaa Probably not if it does not come as standard with the OH3 install. Let me see how to install that then

OK thanks all working now. One would think that if you can configure a setting on the Channel that it will have the code behind it to use it.

1 Like