Hello
please help me diagnose recurring problem. I migrated to HA from Gira HomeServer few months ago.
My setup:
Raspberry PI4
Home Assistant 2021.9.7
KNX/IP JUNG IPR100REG
Actual KNX configuration:
individual_address: '1.1.23'
rate_limit: 10
state_updater: true
Problem: HA sometimes stops sending telegrams to KNX.
My investigation:
- it happens mainly after core update
- it happens between 00:00 - 01:00 hours (no matter when the HA is restarted)
- incoming communications to HA works and is processed
What doesnāt help:
- reload KNX configuration
- restart KNX/IP router
What does help:
- restart Raspberry
- restart HA (sometimes more restarts needed)
Notice:
KNX/IP JUNG IPR100REG allows only ONE tunneling connection. But, I had no problem with this on Gira HomeServer in last 10 years. Does Gira handle connection better?
What is interresting? That it occures not immediately after restart but after midnigt that day.
My tries to solve it:
- all possible combinations of KNX setup - routing, tunneling
- restarting KNX/IP router
- reseting KNX/IP router
- changing routerās KNX address
- tried to send telegrams via service KNX.SEND with no luck
Some excerpts from log:
The last xknx log entries before core update:
2021-09-20 19:47:21 DEBUG (MainThread) [xknx.knx] Sending: <KNXIPFrame <KNXIPHeader HeaderLength="6" ProtocolVersion="16" KNXIPServiceType="DISCONNECT_REQUEST" Reserve="0" TotalLength="16" />
body="<DisconnectRequest CommunicationChannelID="72" control_endpoint="<HPAI 10.0.0.66:50113 />" />" />
2021-09-20 19:47:21 DEBUG (MainThread) [xknx.raw_socket] Received from ('10.0.0.21', 3671): 0610020a00084800
2021-09-20 19:47:21 DEBUG (MainThread) [xknx.knx] Received: <KNXIPFrame <KNXIPHeader HeaderLength="6" ProtocolVersion="16" KNXIPServiceType="DISCONNECT_RESPONSE" Reserve="0" TotalLength="8" />
body="<DisconnectResponse CommunicationChannelID="72" status_code="ErrorCode.E_NO_ERROR" />" />
2021-09-20 19:47:21 DEBUG (MainThread) [xknx.log] Tunnel disconnected (communication_channel: 72)
2021-09-20 19:47:21 DEBUG (MainThread) [xknx.log] Closing transport.
Discovered interface after restart:
2021-09-20 19:49:49 DEBUG (MainThread) [xknx.knx] Received: <KNXIPFrame <KNXIPHeader HeaderLength="6" ProtocolVersion="16" KNXIPServiceType="SEARCH_RESPONSE" Reserve="0" TotalLength="78" />
body="<SearchResponse control_endpoint="<HPAI 10.0.0.21:3671 />" dibs="[
<DIBDeviceInformation
knx_medium="KNXMedium.TP1"
programming_mode="False"
individual_address="1.1.22"
installation_number="0"
project_number="0"
serial_number="00:01:00:xx:xx:xx"
multicast_address="224.0.23.12"
mac_address="00:0e:xx:xx:xx:xx"
name=" " />,
<DIBSuppSVCFamilies families="[DIBServiceFamily.CORE version: 1, DIBServiceFamily.DEVICE_MANAGEMENT version: 1, DIBServiceFamily.TUNNELING version: 1, DIBServiceFamily.ROUTING version: 1]" />
]" />" />
2021-09-20 19:49:52 DEBUG (MainThread) [xknx.log] Tunnel established communication_channel=73, id=4373
Probably the last send request (to 8/7/18 address):
2021-09-21 00:00:17 DEBUG (MainThread) [xknx.telegram] <Telegram direction="Incoming" source_address="1.1.8" destination_address="8/1/21" payload="<GroupValueWrite value="<DPTBinary value="0" />" />" />
2021-09-21 00:00:17 DEBUG (MainThread) [xknx.telegram] <Telegram direction="Outgoing" source_address="0.0.0" destination_address="8/7/18" payload="<GroupValueWrite value="<DPTArray value="[0x4,0x38]" />" />" />
2021-09-21 00:00:17 DEBUG (MainThread) [xknx.knx] Sending: <KNXIPFrame <KNXIPHeader HeaderLength="6" ProtocolVersion="16" KNXIPServiceType="TUNNELLING_REQUEST" Reserve="0" TotalLength="23" />
body="<TunnellingRequest communication_channel_id="73" sequence_counter="186" cemi="<CEMIFrame SourceAddress="IndividualAddress("1.1.21")" DestinationAddress="GroupAddress("8/7/18")" Flags="1011110011100000" payload="<GroupValueWrite value="<DPTArray value="[0x4,0x38]" />" />" />" />" />
2021-09-21 00:00:17 DEBUG (MainThread) [xknx.raw_socket] Received from ('10.0.0.21', 3671): 06100421000a0449ba00
2021-09-21 00:00:17 DEBUG (MainThread) [xknx.knx] Received: <KNXIPFrame <KNXIPHeader HeaderLength="6" ProtocolVersion="16" KNXIPServiceType="TUNNELLING_ACK" Reserve="0" TotalLength="10" />
body="<TunnellingAck communication_channel_id="73" sequence_counter="186" status_code="ErrorCode.E_NO_ERROR" />" />
2021-09-21 00:00:17 DEBUG (MainThread) [xknx.raw_socket] Received from ('10.0.0.21', 3671): 0610042000170449f1002e00bce0111547120300800438
2021-09-21 00:00:17 DEBUG (MainThread) [xknx.knx] Received: <KNXIPFrame <KNXIPHeader HeaderLength="6" ProtocolVersion="16" KNXIPServiceType="TUNNELLING_REQUEST" Reserve="0" TotalLength="23" />
body="<TunnellingRequest communication_channel_id="73" sequence_counter="241" cemi="<CEMIFrame SourceAddress="IndividualAddress("1.1.21")" DestinationAddress="GroupAddress("8/7/18")" Flags="1011110011100000" payload="<GroupValueWrite value="<DPTArray value="[0x4,0x38]" />" />" />" />" />
2021-09-21 00:00:17 DEBUG (MainThread) [xknx.knx] Sending: <KNXIPFrame <KNXIPHeader HeaderLength="6" ProtocolVersion="16" KNXIPServiceType="TUNNELLING_ACK" Reserve="0" TotalLength="10" />
body="<TunnellingAck communication_channel_id="73" sequence_counter="241" status_code="ErrorCode.E_NO_ERROR" />" />
2021-09-21 00:00:44 DEBUG (MainThread) [xknx.knx] Sending: <KNXIPFrame <KNXIPHeader HeaderLength="6" ProtocolVersion="16" KNXIPServiceType="CONNECTIONSTATE_REQUEST" Reserve="0" TotalLength="16" />
body="<ConnectionStateRequest CommunicationChannelID="73", control_endpoint="<HPAI 10.0.0.66:55618 />" />" />
2021-09-21 00:00:44 DEBUG (MainThread) [xknx.raw_socket] Received from ('10.0.0.21', 3671): 0610020800084900
2021-09-21 00:00:44 DEBUG (MainThread) [xknx.knx] Received: <KNXIPFrame <KNXIPHeader HeaderLength="6" ProtocolVersion="16" KNXIPServiceType="CONNECTIONSTATE_RESPONSE" Reserve="0" TotalLength="8" />
body="<ConnectionStateResponse CommunicationChannelID="73" status_code="ErrorCode.E_NO_ERROR" />" />
2021-09-21 00:01:00 INFO (MainThread) [homeassistant.components.automation.backup_automaticky] Backup automatickĆ½: Running automation actions
2021-09-21 00:01:00 INFO (MainThread) [homeassistant.components.automation.backup_automaticky] Backup automatickĆ½: Executing step call service
2021-09-21 00:01:11 DEBUG (MainThread) [xknx.raw_socket] Received from ('10.0.0.21', 3671): 0610042000150449f2002900bce0110b4603010081
2021-09-21 00:01:11 DEBUG (MainThread) [xknx.knx] Received: <KNXIPFrame <KNXIPHeader HeaderLength="6" ProtocolVersion="16" KNXIPServiceType="TUNNELLING_REQUEST" Reserve="0" TotalLength="21" />
body="<TunnellingRequest communication_channel_id="73" sequence_counter="242" cemi="<CEMIFrame SourceAddress="IndividualAddress("1.1.11")" DestinationAddress="GroupAddress("8/6/3")" Flags="1011110011100000" payload="<GroupValueWrite value="<DPTBinary value="1" />" />" />" />" />
2021-09-21 00:01:11 DEBUG (MainThread) [xknx.knx] Sending: <KNXIPFrame <KNXIPHeader HeaderLength="6" ProtocolVersion="16" KNXIPServiceType="TUNNELLING_ACK" Reserve="0" TotalLength="10" />
body="<TunnellingAck communication_channel_id="73" sequence_counter="242" status_code="ErrorCode.E_NO_ERROR" />" />
2021-09-21 00:01:11 DEBUG (MainThread) [xknx.telegram] <Telegram direction="Incoming" source_address="1.1.11" destination_address="8/6/3" payload="<GroupValueWrite value="<DPTBinary value="1" />" />" />
This telegram was not delivered (but incoming telegrams to HA are processed):
021-09-21 00:02:01 INFO (MainThread) [homeassistant.components.automation.text_ovladac_satna] Text ovladaÄ - Å”atna rodiÄe - poÅ”li svĆ”tek: Running automation actions
2021-09-21 00:02:01 INFO (MainThread) [homeassistant.components.automation.text_ovladac_satna] Text ovladaÄ - Å”atna rodiÄe - poÅ”li svĆ”tek: Executing step call service
2021-09-21 00:02:01 DEBUG (MainThread) [xknx.telegram] <Telegram direction="Outgoing" source_address="0.0.0" destination_address="9/1/62" payload="<GroupValueWrite value="<DPTArray value="[0x4d,0x61,0x74,0x6f,0x75,0x161,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0]" />" />" />
2021-09-21 00:02:01 DEBUG (MainThread) [xknx.knx] Sending: <KNXIPFrame <KNXIPHeader HeaderLength="6" ProtocolVersion="16" KNXIPServiceType="TUNNELLING_REQUEST" Reserve="0" TotalLength="35" />
body="<TunnellingRequest communication_channel_id="73" sequence_counter="187" cemi="<CEMIFrame SourceAddress="IndividualAddress("1.1.21")" DestinationAddress="GroupAddress("9/1/62")" Flags="1011110011100000" payload="<GroupValueWrite value="<DPTArray value="[0x4d,0x61,0x74,0x6f,0x75,0x161,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0]" />" />" />" />" />
2021-09-21 00:02:41 DEBUG (MainThread) [xknx.raw_socket] Received from ('10.0.0.21', 3671): 0610042000170449f6002900bce0117047060300800c4b
2021-09-21 00:02:41 DEBUG (MainThread) [xknx.knx] Received: <KNXIPFrame <KNXIPHeader HeaderLength="6" ProtocolVersion="16" KNXIPServiceType="TUNNELLING_REQUEST" Reserve="0" TotalLength="23" />
body="<TunnellingRequest communication_channel_id="73" sequence_counter="246" cemi="<CEMIFrame SourceAddress="IndividualAddress("1.1.112")" DestinationAddress="GroupAddress("8/7/6")" Flags="1011110011100000" payload="<GroupValueWrite value="<DPTArray value="[0xc,0x4b]" />" />" />" />" />
2021-09-21 00:02:41 DEBUG (MainThread) [xknx.knx] Sending: <KNXIPFrame <KNXIPHeader HeaderLength="6" ProtocolVersion="16" KNXIPServiceType="TUNNELLING_ACK" Reserve="0" TotalLength="10" />
body="<TunnellingAck communication_channel_id="73" sequence_counter="246" status_code="ErrorCode.E_NO_ERROR" />" />
2021-09-21 00:02:41 DEBUG (MainThread) [xknx.telegram] <Telegram direction="Incoming" source_address="1.1.112" destination_address="8/7/6" payload="<GroupValueWrite value="<DPTArray value="[0xc,0x4b]" />" />" />
2021-09-21 00:02:46 DEBUG (MainThread) [xknx.raw_socket] Received from ('10.0.0.21', 3671): 0610042000150449f7002900bce0110b4603010081
2021-09-21 00:02:46 DEBUG (MainThread) [xknx.knx] Received: <KNXIPFrame <KNXIPHeader HeaderLength="6" ProtocolVersion="16" KNXIPServiceType="TUNNELLING_REQUEST" Reserve="0" TotalLength="21" />
body="<TunnellingRequest communication_channel_id="73" sequence_counter="247" cemi="<CEMIFrame SourceAddress="IndividualAddress("1.1.11")" DestinationAddress="GroupAddress("8/6/3")" Flags="1011110011100000" payload="<GroupValueWrite value="<DPTBinary value="1" />" />" />" />" />
2021-09-21 00:02:46 DEBUG (MainThread) [xknx.knx] Sending: <KNXIPFrame <KNXIPHeader HeaderLength="6" ProtocolVersion="16" KNXIPServiceType="TUNNELLING_ACK" Reserve="0" TotalLength="10" />
body="<TunnellingAck communication_channel_id="73" sequence_counter="247" status_code="ErrorCode.E_NO_ERROR" />" />
This automation should trigger telegram sending to address 10/2/10 but there is no sending to 10/2/10 in the log and no sending entries at all till HA restart:
2021-09-21 01:01:00 INFO (MainThread) [homeassistant.components.automation.vzt_auto_on] VZT ON: Restarting
2021-09-21 01:01:00 INFO (MainThread) [homeassistant.components.automation.vzt_auto_on] VZT ON: Running automation actions
2021-09-21 01:01:00 INFO (MainThread) [homeassistant.components.automation.vzt_auto_on] VZT ON: Executing step call service
2021-09-21 01:01:24 DEBUG (MainThread) [xknx.knx] Sending: <KNXIPFrame <KNXIPHeader HeaderLength="6" ProtocolVersion="16" KNXIPServiceType="CONNECTIONSTATE_REQUEST" Reserve="0" TotalLength="16" />
body="<ConnectionStateRequest CommunicationChannelID="73", control_endpoint="<HPAI 10.0.0.66:55618 />" />" />
2021-09-21 01:01:24 DEBUG (MainThread) [xknx.raw_socket] Received from ('10.0.0.21', 3671): 0610020800084900
2021-09-21 01:01:24 DEBUG (MainThread) [xknx.knx] Received: <KNXIPFrame <KNXIPHeader HeaderLength="6" ProtocolVersion="16" KNXIPServiceType="CONNECTIONSTATE_RESPONSE" Reserve="0" TotalLength="8" />
body="<ConnectionStateResponse CommunicationChannelID="73" status_code="ErrorCode.E_NO_ERROR" />" />
2021-09-21 01:01:48 DEBUG (MainThread) [xknx.raw_socket] Received from ('10.0.0.21', 3671): 061004200017044975002900bce011cb471103008015dc
2021-09-21 01:01:48 DEBUG (MainThread) [xknx.knx] Received: <KNXIPFrame <KNXIPHeader HeaderLength="6" ProtocolVersion="16" KNXIPServiceType="TUNNELLING_REQUEST" Reserve="0" TotalLength="23" />
body="<TunnellingRequest communication_channel_id="73" sequence_counter="117" cemi="<CEMIFrame SourceAddress="IndividualAddress("1.1.203")" DestinationAddress="GroupAddress("8/7/17")" Flags="1011110011100000" payload="<GroupValueWrite value="<DPTArray value="[0x15,0xdc]" />" />" />" />" />
2021-09-21 01:01:48 DEBUG (MainThread) [xknx.knx] Sending: <KNXIPFrame <KNXIPHeader HeaderLength="6" ProtocolVersion="16" KNXIPServiceType="TUNNELLING_ACK" Reserve="0" TotalLength="10" />
body="<TunnellingAck communication_channel_id="73" sequence_counter="117" status_code="ErrorCode.E_NO_ERROR" />" />
2021-09-21 01:01:48 DEBUG (MainThread) [xknx.telegram] <Telegram direction="Incoming" source_address="1.1.203" destination_address="8/7/17" payload="<GroupValueWrite value="<DPTArray value="[0x15,0xdc]" />" />" />
2021-09-21 01:02:22 DEBUG (MainThread) [xknx.raw_socket] Received from ('10.0.0.21', 3671): 061004200015044976002900bce0110b4603010081
2021-09-21 01:02:22 DEBUG (MainThread) [xknx.knx] Received: <KNXIPFrame <KNXIPHeader HeaderLength="6" ProtocolVersion="16" KNXIPServiceType="TUNNELLING_REQUEST" Reserve="0" TotalLength="21" />
body="<TunnellingRequest communication_channel_id="73" sequence_counter="118" cemi="<CEMIFrame SourceAddress="IndividualAddress("1.1.11")" DestinationAddress="GroupAddress("8/6/3")" Flags="1011110011100000" payload="<GroupValueWrite value="<DPTBinary value="1" />" />" />" />" />
2021-09-21 01:02:22 DEBUG (MainThread) [xknx.knx] Sending: <KNXIPFrame <KNXIPHeader HeaderLength="6" ProtocolVersion="16" KNXIPServiceType="TUNNELLING_ACK" Reserve="0" TotalLength="10" />
body="<TunnellingAck communication_channel_id="73" sequence_counter="118" status_code="ErrorCode.E_NO_ERROR" />" />
After the second restart in the morning:
2021-09-21 08:32:41 DEBUG (MainThread) [xknx.knx] Sending: <KNXIPFrame <KNXIPHeader HeaderLength="6" ProtocolVersion="16" KNXIPServiceType="CONNECT_REQUEST" Reserve="0" TotalLength="26" />
body="<ConnectRequest control_endpoint="<HPAI 10.0.0.66:38167 />" data_endpoint="<HPAI 10.0.0.66:38167 />" request_type="ConnectRequestType.TUNNEL_CONNECTION" />" />
2021-09-21 08:32:41 INFO (MainThread) [homeassistant.setup] Setting up automation
2021-09-21 08:32:42 INFO (MainThread) [homeassistant.setup] Setup of domain zeroconf took 1.7 seconds
2021-09-21 08:32:42 INFO (MainThread) [homeassistant.setup] Setting up device_tracker
2021-09-21 08:32:43 INFO (MainThread) [homeassistant.setup] Setting up template
2021-09-21 08:32:43 DEBUG (MainThread) [xknx.raw_socket] Received from ('10.0.0.21', 3671): 0610020600080024
2021-09-21 08:32:43 DEBUG (MainThread) [xknx.knx] Received: <KNXIPFrame <KNXIPHeader HeaderLength="6" ProtocolVersion="16" KNXIPServiceType="CONNECT_RESPONSE" Reserve="0" TotalLength="8" />
body="<ConnectResponse communication_channel="0" status_code="ErrorCode.E_NO_MORE_CONNECTIONS" control_endpoint="<HPAI 0.0.0.0:0 />" request_type="ConnectRequestType.TUNNEL_CONNECTION" identifier="None" />" />
2021-09-21 08:32:43 DEBUG (MainThread) [xknx.log] Error: KNX bus responded to request of type 'Connect' with error in 'ConnectResponse': ErrorCode.E_NO_MORE_CONNECTIONS
2021-09-21 08:32:43 INFO (MainThread) [homeassistant.setup] Setup of domain notify took 3.8 seconds
2021-09-21 08:32:43 INFO (MainThread) [homeassistant.components.binary_sensor] Setting up binary_sensor.onewire
2021-09-21 08:32:43 INFO (MainThread) [homeassistant.components.switch] Setting up switch.onewire
2021-09-21 08:32:43 DEBUG (MainThread) [xknx.log] Could not establish connection to KNX/IP interface. CommunicationError: ConnectRequest failed. Status code: ErrorCode.E_NO_MORE_CONNECTIONS
2021-09-21 08:32:43 DEBUG (MainThread) [xknx.state_updater] StateUpdater initializing values
2021-09-21 08:32:43 DEBUG (MainThread) [xknx.log] Closing transport.
Self recovered two minutes after:
2021-09-21 08:34:03 DEBUG (MainThread) [xknx.knx] Sending: <KNXIPFrame <KNXIPHeader HeaderLength="6" ProtocolVersion="16" KNXIPServiceType="CONNECT_REQUEST" Reserve="0" TotalLength="26" />
body="<ConnectRequest control_endpoint="<HPAI 10.0.0.66:37161 />" data_endpoint="<HPAI 10.0.0.66:37161 />" request_type="ConnectRequestType.TUNNEL_CONNECTION" />" />
2021-09-21 08:34:03 DEBUG (MainThread) [xknx.raw_socket] Received from ('10.0.0.21', 3671): 061002060014420008010a0000150e5704041115
2021-09-21 08:34:03 DEBUG (MainThread) [xknx.knx] Received: <KNXIPFrame <KNXIPHeader HeaderLength="6" ProtocolVersion="16" KNXIPServiceType="CONNECT_RESPONSE" Reserve="0" TotalLength="20" />
body="<ConnectResponse communication_channel="66" status_code="ErrorCode.E_NO_ERROR" control_endpoint="<HPAI 10.0.0.21:3671 />" request_type="ConnectRequestType.TUNNEL_CONNECTION" identifier="4373" />" />
2021-09-21 08:34:03 DEBUG (MainThread) [xknx.log] Tunnel established communication_channel=66, id=4373
2021-09-21 08:34:03 INFO (MainThread) [xknx.log] Successfully reconnected to KNX bus.
Thats all I know. I am desperated. Any help?