home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.3k stars 30.62k forks source link

ZHA - stick wont work after updating HA #121748

Closed dawauz closed 3 months ago

dawauz commented 3 months ago

The problem

I updated HA core and OS to latest versions, after that my zigbee stick fails. I tried complete shutdown, reboots, other usb ports, but I dont know what I can do anymore. It is saying there is no such file or directory?

`2024-07-11 06:54:01.767 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities light.staande_lamp_2_light are missing or not currently available 2024-07-11 06:54:01.774 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities light.staande_lamp_woonkamer_3_light are missing or not currently available 2024-07-11 06:57:00.889 WARNING (MainThread) [pyotgw.commandprocessor] Unknown message in command queue: SC: 06:57/4 2024-07-11 06:57:00.889 WARNING (MainThread) [pyotgw.commandprocessor] Command PR failed with SC: 06:57/4, retrying... 2024-07-11 07:03:40.245 WARNING (MainThread) [homeassistant.helpers.entity_component] Forced update failed. Entity update.lamp_kantoor_hue_firmware not found. 2024-07-11 07:03:40.246 WARNING (MainThread) [homeassistant.helpers.entity_component] Forced update failed. Entity update.staande_lamp_woonkamer_3_firmware not found. 2024-07-11 07:03:40.246 WARNING (MainThread) [homeassistant.helpers.entity_component] Forced update failed. Entity update.staande_lamp_2_firmware not found. 2024-07-11 07:03:40.247 WARNING (MainThread) [homeassistant.helpers.entity_component] Forced update failed. Entity update.temperatuur_kasje_firmware not found. 2024-07-11 07:03:40.247 WARNING (MainThread) [homeassistant.helpers.entity_component] Forced update failed. Entity update.lampen_border_achtertuin_firmware not found.

Traceback (most recent call last): File "/usr/local/lib/python3.12/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-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20220812195202-if00' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/zha/init.py", line 152, in async_setup_entry zha_gateway = await ZHAGateway.async_from_config( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/zha/core/gateway.py", line 197, in async_from_config await instance.async_initialize() File "/usr/src/homeassistant/homeassistant/components/zha/core/gateway.py", line 215, in async_initialize await app.startup(auto_form=True) File "/usr/local/lib/python3.12/site-packages/zigpy/application.py", line 233, in startup await self.connect() File "/usr/local/lib/python3.12/site-packages/bellows/zigbee/application.py", line 146, in connect await ezsp.connect(use_thread=self.config[CONF_USE_THREAD]) File "/usr/local/lib/python3.12/site-packages/bellows/ezsp/init.py", line 145, in connect self._gw = await bellows.uart.connect(self._config, self, use_thread=use_thread) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/bellows/uart.py", line 179, in connect protocol, connection_done = await thread.run_coroutine_threadsafe( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/bellows/uart.py", line 158, in connect transport, = await zigpy.serial.create_serial_connection( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/zigpy/serial.py", line 48, in create_serial_connection transport, protocol = await pyserial_asyncio.create_serial_connection( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/serial_asyncio_fast/init.py", line 508, in create_serial_connection serial_instance = await loop.run_in_executor(None, callback) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, *self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/serial/init.py", line 90, in serial_for_url instance.open() File "/usr/local/lib/python3.12/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-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20220812195202-if00: [Errno 2] No such file or directory: '/dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20220812195202-if00' 2024-07-11 07:27:00.346 INFO (MainThread) [universal_silabs_flasher.flasher] Probing ApplicationType.GECKO_BOOTLOADER at 115200 baud 2024-07-11 07:27:00.346 DEBUG (MainThread) [zigpy.serial] Opening a serial connection to '/dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20220812195202-if00' (115200 baudrate) 2024-07-11 07:27:00.349 DEBUG (MainThread) [homeassistant.components.zha.repairs.wrong_silabs_firmware] Failed to probe application type Traceback (most recent call last): File "/usr/local/lib/python3.12/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-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20220812195202-if00' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/zha/repairs/wrong_silabs_firmware.py", line 87, in probe_silabs_firmware_type await flasher.probe_app_type() File "/usr/local/lib/python3.12/site-packages/universal_silabs_flasher/flasher.py", line 206, in probe_app_type result = await probe_funcsprobe_method ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/universal_silabs_flasher/flasher.py", line 112, in probe_gecko_bootloader async with self._connect_gecko_bootloader(baudrate) as gecko: File "/usr/local/lib/python3.12/contextlib.py", line 210, in aenter return await anext(self.gen) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/universal_silabs_flasher/common.py", line 181, in connectprotocol , protocol = await zigpy.serial.create_serial_connection( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/zigpy/serial.py", line 48, in create_serial_connection transport, protocol = await pyserial_asyncio.create_serial_connection( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/serial_asyncio_fast/init.py", line 508, in create_serial_connection serial_instance = await loop.run_in_executor(None, callback) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run result = self.fn(self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/serial/init.py", line 90, in serial_for_url instance.open() File "/usr/local/lib/python3.12/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-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20220812195202-if00: [Errno 2] No such file or directory: '/dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20220812195202-if00'`

What version of Home Assistant Core has the issue?

core-2024.7.2

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

ZHA

Link to integration documentation on our website

https://www.home-assistant.io/integrations/zha

Diagnostics information

home-assistant_zha_2024-07-11T05-48-36.530Z.log

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 3 months ago

Hey there @dmulcahey, @adminiuga, @puddly, @thejulianjes, mind taking a look at this issue as it has been labeled with an integration (zha) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `zha` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign zha` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


zha documentation zha source (message by IssueLinks)

rrooggiieerr commented 3 months ago

Your log file says

could not open port /dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20220812195202-if00

and

No such file or directory: '/dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20220812195202-if00'

So is the file there? You can look it up in Settings > System > Hardware > All Hardware and then one of the tty devices

dawauz commented 3 months ago

image

It has to be the first?

rrooggiieerr commented 3 months ago

If that are all your tty devices than /dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20220812195202-if00 is not there. Maybe remove and plug back in the Zigbee device and see if it appears. You probably need to refresh te screen

dawauz commented 3 months ago

Well I tried that yesterday late, nothing special happens but I dont checked it by this hardware screen. I will try some things today when I'm home.

rrooggiieerr commented 3 months ago

What you could also do is remove the device, check the screen, add the device, and then see what changed. Maybe something happened (firmware update?) that changed the id and thus the path name. Also if you could identify what the 3 tty devices in your screenshot are that could also give you some insight if you are missing a device. I see one RFXcom, two generic serial devices (DSMR reader and something else?)

dawauz commented 3 months ago

I removed it, and its the TTYACM0 device.

rrooggiieerr commented 3 months ago

Ok, so it somehow changed it's ID and thus path. Not sure if that's because you update HA or maybe the firmware?

dawauz commented 3 months ago

Well I think I fixed it. I did migrate radio and choosed to keep settings, after that I could select which usb port, so I did, and the things are up and working again. Really strange.