Transform data

How do I transform the following incoming MQTT message. This is message broker is showing.

/maincrb/c02/CO2/add105 {“created_at”:“2022-06-20T16:07:34.9039733Z”,“VersionInfo”:-1.0,“ModuleType”:“CO2”,“value”:“838”,“Address”:105,“Name”:""}

just want to pull the value ( whatever the value is from the sensor). In this case its 838 but that can change. I assume we use channel transformation but don’t know how? Pretty clueless.

Assuming that first part is just the name of the topic and not actually part of the message, you’ll want to install and use the JSONPATH transformation. The incoming message transformation would look something like JSONPATH:$.value.

Hi Rich,

I am pretty new at this honestly, how do I install and use JSONPATH?

How did you manage to install the MQTT Binding? Do it the same way except choose JSONPATH as the add-on to install. You’ll find it under “Other Add-ons”.

You use it just like I described. Put that String from my previous reply into the “incoming message transformation” field on the MQTT Channel config.

That worked. Thank you

Watched a Youtube video that helped me understand MQTT binding. Thanks again