Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broadcasts failing on ember after migration #22453

Closed
julien-billaud opened this issue May 4, 2024 · 209 comments
Closed

Broadcasts failing on ember after migration #22453

julien-billaud opened this issue May 4, 2024 · 209 comments
Labels
ember Issues related to ember driver fixed-in-dev The issue should be fixed in current dev/edge. problem Something isn't working

Comments

@julien-billaud
Copy link

What happened?

While I've never been facing any issues for more than a year with the Sonoff Dongle-e + ezsp driver, I've tried to change the driver to ember, but nothing is working (tried multiple time) but sometime losing all the devices, sometime they are still there but impossible to interact with them, and pairing is never working. (for now I returned to the ezsp driver).
I'm not noticing much error in the log (only the broadcast error reported here #22445)

I've tried the exact same configuration on a regular x86 computer running debian (using the same zigbee dongle) and didn't face any issue which seems to be a linked with the Raspberry pi 4

What did you expect to happen?

No response

How to reproduce it (minimal and precise)

switch from eszp to ember driver

Zigbee2MQTT version

1.37.0

Adapter firmware version

7.4.2.0 build 0

Adapter

Sonoff dongle-e

Setup

Raspberry pi 4 using docker image

Debug log

No response

@julien-billaud julien-billaud added the problem Something isn't working label May 4, 2024
@Nerivec Nerivec added the ember Issues related to ember driver label May 4, 2024
@Nerivec
Copy link
Collaborator

Nerivec commented May 4, 2024

Any chance you can downgrade to 7.4.1 and see if you still have those problems on the pi?

@fir3drag0n
Copy link

fir3drag0n commented May 4, 2024

Same problem with SLZB-06M

But I don't have a raspberry pi 4, host is a x86 machine, running unraid and zigbee2mqtt in docker.

@Nerivec
Copy link
Collaborator

Nerivec commented May 4, 2024

Grouping the mentioned broadcasting issue here guys (#22445, #22398)
@supaeasy @alainsch @Ricc68 @VladislavVesely @luqsq

I cannot reproduce this with my Dongle-E. I've tried various firmware, various ways to migrate from ezsp to ember (even bad ones 😅).
Can you guys think of something that may be different in your setup from a "regular setup"?

@raphael1688
Copy link

Same problem with SLZB-06M

But I don't have a raspberry pi 4, host is a x86 machine, running unraid and zigbee2mqtt in docker.

adapter: ember
rtscts: false

May need to add 'rtscts' below adapter setting.

@supaeasy
Copy link

supaeasy commented May 5, 2024

Can you guys think of something that may be different in your setup from a "regular setup"?

Two things: I recently installed https://www.zigbee2mqtt.io/devices/ZFP-1A-CH.html#siglis-zfp-1a-ch

Wich I think is not a very common router. Swiss market only and most likely not very popular. Initially I had problems with it. Also shortly after I installed it, my second Dongle-E that I use as a router had to re-pair and this was one of the first devices in my 2yo network that I never had any problems with.

Second: Shortly before my Router Dongle failed I set reporting interval of every lamp to 1-3 seconds because I didn't see lamps status change quickly enough (or at all) when pressing a HW button like the switches mentioned above. After the Dongle failed I reverted this to 1-30 s and had no problems since. But I did the reverting before I saw the error in logs.

Also I have to say: I don't recognize bigger problems or misbehavior. I just saw the error in the logs. The only real problem I have is that sometimes (not reproducible) some IKEA Bulbs are starting in maximum dimmed mode even though at least one of them is never dimmed manually.

@julien-billaud
Copy link
Author

julien-billaud commented May 5, 2024

Grouping the mentioned broadcasting issue here guys (#22445, #22398) @supaeasy @alainsch @Ricc68 @VladislavVesely @luqsq

I cannot reproduce this with my Dongle-E. I've tried various firmware, various ways to migrate from ezsp to ember (even bad ones 😅). Can you guys think of something that may be different in your setup from a "regular setup"?

As the dongle-e is working using a docker images on an x86 environnement I'm guessing there is no issue with the zigbee Dongle, so if I focus on some specifics configs, here is what's coming to my mind as part of the change that might be different than a regular installation :

  • RPI4 using a Argon One case
  • RPI4 is booting from an SSD which is plugged to the USB3 port just bellow the Zigbee dongle
  • 64 bit is enabled for that OS
  • The persistent data of the container are stored on an encrypted (Luks volume) which is being mounted on boot

everything else is quite standard in my opinion.

@alainsch
Copy link

alainsch commented May 5, 2024

Nothing special over here. Had 1.36 running with SLZD-06M running on zigbee FW 20231030. Everything was running OK with adapter: ezsp

Did the following steps:

  • upgraded addon to 1.37

  • received the "zh:ezsp: Deprecated driver 'ezsp' currently in use, 'ember' will become the..." messages

  • changed adapter: ezsp to adapter: ember and restarted

  • got an error that my coordinator was not on EZSP13

  • upgraded my coordinator firmware to FW 20240408

  • as adviced by SMLight, changed config in zigbee2mqtt to "adapter: ember" + "rtscts: false"

  • restarted zigbee2mqtt and zigbee network is working

  • now at startup I get the message "zh:ember: Delivery of BROADCAST failed for "65533" [apsFrame={"profileId":0,"clusterId":19,"sourceEndpoint":0,"destinationEndpoint":0,"options":0,"groupId":0,"sequence":212} messageTag=255]"

  • pairing new entities does not work due to the same error

  • switching back to "adapter: ezsp" doesn't work either as I then get the error "zh:controller:greenpower: Received undefined command from '0'". another used already created a ticket for this.

So currently I'm in a state that my network is running, but I can't add any new devices.

Is there any more info we can provide?

@supaeasy
Copy link

supaeasy commented May 5, 2024

Oh I should have mentioned that I am running HAOS in a VM on Synology DSM 7.2.

Interference should not be a problem as my dongle is in a USB 2 port with a 2 m extension cable.

@alainsch
Copy link

alainsch commented May 5, 2024

My setup is HAOS running on a ODROID M1 with 8GB RAM and 512 GB SSD.

@fir3drag0n
Copy link

fir3drag0n commented May 5, 2024

Nothing special over here. Had 1.36 running with SLZD-06M running on zigbee FW 20231030. Everything was running OK with adapter: ezsp

Did the following steps:

  • upgraded addon to 1.37
  • received the "zh:ezsp: Deprecated driver 'ezsp' currently in use, 'ember' will become the..." messages
  • changed adapter: ezsp to adapter: ember and restarted
  • got an error that my coordinator was not on EZSP13
  • upgraded my coordinator firmware to FW 20240408
  • as adviced by SMLight, changed config in zigbee2mqtt to "adapter: ember" + "rtscts: false"
  • restarted zigbee2mqtt and zigbee network is working
  • now at startup I get the message "zh:ember: Delivery of BROADCAST failed for "65533" [apsFrame={"profileId":0,"clusterId":19,"sourceEndpoint":0,"destinationEndpoint":0,"options":0,"groupId":0,"sequence":212} messageTag=255]"
  • pairing new entities does not work due to the same error
  • switching back to "adapter: ezsp" doesn't work either as I then get the error "zh:controller:greenpower: Received undefined command from '0'". another used already created a ticket for this.

So currently I'm in a state that my network is running, but I can't add any new devices.

Is there any more info we can provide?

Exactly the same behavior. Plus the problem that no new devices can't be paired with ember. But with ezsp I can add devices. In my case especially all my routers get disconnected.

@fir3drag0n
Copy link

I do have 4 mmwave presence sensors. Maybe these devices have an influence.

@alainsch
Copy link

alainsch commented May 5, 2024

Sorry, posted my follow-up on the wrong ticket...

These are the messages I see when I startup Zigbee2MQTT. Maybe they are related.

[2024-05-05 11:00:43] info: z2m: Logging to console, file (filename: log.log)
[2024-05-05 11:00:49] info: z2m: Starting Zigbee2MQTT version 1.37.0 (commit #unknown)
[2024-05-05 11:00:49] info: z2m: Starting zigbee-herdsman (0.45.0)
[2024-05-05 11:00:49] info: zh:ember: ======== Ember Adapter Starting ========
[2024-05-05 11:00:49] info: zh:ember:ezsp: ======== EZSP starting ========
[2024-05-05 11:00:49] info: zh:ember:uart:ash: ======== ASH NCP reset ========
[2024-05-05 11:00:49] info: zh:ember:uart:ash: Socket ready
[2024-05-05 11:00:49] info: zh:ember:uart:ash: ======== ASH starting ========
[2024-05-05 11:00:51] info: zh:ember:uart:ash: ======== ASH connected ========
[2024-05-05 11:00:51] info: zh:ember:uart:ash: ======== ASH started ========
[2024-05-05 11:00:51] info: zh:ember:ezsp: ======== EZSP started ========
[2024-05-05 11:00:51] warning: zh:ember: [EzspConfigId] Failed to SET "ADDRESS_TABLE_SIZE" TO "16" with status=ERROR_OUT_OF_MEMORY. Firmware value will be used instead.
[2024-05-05 11:00:51] warning: zh:ember: [EzspConfigId] Failed to SET "APS_UNICAST_MESSAGE_COUNT" TO "32" with status=ERROR_OUT_OF_MEMORY. Firmware value will be used instead.
[2024-05-05 11:00:51] warning: zh:ember: [EzspConfigId] Failed to SET "NEIGHBOR_TABLE_SIZE" TO "26" with status=ERROR_OUT_OF_MEMORY. Firmware value will be used instead.
[2024-05-05 11:00:51] warning: zh:ember: [EzspConfigId] Failed to SET "SOURCE_ROUTE_TABLE_SIZE" TO "200" with status=ERROR_INVALID_VALUE. Firmware value will be used instead.
[2024-05-05 11:00:51] warning: zh:ember: [EzspConfigId] Failed to SET "MULTICAST_TABLE_SIZE" TO "16" with status=ERROR_OUT_OF_MEMORY. Firmware value will be used instead.
[2024-05-05 11:00:51] info: zh:ember: [STACK STATUS] Network up.
[2024-05-05 11:00:51] info: zh:ember: [INIT TC] NCP network matches config.
[2024-05-05 11:00:51] info: zh:ember: [CONCENTRATOR] Started source route discovery. 1247ms until next broadcast.
[2024-05-05 11:00:51] info: z2m: zigbee-herdsman started (resumed)
[2024-05-05 11:00:51] info: z2m: Coordinator firmware version: '{"meta":{"build":0,"ezsp":13,"major":7,"minor":4,"patch":1,"revision":"7.4.1 [GA]","special":0,"type":170},"type":"EmberZNet"}'
[2024-05-05 11:00:51] info: z2m: Currently 12 devices are joined:
...

[2024-05-05 11:00:51] info: z2m: Zigbee: disabling joining new devices.
[2024-05-05 11:00:51] info: z2m: Connecting to MQTT server at mqtt://core-mosquitto:1883
[2024-05-05 11:00:52] info: z2m: Connected to MQTT server
[2024-05-05 11:00:52] info: z2m: Started frontend on port 8099
[2024-05-05 11:00:53] info: z2m: Zigbee2MQTT started!
[2024-05-05 11:01:11] error: zh:ember: Delivery of BROADCAST failed for "65532" [apsFrame={"profileId":0,"clusterId":31,"sourceEndpoint":0,"destinationEndpoint":0,"options":0,"groupId":0,"sequence":0} messageTag=255]
[2024-05-05 11:01:23] error: zh:ember: Delivery of BROADCAST failed for "65532" [apsFrame={"profileId":0,"clusterId":31,"sourceEndpoint":0,"destinationEndpoint":0,"options":0,"groupId":0,"sequence":0} messageTag=255]
[2024-05-05 11:01:33] error: zh:ember: Delivery of BROADCAST failed for "65532" [apsFrame={"profileId":0,"clusterId":31,"sourceEndpoint":0,"destinationEndpoint":0,"options":0,"groupId":0,"sequence":0} messageTag=255]

Whenever I try to start the pairing process, I see these messages:

[2024-05-05 11:03:28] info: z2m: Zigbee: allowing new devices to join.
[2024-05-05 11:03:28] info: zh:ember: [STACK STATUS] Network opened.
[2024-05-05 11:03:29] error: zh:ember: Delivery of BROADCAST failed for "65532" [apsFrame={"profileId":0,"clusterId":54,"sourceEndpoint":0,"destinationEndpoint":0,"options":256,"groupId":0,"sequence":240} messageTag=2]
[2024-05-05 11:03:29] error: zh:ember: Delivery of BROADCAST failed for "65533" [apsFrame={"profileId":41440,"clusterId":33,"sourceEndpoint":242,"destinationEndpoint":242,"options":256,"groupId":0,"sequence":241} messageTag=3]

@fir3drag0n
Copy link

@alainsch I also had a discussion with @Nerivec at discord, because I also have the same stillsaying error message.

@alainsch
Copy link

alainsch commented May 5, 2024

Exactly the same behavior. Plus the problem that no new devices can't be paired with ember. But with ezsp I can add devices. In my case especially all my routers get disconnected.

Ah yes, and I wasn't aware it is related...

I have a SLZB-06M as coordinator (groundfloor) and a Sonoff Dongle-E flashed as router (first floor). Yesterday evening my Sonoff router got disconnected. It is while trying to pair it again that I found out I couldn't pair any devices.

I have a very small zigbee network (more a test setup here), so I have no other routers, only end devices.

@alainsch
Copy link

alainsch commented May 5, 2024

@alainsch I also had a discussion with @Nerivec at discord, because I also have the same stillsaying error message.

I'm pretty new to discord, I'll try to find the channel (?) so I can follow the discussion.

@fir3drag0n
Copy link

Exactly the same behavior. Plus the problem that no new devices can't be paired with ember. But with ezsp I can add devices. In my case especially all my routers get disconnected.

Ah yes, and I wasn't aware it is related...

I have a SLZB-06M as coordinator (groundfloor) and a Sonoff Dongle-E flashed as router (first floor). Yesterday evening my Sonoff router got disconnected. It is while trying to pair it again that I found out I couldn't pair any devices.

I have a very small zigbee network (more a test setup here), so I have no other routers, only end devices.

I already have nearly 70 devices...

@alainsch
Copy link

alainsch commented May 5, 2024

I already have nearly 70 devices...

Here at home, HA is a small setup (12 devices) I use mainly for testing. But in our vacation home, everything is controlled by HA and we have 51 zigbee and 33 ESPHome devices.

In this second setup, I also have the same SLZB-06M coordinator, but still on the older 20231030 firmware, where the adapter is still defined as 'adapter: ezsp'.

Since I ugraded to 1.37, I couldn't pair any new devices too, due to another error: "zh:controller:greenpower: Received undefined command from '0'"

And that setup is not a test setup :-(

@fir3drag0n
Copy link

@alainsch I also had a discussion with @Nerivec at discord, because I also have the same stillsaying error message.

I'm pretty new to discord, I'll try to find the channel (?) so I can follow the discussion.

In the development-branch channel. The similarity we both have is the same coordinator (I am at the dev Firmware right now). But maybe you can rather rule out the cause if you only have 12 devices in your setup.

@Ricc68
Copy link

Ricc68 commented May 5, 2024

Very very simple configuration here.

HAOS on qemu VM in low end x86-64 QNAP nas, resources 2 cpu+2 GB ram as suggested by HAOS setup guide.
I have seen a lot of ppl using VMs or arm devices: one common point may be low resources in terms of CPU power and/or RAM.

Back to the setup, I can report two setups:

  1. ZBDongle-E with fw 7.4.2, Z2M 1.37.0, ember driver. Only the ZBDongle-E is in the ZigBee network so it is only the coordinator. The broadcast errors happens. This may rule out the devices and spot the light on the coordinator.
  2. ZBDongle-E as above in above setup but with 2 Sonoff TRVZB valves added to the ZigBee network: same error continues to happen. But since it was happening with the coordinator alone as for setup 1, I would rule out the fact that I have added the 2 devices.

Anyway I see from other posts that the error is happening with a variety of devices and if I look at another common factor, all the variety of networks showing the error have -> a coordinator <- which again spots the light on the coordinator.

I see that @Nerivec is not able to reproduce the issue, and, needless to say, also Nerivec is working with a coordinator which should obviously rule out the coordinator itself (unless there is some elusive coordinator hardware common factor), maybe a good starting point for you would be to constrain the system on a low resource/slow host or a VM with limited resources to see what happens with the coordinator handling of Z2M.

Maybe another hint maybe found in the first post from @julien-billaud: "I've tried the exact same configuration on a regular x86 computer running debian (using the same zigbee dongle) and didn't face any issue which seems to be a linked with the Raspberry pi 4".

@alainsch
Copy link

alainsch commented May 5, 2024

OK, because my setup is a small setup mainly for test, I did the following steps:

  • removed zigbee2mqtt addon
  • removed the zigbee2mqtt folder from my config
  • re-installed zigbee2mqtt with the SLZB-06M and "adapter:ezsp"
  • startup and got the following messages

[12:01:03] INFO: Preparing to start...
[12:01:04] INFO: Socat not enabled
[12:01:10] INFO: Starting Zigbee2MQTT...
[2024-05-05 12:01:14] info: z2m: Logging to console, file (filename: log.log)
[2024-05-05 12:01:20] info: z2m: Starting Zigbee2MQTT version 1.37.0 (commit #unknown)
[2024-05-05 12:01:20] info: z2m: Starting zigbee-herdsman (0.45.0)
[2024-05-05 12:01:20] warning: zh:ezsp: Deprecated driver 'ezsp' currently in use, 'ember' will become the officially supported EmberZNet driver in next release. If using Zigbee2MQTT see #21462
[2024-05-05 12:01:24] info: zh:ezsp:driv: Leaving current network and forming new network
[2024-05-05 12:01:25] info: zh:ezsp:driv: Form network
[2024-05-05 12:01:26] info: zh:controller: Wrote coordinator backup to '/config/zigbee2mqtt/level_0/coordinator_backup.json'
[2024-05-05 12:01:26] info: z2m: zigbee-herdsman started (reset)
[2024-05-05 12:01:26] info: z2m: Coordinator firmware version: '{"meta":{"maintrel":"1 ","majorrel":"7","minorrel":"4","product":13,"revision":"7.4.1.0 build 0"},"type":"EZSP v13"}'
[2024-05-05 12:01:26] info: z2m: Currently 0 devices are joined:
[2024-05-05 12:01:26] info: z2m: Zigbee: disabling joining new devices.
[2024-05-05 12:01:27] info: z2m: Connecting to MQTT server at mqtt://core-mosquitto:1883
[2024-05-05 12:01:27] info: z2m: Connected to MQTT server
[2024-05-05 12:01:28] info: z2m: Started frontend on port 8099
[2024-05-05 12:01:28] info: z2m: Zigbee2MQTT started!

  • when I try to start pairing a device, I see

[2024-05-05 12:01:40] info: z2m: Zigbee: allowing new devices to join.
[2024-05-05 12:01:41] error: zh:controller:greenpower: Received undefined command from '0'
[2024-05-05 12:02:00] info: zh:controller: Interview for '0x00158d0008083d2a' started
[2024-05-05 12:02:00] info: z2m: Device '0x00158d0008083d2a' joined
[2024-05-05 12:02:00] info: z2m: Starting interview of '0x00158d0008083d2a'
[2024-05-05 12:02:11] info: zh:controller: Succesfully interviewed '0x00158d0008083d2a'
[2024-05-05 12:02:11] info: z2m: Successfully interviewed '0x00158d0008083d2a', device has successfully been paired
[2024-05-05 12:02:11] info: z2m: Device '0x00158d0008083d2a' is supported, identified as: Aqara Motion sensor (RTCGQ11LM)
[2024-05-05 12:02:11] info: z2m: Configuring '0x00158d0008083d2a'
[2024-05-05 12:02:11] info: z2m: Successfully configured '0x00158d0008083d2a'

  • so pairing is possible in "adapter:ezsp" mode. Removed the device...

[2024-05-05 12:02:19] info: z2m: Removing device '0x00158d0008083d2a' (block: false, force: true)
[2024-05-05 12:02:19] info: z2m: Successfully removed device '0x00158d0008083d2a' (block: false, force: true)

  • changed the config to "adapter: ember" and "rtscts: false" and restarted zigbee2mqtt

[12:06:41] INFO: Preparing to start...
[12:06:42] INFO: Socat not enabled
[12:06:48] INFO: Starting Zigbee2MQTT...
[2024-05-05 12:06:53] info: z2m: Logging to console, file (filename: log.log)
[2024-05-05 12:06:58] info: z2m: Starting Zigbee2MQTT version 1.37.0 (commit #unknown)
[2024-05-05 12:06:58] info: z2m: Starting zigbee-herdsman (0.45.0)
[2024-05-05 12:06:59] info: zh:ember: ======== Ember Adapter Starting ========
[2024-05-05 12:06:59] info: zh:ember:ezsp: ======== EZSP starting ========
[2024-05-05 12:06:59] info: zh:ember:uart:ash: ======== ASH NCP reset ========
[2024-05-05 12:06:59] info: zh:ember:uart:ash: Socket ready
[2024-05-05 12:06:59] info: zh:ember:uart:ash: ======== ASH starting ========
[2024-05-05 12:07:00] info: zh:ember:uart:ash: ======== ASH connected ========
[2024-05-05 12:07:00] info: zh:ember:uart:ash: ======== ASH started ========
[2024-05-05 12:07:00] info: zh:ember:ezsp: ======== EZSP started ========
[2024-05-05 12:07:00] warning: zh:ember: [EzspConfigId] Failed to SET "ADDRESS_TABLE_SIZE" TO "16" with status=ERROR_OUT_OF_MEMORY. Firmware value will be used instead.
[2024-05-05 12:07:00] warning: zh:ember: [EzspConfigId] Failed to SET "APS_UNICAST_MESSAGE_COUNT" TO "32" with status=ERROR_OUT_OF_MEMORY. Firmware value will be used instead.
[2024-05-05 12:07:00] warning: zh:ember: [EzspConfigId] Failed to SET "NEIGHBOR_TABLE_SIZE" TO "26" with status=ERROR_OUT_OF_MEMORY. Firmware value will be used instead.
[2024-05-05 12:07:00] warning: zh:ember: [EzspConfigId] Failed to SET "SOURCE_ROUTE_TABLE_SIZE" TO "200" with status=ERROR_INVALID_VALUE. Firmware value will be used instead.
[2024-05-05 12:07:00] warning: zh:ember: [EzspConfigId] Failed to SET "MULTICAST_TABLE_SIZE" TO "16" with status=ERROR_OUT_OF_MEMORY. Firmware value will be used instead.
[2024-05-05 12:07:00] info: zh:ember: [STACK STATUS] Network up.
[2024-05-05 12:07:00] info: zh:ember: [INIT TC] NCP network matches config.
[2024-05-05 12:07:00] info: zh:ember: [CONCENTRATOR] Started source route discovery. 1248ms until next broadcast.
[2024-05-05 12:07:01] info: z2m: zigbee-herdsman started (resumed)
[2024-05-05 12:07:01] info: z2m: Coordinator firmware version: '{"meta":{"build":0,"ezsp":13,"major":7,"minor":4,"patch":1,"revision":"7.4.1 [GA]","special":0,"type":170},"type":"EmberZNet"}'
[2024-05-05 12:07:01] info: z2m: Currently 0 devices are joined:
[2024-05-05 12:07:01] info: z2m: Zigbee: disabling joining new devices.
[2024-05-05 12:07:01] info: z2m: Connecting to MQTT server at mqtt://core-mosquitto:1883
[2024-05-05 12:07:01] info: z2m: Connected to MQTT server
[2024-05-05 12:07:02] info: z2m: Started frontend on port 8099
[2024-05-05 12:07:02] info: z2m: Zigbee2MQTT started!

  • when I try to pair the same aqara motion sensor...

[2024-05-05 12:07:40] info: z2m: Zigbee: allowing new devices to join.
[2024-05-05 12:07:40] info: zh:ember: [STACK STATUS] Network opened.
[2024-05-05 12:08:08] info: zh:controller: Interview for '0x00158d0008083d2a' started
[2024-05-05 12:08:08] info: z2m: Device '0x00158d0008083d2a' joined
[2024-05-05 12:08:09] info: z2m: Starting interview of '0x00158d0008083d2a'
[2024-05-05 12:08:11] warning: zh:ember: [ZDO] Node descriptor for "7769" reports device is only compliant to revision "pre-21" of the ZigBee specification (current revision: 23).
[2024-05-05 12:08:47] info: zh:controller: Succesfully interviewed '0x00158d0008083d2a'
[2024-05-05 12:08:47] info: z2m: Successfully interviewed '0x00158d0008083d2a', device has successfully been paired
[2024-05-05 12:08:47] info: z2m: Device '0x00158d0008083d2a' is supported, identified as: Aqara Motion sensor (RTCGQ11LM)
[2024-05-05 12:08:47] info: z2m: Configuring '0x00158d0008083d2a'
[2024-05-05 12:08:47] info: z2m: Successfully configured '0x00158d0008083d2a'

so pairing is working and I didn't get the broadcast error now, not while starting up and not while pairing.

So starting over with zigbee2mqtt solved it for me, but that is not possible for everyone I think :-)

@alainsch
Copy link

alainsch commented May 5, 2024

so pairing is working and I didn't get the broadcast error now, not while starting up and not while pairing.

So starting over with zigbee2mqtt solved it for me, but that is not possible for everyone I think :-)

No, not completly... after approx 5 minutes, pairing was again not possible. No errors, but the connection / interview didn't start. Tried to restart z2m and reboot the coordinator, nothing helps.

Downgraded the coordinator to the 20231030 FW (ESZP12) and switched back to "adapter: ezsp" and I still got the "error: zh:controller:greenpower: Received undefined command from '0' " messages, but pairing is possible again.

Will see in about 10 minutes...

@fir3drag0n
Copy link

fir3drag0n commented May 5, 2024

Very very simple configuration here.

HAOS on qemu VM in low end x86-64 QNAP nas, resources 2 cpu+2 GB ram as suggested by HAOS setup guide. I have seen a lot of ppl using VMs or arm devices: one common point may be low resources in terms of CPU power and/or RAM.

Back to the setup, I can report two setups:

  1. ZBDongle-E with fw 7.4.2, Z2M 1.37.0, ember driver. Only the ZBDongle-E is in the ZigBee network so it is only the coordinator. The broadcast errors happens. This may rule out the devices and spot the light on the coordinator.
  2. ZBDongle-E as above in above setup but with 2 Sonoff TRVZB valves added to the ZigBee network: same error continues to happen. But since it was happening with the coordinator alone as for setup 1, I would rule out the fact that I have added the 2 devices.

Anyway I see from other posts that the error is happening with a variety of devices and if I look at another common factor, all the variety of networks showing the error have -> a coordinator <- which again spots the light on the coordinator.

I see that @Nerivec is not able to reproduce the issue, and, needless to say, also Nerivec is working with a coordinator which should obviously rule out the coordinator itself (unless there is some elusive coordinator hardware common factor), maybe a good starting point for you would be to constrain the system on a low resource/slow host or a VM with limited resources to see what happens with the coordinator handling of Z2M.

Maybe another hint maybe found in the first post from @julien-billaud: "I've tried the exact same configuration on a regular x86 computer running debian (using the same zigbee dongle) and didn't face any issue which seems to be a linked with the Raspberry pi 4".

I do also have one Sonoff TRVZB.

And I also started fresh with one new zigbee2mqtt config and just the coordinator, and even at start the pairing/broadcast issue appeared immediately. I don't think that it is an issue with raspberry pi as I am using an x86 machine running a zigbee2mqtt container (docker).

I also observed that a coordinator reset sometimes helped. @Nerivec recommended to do a hard reset with my device (that includes pushing the physical reset button). This also helped me once starting without any issues, but after restarting again, I again suffered by those errors.

@Ricc68
Copy link

Ricc68 commented May 5, 2024

HAOS on qemu VM in low end x86-64 QNAP nas, resources 2 cpu+2 GB ram as suggested by HAOS setup guide. I have seen a lot of ppl using VMs or arm devices: one common point may be low resources in terms of CPU power and/or RAM.

I don't think that it is an issue with raspberry pi as I am using an x86 machine running a zigbee2mqtt container (docker).

Just to have a better understanding: what CPU/RAM is your x86 machine? Is it running what OS? Is it on bare metal or on a virtualization environment like Proxmox or other VM of any sort? I agree dockers are less demanding, but performance then is limited by the host so it would be useful to know what kind of host is running your docker and how loaded is your x86 system.

@fir3drag0n
Copy link

fir3drag0n commented May 5, 2024

It is a Intel® Core™ i3-9100 system with 64 GB RAM ECC.
It is running Unraid / NAS system with virtualization options (docker or vms).

@Nerivec
Copy link
Collaborator

Nerivec commented May 5, 2024

I have a low-resource VM that mimics the specs of an average PI 4 to run tests on stuff that I know affect performance. No issue there either. No failed broadcast without any device, nor with devices, and successfully paired & re-paired a dozen devices since it's been running for a couple of hours.

But just in case, you can try giving it some breathing room with the adapter_delay setting:

advanced:
  adapter_delay: 20

Default/min is 5, max is 60 (milliseconds). Note that at 60, you are likely to experience some delays when triggering devices rapidly.


PS: I created an issue in the firmware repo for the SLZB-06M and the failing config IDs. May or may not be related to the ensuing troubles, but we need to get to the bottom of it nonetheless. darkxst/silabs-firmware-builder#90

@Ricc68
Copy link

Ricc68 commented May 5, 2024

adapter_delay: 20

Added the adapter_delay option, no joy:

[2024-05-05 14:42:54] error: zh:ember: Delivery of BROADCAST failed for "65532" [apsFrame={"profileId":0,"clusterId":54,"sourceEndpoint":0,"destinationEndpoint":0,"options":256,"groupId":0,"sequence":170} messageTag=255]
[2024-05-05 14:42:55] error: zh:ember: Delivery of BROADCAST failed for "65533" [apsFrame={"profileId":41440,"clusterId":33,"sourceEndpoint":242,"destinationEndpoint":242,"options":256,"groupId":0,"sequence":171} messageTag=1]
[2024-05-05 14:42:57] error: zh:ember: Delivery of BROADCAST failed for "65533" [apsFrame={"profileId":0,"clusterId":19,"sourceEndpoint":0,"destinationEndpoint":0,"options":1024,"groupId":0,"sequence":53} messageTag=255]
[2024-05-05 14:44:07] error: zh:ember: Delivery of BROADCAST failed for "65533" [apsFrame={"profileId":0,"clusterId":19,"sourceEndpoint":0,"destinationEndpoint":0,"options":1024,"groupId":0,"sequence":59} messageTag=255]

at startup of z2m.

@julien-billaud
Copy link
Author

I've been doing little more testing and figured out "what was wrong".
I've done the following tests :
Start on a fresh install for the pi4 and install the latest version of docker, all from an SD card (removing de SSD plugged on the USB3 port) only remaining plugged, the dongle-e on the second USB3 port.
Averything has been running perfectly fine with the ember driver.
From that fresh install, I then plugged the SSD on the USB3 port then it started to be way less responsive so I've rebooted the system and got the exact same "BROADCAST" errors and nothing was working.
Then, I've switched the dongle-e to one of the USB2.0 port and kept the SSD to one of the USB3 port then no more error.
last test, starting the PI4 from the SSD plugged to USB3.0 then the Dongle-e to USB2.0 and now everything is working fine with ember driver.

To conclude, it seems like the ember driver is for some reason little bit more sensitive (I know that using the Dongle without extension cord isn't ideal).
Hope it will help for those who are observing the same "BROADCAST" error after switching from ezsp to ember driver and/or what in that driver is leading to that strange behavior.

@supaeasy
Copy link

supaeasy commented May 5, 2024

Can't be my problem. USB2 Port with 2m extension cable.

@lennon101
Copy link

If anyone's still struggling try using the 7.4.4 firmware. Everything seems much happier now.

Is that using the ember setting on z2m?

@lawrencedudley
Copy link

If anyone's still struggling try using the 7.4.4 firmware. Everything seems much happier now.

Is that using the ember setting on z2m?

Yup!

@JericoPablo
Copy link

I still have this issues with 7.4.4 and latest Z2M. Can anyone help me out here? It's really annoying and I believe the reason why some devices lose connection.

@andrei-cerbulescu
Copy link

I still have this issues with 7.4.4 and latest Z2M. Can anyone help me out here? It's really annoying and I believe the reason why some devices lose connection.

I believe the same thing but am still looking for a fix to it 😞

@m33ts4k0z
Copy link

Any particular reason why you all not upgrading to the 8.x.x firmware?

@lawrencedudley
Copy link

Good question! Didn't realise it had been released.

@nerthazrim
Copy link

Any particular reason why you all not upgrading to the 8.x.x firmware?

Hi! Where do you fetch your firmware?
Latest version I can find here is 7.4.4:
https://github.com/darkxst/silabs-firmware-builder/tree/main/firmware_builds/zbdonglee

Thanks!

@m33ts4k0z
Copy link

m33ts4k0z commented Oct 5, 2024

Here is the firmware

@lawrencedudley
Copy link

Ah I had no idea @Nerivec has been doing their own firmware builds! I'll give it a go 👌

@kwetnico
Copy link

kwetnico commented Oct 6, 2024

We are lost with all the firmware...

@Neocray
Copy link

Neocray commented Oct 7, 2024

Here is the firmware

Which one is to be used between the two ?

sonoff_zbdonglee_ncp-uart-sw_115200_8.0.1.0.gbl
sonoff_zbdonglee_rcp-uart-802154-blehci-sw_460800_2024.6.1.gbl

@lawrencedudley
Copy link

@Neocray I'd have assumed the ncp one

@Neocray
Copy link

Neocray commented Oct 7, 2024

@lawrencedudley I’ve just found out that. NCP is for ember, RCP is the one for multiPAN zigbee+openthread, which use is officially advised against (stability issues, which is the very topic here).

@lawrencedudley
Copy link

The RCP one won't work at all with Z2M, you'd need some kind of working multiprotocol bridge which yeah, isn't currently stable enough to use (and may never be). You give the that NCP firmware a go? I'm tempted but also I don't want to cause myself a load of headaches.

@nerthazrim
Copy link

nerthazrim commented Oct 7, 2024

I might be missing something but running this:
/opt/universal-silabs-flasher/bin/universal-silabs-flasher --device /dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20231008095558-if00 flash --firmware /tmp/sonoff_zbdonglee_ncp-uart-sw_115200_8.0.2.0.gbl

Gives me this:
ValueError: 'ncp-uart-sw' is not a valid FirmwareImageType

Looks like it's not the proper firmware for a Sonoff Dongle-E.
I notice the difference between "sw" and "hw", maybe the reason is around that?

@m33ts4k0z
Copy link

m33ts4k0z commented Oct 7, 2024

Always use then ncp one. I have created a docker container together with @Nerivec which uses the multiprotocol (rcp) one but its not quite stable yet.

@m33ts4k0z
Copy link

m33ts4k0z commented Oct 7, 2024

I might be missing something but running this: /opt/universal-silabs-flasher/bin/universal-silabs-flasher --device /dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20231008095558-if00 flash --firmware /tmp/sonoff_zbdonglee_ncp-uart-sw_115200_8.0.2.0.gbl

Gives me this: ValueError: 'ncp-uart-sw' is not a valid FirmwareImageType

Looks like it's not the proper firmware for a Sonoff Dongle-E. I notice the difference between "sw" and "hw", maybe the reason is around that?

Its the correct firmware. I use the same device. Just disable the hardware(hw) flow control in z2m since this firmware uses software (sw)

rtscts: false

Also use ember-zli in order to flash it. The official flasher will most likely not work.

@m33ts4k0z
Copy link

m33ts4k0z commented Oct 7, 2024

Just a note. There are variants of @Nerivecs firmware (blehci) that enable bluetooth on the dongles even if the dongle itself is not officially advertised as supporting BLE. However this will only work using multiprotocol (rcp) which is still experimental.

@nerthazrim
Copy link

nerthazrim commented Oct 7, 2024

Thanks!

Its the correct firmware. I use the same device. Just disable the hardware(hw) flow control in z2m since this firmware uses software (sw)

rtscts: false

I don't see how disabling anything in Z2M will help me flash the firmware of the dongle. Is there an option I should pass to the universal flasher, to disable the check and move from hw to sw?

Additionally, doesn't it mean better performance if the flow control is hw rather than sw?

@m33ts4k0z
Copy link

m33ts4k0z commented Oct 7, 2024

Thanks!

Its the correct firmware. I use the same device. Just disable the hardware(hw) flow control in z2m since this firmware uses software (sw)
rtscts: false

I don't see how disabling anything in Z2M will help me flash the firmware of the dongle. Is there an option I should pass to the universal flasher, to disable the check and move from hw to sw?

Additionally, doesn't it mean better performance if the flow control is hw rather than sw?

if you dont disable it, it wont work after flasing it. It doesnt have to do with the flashing process itself.

No I dont think the universal flasher will work but @Nerivec can confirm that. I myself used ember-zli to flash it.

hw or sw flow has nothing to do with reliability or stability. It just how the firmware wants to handle things. The outcome is the same.

@Nerivec
Copy link
Collaborator

Nerivec commented Oct 7, 2024

Indeed, use Ember ZLI for flashing 8.0.2.

I'm discussing with puddly to remove that restriction in universal-silabs-flasher that prevents flashing these.
Long story:
The firmware type is hardcoded in universal-silabs-flasher, but these firmware are actually matched against what they "really" are, not what the original project's name says (for example, Dongle-E firmware previously said hw, even though Dongle-E does not support hw and has actually always been sw under the hood).
The same applies to flashing other types of firmware, that universal-silabs-flasher should support, but that restriction prevents.


Some more notes:

  • rtscts: false or no rtscts at all in your config equates to the same thing (Z2M sets it to false automatically if not present).
  • NCP => regular use with Z2M
  • RCP => requires a multiprotocol software of some kind (see what m33ts4koz said above)
  • 8.0.x are not officially supported by other firmware builders, but I had to build some to test the ember implementation for Z2M, hence the repo I created. You can consider these edge versions.
    • I have had some good feedback on 8.0.2 so far. See the notes in the release for more details on what's changed.
    • I also use that repo for specific testing, debugging, etc. for small groups of users (affected by specific issues). These do not appear in the Releases however.
  • For Dongle-E users on 7.4.x with issues, 7.4.4 apparently fixes a stability issue (never had it myself, but several users have reported the same behavior).
  • 7.4.4 remains the recommended version for now.

@Neocray
Copy link

Neocray commented Oct 7, 2024

I used https://darkxst.github.io/silabs-firmware-builder/ to flash 8.0.1 then 8.0.2 without issue.
@lawrencedudley I just needed to delete configuration.yaml after update to 8.0.1 because of the different baudrate (115200 here vs 230400 for 7.4.4).

@JericoPablo
Copy link

Like most people have already commented, just revert to previous Z2M version until a new fixed one comes out.

which one is stable? So its not the firmware which makes issues, its Z2M? Sorry at this point i tried so many different things that im a bit confused now. Thanks for the reply

@supaeasy
Copy link

supaeasy commented Oct 9, 2024

The trouble definitely started before 1.40 for me. Iirc 1.37 was the latest stable release for me. Though I still think it has to do with IKEA firmware in combination with ember and not Z2M itself.

@Nerivec
Copy link
Collaborator

Nerivec commented Oct 9, 2024

@Jojonintendo There was no change in ember regarding anything that could affect this in 1.40.1>1.40.2 (no change at all actually, except for the ZDO move, definitely unrelated). If you are having problems with 1.40.2, it must be something else. If you are still using the firmware from ITEAD, I'd definitely recommend trying 7.4.4 from darkxst, these are far more thoroughly tested than ITEAD's ones, and we know exactly how they were built since it's open source.


Note that for anyone getting massive interference on 2.4GHz (regular or periodic), this is nothing the firmware or Z2M will ever be able to fix. You have to go through the usual steps to try to decrease said interference.


You can also try to customize the stack parameters on Z2M start. Of particular interest here, is {"CCA_MODE": "ALWAYS_TRANSMIT"}. You can always just remove the customization if other issues crop up.
https://www.mathworks.com/help/comm/ug/aloha-and-csma-ca-packetized-wireless-networks.html

@Jojonintendo
Copy link

My bad, I thought I was replying to a different issue Z2M related. I'll remove my previous comments to avoid confusion.

@andrei-cerbulescu
Copy link

After updating my ember Sonoff Zigbee adapter to 8.0.1, the broadcast error seems to have been fixed.
For anyone wondering, I am running Z2M version 1.40.2 (the latest as of now) on a docker container.
From what I could see, the issue was also fixed by running 7.4.4 on an older build (but I generally prefer running the latest versions)

@JericoPablo
Copy link

JericoPablo commented Oct 12, 2024

The trouble definitely started before 1.40 for me. Iirc 1.37 was the latest stable release for me. Though I still think it has to do with IKEA firmware in combination with ember and not Z2M itself.

you my friend you are a true hero. Downgraded Z2M to 1.38.0-1. Worked out no "error: zh:ember: Delivery of BROADCAST failed for '65535'." anymore.
Ember latest (ncp-uart-hw-v7.4.4.0-zbdonglee-115200.gbl"

I tried so many Ember firmware versions nothing worked. I even turned off WiFi (both 2.4 and 5) nothing worked before...
So if anyone wondering what to do, downgrade that Z2M to 1.38.0 and enjoy ur life

@Nerivec
Copy link
Collaborator

Nerivec commented Oct 12, 2024

@supaeasy Can you try walking zigbee-herdsman versions from 0.49.3 to 0.56.1 until you find exactly which one is problematic?
Focus on versions with Ember changes, you can skip the others: https://github.com/Koenkk/zigbee-herdsman/releases?page=4

@maverick1872
Copy link

maverick1872 commented Oct 17, 2024

Just chiming in here as well @Nerivec.

Got a new Sonoff ZBDongle-E and figured it was a good time to migrate away from ZHA when setting it up. Flashed firmware 7.4.4 onto it and setup Zigbee2MQTT (ffc2ff1) using the ember adapter. Got everything running and started to attempt to pair devices I had not previously had paired and could not get anything to indicate something was happening. Checking the logs I found the following which helped me stumble upon this issue.

zigbee-controller  | [STACK STATUS] Network opened.
zigbee-controller  | Zigbee2MQTT:info  2024-10-16 21:42:47: MQTT publish: topic 'zigbee2mqtt/bridge/response/permit_join', payload '{"data":{"time":254,"value":true},"status":"ok","transaction":"cdfgu-15"}'
zigbee-controller  | Delivery of BROADCAST failed for "65532" [apsFrame={"profileId":0,"clusterId":54,"sourceEndpoint":0,"destinationEndpoint":0,"options":256,"groupId":0,"sequence":128} messageTag=255]
zigbee-controller  | Delivery of BROADCAST failed for "65533" [apsFrame={"profileId":41440,"clusterId":33,"sourceEndpoint":242,"destinationEndpoint":242,"options":256,"groupId":0,"sequence":129} messageTag=10]
zigbee-controller  | Delivery of BROADCAST failed for "65532" [apsFrame={"profileId":0,"clusterId":54,"sourceEndpoint":0,"destinationEndpoint":0,"options":256,"groupId":0,"sequence":130} messageTag=255]
zigbee-controller  | Delivery of BROADCAST failed for "65533" [apsFrame={"profileId":41440,"clusterId":33,"sourceEndpoint":242,"destinationEndpoint":242,"options":256,"groupId":0,"sequence":131} messageTag=11]
zigbee-controller  | Zigbee2MQTT:info  2024-10-16 21:46:49: Zigbee: disabling joining new devices.
zigbee-controller  | Zigbee2MQTT:info  2024-10-16 21:46:49: MQTT publish: topic 'zigbee2mqtt/bridge/response/permit_join', payload '{"data":{"time":254,"value":false},"status":"ok","transaction":"cdfgu-16"}'
zigbee-controller  | [STACK STATUS] Network closed.

After perusing the issue thread I saw some people had luck reverting back to the ezsp adapter so gave that a shot. As far as I can tell that seems to have fixed it.

If there's something I can do to provide something of more substantial value in identifiying root cause let me know as this is basically just a sandbox Zigbee network for the moment.

Edit:

Screenshot of Zigbee2MQTT "About" Tab image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ember Issues related to ember driver fixed-in-dev The issue should be fixed in current dev/edge. problem Something isn't working
Projects
None yet
Development

No branches or pull requests