Zigbee2MQTT: A1Z JSON parsing + failed to deliver message

Hi All!

What is the problem
As I added more devices to the network (around 20) i noticed that some of the smart switches (A1Z nous) stopped responding. Usually restart of service helps. I was checking the logs and I have found following things:

Home assistant logs

Rejestrator: homeassistant.helpers.template
Źródło: helpers/template.py:809
Pierwsze zdarzenie: 08:55:17 (8 zdarzenia)
Ostatnio zalogowany: 08:55:17

Error parsing value: 'value_json' is undefined (value: , template: {{ value_json.power_outage_memory }})
Error parsing value: 'value_json' is undefined (value: , template: {{ value_json['update']['latest_version'] }})
Error parsing value: 'value_json' is undefined (value: , template: {{ value_json.indicator_mode }})
Error parsing value: 'value_json' is undefined (value: , template: {{ value_json.countdown }})
Error parsing value: 'value_json' is undefined (value: , template: {{ value_json['update']['installed_version'] }})
Rejestrator: homeassistant.components.mqtt.entity
Źródło: components/mqtt/entity.py:432
integracja: MQTT (dokumentacja, Problemy)
Pierwsze zdarzenie: 08:55:17 (1 zdarzenia)
Ostatnio zalogowany: 08:55:17

Erroneous JSON:

Zigbee2mqtt logs with unexpected data packet:

[2024-12-24 09:17:37] e[34mdebuge[39m: 	zh:ezsp:uart: <-- DATA (3,3,0): 3368a1a9372a15b25994eafe7e
[2024-12-24 09:17:37] e[34mdebuge[39m: 	zh:ezsp:uart: Unexpected DATA packet sequence 3 | 4: reject condition
[2024-12-24 09:17:37] e[34mdebuge[39m: 	zh:ezsp:uart: --> [a4149e7e]
[2024-12-24 09:17:37] e[34mdebuge[39m: 	zh:ezsp:uart: <-- DATA (3,3,0): 3368a1a9372a15b25994eafe7e
[2024-12-24 09:17:37] e[34mdebuge[39m: 	zh:ezsp:uart: Unexpected DATA packet sequence 3 | 4: reject condition
[2024-12-24 09:17:37] e[34mdebuge[39m: 	zh:ezsp:uart: -+- waiting (3) success
[2024-12-24 09:17:37] e[34mdebuge[39m: 	zh:ezsp:cast: MulticastTableEntry[10] = EmberMulticastTableEntry: {"multicastId":0,"endpoint":0,"networkIndex":0}
[2024-12-24 09:17:37] e[34mdebuge[39m: 	zh:ezsp:ezsp: ==> getMulticastTableEntry: {"index":11}
[2024-12-24 09:17:37] e[34mdebuge[39m: 	zh:ezsp:ezsp: ==> {"_cls_":"getMulticastTableEntry","_id_":99,"_isRequest_":true,"index":11}
[2024-12-24 09:17:37] e[34mdebuge[39m: 	zh:ezsp:uart: --> DATA (3,4,0): 2b000163000b
[2024-12-24 09:17:37] e[34mdebuge[39m: 	zh:ezsp:uart: --> [346921a9372a1e9f7c7e]
[2024-12-24 09:17:37] e[34mdebuge[39m: 	zh:ezsp:uart: -?- waiting (4)
[2024-12-24 09:17:37] e[34mdebuge[39m: 	zh:ezsp:uart: <-- [4469a1a9372a15b25994c2a67e]
[2024-12-24 09:17:37] e[34mdebuge[39m: 	zh:ezsp:uart: <-- DATA (4,4,0): 4469a1a9372a15b25994c2a67e
[2024-12-24 09:17:37] e[34mdebuge[39m: 	zh:ezsp:uart: --> ACK  (5)
[2024-12-24 09:17:37] e[34mdebuge[39m: 	zh:ezsp:uart: --> [8520dd7e]
[2024-12-24 09:17:37] e[34mdebuge[39m: 	zh:ezsp:uart: <-- ACK (4): 4469a1a9372a15b25994c2a67e
[2024-12-24 09:17:37] e[34mdebuge[39m: 	zh:ezsp:ezsp: <== Frame: 2b8001630000000000
[2024-12-24 09:17:37] e[34mdebuge[39m: 	zh:ezsp:ezsp: <== 0x63: {"_cls_":"getMulticastTableEntry","_id_":99,"_isRequest_":false,"value":{"multicastId":0,"endpoint":0,"networkIndex":0}}

I removed from the network most problematic switch that literally was flooding information about this state each second. Yet if I add new switch to the network I might lost control of some (random) other switches. What does it mean? That I cannot change it state. I click in UI and nothing changes or quickly returns to the previous states. In logs there’s either no request to MQTT at all or request with the same value (state: off) not changing at all.

What is installed

SLZB-06M with
Core firmware version: v2.6.8.dev25 (I moved from 2.3.6 where the problem was the same) and zigbee firmware revision: 20241127

Zigbee2Mqtt: 1.42.0-2
Mosquitto broker: 6.4.1

This is good example. I try to turn off swithc and

2024-12-24 12:29:07] e[32minfoe[39m: 	z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Gniazdko kuchnia opiekacz', payload '{"child_lock":"UNLOCK","countdown":0,"current":0,"energy":1.37,"indicator_mode":"off/on","linkquality":80,"power":0,"power_outage_memory":"restore","state":"OFF","update":{"installed_version":-1,"latest_version":-1,"state":null},"update_available":null,"voltage":212}'
[2024-12-24 12:29:07] e[32minfoe[39m: 	z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Gniazdko kuchnia opiekacz', payload '{"child_lock":"UNLOCK","countdown":0,"current":0,"energy":1.37,"indicator_mode":"off/on","linkquality":80,"power":0,"power_outage_memory":"restore","state":"OFF","update":{"installed_version":-1,"latest_version":-1,"state":null},"update_available":null,"voltage":212}'
[2024-12-24 12:29:08] e[34mdebuge[39m: 	zh:ezsp:ezsp: Time to watchdog ... 0
[2024-12-24 12:29:08] e[34mdebuge[39m: 	zh:ezsp:ezsp: ==> nop: undefined
[2024-12-24 12:29:08] e[34mdebuge[39m: 	zh:ezsp:ezsp: ==> {"_cls_":"nop","_id_":5,"_isRequest_":true}
[2024-12-24 12:29:08] e[34mdebuge[39m: 	zh:ezsp:uart: --> DATA (6,4,0): 7600010500
[2024-12-24 12:29:08] e[34mdebuge[39m: 	zh:ezsp:uart: --> [643421a9512a08107e]
[2024-12-24 12:29:08] e[34mdebuge[39m: 	zh:ezsp:uart: -?- waiting (7)
[2024-12-24 12:29:08] e[34mdebuge[39m: 	zh:ezsp:uart: <-- [4734a1a9512a2ec07e]
[2024-12-24 12:29:08] e[34mdebuge[39m: 	zh:ezsp:uart: <-- DATA (4,7,0): 4734a1a9512a2ec07e
[2024-12-24 12:29:08] e[34mdebuge[39m: 	zh:ezsp:uart: --> ACK  (5)
[2024-12-24 12:29:08] e[34mdebuge[39m: 	zh:ezsp:uart: --> [8520dd7e]
[2024-12-24 12:29:08] e[34mdebuge[39m: 	zh:ezsp:uart: <-- ACK (7): 4734a1a9512a2ec07e
[2024-12-24 12:29:08] e[34mdebuge[39m: 	zh:ezsp:ezsp: <== Frame: 7680010500
[2024-12-24 12:29:08] e[34mdebuge[39m: 	zh:ezsp:ezsp: <== 0x5: {"_cls_":"nop","_id_":5,"_isRequest_":false}
[2024-12-24 12:29:08] e[34mdebuge[39m: 	zh:ezsp:uart: -+- waiting (7) success
[2024-12-24 12:29:08] e[34mdebuge[39m: 	zh:ezsp:uart: <-- [5734b1a97d312a15b658944a24ab5593499c94f77b7f289874f2ce9e83fd7d5e1fe90932fe]
[2024-12-24 12:29:08] e[34mdebuge[39m: 	zh:ezsp:uart: <-- [576b00e7dbd1752b7e]
[2024-12-24 12:29:08] e[34mdebuge[39m: 	zh:ezsp:uart: <-- DATA (5,7,0): 5734b1a9112a15b658944a24ab5593499c94f77b7f289874f2ce9e83fd7e1fe90932fe576b00e7dbd1752b7e
[2024-12-24 12:29:08] e[34mdebuge[39m: 	zh:ezsp:uart: --> ACK  (6)
[2024-12-24 12:29:08] e[34mdebuge[39m: 	zh:ezsp:uart: --> [8610be7e]
[2024-12-24 12:29:08] e[34mdebuge[39m: 	zh:ezsp:uart: <-- ACK (7): 5734b1a9112a15b658944a24ab5593499c94f77b7f289874f2ce9e83fd7e1fe90932fe576b00e7dbd1752b7e
[2024-12-24 12:29:08] e[34mdebuge[39m: 	zh:ezsp:ezsp: <== Frame: 76900145000004010000010100010000dad0d092e6ffff0f08fd0a0100204ee2ff2038e4ff200004
[2024-12-24 12:29:08] e[34mdebuge[39m: 	zh:ezsp:ezsp: <== 0x45: 
[2024-12-24 12:29:24] e[34mdebuge[39m: 	zh:ezsp:driv: Delivery failed for {"_cls_":"messageSentHandler","_id_":63,"_isRequest_":false,"type":0,"indexOrDestination":30893,"apsFrame":{"profileId":260,"sequence":230,"clusterId":6,"sourceEndpoint":1,"destinationEndpoint":1,"groupId":0,"options":256},"messageTag":58,"status":102,"message":{"type":"Buffer","data":[]}}.

what might be the reason of delay/failing to deliver message? Other switches works fine at the same time.