ZHA stopped working after update

would the usb bluetooth dongle cause interference?

Wrote some more in my post by edit.

Shouldn’t. But could. Anything can create interference.

Thank your for your reply.

I checked the hardware settings. The sonoff USB dongle is not identified!

Do you know what to do? Sometimes the USB dongle is identified and after a while it seems to disappear…

Of course the standard “did you try to reboot” is mandatory.
Then; Some zigbee controllers tend to work sub optimally with USB 3.0 usb-ports. Such ports are sometimes blue-colored. See if you can find a USB 2x port, change your controller to that, then
Developer tools\Check Configuration. If green, hit Restart.

If not working, try a restart of entire HA

Thank you for your quick reply.

I have shut down VB and restarted it. Now HA finds the Zonoff dongle again. The question is for how long?

As you recommended, I searched for USB Devices in the Hardware menu item. Strangely, Zonoff is not displayed, although I was able to activate the USB dongle under Devices.

I installed HA on a VM running on an old MacBook Air, which means USB 2 is already running. Rebooting on the virtual machine and unfortunately not on Home Assistant makes the difference for me. I suspect over time the information about the Zonoff USB dongle is lost between VM and HA. I don’t understand why yet, unfortunately.

I will now buy the USB extension cable and see if that solves the problem.

you can restart (Developer\Restart) by automation once every night. It should not matter. Just dont do it during the time when your backup is running.

Extension cord, 1.5 meters is the trick.
And don’t apply every update that arrives at Settings. Always wait two or three weeks first :wink:

1 Like

One question for the USB extension cord. Is it useful to take USB 2.0 or 3.0?

As far as I know, and please google this before actually buying one, the controllers I have read up on use primarily USB 2x. I have also read forums posts that claim that it is better to use USB 2-ports over USB 3-ports. I don’t why this is, but I myself have swapped to using only USB 2x peripherals (ports and cables) together with my Conbee 2 Zigbee controller.

Thank you for your advise. I will buy one and give an update…

1 Like

Tip is to use a USB 3.0 cable for the Zigbee Coordiantor because thick such cables are usually better shielded (see electromagnetic shielding), but only connect it to a USB 2.0 port or via a powered USB 2.0 hub, as the reason for that is because it is the USB 3.0 port/traffic that generates interference. Read and follow (which contains external link that explain about USB 3.0 specifically) → https://github.com/zigpy/zigpy/wiki/Generic-best-practice-tips-on-improving-Zigbee-network-range-and-general-stability

So it is not the USB 3.0 cables itself that is the problem but the USB 3.0 traffic if connected to a USB 3.0 port. In comparison USB 2.0 cables are usually thin and have little to no EMF/RF shielding whatsoever. Again see → https://en.wikipedia.org/wiki/Electromagnetic_shielding#Example_applications

1 Like

Andrew, I am back home and plugged in my new powered USB hub. I have the Nortek dual zigbee and zwave dongle plugged as well as the bluetooth dongle. I have checked the “three dots” and all hardware. Its a bit overwhelming. I selected usb1 and usb2 as I assume this is where I would see the hub and dongles, but frankly, I do not know what I am looking at or what I am looking for. Again, any assistance would be greatly appreciated as all was working well prior to this update. Thank you so much

When viewing all hardware, use the search box att the top
Try searching for the product name, or the integration that you use to connect to zha

1 Like

I believe I made big mistake. I attempted to restore to prior to the update. when that didnt work, I deleted the integrations, assuming I would be able to easily set up again. Now, this is where I am.

I did try to search the “all hardware” for product name but that didnt seem to work. I am currently trying to set up the zigbee through ZHA. I see the silicon labs (Nortek) when I select the device,
2022-10-25 - Screen Shot 2022-10-25 at 3.37.14 PM

i get the “serial Port Settings” window.
2022-10-25 - Screen Shot 2022-10-25 at 3.39.57 PM

When I select submit I get this error message.

So, I am stuck.

Also, when I attmpt to reinstall ZWAVE JS, i get an error as well.

here is the log error I get after restoring and ZHA failing to set up:
‘’’
Logger: homeassistant.components.zha.core.gateway
Source: components/zha/core/gateway.py:172
Integration: Zigbee Home Automation (documentation, issues)
First occurred: 3:49:47 PM (3 occurrences)
Last logged: 3:49:54 PM

Couldn’t start EZSP = Silicon Labs EmberZNet protocol: Elelabs, HUSBZB-1, Telegesis coordinator (attempt 1 of 3)
Couldn’t start EZSP = Silicon Labs EmberZNet protocol: Elelabs, HUSBZB-1, Telegesis coordinator (attempt 2 of 3)
Couldn’t start EZSP = Silicon Labs EmberZNet protocol: Elelabs, HUSBZB-1, Telegesis coordinator (attempt 3 of 3)
Traceback (most recent call last):
File “/usr/local/lib/python3.10/site-packages/serial/serialposix.py”, line 322, in open
self.fd = os.open(self.portstr, os.O_RDWR | os.O_NOCTTY | os.O_NONBLOCK)
FileNotFoundError: [Errno 2] No such file or directory: ‘/dev/serial/by-id/usb-Silicon_Labs_HubZ_Smart_Home_Controller_11600383-if01-port0’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/components/zha/core/gateway.py”, line 172, in async_initialize
self.application_controller = await app_controller_cls.new(
File “/usr/local/lib/python3.10/site-packages/zigpy/application.py”, line 144, in new
await app.startup(auto_form=auto_form)
File “/usr/local/lib/python3.10/site-packages/zigpy/application.py”, line 124, in startup
await self.connect()
File “/usr/local/lib/python3.10/site-packages/bellows/zigbee/application.py”, line 124, in connect
self._ezsp = await bellows.ezsp.EZSP.initialize(self.config)
File “/usr/local/lib/python3.10/site-packages/bellows/ezsp/init.py”, line 103, in initialize
await ezsp.connect()
File “/usr/local/lib/python3.10/site-packages/bellows/ezsp/init.py”, line 120, in connect
self._gw = await bellows.uart.connect(self._config, self)
File “/usr/local/lib/python3.10/site-packages/bellows/uart.py”, line 382, in connect
protocol, connection_done = await thread.run_coroutine_threadsafe(
File “/usr/local/lib/python3.10/site-packages/bellows/uart.py”, line 361, in _connect
transport, protocol = await zigpy.serial.create_serial_connection(
File “/usr/local/lib/python3.10/site-packages/zigpy/serial.py”, line 37, in create_serial_connection
transport, protocol = await pyserial_asyncio.create_serial_connection(
File “/usr/local/lib/python3.10/site-packages/serial_asyncio/init.py”, line 448, in create_serial_connection
serial_instance = serial.serial_for_url(*args, **kwargs)
File “/usr/local/lib/python3.10/site-packages/serial/init.py”, line 90, in serial_for_url
instance.open()
File “/usr/local/lib/python3.10/site-packages/serial/serialposix.py”, line 325, in open
raise SerialException(msg.errno, “could not open port {}: {}”.format(self._port, msg))
serial.serialutil.SerialException: [Errno 2] could not open port /dev/serial/by-id/usb-Silicon_Labs_HubZ_Smart_Home_Controller_11600383-if01-port0: [Errno 2] No such file or directory: ‘/dev/serial/by-id/usb-Silicon_Labs_HubZ_Smart_Home_Controller_11600383-if01-port0’
‘’’

Thank you Andrew, for your ideas. Meanwhile I have bought a raspberry pi 4 with SSD instead of using virtualbox with an old MacBook Air. I have used the USB 2 Port. And it is working now!

Hi again
Good that you got it working.
I myself use RPi4, SSD as my daily driver/production setup.
It’s a good setup for home usage :dove:

True. It works very well so far.

I have the same “Failed to connect” issue with a Sonoff dongle that has been working fine for 2+ years until one of the updates this fall.

Has anyone found a solution?

Just updated the base OS (9.4 to 9.5) and have the same issue:

FileNotFoundError: [Errno 2] No such file or directory: '/dev/serial/by-id/usb-1a86_USB_Serial-if00-port0'

While I can see /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0 under ttyUSB0 in the hardware tab. :frowning:

I don’t have much time for debugging now, but I fixed it by downgrading from the terminal:

ha host update --version 9.4
1 Like

Had a quick zigbee blimp and a few devices got stuck after that , looking at the logs see this event right at the time that happened, any idea what was that ?

Logger: zigpy.appdb
Source: runner.py:179
First occurred: 03:52:06 (2 occurrences)
Last logged: 03:52:06

Discarding _save_device_last_seen event
Discarding _save_attribute event

And a few seconds after

Logger: homeassistant.components.automation.zha_laundry_wall_switch_bottom_outside_off
Source: components/zha/core/cluster_handlers/general.py:407
Integration: Automation (documentation, issues)
First occurred: 03:52:29 (2 occurrences)
Last logged: 03:52:29

ZHA - (Laundry) wall switch - bottom - Outside off: Error executing script. Unexpected error for device at pos 1:
While executing automation automation.zha_laundry_wall_switch_bottom_outside_off
Traceback (most recent call last):
File “/usr/local/lib/python3.11/site-packages/zigpy/device.py”, line 310, in request
return await req.result
^^^^^^^^^^^^^^^^
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/script.py”, line 468, in _async_step
await getattr(self, handler)()
File “/usr/src/homeassistant/homeassistant/helpers/script.py”, line 719, in _async_device_step
await device_action.async_call_action_from_config(
File “/usr/src/homeassistant/homeassistant/components/device_automation/action.py”, line 71, in async_call_action_from_config
await platform.async_call_action_from_config(hass, config, variables, context)
File “/usr/src/homeassistant/homeassistant/components/switch/device_action.py”, line 35, in async_call_action_from_config
await toggle_entity.async_call_action_from_config(
File “/usr/src/homeassistant/homeassistant/components/device_automation/toggle_entity.py”, line 123, in async_call_action_from_config
await hass.services.async_call(
File “/usr/src/homeassistant/homeassistant/core.py”, line 1965, in async_call
response_data = await coro
^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/core.py”, line 2005, in _execute_service
return await cast(
^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/helpers/entity_component.py”, line 235, in handle_service
return await service.entity_service_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/helpers/service.py”, line 848, in entity_service_call
response_data = task.result() # pop exception if have
^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 1192, in async_request_call
return await coro
^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/helpers/service.py”, line 892, in _handle_entity_call
result = await task
^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/components/zha/switch.py”, line 96, in async_turn_off
result = await self._on_off_cluster_handler.turn_off()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/components/zha/core/cluster_handlers/general.py”, line 407, in turn_off
result = await self.off()
^^^^^^^^^^^^^^^^
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 375, 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 309, in request
async with asyncio_timeout(timeout):
File “/usr/local/lib/python3.11/asyncio/timeouts.py”, line 111, in aexit
raise TimeoutError from exc_val
TimeoutError