- Platform information:
- Hardware: RPI 4, 4GB
- OS: Ubuntu 20.04.2 LTS
- Java Runtime Environment: openjdk 11.0.10 2021-01-19
- openHAB version: openHAB 3.0.1 (release build)
- Issue of the topic:
I have power consumption data of my home being published to MQTT
- {“time”: 1619174609.8827522, “datetime”: “2021-04-23 10:43:29”, “printable_key”: “Current Consumption”, “key”: “consumption_now”, “value”: “3.588”, “consumption_now”: 3.588, “printable_value”: “3.588 kW”, “unit”: “kW”, “printable_string”: “Current Consumption: 3.588 kW”, “normalized_value”: “3.588 kW”, “normalized_string”: “Current Consumption: 3.588 kW”}
The JSON content is published under topic:
home/power/consumption/total/consumption
The channel on my Generic MQTT Thing looks like this (snippet from “Code”-view)
- id: cCurrentconsumption
channelTypeUID: mqtt:string
label: Current Consumption
description: “”
configuration:
stateTopic: home/power/consumption/total/consumption
transformationPattern: JSONPATH:$.value
I created an item, just showing the channel value as a string
Result: I see the complete JSON message, no filtering on JSONPATH:$.value
What am I doing wrong?