Thng mqtt json path

path is 100% correct, don’t know what is causing this error?

2022-09-24 13:31:47.529 [WARN ] [t.generic.ChannelStateTransformation] - Executing the JSONPATH-transformation failed: Invalid path ‘/$.voltage’ in ‘{“battery”:100,“humidity”:50.7,“last_seen”:“2022-09-24T13:30:50+02:00”,“linkquality”:0,“temperature”:21,“voltage”:3000}’

Shoudln’t it be


instead of


but it’s the same for all other items extracted from this json, and only voltage is not working

Please show your full Thing configuration.

attached - nothing unusual, i am using it for months

2022-09-28 22:55:15.157 [WARN ] [t.generic.ChannelStateTransformation] - Executing the JSONPATH-transformation failed: Invalid path '/$.voltage' in '{"battery":100,"humidity":80.2,"last_seen":"2022-09-28T22:55:08+02:00","linkquality":0,"temperature":21.8,"voltage":3000}'

Thing topic Temp_1              "Temperatura 1"  {
                                Type number : temperature "Temperatura" [ stateTopic="zigbee2mqtt/Temp_1", transformationPattern="JSONPATH:$.temperature"]
                                Type number : humidity "Wilgotnosc" [ stateTopic="zigbee2mqtt/Temp_1", transformationPattern="JSONPATH:$.humidity"]
                                Type number : battery "Bateria" [ stateTopic="zigbee2mqtt/Temp_1", transformationPattern="JSONPATH:$.battery"]
                                Type number : linkquality "Link" [ stateTopic="zigbee2mqtt/Temp_1", transformationPattern="JSONPATH:$.linkquality"]
                                Type number : voltage "Napiecie" [ stateTopic="zigbee2mqtt/Temp_1", transformationPattern="JSONPATH:$.voltage"]

zigbee2mqtt state:

    "battery": 100,
    "humidity": 58.7,
    "last_seen": "2022-09-28T22:31:16+02:00",
    "linkquality": 94,
    "temperature": 20.6,
    "voltage": 3000

Show us the GUI view of your suspect channel using the code tab. Compare with a channel that works.

It is possible for unprintable characters to end up in your xxx.things file, often as a result of copy-paste editing, which will usually be invisible in your editor screen.

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.