Hi guys,
I am trying to setup items that read values from a Smart Meter via HTTP binding. I can successfully request the JSON and also it works accessing items via the key name, when they are normal text values. What I cannot get to work is accessing values where the key contains dots, i.e. OBIS codes like 1.8.0.
Trying online evaluators at http://jsonpath.com/ and also https://jsonpath.herokuapp.com/ it should be simple like
$.[1.8.0]
but it does not work, logging just throws general transformation exceptions. I feel like having tried all variantes of escaping the brackets, escaping the dots, using " and ’ and also escaped variants of them.
Is there something I don’t see or is the internal JSONPATH simply not working like the online tools?
JSON (shortened):
{ "timestamp":"181229020730W","1.8.0":"68138","2.8.0":"41611" }
My item definition:
String SR_http_1_8_0 "1.8.0 Wirkleistung Bezug [%s]" (SmartReader_GROUP) { http="<[smartreader:5000:JSONPATH($.[1.8.0])]" }
Would appreciate any hints.
Andreas