Parsing a mqtt message error

on one of my host i see often :

2022-12-12 20:34:19.023 [WARN ] [t.generic.ChannelStateTransformation] - Executing the JSONPATH-transformation failed: Invalid path ‘/$.voltage’ in ‘{“battery”:100,“humidity”:53.4,“last_seen”:“2022-12-12T20:34:19+01:00”,“linkquality”:94,“temperature”:20.8,“voltage”:3000}’
2022-12-12 20:34:24.560 [WARN ] [t.generic.ChannelStateTransformation] - Executing the JSONPATH-transformation failed: Invalid path ‘/$.voltage’ in ‘{“battery”:100,“humidity”:53.4,“last_seen”:“2022-12-12T20:34:24+01:00”,“linkquality”:94,“temperature”:20.8,“voltage”:3000}’
2022-12-12 23:05:25.269 [WARN ] [m.internal.handler.PWMTriggerHandler] - Dead-man switch activated. Disabling output
2022-12-12 23:21:11.456 [WARN ] [m.internal.handler.PWMTriggerHandler] - Dead-man switch activated. Disabling output
2022-12-13 00:37:00.311 [WARN ] [t.generic.ChannelStateTransformation] - Executing the JSONPATH-transformation failed: Invalid path ‘/$.voltage’ in ‘{“battery”:100,“humidity”:53.4,“last_seen”:“2022-12-13T00:37:00+01:00”,“linkquality”:98,“temperature”:20.8,“voltage”:3000}’
2022-12-13 00:37:18.907 [WARN ] [t.generic.ChannelStateTransformation] - Executing the JSONPATH-transformation failed: Invalid path ‘/$.voltage’ in ‘{“battery”:100,“humidity”:53.4,“last_seen”:“2022-12-13T00:37:18+01:00”,“linkquality”:98,“temperature”:20.8,“voltage”:3000}’
2022-12-13 04:39:28.054 [WARN ] [t.generic.ChannelStateTransformation] - Executing the JSONPATH-transformation failed: Invalid path ‘/$.voltage’ in ‘{“battery”:100,“humidity”:53.4,“last_seen”:“2022-12-13T04:39:28+01:00”,“linkquality”:98,“temperature”:20.8,“voltage”:3000}’
i
there are many temp sensors publishing this messages - all are the same, thing config:

                 Channels:
                            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"]

so there is nothing unusual in this setup. i am using this setup on few hosts and this is the only one where i see problem

What’s that slash doing in there?

i don’t know. it is only visible in the logs

  • id: voltage
    channelTypeUID: mqtt:number
    label: Napiecie
    description: null
    configuration:
    retained: false
    postCommand: false
    step: 1
    formatBeforePublish: “%s”
    stateTopic: zigbee2mqtt/Temp_4
    transformationPattern: JSONPATH:$.voltage

I believe you have many devices and one of them has the slash in the config.

In any case I’d suggest not using json at all.

Use attribute

they are all configured exactlly the same… which binding should i put to higher log level to see the details?

Mqtt.generic
Do a list -s | grep mqtt for the full name