kukulich / home-assistant-jablotron100

Home Assistant custom component for JABLOTRON 100+ alarm system
MIT License
65 stars 24 forks source link

Fail to setup after upgrade to the latest version #87

Closed vojtechkoval closed 5 months ago

vojtechkoval commented 5 months ago

After last update to version 3.23.1 the Jablotron integration is not working. I use Jablotron as a custom_component in HA that is working on Raspberry Pi 4.

Here is error message: FileNotFoundError: [Errno 2] No such file or directory: '/dev/hidraw0'

There is a similar issue:

I haven't changed anything in the integration in the past months (the devices have remained the same), only an upgrade to a new version has been made. The only change in the Jablotron ecosystem was the replacement of the battery in the thermostat, but I suppose that can't cause anything.

I found in closed issues only these two similar cases:

Log:

Error setting up entry Jablotron for jablotron100
Traceback (most recent call last):
  File "/config/custom_components/jablotron100/jablotron.py", line 476, in _detect_central_unit
    self._central_unit = reader.result(STREAM_TIMEOUT)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/concurrent/futures/_base.py", line 449, in result
    return self.__get_result()
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result
    raise self._exception
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/jablotron100/jablotron.py", line 425, in reader_thread
    stream = self._open_read_stream()
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/jablotron100/jablotron.py", line 1111, in _open_read_stream
    return open(self._serial_port, "rb", buffering=0)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/dev/hidraw0'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 444, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/jablotron100/__init__.py", line 30, in async_setup_entry
    await jablotron_instance.initialize()
  File "/config/custom_components/jablotron100/jablotron.py", line 290, in initialize
    self._detect_central_unit()
  File "/config/custom_components/jablotron100/jablotron.py", line 480, in _detect_central_unit
    raise ServiceUnavailable
custom_components.jablotron100.errors.ServiceUnavailable
kukulich commented 5 months ago

Your port probably moved from /dev/hidraw0 to something else.

vojtechkoval commented 5 months ago

Your port probably moved from /dev/hidraw0 to something else.

You are right. The port has changed from '/dev/hidraw0' to '/dev/hidraw1'. Now it seems to be working again. Thanks.