Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC2217: write_timeout is currently not supported #143

Open
noud-github opened this issue Jan 19, 2024 · 3 comments
Open

RFC2217: write_timeout is currently not supported #143

noud-github opened this issue Jan 19, 2024 · 3 comments
Assignees
Labels
ramses_rf The issue is likely due to an underlying bug in the ramses_rf library.

Comments

@noud-github
Copy link

noud-github commented Jan 19, 2024

I found Issue after updating to 0.31.2.

on 0.21.40 this works like a charm:

serial_port:
  port_name: rfc2217://somewhere.lan:2217
  baudrate: 57600  # or 115200, YMMV

after the upgrade to 0.31.2
this end with write_timeout is currently not supported

Logger: homeassistant.setup
Source: setup.py:332
First occurred: 09:58:56 (1 occurrences)
Last logged: 09:58:56

Error during setup of component ramses_cc
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 332, in _async_setup_component
    result = await task
             ^^^^^^^^^^
  File "/config/custom_components/ramses_cc/__init__.py", line 74, in async_setup
    await broker.start()
  File "/config/custom_components/ramses_cc/broker.py", line 120, in start
    await self.client.start(cached_packets=cached_packets())
  File "/usr/local/lib/python3.11/site-packages/ramses_rf/gateway.py", line 179, in start
    await super().start()  # TODO: do this *after* restore cache
    ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/ramses_tx/gateway.py", line 189, in start
    self._transport = await transport_factory(
                      ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/ramses_tx/transport.py", line 913, in transport_factory
    transport = PortTransport(
                ^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/ramses_tx/transport.py", line 759, in __init__
    super().__init__(*args, **kwargs)
  File "/usr/local/lib/python3.11/site-packages/ramses_tx/transport.py", line 454, in __init__
    super().__init__(*args, **kwargs)
  File "/usr/local/lib/python3.11/site-packages/ramses_tx/transport.py", line 282, in __init__
    super().__init__(*args, **kwargs)
  File "/usr/local/lib/python3.11/site-packages/ramses_tx/transport.py", line 624, in __init__
    super().__init__(loop or asyncio.get_running_loop(), protocol, pkt_source)
  File "/usr/local/lib/python3.11/site-packages/serial_asyncio/__init__.py", line 66, in __init__
    self._serial.write_timeout = 0
    ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/serial/serialutil.py", line 392, in write_timeout
    self._reconfigure_port()
  File "/usr/local/lib/python3.11/site-packages/serial/rfc2217.py", line 508, in _reconfigure_port
    raise NotImplementedError('write_timeout is currently not supported')
NotImplementedError: write_timeout is currently not supported

@noud-github
Copy link
Author

I worked around this issue (for now) by using socat to create a virtual tty connected to the rcf2217 port, and mount that in the HA container,

@zxdavb
Copy link
Owner

zxdavb commented Feb 4, 2024

Unfortunately, RFC2217 is not supported from version 0.30.0 (and 0.31.x).

This may change in the future, but current focus is on the new MQTT feature.

@zxdavb zxdavb changed the title 0.31.2 RFC2217 : write_timeout is currently not supported 0.3x.x RFC2217 : write_timeout is currently not supported Feb 4, 2024
@zxdavb zxdavb changed the title 0.3x.x RFC2217 : write_timeout is currently not supported 0.3x.x: RFC2217: write_timeout is currently not supported Feb 4, 2024
@zxdavb zxdavb changed the title 0.3x.x: RFC2217: write_timeout is currently not supported RFC2217: write_timeout is currently not supported Feb 4, 2024
@noud-github
Copy link
Author

Thanx for sharing, switching to mqtt makes a lot of sence.

@zxdavb zxdavb self-assigned this Mar 16, 2024
@zxdavb zxdavb added the ramses_rf The issue is likely due to an underlying bug in the ramses_rf library. label Mar 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ramses_rf The issue is likely due to an underlying bug in the ramses_rf library.
Projects
None yet
Development

No branches or pull requests

2 participants