Skyconnect Shows Under System Hardware ttyusb but ZHA Appears to Quit Detecting it

I get Skyconnect to work and ZHA to read my Ikea button for about a 1/2 day to a day then the button quits working. It appears a Python serial module looses access to the device.

What ZHA reports seeing:

/dev/serial/by-id/usb-Nabu_Casa_SkyConnect_v1.0_c6f9a8c1ee42ed118d1a48ab2a61ed69-if00-port0

Traceback in core logs:

Logger: bellows.zigbee.application
Source: /usr/local/lib/python3.11/site-packages/bellows/zigbee/application.py:643
First occurred: 4:14:40 AM (14 occurrences)
Last logged: 4:44:01 AM

ControllerApplication reset unsuccessful: SerialException(2, "could not open port /dev/serial/by-id/usb-Nabu_Casa_SkyConnect_v1.0_c6f9a8c1ee42ed118d1a48ab2a61ed69-if00-port0: [Errno 2] No such file or directory: '/dev/serial/by-id/usb-Nabu_Casa_SkyConnect_v1.0_c6f9a8c1ee42ed118d1a48ab2a61ed69-if00-port0'")
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/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-Nabu_Casa_SkyConnect_v1.0_c6f9a8c1ee42ed118d1a48ab2a61ed69-if00-port0'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/bellows/zigbee/application.py", line 640, in _reset_controller_loop
    await self._reset_controller()
  File "/usr/local/lib/python3.11/site-packages/bellows/zigbee/application.py", line 661, in _reset_controller
    await self.connect()
  File "/usr/local/lib/python3.11/site-packages/bellows/zigbee/application.py", line 133, in connect
    self._ezsp = await bellows.ezsp.EZSP.initialize(self.config)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/bellows/ezsp/__init__.py", line 164, in initialize
    await ezsp.connect(use_thread=zigpy_config[conf.CONF_USE_THREAD])
  File "/usr/local/lib/python3.11/site-packages/bellows/ezsp/__init__.py", line 181, in connect
    self._gw = await bellows.uart.connect(self._config, self, use_thread=use_thread)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/bellows/uart.py", line 406, in connect
    protocol, connection_done = await thread.run_coroutine_threadsafe(
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/bellows/uart.py", line 385, in _connect
    transport, protocol = await zigpy.serial.create_serial_connection(
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/zigpy/serial.py", line 37, in create_serial_connection
    transport, protocol = await pyserial_asyncio.create_serial_connection(
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/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.11/site-packages/serial/__init__.py", line 90, in serial_for_url
    instance.open()
  File "/usr/local/lib/python3.11/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-Nabu_Casa_SkyConnect_v1.0_c6f9a8c1ee42ed118d1a48ab2a61ed69-if00-port0: [Errno 2] No such file or directory: '/dev/serial/by-id/usb-Nabu_Casa_SkyConnect_v1.0_c6f9a8c1ee42ed118d1a48ab2a61ed69-if00-port0'

I am not certain exactly what I have done to getting it working again except that I think I remove the reinstall the Zigbee Integration. I didn’t want to loose the traceback so I haven’t performed tests to figure out exactly what I have done to get it working again (for another half day). I will try to determine what I do to get it working again and add a follow-up post to this topic.

Although I don’t use ZHA, I use the SiLabs Multiprotocol Add-On which in turn uses SkyConnect, and I have seen the same issue over the last couple of weeks. I have no idea what is causing the issue, but to fix it I have to replug the SkyConnect and restart the AddOn.

My rule of thumb is if I can’t find any similar problems on the forum (haven’t unless my search was incomplete) and there are few if any responses with any directly relevant detail (thank you Tommy Long for info on the Add-On, SiLabs; I may explore this route) then the problem is probably unique to my configuration.

Very frustrating, though.

No solution yet. I haven’t managed to get it back working again even after deleting and reinstalling the Integration, along with reboots. I have more to test here. My time to explore this has been limited, unfortunately. Since I have been able to get it working in the past after this has happened (restarting the cycle of it dying within a day), I suspect I will figure that out soon. When I know definitively exactly the process that will get it working again I will post that.