OH 3.3.x
I have my first MQTT thing connected to Openhab, awesome But I have some issue with parsing the incoming data. Problem: the JSON content varies!
When the sensor thingy starts it delivers a full status on all measured items like this
{
"Time": "2023-01-12T21:09:48",
"LOGAREX": {
"total_in": 6512.0818,
"total_out": 0.008,
"current": 345,
"total_day": 18.8,
"total_week": 67.1,
"total_month": 282.2,
"total_year": 2750.9
}
}
But all following messages contain only the subset of items whose value has acutally changed, like
{
"Time":"2023-01-12T21:27:32",
"LOGAREX":{
"current":282
}
}
I have started to create channels of type Number based on this MQTT items JSON data, utilizing the JSONPATH, like
JSONPATH:$.LOGAREX.current
the next channel
JSONPATH:$.LOGAREX.total_in
The issue: openhab.log gets now spammed with
2023-01-12 21:31:44.674 [WARN ] [t.generic.ChannelStateTransformation] - Executing the JSONPATH-transformation failed: Invalid path '$.LOGAREX.total_in' in '{"Time":"2023-01-12T21:31:44","LOGAREX":{"current":280}}'
How to deal with that? It’s only a WARNING and not an ERROR but I still would like to get rid of that, if possible
thanks
Jens