Outgoing KNX telegrams are not send after HA core update

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?

Hi :wave:!
Maybe I can answer some of your questions:

This may be true for tunneling connections, whereas in routing mode there is virtually no connection limit. Older Gira HS installations only support routing.

Most probably :rofl: Its a huge company making money from KNX gear since being part of developing the standard whereas xknx is a small community project built by volunteers in their spare time.

All your logs are from tunneling connections. Routing works completely different - there is no such thing as a connection there. Iā€™m having a hard time imagining why this would occur on both modes. Maybe try routing again.

There have been issues with connections on low-end hardware like RaspberryPis. The gist is that something blocks the main asyncio loop long enough for a tunnelling connection to miss sending heartbeats.
This may be your problem too. I have seen some indication of a backup running at this time in your logs. Maybe this slows the Pi down enough to trigger that issue. You would see incoming KNXIPServiceType="DISCONNECT_REQUEST" then.

Is this before you shut down / restart HA? Then it would be perfectly ok.


This is something that boggles me. Normally the tunneling connection is either live or not - its the exact same transport that is used there. Are you using knx.send in a non-expected way in an automation or such? It seems like the outgoing queue isnā€™t processed anymore, but I donā€™t recall seeing such an issue before :thinking: This would explain why it happens on routing mode alike.
But I fail to imagine how this can happenā€¦


Some general advice:

  • remove rate_limit this causes more issues than it solves
  • individual_address is normally only used on routing mode
  • state_updater: true is default anyway
1 Like

Hi Matthias and thank you for your answers.

I would definitely try it again. I donā€™t remember exactly but I think there were some problems with routing.

I have set up backup only few days ago. My problem is lasting longer. But I am fine with rescheduling it to different time.

Yes, it is before restart. In this case it is correct. I have only demonstrated HA correctly disconnecting the communication.

It is absolutely weird for me as well. I can see (log, visu) every incoming events - lights, temperatures, sensors, with no miss! But every action heading towards KNX bus does not work. When I switch the light from frontend, it would render the switch to off position again and nothing happen. Nothing is in log.

This automation sends KNX number with service number.set_value
No matter which service I use it doesnā€™t send anything to KNX. Maybe there is a problem between HA a XKNX.

It was only desperated try to make it work. I posted it only to clearly state actual configuration. Of course I have tried it without this parameters.

Is this the last working outgoing telegram or the first failing?
We need to locate the first failing action.


Which installation method are you running?

I am running Home Assistant OS.

It is hard to find the first failing telegram because in that time I was in the bed :slight_smile:
I know this telegram was not delivered because it sends text to room display and this text was not displayed.

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]" />" />" />" />" />

I discovered the HA is sending TUNNELLING_ACK to the bus (I hope I understand it correctly :slight_smile: ) even after not sending TUNNELLING_REQUEST already.

2021-09-21 00:12:08 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="21" cemi="<CEMIFrame SourceAddress="IndividualAddress("1.1.11")" DestinationAddress="GroupAddress("8/6/3")" Flags="1011110011100000" payload="<GroupValueWrite value="<DPTBinary value="1" />" />" />" />" />
2021-09-21 00:12:08 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="21" status_code="ErrorCode.E_NO_ERROR" />" />

Every incoming telegram yields an ACK, thatā€™s perfectly fine.

How is that text payload generated? I think that might be the source of your issue.

Like Matthias said its much better to use the routing of the Jung KNX router.
Best to just use knx: and dont bother with the rate limiter unless you have a very busy KNX bus (tho you shouldnt :stuck_out_tongue: ) and other settings. Just your group addresses.

I have tested HA with KNX with the Jung, Gira 216700 router and Meanwell KSR-01IP. All of them just worked.
Even have 2 sites with HA + Homeserver as i needed the interface of the Homeserver and the weird integrations that HA provide :grin: such as TVā€™s, Sonos, Unifi, ect ect

Tunneling is fine - itā€™s by far the most used connection method - thus better tested (but also far more complex). And it doesnā€™t need to account for filters in line couplers/routers for every GA.
Itā€™s also the default connection method. So when you use only knx: you are tunneling :wink:

However

this isnā€™t fine as 0x161 > 0xFF hence Iā€™d like to know how this was created so we can reproduce and implement a proper error for that.

In the doc:

knx:
  tunneling:
    host: "192.168.2.23"

Let me to believe that you needed to setup tunneling and routing would be default.
But now iā€™m not sure it will default to routing :frowning:
Wont matter for me atm as it just works. But something to keep in mind for the future.

Yes, knx: only is tunneling.

To be more precise: setting neither tunneling: nor routing: starts xknx in automatic mode which prefers tunneling. If you want to coerce to routing just add routing: without any sub-keys.

You are right. This could be a problem.
0x161 = Å” (in latin unicode)
I am sending DPT16 string as KNX.notify to JUNG RCD 3096. In this case it is ā€œMatouÅ”ā€ (who has name anniversary today). It is not always with diacritics.

I was surprised it could handle non ASCII characters :slight_smile:

I changed my knx config to

knx:
  routing:

and it does not communicate with the router.

Valid knx String characters are very limited indeed. Nothing we can do about that but fail gracefullyā€¦

Do you get any errors in your HA logs when you are using routing? You will probably also want to set an individual_address.

2021-09-21 18:22:43 DEBUG (MainThread) [xknx.log] Starting Routing from 10.0.0.66 as 1.1.23
2021-09-21 18:22:51 DEBUG (MainThread) [xknx.telegram] <Telegram direction="Outgoing" source_address="0.0.0" destination_address="11/1/14" payload="<GroupValueRead />" />
2021-09-21 18:22:51 DEBUG (MainThread) [xknx.knx] Sending: <KNXIPFrame <KNXIPHeader HeaderLength="6" ProtocolVersion="16" KNXIPServiceType="ROUTING_INDICATION" Reserve="0" TotalLength="17" /> body="<RoutingIndication cemi="<CEMIFrame SourceAddress="IndividualAddress("1.1.23")" DestinationAddress="GroupAddress("11/1/14")" Flags="1011110011100000" payload="<GroupValueRead />" />" />" />
2021-09-21 18:22:53 WARNING (MainThread) [xknx.log] Error: KNX bus did not respond in time (2.0 secs) to GroupValueRead request for: 11/1/14
2021-09-21 18:22:53 WARNING (MainThread) [xknx.log] Could not sync group address '11/1/14' (Branka - State)

Only outgoing telegrams which are not processed by KNX.

Bingo! 0x161 is the problem
I reproduced it now.

Thank you Matthias :+1: :clap:

1 Like

Thatā€™s most probably due to filter tables (see Outgoing KNX telegrams are not send after HA core update - #9 by farmio)
Routing isnā€™t as straightforward as tunneling. You shouldnā€™t just use any address - 1.1.x is a TP line.
xknx in routing mode is an IP device so e.g. 0.0.1
The Router has to be on 1.1.0
Then youā€™d need a dummy device in ETS and connect everything you want to have forwarded to HA.
But these addresses all depend on how your bus topology is really set up.

TLDR: keep using tunneling, itā€™s fine. Use routing from ETS to avoid kicking HAs connection every time you use ETS.

Absolutely. I will keep using tunneling. I hope it will be stable from now.

And in case of routing. So in xknx/HA should individual_address be 0.0.1?
I have one TP line 1.1.x, IP router at 1.1.21

I looked to my ETS project and I had dummy device 1.0.21 for Gira HS without any GAs. But no forwarding all traffic to this device.