Hi there,
I just cannot manage to read any numbers for power consumption etc from my tasmota flashed power plug.
I get a read from MQTT by this stat query:
tele/Steckdose1/SENSOR
{“Time”:“2021-01-16T19:06:24”,“ENERGY”:{“TotalStartTime”:“2019-12-15T19:21:52”,“Total”:1.710,“Yesterday”:0.000,“Today”:0.032,“Period”:2,“Power”:24,“ApparentPower”:36,“ReactivePower”:27,“Factor”:0.66,“Voltage”:234,“Current”:0.153}}
I can read this from OH3 as a string (the 2nd point/item)
if I add this “JSONPATH:$.ENERGY.Power” to the configuration of the channel, nothing happens
- I get a “NULL” if I define the Channel as number (3rd point)
- I get the whole string (nothing/everything parsed) if I define it as a string (not shown)
This is the code OH3 generates for my thing:
UID: mqtt:topic:MQTT_broker_localhost:Steckdose1
label: Steckdose 1
thingTypeUID: mqtt:topic
configuration: {}
bridgeUID: mqtt:broker:MQTT_broker_localhost
channels:
- id: switch
channelTypeUID: mqtt:switch
label: switch
description: ""
configuration:
commandTopic: cmnd/Steckdose1/POWER
stateTopic: "stat/Steckdose1/POWER "
- id: test
channelTypeUID: mqtt:string
label: test
description: ""
configuration:
stateTopic: tele/Steckdose1/SENSOR
- id: test_number
channelTypeUID: mqtt:number
label: test_number
description: ""
configuration:
stateTopic: tele/Steckdose1/SENSOR
transformationPattern: JSONPATH:$.ENERGY.Power
Obviously ths whole setup works as OH3 reads the MQTT tele/ stats but it cannot filter anything from the string. The Syntax “JSONPATH:$.ENERGY.Power” must be wrong… Any ideas what it could be?