- Platform information:
- Hardware: RPi 4
- OS: Raspbian
- Java Runtime Environment: which java platform is used and what version
- openHAB version: 3.3.0 in docker
Hi,
I have a small problem which trying to solve with no success (so far)
I have Xiaomi/Auara wireless wall switch connected via zigbee2mqtt and when I click the button I have following payload:
payload '{\"action\":\"single\",\"battery\":100,\"device_temperature\":32,\"last_seen\":\"2022-07-04T12:46:30+02:00\",\"linkquality\":98,\"voltage\":3015}'"}
However the switch itself sends also the “status” message from time to time, but without action
element:
{\"battery\":100,\"device_temperature\":25,\"last_seen\":\"2022-07-04T13:16:51+02:00\",\"linkquality\":98,\"voltage\":3055}'"}
In this case I am receiving the following warning, which I don’t like
2022-07-04 13:16:51.424 [WARN ] [t.generic.ChannelStateTransformation] - Executing the JSONPATH-transformation failed: Invalid path '$.action' in '{"battery":100,"device_temperature":25,"last_seen":"2022-07-04T13:16:51+02:00","linkquality":98,"voltage":3055}'
The setup of my thing looks like this:
UID: mqtt:topic:mosquitto:X_Switch_S002
label: Switch 002
thingTypeUID: mqtt:topic
configuration: {}
bridgeUID: mqtt:broker:mosquitto
location: Corridor
channels:
- id: SwitchCorridorAction
channelTypeUID: mqtt:string
label: Action
description: null
configuration:
commandTopic: zigbee2mqtt/X_Switch_S002/set
transformationPattern: JSONPATH:$.action
stateTopic: zigbee2mqtt/X_Switch_S002
- id: SwitchCorridorBattery
channelTypeUID: mqtt:number
label: Bateria
description: null
configuration:
stateTopic: zigbee2mqtt/X_Switch_S002
transformationPattern: JSONPATH:$.battery
unit: "%"
- id: SwitchCorridorLinkquality
channelTypeUID: mqtt:number
label: Siła sygnału
description: null
configuration:
stateTopic: zigbee2mqtt/X_Switch_S002
transformationPattern: JSONPATH:$.linkquality
- id: SwitchCorridorLastChange
channelTypeUID: mqtt:datetime
label: Ostatnia zmiana
description: null
configuration:
stateTopic: zigbee2mqtt/X_Switch_S002
transformationPattern: JSONPATH:$.last_seen
Maybe this is not a big issue, but I have several such switches and don’t like to have errors and warnings in logs
Any ideas how to solve it?
Thanks in advance.