core: KNX entities switching constantly from available to unavailable
The problem
After upgrading to HA last version 2021.11.1 the KNX entities continue switching from availble to Not avalable
What version of Home Assistant Core has the issue?
2021.11.1
What was the last working version of Home Assistant Core?
2021.10.9
What type of installation are you running?
Home Assistant OS
Integration causing the issue
KNX
Link to integration documentation on our website
https://www.home-assistant.io/integrations/knx/
Example YAML snippet
No response
Anything in the logs that might be useful for us?
2021-11-05 15:28:01 WARNING (MainThread) [xknx.log] Received DisconnectRequest from tunnelling sever.
2021-11-05 15:28:06 WARNING (MainThread) [xknx.log] Heartbeat to KNX bus failed. No active communication channel.
Additional information
No response
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 80 (44 by maintainers)
I had a similar problem as described in this thread. It turned out that a third party integration (Helios KWL/Fan) caused the whole network stack of HomeAssistant to pause for a few seconds every now and then. This forced the KNX connection to trigger a reconnect and all entities were unavailable for 30-60 seconds. KNX disconnects because of the missing keep alive message caused by the blocking problem in HomeAssistant. Disabling the third party integration solved the problem. I highly recommend trying this as well. Disable and enable all integrations one by one and check the behavior. I was too lazy to debug the faulty integration at the time to find out the cause. Hope this helps.
Thanks all for the input.
Last days I tried switching cables, using wifi instead of a cable, updating the firmware of the MDT interface and using a clean install. None of those changed anything to the behavior.
When trying to ping the IP interface it usually reponded quite slow and sometimes packets were dropped. Again evidence that it had nothing to do with xknx or home assistant.
Going in ETS and doing a full download of the MDT IP interface solved my problem. Right now the program version shows 2.1. Unfortunatly I have no clue what it was before. Pinging goes alot faster, no dropped packets anymore and most importantly, no sign of dropped connections in HA for the last 20 hours.
Having the same issue here. First I was using the docker version on a Raspberry Pi 4 model B. Then I switched to HA OS on the RPI, to see whether it changed anything (it didn’t).
I’m using a MDT IP Interface SCN-IP000.03
When taking a look with wireshark, I’m having the impression that the MDT interface is either ignoring some requests or that my network is somehow dropping them.
Synology NAS / Docker / HA image.
Home Assistant OS on Raspberry Pi 4 model B 4Gb RAM with MicroSD 64Gb.
HassOS on VM using proxmox, on intel NUC with KNX\IP interface Weinzierl 731 directly into a managed switch not passing between router (knx\ip & nuc -> Switch)
Anyway i “fixed” this issue on my istance considering unavailable in every automation (like 200 automation, 2 weeks of work) and every template & custom sensor, climate… i already have a watchdog\hearbeat analysis system and i inhibite automations with this during a persistent communication fault.
Upgraded to HA 2022.2.0b4 Now the system boots correctly. It’s a bit slower but everything is up and running. The KNX disconnection now happens again every 10 seconds even if rout back is disabled. Here you can find logs from HA and diagnostic form KNX integration. config_entry-knx-e0f52016e11797923387412866023651.json.zip home-assistant (2022.2.0b4)+debugpy.zip
I will roll back to HA 2022.2.0b3 which has a tolerable behaviour with KNX disconnection while waiting for a fix. Thanx
The
entity_id=sensor.ntc_temperature_01
comes frome ESPHome integration. It’s a temperature sensor to acquire data from the hot water boiler. It’s not used in any automation, just for showing up its value in the dashboard. I correctly addeddebugpy:
in configuration.yaml and restarted… I’ll let you have some new logs tomorrow ! Thankyou@farmio Disabling the route back solved the problem of disconnection every 2/3 seconds. Still present the usual behaviour with random diconnections. @marvin-w I attach here the KNX diagnostics config_entry-knx-e0f52016e11797923387412866023651.zip and here the HA log with debugpy and homeassistant.core. (The logs start from bootstrap of HA and ends 10 minutes after KNX tunneling disconnection). You can find a disconnection @ 2022-01-30 22:44:46 Ha Log (2022.2.0b3).zip
Last questions: How do I use the individual address in KNX configuration?Which address do I have to use?
Thanx
@arcano81 thanks for these logs, we found a bug in the route_back logic. Try disabling route_back - you probably don’t need it as your HA device and interface are on the same network anyway.
#63766 was just merged to
dev
. It’s easier to just try current HA dev branch and see if that logs any warnings. See https://developers.home-assistant.io/docs/development_environmenthttps://github.com/XKNX/xknx/pull/847 would also be worth a try - its a more or less experimental version of xknx which puts its connection (acking etc.) logic in a separate thread. It works fine on my system (but then again the current release version also works fine here 🤷).
@josiasmontag Don’t know what causes this, but every Frame is listed twice in your capture. It’s most probably some capturing configuration issue so I’ll ignore this 🤷♂️
The first disconnect is different, the other 2 seem also to be caused by a blocked loop. This picture is showing the 2nd disconnect.
You can see the Telegram 33 was ACKed in 0.000696 seconds.
Telegram 34 didn’t get an ACK in time (~1 second) and is repeated by the KNX interface.
After an additional second the KNX interface sends a DisconnectRequest - as it should.
After additional 0.2 seconds xknx is unblocked again and works its queue - it ACKs both Telegrams and answers the DisconnectRequest (which both is pointless since we don’t have a connection anymore anyway).
What happened between 33 and 34 remains a mystery 🤷
Hi All, I’m the owner one of the mentioned helios integration. The “production” version of the integration blocks the event loop (there is thread locking inside, and the socket connection is also not based on asyncio in the underlying eazyctrl package). I have made a quick (just for testing) modification to make everything async (locking, connection, etc…). If someone has installed the homeassistant-easycontrols integration and has this #59170 issue please try to update the integration from this branch: https://github.com/laszlojakab/homeassistant-easycontrols/tree/fix/network-stack-restart
Please give me a feedback if it solves the original problem. Thanks!
@farmio Here attached a 40min dump of KNX/IP protocolo. Hope this could be enough to better understand the issue. Let me know if you need some more data. KNX IP dump 02.zip
Thank you for pointing this out. It was indeed the Helios integration for me as well.
@arcano81 the disconnect is issued form your tunnelling server. How often does it occur? You can try to turn off the second device connecting to it and see if this is causing the problems. Alternatively try to use ETS bus monitor to get an idea what is happening.
@sagitt without further information we can’t help you. But your problems don’t seem related to this issue (entities unavailable) so please open a new one providing as much information as possible.
Here some more logs to better explain the issue. As you can see in the first 2 lines seems that there is something wrong with the connection to the KNX BUS that didn’t happen before the last HA update. Thanx!
2021-11-06 01:56:15 WARNING (MainThread) [xknx.log] Received DisconnectRequest from tunnelling sever. 2021-11-06 01:56:17 WARNING (MainThread) [xknx.log] Heartbeat to KNX bus failed. No active communication channel. 2021-11-06 01:56:22 WARNING (MainThread) [xknx.log] Error: KNX bus did not respond in time (2.0 secs) to GroupValueRead request for: 4/2/1 2021-11-06 01:56:22 WARNING (MainThread) [xknx.log] Could not sync group address ‘4/2/1’ (FinestraLavanderia - State) 2021-11-06 01:56:22 WARNING (MainThread) [xknx.log] Error: KNX bus did not respond in time (2.0 secs) to GroupValueRead request for: 4/2/10 2021-11-06 01:56:22 WARNING (MainThread) [xknx.log] Could not sync group address ‘4/2/10’ (FinestraCameretta - State) 2021-11-06 01:56:23 WARNING (MainThread) [xknx.log] Received DisconnectRequest from tunnelling sever. 2021-11-06 01:56:29 WARNING (MainThread) [xknx.log] Error: KNX bus did not respond in time (2.0 secs) to GroupValueRead request for: 4/2/1 2021-11-06 01:56:29 WARNING (MainThread) [xknx.log] Could not sync group address ‘4/2/1’ (FinestraLavanderia - State) 2021-11-06 01:56:29 WARNING (MainThread) [xknx.log] Error: KNX bus did not respond in time (2.0 secs) to GroupValueRead request for: 4/2/10 2021-11-06 01:56:29 WARNING (MainThread) [xknx.log] Could not sync group address ‘4/2/10’ (FinestraCameretta - State) 2021-11-06 01:56:31 WARNING (MainThread) [xknx.log] Error: KNX bus did not respond in time (2.0 secs) to GroupValueRead request for: 4/2/11 2021-11-06 01:56:31 WARNING (MainThread) [xknx.log] Could not sync group address ‘4/2/11’ (FinestraBagnoOspiti - State) 2021-11-06 01:56:31 WARNING (MainThread) [xknx.log] Error: KNX bus did not respond in time (2.0 secs) to GroupValueRead request for: 4/2/12 2021-11-06 01:56:31 WARNING (MainThread) [xknx.log] Could not sync group address ‘4/2/12’ (FinestraCucina - State) 2021-11-06 01:56:33 WARNING (MainThread) [xknx.log] Error: KNX bus did not respond in time (2.0 secs) to GroupValueRead request for: 4/2/13 2021-11-06 01:56:33 WARNING (MainThread) [xknx.log] Could not sync group address ‘4/2/13’ (FinestraSalaPranzo - State) 2021-11-06 01:56:33 WARNING (MainThread) [xknx.log] Error: KNX bus did not respond in time (2.0 secs) to GroupValueRead request for: 4/2/14 2021-11-06 01:56:33 WARNING (MainThread) [xknx.log] Could not sync group address ‘4/2/14’ (PortaIngressoP1 - State) 2021-11-06 01:56:35 WARNING (MainThread) [xknx.log] Error: KNX bus did not respond in time (2.0 secs) to GroupValueRead request for: 4/2/15 2021-11-06 01:56:35 WARNING (MainThread) [xknx.log] Could not sync group address ‘4/2/15’ (PortaIngressoLaterale - State) 2021-11-06 01:56:35 WARNING (MainThread) [xknx.log] Error: KNX bus did not respond in time (2.0 secs) to GroupValueRead request for: 4/2/16 2021-11-06 01:56:35 WARNING (MainThread) [xknx.log] Could not sync group address ‘4/2/16’ (FinestraMatrimonialePT - State) 2021-11-06 01:56:37 WARNING (MainThread) [xknx.log] Error: KNX bus did not respond in time (2.0 secs) to GroupValueRead request for: 4/2/17 2021-11-06 01:56:37 WARNING (MainThread) [xknx.log] Could not sync group address ‘4/2/17’ (FinestraSoggiornoPT - State) 2021-11-06 01:56:37 WARNING (MainThread) [xknx.log] Error: KNX bus did not respond in time (2.0 secs) to GroupValueRead request for: 4/2/18 2021-11-06 01:56:37 WARNING (MainThread) [xknx.log] Could not sync group address ‘4/2/18’ (PortaIngressoPT - State) 2021-11-06 01:56:39 WARNING (MainThread) [xknx.log] Error: KNX bus did not respond in time (2.0 secs) to GroupValueRead request for: 4/2/19 2021-11-06 01:56:39 WARNING (MainThread) [xknx.log] Could not sync group address ‘4/2/19’ (FinestraBagnoRosso - State) 2021-11-06 01:56:39 WARNING (MainThread) [xknx.log] Error: KNX bus did not respond in time (2.0 secs) to GroupValueRead request for: 4/2/2 2021-11-06 01:56:39 WARNING (MainThread) [xknx.log] Could not sync group address ‘4/2/2’ (FinestraSalaHobby - State) 2021-11-06 01:56:41 WARNING (MainThread) [xknx.log] Error: KNX bus did not respond in time (2.0 secs) to GroupValueRead request for: 4/2/20 2021-11-06 01:56:41 WARNING (MainThread) [xknx.log] Could not sync group address ‘4/2/20’ (FinestraCamerettaPT - State) 2021-11-06 01:56:41 WARNING (MainThread) [xknx.log] Error: KNX bus did not respond in time (2.0 secs) to GroupValueRead request for: 4/2/3 2021-11-06 01:56:41 WARNING (MainThread) [xknx.log] Could not sync group address ‘4/2/3’ (PortaSalaHobby - State) 2021-11-06 01:56:43 WARNING (MainThread) [xknx.log] Error: KNX bus did not respond in time (2.0 secs) to GroupValueRead request for: 4/2/4 2021-11-06 01:56:43 WARNING (MainThread) [xknx.log] Could not sync group address ‘4/2/4’ (FinestraSoggiorno - State) 2021-11-06 01:56:43 WARNING (MainThread) [xknx.log] Error: KNX bus did not respond in time (2.0 secs) to GroupValueRead request for: 4/2/5 2021-11-06 01:56:43 WARNING (MainThread) [xknx.log] Could not sync group address ‘4/2/5’ (FinestraAlzante - State) 2021-11-06 01:56:45 WARNING (MainThread) [xknx.log] Error: KNX bus did not respond in time (2.0 secs) to GroupValueRead request for: 4/2/6 2021-11-06 01:56:45 WARNING (MainThread) [xknx.log] Could not sync group address ‘4/2/6’ (FinestraStudio - State) 2021-11-06 01:56:45 WARNING (MainThread) [xknx.log] Error: KNX bus did not respond in time (2.0 secs) to GroupValueRead request for: 4/2/7 2021-11-06 01:56:45 WARNING (MainThread) [xknx.log] Could not sync group address ‘4/2/7’ (FinestraBagnoGrigio - State) 2021-11-06 01:56:47 WARNING (MainThread) [xknx.log] Error: KNX bus did not respond in time (2.0 secs) to GroupValueRead request for: 4/2/8 2021-11-06 01:56:47 WARNING (MainThread) [xknx.log] Could not sync group address ‘4/2/8’ (FinestraMatrimoniale - State) 2021-11-06 01:56:47 WARNING (MainThread) [xknx.log] Error: KNX bus did not respond in time (2.0 secs) to GroupValueRead request for: 4/2/9 2021-11-06 01:56:47 WARNING (MainThread) [xknx.log] Could not sync group address ‘4/2/9’ (FinestraBagnoAzzurro - State) 2021-11-06 01:56:49 WARNING (MainThread) [xknx.log] Error: KNX bus did not respond in time (2.0 secs) to GroupValueRead request for: 4/2/21 2021-11-06 01:56:49 WARNING (MainThread) [xknx.log] Could not sync group address ‘4/2/21’ (Tenda_BOX - State) 2021-11-06 01:56:49 WARNING (MainThread) [xknx.log] Error: KNX bus did not respond in time (2.0 secs) to GroupValueRead request for: 4/2/22 2021-11-06 01:56:49 WARNING (MainThread) [xknx.log] Could not sync group address ‘4/2/22’ (Tenda_SOGGIORNO2 - State) 2021-11-06 01:56:51 WARNING (MainThread) [xknx.log] Error: KNX bus did not respond in time (2.0 secs) to GroupValueRead request for: 4/2/23 2021-11-06 01:56:51 WARNING (MainThread) [xknx.log] Could not sync group address ‘4/2/23’ (Tenda_INGRESSO_SALAHOBBT - State) 2021-11-06 01:56:51 WARNING (MainThread) [xknx.log] Error: KNX bus did not respond in time (2.0 secs) to GroupValueRead request for: 4/2/24 2021-11-06 01:56:51 WARNING (MainThread) [xknx.log] Could not sync group address ‘4/2/24’ (Tenda_MATRIMONIALE_PT - State) 2021-11-06 01:56:53 WARNING (MainThread) [xknx.log] Error: KNX bus did not respond in time (2.0 secs) to GroupValueRead request for: 4/2/25 2021-11-06 01:56:53 WARNING (MainThread) [xknx.log] Could not sync group address ‘4/2/25’ (Tenda_CAMERETTA_PT - State) 2021-11-06 01:56:53 WARNING (MainThread) [xknx.log] Error: KNX bus did not respond in time (2.0 secs) to GroupValueRead request for: 4/2/26 2021-11-06 01:56:53 WARNING (MainThread) [xknx.log] Could not sync group address ‘4/2/26’ (Tenda_SOGGIORNO_PT - State) 2021-11-06 01:56:55 WARNING (MainThread) [xknx.log] Error: KNX bus did not respond in time (2.0 secs) to GroupValueRead request for: 4/2/27 2021-11-06 01:56:55 WARNING (MainThread) [xknx.log] Could not sync group address ‘4/2/27’ (Tenda_INGRESSO_PT - State) 2021-11-06 01:56:55 WARNING (MainThread) [xknx.log] Error: KNX bus did not respond in time (2.0 secs) to GroupValueRead request for: 4/2/28 2021-11-06 01:56:55 WARNING (MainThread) [xknx.log] Could not sync group address ‘4/2/28’ (Tenda_SOGGIORNO1 - State) 2021-11-06 01:56:57 WARNING (MainThread) [xknx.log] Error: KNX bus did not respond in time (2.0 secs) to GroupValueRead request for: 4/2/29 2021-11-06 01:56:57 WARNING (MainThread) [xknx.log] Could not sync group address ‘4/2/29’ (Tenda_STUDIO - State) 2021-11-06 01:56:57 WARNING (MainThread) [xknx.log] Error: KNX bus did not respond in time (2.0 secs) to GroupValueRead request for: 4/2/30 2021-11-06 01:56:57 WARNING (MainThread) [xknx.log] Could not sync group address ‘4/2/30’ (Tenda_VETROLUNGO - State) 2021-11-06 01:56:59 WARNING (MainThread) [xknx.log] Error: KNX bus did not respond in time (2.0 secs) to GroupValueRead request for: 4/2/31 2021-11-06 01:56:59 WARNING (MainThread) [xknx.log] Could not sync group address ‘4/2/31’ (Tenda_BAGNOGRIGIO - State) 2021-11-06 01:56:59 WARNING (MainThread) [xknx.log] Error: KNX bus did not respond in time (2.0 secs) to GroupValueRead request for: 4/2/32 2021-11-06 01:56:59 WARNING (MainThread) [xknx.log] Could not sync group address ‘4/2/32’ (Tenda_MATRIMONIALE_P1 - State) 2021-11-06 01:57:01 WARNING (MainThread) [xknx.log] Error: KNX bus did not respond in time (2.0 secs) to GroupValueRead request for: 4/2/33 2021-11-06 01:57:01 WARNING (MainThread) [xknx.log] Could not sync group address ‘4/2/33’ (Tenda_BAGNOAZZURRO - State) 2021-11-06 01:57:02 WARNING (MainThread) [xknx.log] Error: KNX bus did not respond in time (2.0 secs) to GroupValueRead request for: 4/2/34 2021-11-06 01:57:02 WARNING (MainThread) [xknx.log] Could not sync group address ‘4/2/34’ (Tenda_CAMERETTA_P1 - State) 2021-11-06 01:57:03 WARNING (MainThread) [xknx.log] Error: KNX bus did not respond in time (2.0 secs) to GroupValueRead request for: 4/2/35 2021-11-06 01:57:03 WARNING (MainThread) [xknx.log] Could not sync group address ‘4/2/35’ (Tenda_CUCINA - State) 2021-11-06 01:57:04 WARNING (MainThread) [xknx.log] Error: KNX bus did not respond in time (2.0 secs) to GroupValueRead request for: 4/2/36 2021-11-06 01:57:04 WARNING (MainThread) [xknx.log] Could not sync group address ‘4/2/36’ (Tenda_ALZANTE - State) 2021-11-06 01:57:05 WARNING (MainThread) [xknx.log] Error: KNX bus did not respond in time (2.0 secs) to GroupValueRead request for: 4/2/37 2021-11-06 01:57:05 WARNING (MainThread) [xknx.log] Could not sync group address ‘4/2/37’ (Tenda_INGRESSO_P1 - State) 2021-11-06 01:57:06 WARNING (MainThread) [xknx.log] Error: KNX bus did not respond in time (2.0 secs) to GroupValueRead request for: 4/2/38 2021-11-06 01:57:06 WARNING (MainThread) [xknx.log] Could not sync group address ‘4/2/38’ (Tenda_BAGNOOSPITI - State) 2021-11-06 01:57:07 WARNING (MainThread) [xknx.log] Error: KNX bus did not respond in time (2.0 secs) to GroupValueRead request for: 4/2/39 2021-11-06 01:57:07 WARNING (MainThread) [xknx.log] Could not sync group address ‘4/2/39’ (Radar_box - State) 2021-11-06 01:57:08 WARNING (MainThread) [xknx.log] Error: KNX bus did not respond in time (2.0 secs) to GroupValueRead request for: 4/2/40 2021-11-06 01:57:08 WARNING (MainThread) [xknx.log] Could not sync group address ‘4/2/40’ (Radar_corr_PT - State) 2021-11-06 01:57:09 WARNING (MainThread) [xknx.log] Error: KNX bus did not respond in time (2.0 secs) to GroupValueRead request for: 4/2/41 2021-11-06 01:57:09 WARNING (MainThread) [xknx.log] Could not sync group address ‘4/2/41’ (Radar_corr_P1 - State) 2021-11-06 01:57:10 WARNING (MainThread) [xknx.log] Error: KNX bus did not respond in time (2.0 secs) to GroupValueRead request for: 4/1/1 2021-11-06 01:57:10 WARNING (MainThread) [xknx.log] Could not sync group address ‘4/1/1’ (FinestreP1 - State) 2021-11-06 01:57:11 WARNING (MainThread) [xknx.log] Error: KNX bus did not respond in time (2.0 secs) to GroupValueRead request for: 4/1/2 2021-11-06 01:57:11 WARNING (MainThread) [xknx.log] Could not sync group address ‘4/1/2’ (TendaP1 - State) 2021-11-06 01:57:12 WARNING (MainThread) [xknx.log] Error: KNX bus did not respond in time (2.0 secs) to GroupValueRead request for: 4/1/3 2021-11-06 01:57:12 WARNING (MainThread) [xknx.log] Could not sync group address ‘4/1/3’ (RadarP1 - State) 2021-11-06 01:57:13 WARNING (MainThread) [xknx.log] Error: KNX bus did not respond in time (2.0 secs) to GroupValueRead request for: 4/1/4 2021-11-06 01:57:14 WARNING (MainThread) [xknx.log] Could not sync group address ‘4/1/4’ (FinestrePT - State) 2021-11-06 01:57:14 WARNING (MainThread) [xknx.log] Error: KNX bus did not respond in time (2.0 secs) to GroupValueRead request for: 4/1/5 2021-11-06 01:57:14 WARNING (MainThread) [xknx.log] Could not sync group address ‘4/1/5’ (TendaPT - State) 2021-11-06 01:57:16 WARNING (MainThread) [xknx.log] Error: KNX bus did not respond in time (2.0 secs) to GroupValueRead request for: 4/1/6 2021-11-06 01:57:16 WARNING (MainThread) [xknx.log] Could not sync group address ‘4/1/6’ (RadarPT - State) 2021-11-06 01:57:16 WARNING (MainThread) [xknx.log] Error: KNX bus did not respond in time (2.0 secs) to GroupValueRead request for: 4/1/7 2021-11-06 01:57:16 WARNING (MainThread) [xknx.log] Could not sync group address ‘4/1/7’ (Box - State) 2021-11-06 01:57:18 WARNING (MainThread) [xknx.log] Error: KNX bus did not respond in time (2.0 secs) to GroupValueRead request for: 4/1/8 2021-11-06 01:57:18 WARNING (MainThread) [xknx.log] Could not sync group address ‘4/1/8’ (TendaBox - State) 2021-11-06 01:57:21 WARNING (MainThread) [xknx.log] Error: KNX bus did not respond in time (2.0 secs) to GroupValueRead request for: 11/0/0 2021-11-06 01:57:21 WARNING (MainThread) [xknx.log] Could not sync group address ‘11/0/0’ (Pedonale - State)