[SOLVED] Help needed: Configure JSONPATH transformation in Paper UI

Hello everyone, I’m quite new to smart homes and OH but I got OH 2.4 running in a docker and have managed to use an Enocean Stick to display and switch my hall light.
But for MQTT and the JSON transformation I’m at a loss. I want to read some values from an ESP01S/BME280 in my basement which doesnt work. So I started testing around with a smart plug which is flashed with arendst/tasmota as well as the other device. But I can’t for the live of me figure out what I’m doing wrong.
The smart plug, upon switching, is publishing two messages:
stat/Obi_Wallplug01/POWER = OFF and
stat/Obi_Wallplug01/RESULT = {"POWER":"OFF"}

When using the topic stat/Obi_Wallplug01/POWER with On/Open value ON and Off/Closed value OFF, it works fine. I can switch the plug and Paper UI displays changes when the plug is switched externally.

But by using stat/Obi_Wallplug01/RESULT, and the transformation string JSONPATH:$.POWER, changes are not displayed.

Can please someone give me a hint, how to use the transformation string in the Paper UI?

Thank you very much!

Is there anything in the logs?

1 Like

I never checked them as I’m pretty new to the whole RPi, Docker, OH thing. Could cross my mind tho. just checked:
2019-03-25 14:37:06.846 [WARN ] [l.generic.ChannelStateTransformation] - Transformation service JSONPATH for pattern $.POWER not found! 2019-03-25 14:37:06.852 [WARN ] [eneric.internal.generic.ChannelState] - Command '{"POWER":"ON"}' not supported by type 'OnOffValue': No enum constant org.eclipse.smarthome.core.library.types.OnOffType.{"POWER":"ON"}

And there is the error for the main reason for that whole hassle:

2019-03-25 14:39:07.907 [WARN ] [l.generic.ChannelStateTransformation] - Transformation service JSONPATH for pattern ${.BME280.Temperature} not found! 2019-03-25 14:39:07.910 [WARN ] [eneric.internal.generic.ChannelState] - Incoming payload '{"Time":"2019-03-25T14:39:06","BME280":{"Temperature":22.9,"Humidity":35.0,"Pressure":1006.8},"PressureUnit":"hPa","TempUnit":"C"}' not supported by type 'NumberValue'

It looks like you missed to install the JSONPATH Transformation.

4 Likes

Oh well, thanks for the input. Can I do that thru Paper UI or do I have to deep dive?

Ninja edit: found it. :slight_smile:

PaperUI is fine for that. Look under Add-ons Transformation.

1 Like

Yep, works fine now. Thank you very much. :smile: