Youless LS120, JSONPath problem

Hey, I have used openhab2x for a while. But now I had the energy to migrate to OH3.
I migrated all my things and items, except then my Youless LS120.
In OH2 I configured the item this way:

Number LS120EnergyTotal         "EnergyTotal [%,.3f kWh]"         <energy>    { http="<[http://192.168.192.112/a?f=j:10000:JSONPATH($.cnt)]" }
Number LS120EnergyCurrent       "EnergyCurrent [%,.0f Watt]"       <energy>   { http="<[http://192.168.192.112/a?f=j:10000:JSONPATH($.pwr)]" }
Number LS120EnergySignal        "EnergySignal [%.0f %%]"          <energy>    { http="<[http://192.168.192.112/a?f=j:10000:JSONPATH($.lvl)]" }

The first entry didn’t work at all in OH2 but that was not really a problem for me.

But the others worked fine.
In OH3 this item give no values back. But I don’t know why.

The URL of the youless gives that:

The http= stuff is linking to the HTTP version 1.x binding.
That binding is not available in OH3, no version 1 bindings are.

You’ll need to use the new HTTP binding with Things and channels. You’d make one Thing pointing to your URL, and give it three channels, each with a different JSONPATH transformation.

Hey thanks for the hint.
Do you have a sample how a JSONPath Transformation “value” has to look like?!
I have really now idea, I tried out several things, but it didn’t work.
I also tried out REGEX, bcause I thought it would be easier :wink:


But this also didn’t work…

You mean the $.cnt part that you posted before?

Don’t forget that transformations like JSONPATH and REGEX are optional installable add-ons.