core: OpenTherm Gateway no longer working in 2022.7.0 (Python 3.10)
The problem
Integration is not working, log is flooded with errors, probably due to the upgrade to Python 3.10
What version of Home Assistant Core has the issue?
2022.7.0
What was the last working version of Home Assistant Core?
2022.6.7
What type of installation are you running?
Home Assistant OS
Integration causing the issue
OpenTherm Gateway
Link to integration documentation on our website
https://www.home-assistant.io/integrations/opentherm_gw/
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
Error doing job: Exception in callback SerialTransport._read_ready()
Traceback (most recent call last):
File "/usr/local/lib/python3.10/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/usr/local/lib/python3.10/site-packages/serial_asyncio/__init__.py", line 120, in _read_ready
self._protocol.data_received(data)
File "/usr/local/lib/python3.10/site-packages/pyotgw/protocol.py", line 95, in data_received
self._readbuf += data
AttributeError: 'protocol' object has no attribute '_readbuf'
Additional information
No response
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 56
- Comments: 38 (17 by maintainers)
Can confirm same issue here.
@jan-gerard Only by running a dev version yourself.
This change is planned to be released with 2022.7.6 (which is the next upcoming patch release).
We link known and reported issues for each integration from the Home Assistant documentation AND from your own Home Assistant instance. This case was reported after Home Assistant 2022.7 was shipped. We offer backups for that reason, use them.
Got it all working correctly in the latest 2022.7 release, however when upgrading to 2022.8.0 opentherm is misbehaving again. Sensors become available and within seconds go unavailable again all the time.
Log information:
Logger: homeassistant Source: util/async_.py:141 First occurred: 3 August 2022 at 18:55:22 (14758 occurrences) Last logged: 07:32:56
Error doing job: Exception in callback SerialTransport._call_connection_lost(SerialExcepti…disconnected’)) Error doing job: Exception in callback SerialTransport._call_connection_lost(None) Traceback (most recent call last): File “/usr/local/lib/python3.10/asyncio/events.py”, line 80, in _run self._context.run(self._callback, *self._args) File “/usr/local/lib/python3.10/site-packages/serial_asyncio/init.py”, line 417, in call_connection_lost self.serial.close() File “/usr/local/lib/python3.10/site-packages/serial/urlhandler/protocol_socket.py”, line 104, in close time.sleep(0.3) File "/usr/src/homeassistant/homeassistant/util/async.py", line 180, in protected_loop_func check_loop(func, strict=strict) File "/usr/src/homeassistant/homeassistant/util/async.py", line 141, in check_loop raise RuntimeError( RuntimeError: Detected blocking call to sleep inside the event loop. Use
await hass.async_add_executor_job()
; This is causing stability issues. Please report issueTo end this with a positive note, this thread was the final push I needed to also install the dev version. I hope I can help with testing in future!
Thanks for the update frenck. We will have to wait for it to release then.
You are right, not trying tot raise that as An issue. So, appoligies for the littering of the topic then
If no one tests it during beta, it will be hard to achieve that. Feel free to join or beta tests to help prevent these issues.
This is upstream breaking (Python in combination with the upstream package), not Home Assistant. You are mixing up things.
The first error occurring in OpenTherm Gateway is:
This causes
_readbuf
being undefined later on.The master branch of pyotgw has a fix for this issue, but unfortunately this has not yet been published in a release.
Same here, luckily found this issue to know it was OpenTherm GW spitting out this error. Happy to test any upcoming fixes - luckily it’s still warm outside.
Thanks for the report. It does look like a dependency issue in pyotgw indeed. I am on vacation at the moment, so I can’t really look into it until at least the end of next week.
For now all you can do is either downgrade or disable the integration.