core: Automations issue/ ZHA Network busy errors after migrating to Skyconnect dongle

The problem

After migrating to Home Assistant Skyconnect usb dongle I’ve been running into network busy errors. I currently have the dongle connected to a usb extension cable connected to R-Pie4 .

What version of Home Assistant Core has the issue?

Home Assistant 2023.1.6

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Automation

Link to integration documentation on our website

https://www.home-assistant.io/docs/automation/

Diagnostics information

No response

Example YAML snippet

alias: "Pico: Master Bathroom remote"
description: ""
use_blueprint:
  path: stephack/core-pico.yaml
  input:
    pico_remote: a58ddd4ab05559d05de8267f82dd7c49
    top_on:
      - service: light.turn_on
        data:
          brightness_step_pct: 100
        target:
          entity_id: light.light_unknown_master_bathroom_lights_zha_group_0x0006
    bottom_off_release:
      - service: light.turn_off
        data: {}
        target:
          entity_id: light.light_unknown_master_bathroom_lights_zha_group_0x0006
    up_raise:
      - service: light.turn_on
        data:
          brightness_step_pct: 20
        target:
          entity_id:
            - light.light_unknown_master_bathroom_lights_zha_group_0x0006
    down_lower:
      - service: light.turn_on
        data:
          brightness_step_pct: -20
        target:
          entity_id: light.light_unknown_master_bathroom_lights_zha_group_0x0006

Anything in the logs that might be useful for us?

Logger: homeassistant.components.automation.pico_master_bedroom_remote
Source: components/zha/light.py:292
Integration: Automation (documentation, issues)
First occurred: January 21, 2023 at 8:37:18 PM (7 occurrences)
Last logged: 7:21:23 PM

Pico: Master Bathroom remote: Choose at step 1: choice 1: Choose at step 1: choice 1: Error executing script. Unexpected error for call_service at pos 1: Failed to enqueue message after 3 attempts: <EmberStatus.NETWORK_BUSY: 161>
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 451, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 684, in _async_call_service_step
    await service_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1755, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1792, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 213, in handle_service
    await service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 678, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 958, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 715, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/light/__init__.py", line 570, in async_handle_light_on_service
    await light.async_turn_on(**filter_turn_on_params(light, params))
  File "/usr/src/homeassistant/homeassistant/components/zha/light.py", line 978, in async_turn_on
    await super().async_turn_on(**kwargs)
  File "/usr/src/homeassistant/homeassistant/components/zha/light.py", line 292, in async_turn_on
    result = await self._level_channel.move_to_level_with_on_off(
  File "/usr/local/lib/python3.10/site-packages/zigpy/zcl/__init__.py", line 324, in request
    return await self._endpoint.request(
  File "/usr/local/lib/python3.10/site-packages/zigpy/group.py", line 57, in request
    await self.application.send_packet(
  File "/usr/local/lib/python3.10/site-packages/bellows/zigbee/application.py", line 782, in send_packet
    raise zigpy.exceptions.DeliveryError(
zigpy.exceptions.DeliveryError: Failed to enqueue message after 3 attempts: <EmberStatus.NETWORK_BUSY: 161>

Additional information

No response

About this issue

  • Original URL
  • State: open
  • Created a year ago
  • Reactions: 1
  • Comments: 68 (25 by maintainers)

Most upvoted comments

@ABEIDO I had the same idea and also switched from Conbee II to ZHA and Skyconnect some time ago. I had the same problems and after much back and forth I followed @cityeyes suggestion (just don’t use ZHA groups, only HA groups). Maybe not the desired solution, but since then I have no more “Network Busy 161” errors. I have about 40 devices (mostly lights) and the delay is acceptable most of the time, even if I turn on several lights at the same time (without using ZHA groups).

Yes i been thinking about it but as i see i have 3 options and im thinking mostly of option 2:

  1. Switch to HA Groups - Feels like its a step back.

  2. Go back to Conbee II - Feels like its a step back also especially as SkyConnect is newer. And a massive hassle to redo the network.

  3. Hope for fix

@ABEIDO I had the same idea and also switched from Conbee II to ZHA and Skyconnect some time ago. I had the same problems and after much back and forth I followed @cityeyes suggestion (just don’t use ZHA groups, only HA groups). Maybe not the desired solution, but since then I have no more “Network Busy 161” errors. I have about 40 devices (mostly lights) and the delay is acceptable most of the time, even if I turn on several lights at the same time (without using ZHA groups).

Hi, been looking into a lot of posts regarding this.

I had a Conbee II which work fine and i wanted to test the HA Skyconnect. To add matter and support HA at the same time. Had no real issues with Conbee.

After full reset of my ZHA (no backup at all) i redid my network manually. 46 devices of which are 30+ IKEA lights/outlets and the rest are sensors from Hue, Aqara, Ikea and Frient. Now im getting Network Busy 161 error from time to time from diffrent automations i have since before skyconnect.

For example i have an automation that dims lights thats triggerd on playstatus on mediaplayer:

Actions

service: light.turn_on
data:
  brightness_pct: 10
  transition: 3
target:
  entity_id:
    - light.livingroom
    - light.hallway_table

light.livingroom = ZHA group with 8 devices rest = single devices

And this causes Network Busy 161 error, am i exeeding the limit with these actions (thought limit was 10 devices)?

If so do ConBee II handle this better, because automations is the same and it never happend before SkyConnect dongle?

normal light group

I was always under the impression that Zigbee groups were the way to go, but it looks like this worked, at least as far as I can tell. Previously, I’d been having this same error pop up when I controlled the lights individually and it was only solved when I changed to a Zigbee group, so I wasn’t aware this could be a solution.

Unfortunately, this means I’m going to have to re-create all of my Zigbee groups in HA standard. Small price to pay to get everything working properly again. Thanks for cluing me in on the difference between standard groups and Zigbee groups.

Edit: Okay, “solved” is an overstatement, unfortunately. Zigbee Groups solved a lot of problems before I switched to multiprotocol, in that the changes would be simultaneous across devices.

Now that I’ve got everything on HA groups instead of Zigbee groups, I’m not getting the network busy errors, but full-home control takes a long time. I’ll tell HA to turn all of my lights on, or change them to a specific color, and it’ll go around my house, one by one, changing and turning on lights, and sometimes it’ll end before they all change and the light will throw back an error until I turn them off and on again.

ZHA groups seem to be the best way to deal with fixtures with more than one light and entire-home control, and I’m not entirely sure why it worked before I switched to multiprotocol and why it’s having so many issues now.

@TheJulianJES I am using another EZSP with Z2M (Sonoff zbdongle-e which has the same EFR32 chip as SkyConnect). @puddly ok I will try that tonight.

Having the same issue, also using ZHA groups to control 2-4 lights at once depending on the group. And its not getting called often, in the example below i call the ZHA groups once (turn of all lights), its maybe 10 groups with 2-4 lights in each group. but the automation is only calling each light group once.

The Automation actually turns off All lights (light service) by Area, meaning the Area could potentially contain both the ZHA group and the induvidual Light in that ZHA group, i usally Hide all the induvidual light entities but they are still in the same Area that the group is.

image

image

Watch - Away: Choose at step 1: choice 1: Error executing script. Unexpected error for call_service at pos 1: Failed to enqueue message after 3 attempts: <EmberStatus.NETWORK_BUSY: 161> Watch - Away: Error executing script. Unexpected error for choose at pos 1: Failed to enqueue message after 3 attempts: <EmberStatus.NETWORK_BUSY: 161> While executing automation automation.watch_away Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 451, in _async_step await getattr(self, handler)() File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 684, in _async_call_service_step await service_task File "/usr/src/homeassistant/homeassistant/core.py", line 1755, in async_call task.result() File "/usr/src/homeassistant/homeassistant/core.py", line 1792, in _execute_service await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)( File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 213, in handle_service await service.entity_service_call( File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 678, in entity_service_call future.result() # pop exception if have File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 958, in async_request_call await coro File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 715, in _handle_entity_call await result File "/usr/src/homeassistant/homeassistant/components/light/__init__.py", line 581, in async_handle_light_off_service await light.async_turn_off(**filter_turn_off_params(light, params)) File "/usr/src/homeassistant/homeassistant/components/zha/light.py", line 986, in async_turn_off await super().async_turn_off(**kwargs) File "/usr/src/homeassistant/homeassistant/components/zha/light.py", line 417, in async_turn_off result = await self._on_off_channel.off() File "/usr/local/lib/python3.10/site-packages/zigpy/zcl/__init__.py", line 324, in request return await self._endpoint.request( File "/usr/local/lib/python3.10/site-packages/zigpy/group.py", line 57, in request await self.application.send_packet( File "/usr/local/lib/python3.10/site-packages/bellows/zigbee/application.py", line 782, in send_packet raise zigpy.exceptions.DeliveryError( zigpy.exceptions.DeliveryError: Failed to enqueue message after 3 attempts: <EmberStatus.NETWORK_BUSY: 161>


Another set of errors that might be related,

`Logger: homeassistant.components.zha.core.channels.base Source: components/zha/core/channels/base.py:486 Integration: Zigbee Home Automation (documentation, issues) First occurred: January 26, 2023 at 16:49:07 (32 occurrences) Last logged: January 26, 2023 at 16:49:10

[0xF4E3:1: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>’)] [0xB7E9:1: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>’)] [0xC402:1:0x0006]: 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>’)] [0x7588:1:0x0006]: 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>’)] [0xC402:1: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>’)]`

Edit: actually forgot to include the logs…