I have a 4 button zigbee switch that works really nice .I use zigbee2tasmota and mqtt to read the buttons actions.I use the incoming tranformation :
REGEX:(.*"Endpoint":1.*)∩JSONPATH:$.ZbReceived.4Button.LidlPower∩MAP:button.map
to parse the action from a line :
{"ZbReceived":{"4Button":{"Device":"0x334D","Name":"4Button","0006!FD":"02","LidlPower":2,"Endpoint":1,"LinkQuality":63}}}
for example to read button’s 1 (“Endpoint”:1) action (LidlPower) and then humanize it with a Map tranform.
From time to time the button sends the following line without any action of me :
{"ZbReceived":{"4Button":{"Device":"0x334D","Name":"4Button","Cluster":10,"Read":[7],"ReadNames":{"LocalTime":true},"Endpoint":1,"LinkQuality":76}}}
so i get the error:
2023-06-11 22:08:41.734 [WARN ] [t.generic.ChannelStateTransformation] - Executing the JSONPATH-transformation failed: Invalid path '$.ZbReceived.4Button.LidlPower' in '{"ZbReceived":{"4Button":{"Device":"0x334D","Name":"4Button","Cluster":10,"Read":[7],"ReadNames":{"LocalTime":true},"Endpoint":1,"LinkQuality":76}}}'
my goal is to use regex to exclude this reading by using the word of “Cluster” or “Read” and not receive this error.Any ideas?