Slow ZHA Sonoff Zigbee 3.0 USB Dongle-E Plus

Hi
I just moved 50 Philips hue devices to ZHA. Most devices works, but the response time from an action is triggered is very slow and about 25 percentage nothing happens. Using a custom:hue-like-light-card card on the dashboard is mostly useless the gui reacts and after 5 to 10 seconds some times something works. I mostly use lights in a light-group.

• I have 40 bulbs and 10 different accessories – almost all Philips Hue.
• HAOS running as a VM on a UNRAID NAS.
• Brand new Sonoff Zigbee 3.0 USB Dongle-E Plus.
• The VM now have 8 gb of memory and 8 logical cpu’s.
• HA generally runs fast and consistent.

• I have tried connecting the USB stick through USB 3 and USB 2.
• 2 different USB extension cords.
• USB ports on the front of PC and directly on motherboard.
• Changing the zigbee channel from 25 to 22.

I’m new to HA so I don’t know what to expect, but I have had the Philips Hue bridge running for 3 years with no problems.
Any suggestions or experiences would be appreciated.

/MKJ

Ok that is abit unusual, Hue bulbs are pretty good routers. A few questions:

  1. How long did you wait? Sometimes it takes a few hours for the mesh to figure out which routes are optimal.
  2. Are you seeing the lag when triggering through HA directly? Or are you triggering through some switch or button like the hue dimmers? If Hue dimmers, how are you configuring the switching logic? Some blueprint? I have had bad luck with some blueprints for hue dimmers, sometimes they dont register clicks for some reason.Using switch manager now, pretty good.
  3. When you changed the zigbee channel, did you do a wifi scan to see which might be optimal? Do understand that wifi and zigbee share the 2.4ghz spectrum and there are some channels that overlap and could cause interference. There is a good resource here to figure out how to choose a good channel ZigBee and Wi-Fi Coexistence | MetaGeek
  4. Any errors in the logs around eszp?

I use a dongle P but I have used a dongle E before and for me the dongle E wasnt as good as P for my scenario of around 150 devices.

@HarvinDhillon

Glad to hear it is unusual :slight_smile:

  1. I have added the bulbs over a period of 10 days. The last was once was added 5 days ago and it is 2 days ago since i changed the channel.
  2. When toggeling a light group (12 bulbs) from http://homeassistant.local:8123/config/helpers. It takes between 1 and 5 seconds for all the lights to change.
  3. I did not do a channel scan, how do I do that, on channels over 13?
  4. No errors.

Just did a “stress test” on the light group, clicked toggle 20 times quick, that resulted in one light turned on and the rest turned off.
I do not use any blueprints and my automations is stripped from transitions and effects.

Snip of a hue dimmer automation:

sequence:
- choose:
- conditions:
- condition: state
entity_id: light.stue_lys_gruppe
state: “off”
sequence:
- service: scene.turn_on
target:
entity_id: scene.stue_lys_1
metadata: {}
- conditions:
- condition: trigger
id: on_double_press
sequence:
- service: scene.turn_on
target:
entity_id: scene.stue_lys_2
metadata: {}
- conditions:
- condition: trigger
id: up_press_release
sequence:
- service: light.turn_on
data:
brightness_step_pct: 5
target:
area_id: stue

Did find somethings in the log:

Error executing service: <ServiceCall light.turn_off (c:01HDPW4ZV0CYWBY6JXWQ9PKFCR): entity_id=[‘light.udefor_lys_gruppe’], params=>
Error executing service: <ServiceCall light.turn_off (c:01HDPYAVQ44SQYX12X6ZB2F7K3): entity_id=[‘light.stue_lys_gruppe’], params=>
Error executing service: <ServiceCall light.turn_off (c:01HDPYAVQ44SQYX12X6ZB2F7K3): entity_id=[‘light.kokken_buer_lys_gruppe’], params=>
Error executing service: <ServiceCall light.turn_off (c:01HDPYAVQ44SQYX12X6ZB2F7K3): entity_id=[‘light.udefor_lys_gruppe’], params=>
Error executing service: <ServiceCall light.turn_off (c:01HDPYAVQ44SQYX12X6ZB2F7K3): entity_id=[‘light.kokken_lys_gruppe’], params=>
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/components/zha/core/cluster_handlers/init.py”, line 64, in wrap_zigpy_exceptions
yield
File “/usr/src/homeassistant/homeassistant/components/zha/core/cluster_handlers/init.py”, line 84, in wrapper
return await RETRYABLE_REQUEST_DECORATOR(func)(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/zigpy/util.py”, line 132, in retry
return await func()
^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/zigpy/zcl/init.py”, line 377, in request
return await self._endpoint.request(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/zigpy/endpoint.py”, line 253, in request
return await self.device.request(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/zigpy/device.py”, line 293, in request
await self._application.request(
File “/usr/local/lib/python3.11/site-packages/zigpy/application.py”, line 828, in request
await self.send_packet(
File “/usr/local/lib/python3.11/site-packages/bellows/zigbee/application.py”, line 870, in send_packet
raise zigpy.exceptions.DeliveryError(
zigpy.exceptions.DeliveryError: Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>

And this:

Logger: homeassistant.components.zha.core.cluster_handlers
Source: components/zha/core/cluster_handlers/init.py:537
Integration: Zigbee Home Automation (documentation, issues)
First occurred: 20:53:52 (24 occurrences)
Last logged: 20:54:14

  • [0xB53E:11:0x0300]: async_initialize: all attempts have failed: [DeliveryError(‘Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>’), DeliveryError(‘Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>’), DeliveryError(‘Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>’), DeliveryError(‘Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>’)]
  • [0xB53E:11:0x0008]: async_initialize: all attempts have failed: [DeliveryError(‘Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>’), DeliveryError(‘Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>’), DeliveryError(‘Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>’), DeliveryError(‘Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>’)]
  • [0x863C:11:0x0300]: async_initialize: all attempts have failed: [DeliveryError(‘Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>’), DeliveryError(‘Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>’), DeliveryError(‘Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>’), TimeoutError()]
  • [0xB636:11:0x0300]: async_initialize: all attempts have failed: [DeliveryError(‘Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>’), DeliveryError(‘Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>’), DeliveryError(‘Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>’), TimeoutError()]
  • [0x6311:11:0x0300]: async_initialize: all attempts have failed: [DeliveryError(‘Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>’), DeliveryError(‘Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>’), DeliveryError(‘Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>’), DeliveryError(‘Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>’)]

Definitely looks like messages are being dropped. I would try to scan wifi around the house and then select a zigbee channel accordingly that doesnt overlap.

Any wifi scan app on your phone will do, there are plenty on android :slight_smile:

For example if you are on zigbee channel 11, you should avoid any wifi on channel 1.

Also try to setup groups from the ZHA → configure → groups tab
the groups in helpers is actually just grouping the entities, whereas the one in zha binds them as a group. So you only send 1 command to the group instead of 1 to each member of the group thus reducing noise.

I will try that and report back.
Thanks.

Hi

The log writes: “Zigbee channel 22 utilization is 97.98%!”. But what is considered an acceptable percentage for this utilization?

/MKJ

Ideally below 75% but this jumps quite wildly for me too between 25% to 78%

You can try to download the ZHA diagnostics

Check at the end of the json file

    "energy_scan": {
      "11": 31.372549019607842,
      "12": 23.92156862745098,
      "13": 21.176470588235293,
      "14": 51.372549019607845,
      "15": 36.86274509803921,
      "16": 16.862745098039216,
      "17": 43.92156862745098,
      "18": 54.11764705882353,
      "19": 74.11764705882354,
      "20": 75.68627450980392,
      "21": 48.23529411764706,
      "22": 60.0,
      "23": 47.05882352941177,
      "24": 34.11764705882353,
      "25": 25.49019607843137,
      "26": 48.23529411764706
    },

I’m on channel 15 now. Does my energy scan mean I should change to channel 17?

“energy_scan”: {
“11”: 82.35373987514762,
“12”: 49.512515447068886,
“13”: 55.9836862725909,
“14”: 82.35373987514762,
“15”: 95.12234809209261,
“16”: 3.2311094587038967,
“17”: 2.509919386096536,
“18”: 3.6632469452765037,
“19”: 13.711043742539033,
“20”: 28.30261646762903,
“21”: 92.95959997754716,
“22”: 97.7033852118351,
“23”: 97.39286236923465,
“24”: 80.38447947821754,
“25”: 12.244260188723507,
“26”: 93.76433891498253

Its not very straight forward. I would check your wifi interfearence still

Zigbee 17 is in the wifi 6 range and will be swamped if someone decides to suddenly broadcast wifi on 6.
11, 15, 20, 25 is what you should consider.

Also download the scan a few times in the day and just check what channels are consistently free.

Also follow the guide on the official ZHA HA page. Get a USB2 sheilded extended cable, middle of the house, far from walls etc… even moving the antenna slightly can impact the noise.

1 Like

ZHA groups makes a big difference :slight_smile: But what about scenes are those not based on light-groups?

Hi

I gave up on the Sonoff and bought a SkyConnect. This works 95% of the time instead of 80%. So much better, but is it normal that HA fails 5% of every ZHA call? I have used Hue and Tado for years now and only saw a couple of errors.

/Mads