linkytic icon indicating copy to clipboard operation
linkytic copied to clipboard

Connection impossible via SerialServer

Open bagl3y opened this issue 1 year ago • 4 comments

Bonjour,

J'utilise SerialServer pour me connecter à mon module TIC via le réseau.

Quand je tape mon url : rfc2217://192.168.42.239:2217 , j'ai une erreur : Erreur inattendue

Coté Logs HA, j'ai une error suivi d'une stacktrace :

2024-11-20 19:26:27.749 ERROR (MainThread) [custom_components.linkytic.config_flow] Unexpected exception: Caught blocking call to sleep with args (0.3,) inside the event loop by custom integration 'linkytic' at custom_components/linkytic/serial_reader.py, line 469: serial_reader = serial.serial_for_url(. (offender: /usr/local/lib/python3.12/site-packages/serial/rfc2217.py, line 557: time.sleep(0.3)), please create a bug report at https://github.com/hekmon/linkytic/issues
For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#sleep
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/serial/rfc2217.py", line 477, in open
    time.sleep(0.05)    # prevent 100% CPU load
    ^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/util/loop.py", line 192, in protected_loop_func
    raise_for_blocking_call(
  File "/usr/src/homeassistant/homeassistant/util/loop.py", line 158, in raise_for_blocking_call
    raise RuntimeError(
RuntimeError: Caught blocking call to sleep with args (0.05,) inside the event loop by custom integration 'linkytic' at custom_components/linkytic/serial_reader.py, line 469: serial_reader = serial.serial_for_url(. (offender: /usr/local/lib/python3.12/site-packages/serial/rfc2217.py, line 477: time.sleep(0.05)    # prevent 100% CPU load), please create a bug report at https://github.com/hekmon/linkytic/issues
For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#sleep
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/config/custom_components/linkytic/config_flow.py", line 76, in async_step_user
    linky_tic_tester(
  File "/config/custom_components/linkytic/serial_reader.py", line 469, in linky_tic_tester
    serial_reader = serial.serial_for_url(
                    ^^^^^^^^^^^^^^^^^^^^^^
  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/rfc2217.py", line 496, in open
    self.close()
  File "/usr/local/lib/python3.12/site-packages/serial/rfc2217.py", line 557, in close
    time.sleep(0.3)
  File "/usr/src/homeassistant/homeassistant/util/loop.py", line 192, in protected_loop_func
    raise_for_blocking_call(
  File "/usr/src/homeassistant/homeassistant/util/loop.py", line 158, in raise_for_blocking_call
    raise RuntimeError(
RuntimeError: Caught blocking call to sleep with args (0.3,) inside the event loop by custom integration 'linkytic' at custom_components/linkytic/serial_reader.py, line 469: serial_reader = serial.serial_for_url(. (offender: /usr/local/lib/python3.12/site-packages/serial/rfc2217.py, line 557: time.sleep(0.3)), please create a bug report at https://github.com/hekmon/linkytic/issues
For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#sleep

Core: 2024.11.2 Supervisor: 2024.11.2 Operating System: 13.2 Interface utilisateur: 20241106.2

Essayé avec la version 2.0.7 et 3.0.0-beta4

bagl3y avatar Nov 20 '24 18:11 bagl3y