zigbee2mqtt icon indicating copy to clipboard operation
zigbee2mqtt copied to clipboard

V1.37.0: Frame changeSourceRouteHandler parsing error

Open uwen70 opened this issue 9 months ago β€’ 47 comments

What happened?

After updating zigbee2mqtt to version 1.37.0 in HA I fond repeated frame parsing error in the log:

[2024-05-04 11:50:24] error: zh:ezsp:ezsp: Frame changeSourceRouteHandler parsing error: RangeError: Attempt to access memory outside buffer bounds at new NodeError (node:internal/errors:405:5) at boundsError (node:internal/buffer:86:11) at Buffer.readUInt16LE (node:internal/buffer:245:5) at Buffer.readUIntLE (node:internal/buffer:182:17) at Function.deserialize (/app/node_modules/zigbee-herdsman/src/adapter/ezsp/driver/types/basic.ts:19:67) at new EZSPFrameData (/app/node_modules/zigbee-herdsman/src/adapter/ezsp/driver/ezsp.ts:180:54) at /app/node_modules/zigbee-herdsman/src/adapter/ezsp/driver/ezsp.ts:154:23 at Array.every (<anonymous>) at Function.createFrame (/app/node_modules/zigbee-herdsman/src/adapter/ezsp/driver/ezsp.ts:148:15) at Ezsp.onFrameReceived (/app/node_modules/zigbee-herdsman/src/adapter/ezsp/driver/ezsp.ts:439:35) [2024-05-04 11:50:24] error: zh:ezsp:ezsp: Unparsed frame 0xc4. Skipped

The error repeats itself sporadically (6 times in 24h).

What did you expect to happen?

No response

How to reproduce it (minimal and precise)

I don't know any way to provoke the error.

Zigbee2MQTT version

1.37.0 commit: unknown

Adapter firmware version

EZSP v8 6.10.3.0 build 297

Adapter

ZB-GW04

Setup

Add-on on Homeassistant on Debian, VM x86-64, VMware

Debug log

No response

uwen70 avatar May 04 '24 12:05 uwen70

Hello, I have exactly the same error in chain.... but Zigbee devices seems to work.

Laguite14 avatar May 04 '24 12:05 Laguite14

Same here, my adapter (Tuya/LIDL converted LAN coordinator) doesn't have a compatible EmberZnet firmware AFAIK so I can't switch to the new driver.

joaquinvacas avatar May 04 '24 18:05 joaquinvacas

re https://github.com/Koenkk/zigbee2mqtt/issues/22443, https://github.com/Koenkk/zigbee2mqtt/issues/22436

Nerivec avatar May 04 '24 19:05 Nerivec

same here... everything seems to work correctly though.

baskient80 avatar May 05 '24 08:05 baskient80

After updating Zigbee firmware from EZSP v8 6.10.3.0 build 297 to EZSP v13 7.4.2.0 the parsing error no longer occurred. An easy way to update is via WebFlasher (https://darkxst.github.io/silabs-firmware-builder/). It then also makes it possible to switch from the EZSP driver, which is now referred to as deprecated, to the new Ember. Going back is no problem either.

uwen70 avatar May 05 '24 12:05 uwen70

After updating Zigbee firmware from EZSP v8 6.10.3.0 build 297 to EZSP v13 7.4.2.0 the parsing error no longer occurred. An easy way to update is via WebFlasher (https://darkxst.github.io/silabs-firmware-builder/). It then also makes it possible to switch from the EZSP driver, which is now referred to as deprecated, to the new Ember. Going back is no problem either.

Thanks, I think I saw that when flashing the new firmware on the coordinator you should have to redo all the pairing of the devices. Did you get this issue after flashing your dongle or Z2MQTT started again with all the devices ? Want to be sure before flashing.

Laguite14 avatar May 05 '24 13:05 Laguite14

@Laguite14 Most people reported having no issues with upgrading from 6.10.3 to 7.x.x, but a few had to re-pair devices.

Nerivec avatar May 05 '24 17:05 Nerivec

today I flashed my Dongle-E from 6.10.3.0 to the current version. I have >60 devices already paired.

All devices are paired after flashing. I have no issues with the upgrade - no dev was "lost".

thombec avatar May 05 '24 17:05 thombec

Thanks for your feedback, I will flash mine to see if it resolves Z2M issues.

Laguite14 avatar May 06 '24 10:05 Laguite14

Hello After updating the firmware the errors disappeared. no device was lost.

sergeyshaklein avatar May 06 '24 14:05 sergeyshaklein

And for users who does not have a compliant key ? Eg chip efr32mg13 What do you recommand @Koenkk for those users ? 😟

Ultraboss77 avatar May 06 '24 16:05 Ultraboss77

I'm on the same boat, using a 256k chip which doesn't support newer versions, not even 6.10 (stable)

El lun, 6 may 2024, 18:37, GΓ©rald Gatesoupe @.***> escribiΓ³:

And for users who does not have a compliant key ? Eg chip efr32mg13 What do you recommand @Koenkk https://github.com/Koenkk for those users ? 😟

β€” Reply to this email directly, view it on GitHub https://github.com/Koenkk/zigbee2mqtt/issues/22444#issuecomment-2096458660, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABBTEJUAJIMFOK4JW77C6F3ZA6WSZAVCNFSM6AAAAABHGZQUE2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJWGQ2TQNRWGA . You are receiving this because you commented.Message ID: @.***>

joaquinvacas avatar May 06 '24 16:05 joaquinvacas

Silabs is splitting support for those old chips (Series 0 & 1) in the next firmware release. darkxst mentioned that support will be dropped in new firmware releases because of this. You can continue to use ezsp, but you will remain on old software with no possibility for upgrade, and that will likely break as soon as devices supporting the latest Zigbee revision (R23) come out (6.10.x are already showing signs of trouble with newer devices). Best option is to migrate to a more recent adapter. With the MG24 now coming out, it should provide good options, first tests on these are very promising πŸ˜‰

Nerivec avatar May 06 '24 17:05 Nerivec

What about Zstack chips from TI ? They will be compliant with Zigbee R23, will be upgradable ? If I do buy an other usb coordinator, which driver should I choose to be "future" proof ??

Ultraboss77 avatar May 06 '24 18:05 Ultraboss77

EMx and EFR32MG1X is only supported until 6.10.X and EFR32MG2X is still full supported so its only splitting the code then its no use implanting functions that cant being used in the hardware. Some MG32MG1 chips is still getting Thread / RCP firmware (EZSP 4.4.x is working OK) like IKEAs first gen module that using WFR32MG1P and tuya snot that is using EFR32MG1B chip.

I cant see some use ditching V8 then its not much changes only some commands / rev and better keep the backward compatibility (ZHA is still having support from early V5.X).

MattWestb avatar May 08 '24 18:05 MattWestb

curiously I have 2 instances running with 2 zb-gw03 and only one of those have this issue, prompting a lot of red errors in the gui even all devices seems to work properly. Anyone know how to stop this error flodding the gui and the log? I have check the loggin options but "error" seems to be the lower loggin option.

djrm05 avatar May 13 '24 17:05 djrm05

curiously I have 2 instances running with 2 zb-gw03 and only one of those have this issue

Probably one of the sticks has a newer firmware?

Anyone know how to stop this error flodding the gui and the log?

Update the stick's firmware. https://github.com/Koenkk/zigbee2mqtt/issues/22444#issuecomment-2094788152 On zb-gw04 the latest version 7.4.3.0 works for me. With Sonoff-E you should try 7.4.1.0. After that you can also switch to the ember driver.

uwen70 avatar May 14 '24 08:05 uwen70

@uwen70 , thanks I would say it was the same version as I flashed both together, but maybe.... where did you get the 7.4.3.0 for the zb-gw03?

djrm05 avatar May 14 '24 08:05 djrm05

@djrm05 Firmware: https://github.com/darkxst/silabs-firmware-builder/tree/main/firmware_builds Check whether you have version 1.1 or 1.2 of zb-gw04

uwen70 avatar May 14 '24 09:05 uwen70

@uwen70 sorry but do you mean to use the existing for gw04? I don't see gw03 there

djrm05 avatar May 14 '24 09:05 djrm05

@uwen70 sorry but do you mean to use the existing for gw04? I don't see gw03 there

Sorry, I mixed up the gw03 and gw04.

For ZB-GW03 is currently no new firmware available. Follow https://github.com/xsp1989/zigbeeFirmware/issues/49 for updates.

uwen70 avatar May 14 '24 09:05 uwen70

Same issue here. I can not switch to ember as I use the Sonoff Zigbee Bridge with tasmota and there is no update available.

dev-2-4-h avatar May 22 '24 15:05 dev-2-4-h

Same issue here. I can not switch to ember as I use the Sonoff Zigbee Bridge with tasmota and there is no update available.

here as well. Using Sonoff ZBBridge Zigbee Gateway (ZBBridge) with Tasmota

pioneer-01 avatar May 27 '24 14:05 pioneer-01

New firmware 7.4.3.0 for ZB-GW03 available: https://github.com/xsp1989/zigbeeFirmware/tree/master/firmware/ZigbeeBridge_SM-011-signed Firmware 7.4.3.0 supports Ember driver.

uwen70 avatar Jun 01 '24 12:06 uwen70

Hi all I have the same error !

Z2m : 1.38.0 plugin : jeezigbee coordinator : Elelabs ELR023 fw : 6.10.3-41

didius62 avatar Jun 07 '24 15:06 didius62

Same issue, Unparsed frame 0xc4. Skipped

And this

Error 2024-06-19 08:14:53Frame changeSourceRouteHandler parsing error: RangeError: Attempt to access memory outside buffer bounds at new NodeError (node:internal/errors:405:5) at boundsError (node:internal/buffer:86:11) at Buffer.readUInt16LE (node:internal/buffer:245:5) at Buffer.readUIntLE (node:internal/buffer:182:17) at Function.deserialize (/app/node_modules/zigbee-herdsman/src/adapter/ezsp/driver/types/basic.ts:19:67) at new EZSPFrameData (/app/node_modules/zigbee-herdsman/src/adapter/ezsp/driver/ezsp.ts:180:54) at /app/node_modules/zigbee-herdsman/src/adapter/ezsp/driver/ezsp.ts:154:23 at Array.every () at Function.createFrame (/app/node_modules/zigbee-herdsman/src/adapter/ezsp/driver/ezsp.ts:148:15) at Ezsp.onFrameReceived (/app/node_modules/zigbee-herdsman/src/adapter/ezsp/driver/ezsp.ts:439:35)

jaspweowaale avatar Jun 19 '24 01:06 jaspweowaale

ah .. this explains why my frontend doesn't work anymore?

v 1.38.0-1

[2024-06-20 18:23:51] error: zh:ezsp:ezsp: Frame changeSourceRouteHandler parsing error: RangeError: Attempt to access memory outside buffer bounds at new NodeError (node:internal/errors:405:5) at boundsError (node:internal/buffer:86:11) at Buffer.readUInt16LE (node:internal/buffer:245:5) at Buffer.readUIntLE (node:internal/buffer:182:17) at Function.deserialize (/app/node_modules/zigbee-herdsman/src/adapter/ezsp/driver/types/basic.ts:19:67) at new EZSPFrameData (/app/node_modules/zigbee-herdsman/src/adapter/ezsp/driver/ezsp.ts:180:54) at /app/node_modules/zigbee-herdsman/src/adapter/ezsp/driver/ezsp.ts:154:23 at Array.every (<anonymous>) at Function.createFrame (/app/node_modules/zigbee-herdsman/src/adapter/ezsp/driver/ezsp.ts:148:15) at Ezsp.onFrameReceived (/app/node_modules/zigbee-herdsman/src/adapter/ezsp/driver/ezsp.ts:439:35)

fransyozef avatar Jun 20 '24 16:06 fransyozef

I'm not sure if helps but below are my USB's

Im new to this and running both ZAH and Zigbee2Mqtt, just to make it more fun Zwave I used to work with GPS modems and Use teraterm-4.106 and see the boot, but then crickets, all info and videos related to Version E and P

Perhaps my error is not related but its the same error on different models of USB sticks, to me it sounds like it is not a firmware issue, when possible to replicate the problem with Sonoff USB's

ttyACM0 /dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20240220163931-if00 Subsystem: tty Device path: /dev/ttyACM0 ID: /dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20240220163931-if00 Attributes: DEVLINKS: >- /dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20240220163931-if00 /dev/serial/by-path/platform-xhci-hcd.1-usb-0:2:1.0 /dev/serial/by-path/platform-xhci-hcd.1-usbv2-0:2:1.0 DEVNAME: /dev/ttyACM0 DEVPATH: >- /devices/platform/axi/1000120000.pcie/1f00300000.usb/xhci-hcd.1/usb3/3-2/3-2:1.0/tty/ttyACM0 ID_BUS: usb ID_MODEL: SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2 ID_MODEL_ENC: SONOFF\x20Zigbee\x203.0\x20USB\x20Dongle\x20Plus\x20V2 ID_MODEL_ID: 55d4 ID_PATH: platform-xhci-hcd.1-usb-0:2:1.0 ID_PATH_TAG: platform-xhci-hcd_1-usb-0_2_1_0 ID_PATH_WITH_USB_REVISION: platform-xhci-hcd.1-usbv2-0:2:1.0 ID_REVISION: '0442' ID_SERIAL: ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20240220163931 ID_SERIAL_SHORT: '20240220163931' ID_TYPE: generic ID_USB_DRIVER: cdc_acm ID_USB_INTERFACES: ':020201:0a0000:' ID_USB_INTERFACE_NUM: '00' ID_USB_MODEL: SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2 ID_USB_MODEL_ENC: SONOFF\x20Zigbee\x203.0\x20USB\x20Dongle\x20Plus\x20V2 ID_USB_MODEL_ID: 55d4 ID_USB_REVISION: '0442' ID_USB_SERIAL: ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20240220163931 ID_USB_SERIAL_SHORT: '20240220163931' ID_USB_TYPE: generic ID_USB_VENDOR: ITEAD ID_USB_VENDOR_ENC: ITEAD ID_USB_VENDOR_ID: 1a86 ID_VENDOR: ITEAD ID_VENDOR_ENC: ITEAD ID_VENDOR_ID: 1a86 MAJOR: '166' MINOR: '0' SUBSYSTEM: tty TAGS: ':systemd:' USEC_INITIALIZED: '1365461'

ttyACM1 /dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20240123115137-if00 Subsystem: tty Device path: /dev/ttyACM1 ID: /dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20240123115137-if00 Attributes: DEVLINKS: >- /dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20240123115137-if00 /dev/serial/by-path/platform-xhci-hcd.0-usb-0:2:1.0 /dev/serial/by-path/platform-xhci-hcd.0-usbv2-0:2:1.0 DEVNAME: /dev/ttyACM1 DEVPATH: >- /devices/platform/axi/1000120000.pcie/1f00200000.usb/xhci-hcd.0/usb1/1-2/1-2:1.0/tty/ttyACM1 ID_BUS: usb ID_MODEL: SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2 ID_MODEL_ENC: SONOFF\x20Zigbee\x203.0\x20USB\x20Dongle\x20Plus\x20V2 ID_MODEL_ID: 55d4 ID_PATH: platform-xhci-hcd.0-usb-0:2:1.0 ID_PATH_TAG: platform-xhci-hcd_0-usb-0_2_1_0 ID_PATH_WITH_USB_REVISION: platform-xhci-hcd.0-usbv2-0:2:1.0 ID_REVISION: '0442' ID_SERIAL: ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20240123115137 ID_SERIAL_SHORT: '20240123115137' ID_TYPE: generic ID_USB_DRIVER: cdc_acm ID_USB_INTERFACES: ':020201:0a0000:' ID_USB_INTERFACE_NUM: '00' ID_USB_MODEL: SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2 ID_USB_MODEL_ENC: SONOFF\x20Zigbee\x203.0\x20USB\x20Dongle\x20Plus\x20V2 ID_USB_MODEL_ID: 55d4 ID_USB_REVISION: '0442' ID_USB_SERIAL: ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20240123115137 ID_USB_SERIAL_SHORT: '20240123115137' ID_USB_TYPE: generic ID_USB_VENDOR: ITEAD ID_USB_VENDOR_ENC: ITEAD ID_USB_VENDOR_ID: 1a86 ID_VENDOR: ITEAD ID_VENDOR_ENC: ITEAD ID_VENDOR_ID: 1a86 MAJOR: '166' MINOR: '1' SUBSYSTEM: tty TAGS: ':systemd:' USEC_INITIALIZED: '1420613'

jaspweowaale avatar Jun 21 '24 01:06 jaspweowaale

I think the "changeSourceRouteHandler parsing error" occurs with all Zigbee USB sticks that work with an EFR32MGxx chip, provided the firmware of the stick is still version 6.x.x.x. An update to 7.4.x.x should fix the problem. @jaspweowaale: Your ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2 are ZBDongle-E with EFR32MG21 and should be able to be updated via WebFlasher (https://darkxst.github.io/silabs-firmware-builder/).

uwen70 avatar Jun 21 '24 10:06 uwen70

ah .. this explains why my frontend doesn't work anymore?

v 1.38.0-1

@fransyozef: No, I don't think so. Despite this error, my web frontend continued to work without any problems. After updating z2m from 1.37.x to 1.38.0-1, my web frontend only worked after another restart.

uwen70 avatar Jun 21 '24 10:06 uwen70