core: KNX connection breaking after upgrade to 2021.2
The problem
I’m facing a serious issue with KNX after upgrading to the 2021.2 release. The connection to the KNX bus is always breaking down after some time. If I restart HA, it does works again, but after around 30-60 minutes KNX devices stop working. I had to roll back to 2021.1.5 where it does work again.
What is version of Home Assistant Core has the issue?
2021.2.1
What was the last working version of Home Assistant Core?
2021.1.5
What type of installation are you running?
Home Assistant OS (installed in a Proxmox VM on Intel NUC)
Integration causing the issue
KNX
Link to integration documentation on our website
https://www.home-assistant.io/integrations/knx/
Example YAML snippet
IPs masked out…
knx:
tunneling:
host: '192.168.x.y'
port: 3671
local_ip: '192.168.x.z'
Anything in the logs that might be useful for us?
2021-02-06 14:58:58 WARNING (MainThread) [xknx.log] Tunnel connection closed.
2021-02-06 14:59:00 WARNING (MainThread) [xknx.log] Received DisconnectRequest from tunnelling sever.
2021-02-06 14:59:00 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback _SelectorDatagramTransport._read_ready()
Traceback (most recent call last):
File "/usr/local/lib/python3.8/asyncio/events.py", line 81, in _run
self._context.run(self._callback, *self._args)
File "/usr/local/lib/python3.8/asyncio/selector_events.py", line 1021, in _read_ready
self._protocol.datagram_received(data, addr)
File "/usr/local/lib/python3.8/site-packages/xknx/io/udp_client.py", line 70, in datagram_received
self.data_received_callback(data)
File "/usr/local/lib/python3.8/site-packages/xknx/io/udp_client.py", line 115, in data_received_callback
self.handle_knxipframe(knxipframe)
File "/usr/local/lib/python3.8/site-packages/xknx/io/udp_client.py", line 122, in handle_knxipframe
callback.callback(knxipframe, self)
File "/usr/local/lib/python3.8/site-packages/xknx/io/tunnel.py", line 273, in _request_received
self._disconnect_request_received(knxipframe.body)
File "/usr/local/lib/python3.8/site-packages/xknx/io/tunnel.py", line 321, in _disconnect_request_received
self._tunnel_lost()
File "/usr/local/lib/python3.8/site-packages/xknx/io/tunnel.py", line 129, in _tunnel_lost
raise CommunicationError("Tunnel connection closed.")
xknx.exceptions.exception.CommunicationError: Tunnel connection closed.
2021-02-06 14:59:00 WARNING (MainThread) [xknx.log] Error: KNX bus did not respond in time (2.0 secs) to GroupValueRead request for: 1/2/25
I did have the problem of disconnecting the KNX bus from time to time, because I use the KNX IP gateway with another device. But I moved HA to an exclusive gateway now and it still does not work with 2021.2.1 and breaks after a very short time.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 21 (8 by maintainers)
I have upgraded my installation again to 2021.2.1 and updated the config to not use the config_file setting. The KNX connection was never lost in the last couple of hours, even if I got some DisconnectRequest requests from the tunnelling server. I will check with the other IP gateway as well. I’m very happy, we found the issue with my configuration and also solved a bug at the same time. Thanks everyone for the great support. This is just an awesome project and community. Keep up the great work.
👍
I think this issue can be closed!?
Possible. I’m not entirely sure how this behaves with wrong configurations 🙃 But the point still stands: don’t use
config_file:
at all - then your entire configuration is also Schema-checked.