Problems with KNX communication

Hi,

I have a Weinzierl 732 KNX IP interface set up with Home Assistant. I have so far added one Gira 2139 00 heating controller and one Gira Pushbutton sensor 4 komfort. Both are setup and configured in ETS and the communication between them is working well.

I have so far observed two problems with the communication between HA and KNX. I assume both are due to my errors for which I appreciate any support.

Problem 1: I managed to add a channel in the heating controller to HA as an climate entity according to the documentation. I have used the config below:

climate:

  # Master bedroom
  - name: "Master Bedroom"
    target_address: "3/5/8"
    target_temperature_address: "3/1/0"
    target_temperature_state_address: "3/5/2"
    command_value_state_address: "3/4/0"
    operation_mode_state_address: "3/5/1"
    controller_status_state_address: "3/5/7"
    min_temp: 18.0
    max_temp: 23.0

What works: I can see the current mode, temperature and setpoint temperature.
What doesn’t work: I cannot change the setpoint. If I change it to say 20 *C, I can see in ETS that HA does a GroupValue_Write to 3/1/0 with the content “07 D0 | 20 *C”. On the heating controller, group position 333 “Setpoint temperature - Active operation mode” is in group 3/1/0. There is no further traffic and HA climate entity changes after few seconds back the temperature to the previous value.

Second problem: Sensors. I have configured three sensors, but all of them are unavailable. The sensor is as below:

sensor:

  # Humidity Master Bedroom
  - name: "Master Bedroom - Current Humidity"
    state_address: "3/6/0"
    sync_state: every 1
    type: percent
    state_class: measurement
    device_class: humidity
    always_callback: true

The sensor is always unavailable. I can see in ETS that HA writes “Sec” with rather long data once a minute. However, there is no reply. I can also see in ETS that the sensor sends GroupValue_Write according to it’s 15 min cycle with correct data to the correct group. I have similar issues also with temperatures etc. With the temperature sensor, configured approx as above, the heating controller writes GroupValue_Read requests to the channel and the sensor replies flawlessly. However, HA does not pick up this communication.

Binary sensors works fine, and HA requests their values at boot with GroupValue_Read. What is the difference between this andf “Sec” that HA uses with sensors?

Hi :wave:!

Can you post a screenshot of this, and also of the group objects with linked GAs (and their flags) of the heating actuator?

Also, are there any log messages from the KNX integration? Open your Home Assistant instance and show your Home Assistant logs.

Thank you for your support, highly appreciated!

I should of course have checked the logs - I don’t understand why I only focused on ETS and it’s traffic… :slight_smile:

Regarding the climate entity issue, when I change the setpoint temperature in HA I get the following in HA logs:

2023-09-29 10:58:44.081 WARNING (MainThread) [xknx.cemi] CEMI Frame failed to parse: <CouldNotParseCEMI description="APDU LEN should be 0 but is 16 from 1.1.255 in CEMI: bcf011ff19000003f110002a19dcb80c52cd891d8e18c1fb" />
2023-09-29 10:58:47.031 WARNING (MainThread) [xknx.log] L_DATA_CON Data Link Layer confirmation timed out for <CEMIFrame code="L_DATA_REQ" info="CEMIInfo("")" data="CEMILData(src_addr="IndividualAddress("1.1.255")" dst_addr="GroupAddress("3/1/0")" flags="1011110011100000" tpci="TDataGroup()" payload="<SecureAPDU scf="<SecurityControlField tool_access=False algorithm=CCM_ENCRYPTION system_broadcast=False service=S_A_DATA />" secured_data=<SecureData sequence_number=180822521868 secured_apdu="52cd891d" message_authentication_code="8e18c1fb" /> />")" />
2023-09-29 10:59:01.810 WARNING (MainThread) [homeassistant.helpers.script] Error in 'if[0]' evaluation: In 'or' (item 2 of 2):
  In 'template' condition: ValueError: could not convert str to datetime: '2023-09-02 23:00:00'

ETS does not show any traffic (however I believe yesterday I got a messages on the bus, but now I am uncertain).

For the sensor issue, I see the following when the sensor periodically sends it’s temperature (3/0/0) and humidity (3/6/0) values:

2023-09-29 11:11:53.565 WARNING (MainThread) [xknx.data_secure] Could not decrypt CEMI frame: Discarding frame with plain APDU for secure group address: CEMILData(src_addr="IndividualAddress("1.1.30")" dst_addr="GroupAddress("3/0/0")" flags="1011110011100000" tpci="TDataGroup()" payload="<GroupValueWrite value="<DPTArray value="[0xc,0x5e]" />" />")
2023-09-29 11:11:57.518 WARNING (MainThread) [xknx.data_secure] Could not decrypt CEMI frame: Discarding frame with plain APDU for secure group address: CEMILData(src_addr="IndividualAddress("1.1.30")" dst_addr="GroupAddress("3/0/0")" flags="1011110011100000" tpci="TDataGroup()" payload="<GroupValueWrite value="<DPTArray value="[0xc,0x5b]" />" />")
2023-09-29 11:11:57.557 WARNING (MainThread) [xknx.data_secure] Could not decrypt CEMI frame: Discarding frame with plain APDU for secure group address: CEMILData(src_addr="IndividualAddress("1.1.30")" dst_addr="GroupAddress("3/6/0")" flags="1011110011100000" tpci="TDataGroup()" payload="<GroupValueWrite value="<DPTArray value="[0x15,0xc3]" />" />")

I have attached a image below of the date seen from ETS.
On row 18 the heating controller requests the temperature and the sensor replies on row 19. On row 14 and 15 HA does the same (both temperature and humidity), but without any reply. The messages also look different (“Sec” instead of “GroupValue_Read”). From the same period, I get the following logs. Please note that for some reason there is a minor time skew between the applications.

2023-09-29 11:11:53.565 WARNING (MainThread) [xknx.data_secure] Could not decrypt CEMI frame: Discarding frame with plain APDU for secure group address: CEMILData(src_addr="IndividualAddress("1.1.30")" dst_addr="GroupAddress("3/0/0")" flags="1011110011100000" tpci="TDataGroup()" payload="<GroupValueWrite value="<DPTArray value="[0xc,0x5e]" />" />")
2023-09-29 11:11:57.518 WARNING (MainThread) [xknx.data_secure] Could not decrypt CEMI frame: Discarding frame with plain APDU for secure group address: CEMILData(src_addr="IndividualAddress("1.1.30")" dst_addr="GroupAddress("3/0/0")" flags="1011110011100000" tpci="TDataGroup()" payload="<GroupValueWrite value="<DPTArray value="[0xc,0x5b]" />" />")
2023-09-29 11:11:57.557 WARNING (MainThread) [xknx.data_secure] Could not decrypt CEMI frame: Discarding frame with plain APDU for secure group address: CEMILData(src_addr="IndividualAddress("1.1.30")" dst_addr="GroupAddress("3/6/0")" flags="1011110011100000" tpci="TDataGroup()" payload="<GroupValueWrite value="<DPTArray value="[0x15,0xc3]" />" />")
2023-09-29 11:13:18.353 WARNING (MainThread) [xknx.data_secure] Could not decrypt CEMI frame: Discarding frame with plain APDU for secure group address: CEMILData(src_addr="IndividualAddress("1.1.30")" dst_addr="GroupAddress("3/0/0")" flags="1011110011100000" tpci="TDataGroup()" payload="<GroupValueWrite value="<DPTArray value="[0xc,0x59]" />" />")
2023-09-29 11:13:21.344 WARNING (MainThread) [xknx.data_secure] Could not decrypt CEMI frame: Discarding frame with plain APDU for secure group address: CEMILData(src_addr="IndividualAddress("1.1.30")" dst_addr="GroupAddress("3/0/0")" flags="1011110011100000" tpci="TDataGroup()" payload="<GroupValueWrite value="<DPTArray value="[0xc,0x5e]" />" />")
2023-09-29 11:13:27.329 WARNING (MainThread) [xknx.data_secure] Could not decrypt CEMI frame: Discarding frame with plain APDU for secure group address: CEMILData(src_addr="IndividualAddress("1.1.30")" dst_addr="GroupAddress("3/0/0")" flags="1011110011100000" tpci="TDataGroup()" payload="<GroupValueWrite value="<DPTArray value="[0xc,0x59]" />" />")
2023-09-29 11:13:30.321 WARNING (MainThread) [xknx.data_secure] Could not decrypt CEMI frame: Discarding frame with plain APDU for secure group address: CEMILData(src_addr="IndividualAddress("1.1.30")" dst_addr="GroupAddress("3/0/0")" flags="1011110011100000" tpci="TDataGroup()" payload="<GroupValueWrite value="<DPTArray value="[0xc,0x5e]" />" />")
2023-09-29 11:13:42.292 WARNING (MainThread) [xknx.data_secure] Could not decrypt CEMI frame: Discarding frame with plain APDU for secure group address: CEMILData(src_addr="IndividualAddress("1.1.30")" dst_addr="GroupAddress("3/0/0")" flags="1011110011100000" tpci="TDataGroup()" payload="<GroupValueWrite value="<DPTArray value="[0xc,0x59]" />" />")
2023-09-29 11:13:56.255 WARNING (MainThread) [xknx.data_secure] Could not decrypt CEMI frame: Discarding frame with plain APDU for secure group address: CEMILData(src_addr="IndividualAddress("1.1.30")" dst_addr="GroupAddress("3/0/0")" flags="1011110011100000" tpci="TDataGroup()" payload="<GroupValueWrite value="<DPTArray value="[0xc,0x60]" />" />")
2023-09-29 11:13:58.251 WARNING (MainThread) [xknx.data_secure] Could not decrypt CEMI frame: Discarding frame with plain APDU for secure group address: CEMILData(src_addr="IndividualAddress("1.1.30")" dst_addr="GroupAddress("3/0/0")" flags="1011110011100000" tpci="TDataGroup()" payload="<GroupValueWrite value="<DPTArray value="[0xc,0x5a]" />" />")
2023-09-29 11:15:24.600 WARNING (MainThread) [xknx.log] Error: KNX bus did not respond in time (2.0 secs) to GroupValueRead request for: 3/6/0
2023-09-29 11:15:24.601 WARNING (MainThread) [xknx.log] Could not sync group address '3/6/0' (Master Bedroom - Current Humidity - Value)
2023-09-29 11:15:26.359 WARNING (MainThread) [xknx.log] Error: KNX bus did not respond in time (2.0 secs) to GroupValueRead request for: 3/0/0
2023-09-29 11:15:26.360 WARNING (MainThread) [xknx.log] Could not sync group address '3/0/0' (Master Bedroom - Current Temperature - Value)
2023-09-29 11:15:37.863 WARNING (MainThread) [xknx.data_secure] Could not decrypt CEMI frame: Discarding frame with plain APDU for secure group address: CEMILData(src_addr="IndividualAddress("1.1.21")" dst_addr="GroupAddress("3/0/0")" flags="1011110011100000" tpci="TDataGroup()" payload="<GroupValueRead />")
2023-09-29 11:15:37.898 WARNING (MainThread) [xknx.data_secure] Could not decrypt CEMI frame: Discarding frame with plain APDU for secure group address: CEMILData(src_addr="IndividualAddress("1.1.30")" dst_addr="GroupAddress("3/0/0")" flags="1011110011100000" tpci="TDataGroup()" payload="<GroupValueResponse value="<DPTArray value="[0xc,0x5a]" />" />")
2023-09-29 11:16:56.772 WARNING (MainThread) [xknx.data_secure] Could not decrypt CEMI frame: Discarding frame with plain APDU for secure group address: CEMILData(src_addr="IndividualAddress("1.1.30")" dst_addr="GroupAddress("3/0/0")" flags="1011110011100000" tpci="TDataGroup()" payload="<GroupValueWrite value="<DPTArray value="[0xc,0x5c]" />" />")
2023-09-29 11:18:00.653 WARNING (MainThread) [xknx.data_secure] Could not decrypt CEMI frame: Discarding frame with plain APDU for secure group address: CEMILData(src_addr="IndividualAddress("1.1.30")" dst_addr="GroupAddress("3/0/0")" flags="1011110011100000" tpci="TDataGroup()" payload="<GroupValueWrite value="<DPTArray value="[0xc,0x60]" />" />")
2023-09-29 11:18:01.653 WARNING (MainThread) [xknx.data_secure] Could not decrypt CEMI frame: Discarding frame with plain APDU for secure group address: CEMILData(src_addr="IndividualAddress("1.1.30")" dst_addr="GroupAddress("3/0/0")" flags="1011110011100000" tpci="TDataGroup()" payload="<GroupValueWrite value="<DPTArray value="[0xc,0x5a]" />" />")
2023-09-29 11:20:37.843 WARNING (MainThread) [xknx.data_secure] Could not decrypt CEMI frame: Discarding frame with plain APDU for secure group address: CEMILData(src_addr="IndividualAddress("1.1.21")" dst_addr="GroupAddress("3/0/0")" flags="1011110011100000" tpci="TDataGroup()" payload="<GroupValueRead />")
2023-09-29 11:20:37.883 WARNING (MainThread) [xknx.data_secure] Could not decrypt CEMI frame: Discarding frame with plain APDU for secure group address: CEMILData(src_addr="IndividualAddress("1.1.30")" dst_addr="GroupAddress("3/0/0")" flags="1011110011100000" tpci="TDataGroup()" payload="<GroupValueResponse value="<DPTArray value="[0xc,0x5a]" />" />")
2023-09-29 11:21:48.093 WARNING (MainThread) [xknx.data_secure] Could not decrypt CEMI frame: Discarding frame with plain APDU for secure group address: CEMILData(src_addr="IndividualAddress("1.1.30")" dst_addr="GroupAddress("3/0/0")" flags="1011110011100000" tpci="TDataGroup()" payload="<GroupValueWrite value="<DPTArray value="[0xc,0x60]" />" />")
2023-09-29 11:21:50.089 WARNING (MainThread) [xknx.data_secure] Could not decrypt CEMI frame: Discarding frame with plain APDU for secure group address: CEMILData(src_addr="IndividualAddress("1.1.30")" dst_addr="GroupAddress("3/0/0")" flags="1011110011100000" tpci="TDataGroup()" payload="<GroupValueWrite value="<DPTArray value="[0xc,0x5b]" />" />")
2023-09-29 11:21:56.041 WARNING (MainThread) [xknx.data_secure] Could not decrypt CEMI frame: Discarding frame with plain APDU for secure group address: CEMILData(src_addr="IndividualAddress("1.1.30")" dst_addr="GroupAddress("3/0/0")" flags="1011110011100000" tpci="TDataGroup()" payload="<GroupValueWrite value="<DPTArray value="[0xc,0x5d]" />" />")
2023-09-29 11:25:04.581 WARNING (MainThread) [xknx.data_secure] Could not decrypt CEMI frame: Discarding frame with plain APDU for secure group address: CEMILData(src_addr="IndividualAddress("1.1.30")" dst_addr="GroupAddress("3/0/0")" flags="1011110011100000" tpci="TDataGroup()" payload="<GroupValueWrite value="<DPTArray value="[0xc,0x60]" />" />")
2023-09-29 11:25:06.575 WARNING (MainThread) [xknx.data_secure] Could not decrypt CEMI frame: Discarding frame with plain APDU for secure group address: CEMILData(src_addr="IndividualAddress("1.1.30")" dst_addr="GroupAddress("3/0/0")" flags="1011110011100000" tpci="TDataGroup()" payload="<GroupValueWrite value="<DPTArray value="[0xc,0x5b]" />" />")
2023-09-29 11:25:37.828 WARNING (MainThread) [xknx.data_secure] Could not decrypt CEMI frame: Discarding frame with plain APDU for secure group address: CEMILData(src_addr="IndividualAddress("1.1.21")" dst_addr="GroupAddress("3/0/0")" flags="1011110011100000" tpci="TDataGroup()" payload="<GroupValueRead />")
2023-09-29 11:25:37.868 WARNING (MainThread) [xknx.data_secure] Could not decrypt CEMI frame: Discarding frame with plain APDU for secure group address: CEMILData(src_addr="IndividualAddress("1.1.30")" dst_addr="GroupAddress("3/0/0")" flags="1011110011100000" tpci="TDataGroup()" payload="<GroupValueResponse value="<DPTArray value="[0xc,0x5b]" />" />")
2023-09-29 11:26:55.265 WARNING (MainThread) [xknx.data_secure] Could not decrypt CEMI frame: Discarding frame with plain APDU for secure group address: CEMILData(src_addr="IndividualAddress("1.1.30")" dst_addr="GroupAddress("3/0/0")" flags="1011110011100000" tpci="TDataGroup()" payload="<GroupValueWrite value="<DPTArray value="[0xc,0x5e]" />" />")
2023-09-29 11:26:55.301 WARNING (MainThread) [xknx.data_secure] Could not decrypt CEMI frame: Discarding frame with plain APDU for secure group address: CEMILData(src_addr="IndividualAddress("1.1.30")" dst_addr="GroupAddress("3/6/0")" flags="1011110011100000" tpci="TDataGroup()" payload="<GroupValueWrite value="<DPTArray value="[0x15,0xc3]" />" />")



So you are using KNX DataSecure, but have not provided any Keys to HA. You have 2 options:

  • disable DataSecure on a group address level. This is done in ETS in the preference pane for each used group address
  • assign all secure group addresses you want to use with HA to your IP interfaces tunnel, export the keyfile and load it to HA

For both ways you’ll need to reconfigure all devices that use these addresses. There is a “dynamic folder” for changed devices in ETS you can use for this.

Thank you again for your kind reply. Yes, it is enabled. I have previously imported the keyring, but as I cannot rule out I made any changes afterwards, I exported it again to be sure. This turned out to solve part of the problem. I can now see get the temperature sensor to work. As the humidity is basically the same, I double checked all configurations and found that I had set it up as percentage instead of humidity in the HA yaml file. Now both sensors works, thank you! :slight_smile:

However, I cannot yet get the setpoint change to work for the climate entity. I verified it is in the correct group(s) in ETS, but I find this a bit strange. If I view it on the device (upper part in the picture) it is in the groups 3/0/0 and 3/1/0. But if I view it on a group plane (lower part in the picture), it is not.

If I change the termostat setpoint I get:

2023-09-29 12:38:41.158 WARNING (MainThread) [xknx.cemi] CEMI Frame failed to parse: <CouldNotParseCEMI description="APDU LEN should be 0 but is 16 from 1.1.255 in CEMI: bcf011ff19000003f110002a1caf11780f4b3603054b6680" />
2023-09-29 12:38:44.106 WARNING (MainThread) [xknx.log] L_DATA_CON Data Link Layer confirmation timed out for <CEMIFrame code="L_DATA_REQ" info="CEMIInfo("")" data="CEMILData(src_addr="IndividualAddress("1.1.255")" dst_addr="GroupAddress("3/1/0")" flags="1011110011100000" tpci="TDataGroup()" payload="<SecureAPDU scf="<SecurityControlField tool_access=False algorithm=CCM_ENCRYPTION system_broadcast=False service=S_A_DATA />" secured_data=<SecureData sequence_number=180869861752 secured_apdu="0f4b3603" message_authentication_code="054b6680" /> />")" />

Yeah, unfortunately ETS doesn’t show such tunnel associations in the group address view :roll_eyes:

I’m not sure from the top of my head, I’ll have to look up how such an error can occur.
Can you maybe set the xknx log level to debug and send me the whole output when this error occurs? KNX - Home Assistant I can maybe recreate the issue locally then.

Hi,

Please find the log below. :slight_smile: I tried to clear out irrelevant parts but I believe there might be something extra on top. I didn’t want to cut out too much. 3/1/0 is the address the setpoint is written to.

2023-09-29 14:55:37.207 DEBUG (KNX Interface) [xknx.knx] Received from 10.100.4.3:3671/tcp: <KNXIPFrame <KNXIPHeader HeaderLength="6" ProtocolVersion="16" KNXIPServiceType="SECURE_WRAPPER" TotalLength="73" /> body="<SecureWrapper secure_session_id="12406" sequence_information="00000000002d" serial_number="00c50105f18e" message_tag="0000" encrypted_data="eaf91c65f2571ebf1f7f493403695e48c089ac46ab86cb451bca45ebb90b0d805cb61e" message_authentication_code="9b5ee21c5131dbe512ee163bc7c52628" />" />
2023-09-29 14:55:37.208 DEBUG (KNX Interface) [xknx.knx] Decrypted frame: <KNXIPFrame <KNXIPHeader HeaderLength="6" ProtocolVersion="16" KNXIPServiceType="TUNNELLING_REQUEST" TotalLength="35" /> body="<TunnellingRequest communication_channel_id="43" sequence_counter="0" cemi="2900bce011151b060f03f1100029c7025e475913974aaa9a6b" />" />
2023-09-29 14:55:37.208 DEBUG (MainThread) [xknx.cemi] Incoming CEMI: <CEMIFrame code="L_DATA_IND" info="CEMIInfo("")" data="CEMILData(src_addr="IndividualAddress("1.1.21")" dst_addr="GroupAddress("3/3/6")" flags="1011110011100000" tpci="TDataGroup()" payload="<SecureAPDU scf="<SecurityControlField tool_access=False algorithm=CCM_ENCRYPTION system_broadcast=False service=S_A_DATA />" secured_data=<SecureData sequence_number=179432480327 secured_apdu="591397" message_authentication_code="4aaa9a6b" /> />")" />
2023-09-29 14:55:37.209 DEBUG (MainThread) [xknx.data_secure] Unpacked APDU <GroupValueWrite value="<DPTArray value="[0x0]" />" /> from <SecureAPDU scf="<SecurityControlField tool_access=False algorithm=CCM_ENCRYPTION system_broadcast=False service=S_A_DATA />" secured_data=<SecureData sequence_number=179432480327 secured_apdu="591397" message_authentication_code="4aaa9a6b" /> />
2023-09-29 14:55:37.209 DEBUG (MainThread) [xknx.telegram] <Telegram direction="Incoming" source_address="1.1.21" destination_address="3/3/6" payload="<GroupValueWrite value="<DPTArray value="[0x0]" />" />" />
2023-09-29 14:55:37.272 DEBUG (KNX Interface) [xknx.knx] Received from 10.100.4.3:3671/tcp: <KNXIPFrame <KNXIPHeader HeaderLength="6" ProtocolVersion="16" KNXIPServiceType="SECURE_WRAPPER" TotalLength="73" /> body="<SecureWrapper secure_session_id="12406" sequence_information="00000000002e" serial_number="00c50105f18e" message_tag="0000" encrypted_data="fb3bf3c40a3c73199b1cfaca0dffbf691f65d1e0c50e7839157c51a72f87f9d70f32e7" message_authentication_code="451ec1e9e9b016d6a8fa6a931a7be0f8" />" />
2023-09-29 14:55:37.273 DEBUG (KNX Interface) [xknx.knx] Decrypted frame: <KNXIPFrame <KNXIPHeader HeaderLength="6" ProtocolVersion="16" KNXIPServiceType="TUNNELLING_REQUEST" TotalLength="35" /> body="<TunnellingRequest communication_channel_id="43" sequence_counter="0" cemi="2900bce011151f000f03f1100029c7025e4813c8f07168c3fa" />" />
2023-09-29 14:55:37.274 DEBUG (MainThread) [xknx.cemi] Incoming CEMI: <CEMIFrame code="L_DATA_IND" info="CEMIInfo("")" data="CEMILData(src_addr="IndividualAddress("1.1.21")" dst_addr="GroupAddress("3/7/0")" flags="1011110011100000" tpci="TDataGroup()" payload="<SecureAPDU scf="<SecurityControlField tool_access=False algorithm=CCM_ENCRYPTION system_broadcast=False service=S_A_DATA />" secured_data=<SecureData sequence_number=179432480328 secured_apdu="13c8f0" message_authentication_code="7168c3fa" /> />")" />
2023-09-29 14:55:37.275 DEBUG (MainThread) [xknx.data_secure] Unpacked APDU <GroupValueWrite value="<DPTArray value="[0x0]" />" /> from <SecureAPDU scf="<SecurityControlField tool_access=False algorithm=CCM_ENCRYPTION system_broadcast=False service=S_A_DATA />" secured_data=<SecureData sequence_number=179432480328 secured_apdu="13c8f0" message_authentication_code="7168c3fa" /> />
2023-09-29 14:55:37.275 DEBUG (MainThread) [xknx.telegram] <Telegram direction="Incoming" source_address="1.1.21" destination_address="3/7/0" payload="<GroupValueWrite value="<DPTArray value="[0x0]" />" />" />
2023-09-29 14:55:37.306 DEBUG (KNX Interface) [xknx.knx] Received from 10.100.4.3:3671/tcp: <KNXIPFrame <KNXIPHeader HeaderLength="6" ProtocolVersion="16" KNXIPServiceType="SECURE_WRAPPER" TotalLength="59" /> body="<SecureWrapper secure_session_id="12406" sequence_information="00000000002f" serial_number="00c50105f18e" message_tag="0000" encrypted_data="1a150c69292feba10f39db5d798a8d36bd75d763b6" message_authentication_code="e37a30e60eb477c3b962487c758cd822" />" />
2023-09-29 14:55:37.307 DEBUG (KNX Interface) [xknx.knx] Decrypted frame: <KNXIPFrame <KNXIPHeader HeaderLength="6" ProtocolVersion="16" KNXIPServiceType="TUNNELLING_REQUEST" TotalLength="21" /> body="<TunnellingRequest communication_channel_id="43" sequence_counter="0" cemi="2900bce011151800010000" />" />
2023-09-29 14:55:37.308 DEBUG (MainThread) [xknx.cemi] Incoming CEMI: <CEMIFrame code="L_DATA_IND" info="CEMIInfo("")" data="CEMILData(src_addr="IndividualAddress("1.1.21")" dst_addr="GroupAddress("3/0/0")" flags="1011110011100000" tpci="TDataGroup()" payload="<GroupValueRead />")" />
2023-09-29 14:55:37.308 DEBUG (MainThread) [xknx.telegram] <Telegram direction="Incoming" source_address="1.1.21" destination_address="3/0/0" payload="<GroupValueRead />" />
2023-09-29 14:55:37.345 DEBUG (KNX Interface) [xknx.knx] Received from 10.100.4.3:3671/tcp: <KNXIPFrame <KNXIPHeader HeaderLength="6" ProtocolVersion="16" KNXIPServiceType="SECURE_WRAPPER" TotalLength="61" /> body="<SecureWrapper secure_session_id="12406" sequence_information="000000000030" serial_number="00c50105f18e" message_tag="0000" encrypted_data="c974b451ca7fd1bd096199c6cb2011a8332c2aa5c14832" message_authentication_code="c1ffe5d03eede991e35d90a891c64a6f" />" />
2023-09-29 14:55:37.347 DEBUG (KNX Interface) [xknx.knx] Decrypted frame: <KNXIPFrame <KNXIPHeader HeaderLength="6" ProtocolVersion="16" KNXIPServiceType="TUNNELLING_REQUEST" TotalLength="23" /> body="<TunnellingRequest communication_channel_id="43" sequence_counter="0" cemi="2900bce0111e18000300400c53" />" />
2023-09-29 14:55:37.347 DEBUG (MainThread) [xknx.cemi] Incoming CEMI: <CEMIFrame code="L_DATA_IND" info="CEMIInfo("")" data="CEMILData(src_addr="IndividualAddress("1.1.30")" dst_addr="GroupAddress("3/0/0")" flags="1011110011100000" tpci="TDataGroup()" payload="<GroupValueResponse value="<DPTArray value="[0xc,0x53]" />" />")" />
2023-09-29 14:55:37.347 DEBUG (MainThread) [xknx.telegram] <Telegram direction="Incoming" source_address="1.1.30" destination_address="3/0/0" payload="<GroupValueResponse value="<DPTArray value="[0xc,0x53]" />" />" />
2023-09-29 14:55:37.395 DEBUG (KNX Interface) [xknx.knx] Received from 10.100.4.3:3671/tcp: <KNXIPFrame <KNXIPHeader HeaderLength="6" ProtocolVersion="16" KNXIPServiceType="SECURE_WRAPPER" TotalLength="74" /> body="<SecureWrapper secure_session_id="12406" sequence_information="000000000031" serial_number="00c50105f18e" message_tag="0000" encrypted_data="b46e65c7af30151afb1a9c75a522bc41bfb4e028927388d2e08bb34aee0833d3d47c5ef9" message_authentication_code="ba6ee645381062d1bd65a97394d77e2d" />" />
2023-09-29 14:55:37.396 DEBUG (KNX Interface) [xknx.knx] Decrypted frame: <KNXIPFrame <KNXIPHeader HeaderLength="6" ProtocolVersion="16" KNXIPServiceType="TUNNELLING_REQUEST" TotalLength="36" /> body="<TunnellingRequest communication_channel_id="43" sequence_counter="0" cemi="29003ce011151d021003f1100029c7025e49e2aa9df4ff8a4c57" />" />
2023-09-29 14:55:37.397 DEBUG (MainThread) [xknx.cemi] Incoming CEMI: <CEMIFrame code="L_DATA_IND" info="CEMIInfo("")" data="CEMILData(src_addr="IndividualAddress("1.1.21")" dst_addr="GroupAddress("3/5/2")" flags="  11110011100000" tpci="TDataGroup()" payload="<SecureAPDU scf="<SecurityControlField tool_access=False algorithm=CCM_ENCRYPTION system_broadcast=False service=S_A_DATA />" secured_data=<SecureData sequence_number=179432480329 secured_apdu="e2aa9df4" message_authentication_code="ff8a4c57" /> />")" />
2023-09-29 14:55:37.397 DEBUG (MainThread) [xknx.data_secure] Unpacked APDU <GroupValueWrite value="<DPTArray value="[0xc,0x1a]" />" /> from <SecureAPDU scf="<SecurityControlField tool_access=False algorithm=CCM_ENCRYPTION system_broadcast=False service=S_A_DATA />" secured_data=<SecureData sequence_number=179432480329 secured_apdu="e2aa9df4" message_authentication_code="ff8a4c57" /> />
2023-09-29 14:55:37.398 DEBUG (MainThread) [xknx.telegram] <Telegram direction="Incoming" source_address="1.1.21" destination_address="3/5/2" payload="<GroupValueWrite value="<DPTArray value="[0xc,0x1a]" />" />" />
2023-09-29 14:55:41.616 DEBUG (KNX Interface) [xknx.knx] Encrypting frame: <KNXIPFrame <KNXIPHeader HeaderLength="6" ProtocolVersion="16" KNXIPServiceType="SESSION_STATUS" TotalLength="8" /> body="<SessionStatus status="SecureSessionStatusCode.STATUS_KEEPALIVE" />" />
2023-09-29 14:55:41.618 DEBUG (KNX Interface) [xknx.knx] Sending to 10.100.4.3:3671/tcp: <KNXIPFrame <KNXIPHeader HeaderLength="6" ProtocolVersion="16" KNXIPServiceType="SECURE_WRAPPER" TotalLength="46" /> body="<SecureWrapper secure_session_id="12406" sequence_information="00000000001e" serial_number="0000786b6e78" message_tag="0000" encrypted_data="c98e7e508764bf22" message_authentication_code="c6471b978d7cf81853ddcf97c566f564" />" />
2023-09-29 14:55:48.246 DEBUG (KNX Interface) [xknx.knx] Encrypting frame: <KNXIPFrame <KNXIPHeader HeaderLength="6" ProtocolVersion="16" KNXIPServiceType="CONNECTIONSTATE_REQUEST" TotalLength="16" /> body="<ConnectionStateRequest communication_channel_id="43", control_endpoint="0.0.0.0:0/tcp" />" />
2023-09-29 14:55:48.247 DEBUG (KNX Interface) [xknx.knx] Sending to 10.100.4.3:3671/tcp: <KNXIPFrame <KNXIPHeader HeaderLength="6" ProtocolVersion="16" KNXIPServiceType="SECURE_WRAPPER" TotalLength="54" /> body="<SecureWrapper secure_session_id="12406" sequence_information="00000000001f" serial_number="0000786b6e78" message_tag="0000" encrypted_data="400b9e9675a4d13f275e41025ebf5825" message_authentication_code="b3d5e80684b46b46131e594057efe5e5" />" />
2023-09-29 14:55:48.258 DEBUG (KNX Interface) [xknx.knx] Received from 10.100.4.3:3671/tcp: <KNXIPFrame <KNXIPHeader HeaderLength="6" ProtocolVersion="16" KNXIPServiceType="SECURE_WRAPPER" TotalLength="46" /> body="<SecureWrapper secure_session_id="12406" sequence_information="000000000032" serial_number="00c50105f18e" message_tag="0000" encrypted_data="9725d45559d3792e" message_authentication_code="962a9dc4c718fa35efb6b6be7b11ec65" />" />
2023-09-29 14:55:48.259 DEBUG (KNX Interface) [xknx.knx] Decrypted frame: <KNXIPFrame <KNXIPHeader HeaderLength="6" ProtocolVersion="16" KNXIPServiceType="CONNECTIONSTATE_RESPONSE" TotalLength="8" /> body="<ConnectionStateResponse communication_channel_id="43" status_code="ErrorCode.E_NO_ERROR" />" />
2023-09-29 14:55:57.221 DEBUG (MainThread) [xknx.telegram] <Telegram direction="Outgoing" source_address="1.1.255" destination_address="3/1/0" payload="<GroupValueWrite value="<DPTArray value="[0x7,0x9e]" />" />" />
2023-09-29 14:55:57.221 DEBUG (MainThread) [xknx.cemi] Outgoing CEMI: <CEMIFrame code="L_DATA_REQ" info="CEMIInfo("")" data="CEMILData(src_addr="IndividualAddress("1.1.255")" dst_addr="GroupAddress("3/1/0")" flags="1011110011100000" tpci="TDataGroup()" payload="<GroupValueWrite value="<DPTArray value="[0x7,0x9e]" />" />")" />
2023-09-29 14:55:57.223 DEBUG (MainThread) [xknx.data_secure] Secured APDU <GroupValueWrite value="<DPTArray value="[0x7,0x9e]" />" /> with <SecureAPDU scf="<SecurityControlField tool_access=False algorithm=CCM_ENCRYPTION system_broadcast=False service=S_A_DATA />" secured_data=<SecureData sequence_number=180877797709 secured_apdu="218853fd" message_authentication_code="58001b22" /> />
2023-09-29 14:55:57.224 DEBUG (KNX Interface) [xknx.knx] Encrypting frame: <KNXIPFrame <KNXIPHeader HeaderLength="6" ProtocolVersion="16" KNXIPServiceType="TUNNELLING_REQUEST" TotalLength="36" /> body="<TunnellingRequest communication_channel_id="43" sequence_counter="19" cemi="1100bce011ff19001003f110002a1d28294d218853fd58001b22" />" />
2023-09-29 14:55:57.228 DEBUG (KNX Interface) [xknx.knx] Sending to 10.100.4.3:3671/tcp: <KNXIPFrame <KNXIPHeader HeaderLength="6" ProtocolVersion="16" KNXIPServiceType="SECURE_WRAPPER" TotalLength="74" /> body="<SecureWrapper secure_session_id="12406" sequence_information="000000000020" serial_number="0000786b6e78" message_tag="0000" encrypted_data="67fdcbe6b38cb13fc8b42b564c57c34b42701f8941044b024e718aff8207b854e76bb87e" message_authentication_code="ac44e97cfcd1814a20ee0fd968532690" />" />
2023-09-29 14:55:57.279 DEBUG (KNX Interface) [xknx.knx] Received from 10.100.4.3:3671/tcp: <KNXIPFrame <KNXIPHeader HeaderLength="6" ProtocolVersion="16" KNXIPServiceType="SECURE_WRAPPER" TotalLength="74" /> body="<SecureWrapper secure_session_id="12406" sequence_information="000000000033" serial_number="00c50105f18e" message_tag="0000" encrypted_data="47ac4d7fb44ac96f99f3d336ae8444b7fe64d9bdf6b1e7f37d12fd6584c82f658a492233" message_authentication_code="a8a7538a507754c77fdea2d2ef678833" />" />
2023-09-29 14:55:57.280 DEBUG (KNX Interface) [xknx.knx] Decrypted frame: <KNXIPFrame <KNXIPHeader HeaderLength="6" ProtocolVersion="16" KNXIPServiceType="TUNNELLING_REQUEST" TotalLength="36" /> body="<TunnellingRequest communication_channel_id="43" sequence_counter="0" cemi="2e00bcf011ff19000003f110002a1d28294d218853fd58001b22" />" />
2023-09-29 14:55:57.280 WARNING (MainThread) [xknx.cemi] CEMI Frame failed to parse: <CouldNotParseCEMI description="APDU LEN should be 0 but is 16 from 1.1.255 in CEMI: bcf011ff19000003f110002a1d28294d218853fd58001b22" />
2023-09-29 14:56:00.230 WARNING (MainThread) [xknx.log] L_DATA_CON Data Link Layer confirmation timed out for <CEMIFrame code="L_DATA_REQ" info="CEMIInfo("")" data="CEMILData(src_addr="IndividualAddress("1.1.255")" dst_addr="GroupAddress("3/1/0")" flags="1011110011100000" tpci="TDataGroup()" payload="<SecureAPDU scf="<SecurityControlField tool_access=False algorithm=CCM_ENCRYPTION system_broadcast=False service=S_A_DATA />" secured_data=<SecureData sequence_number=180877797709 secured_apdu="218853fd" message_authentication_code="58001b22" /> />")" />

If I look at the traffic in ETS, I can see that HA sends something (telegram 295). However, both xknx and the heating controller seem to think something is off as nothing happens.

It’s awkward that ETS seems to be able to read the telegram just fine - but I don’t know the meaning of the light-blue color coding there.

Can you send a value to 3/1/0 from the ETS group monitor? Is that handled correctly by the actuator? (Not sure if this is possible due to DataSecure specialities, but worth a try).

What actuator is this? Looks like a Gira 213900 (if so, which Index version?) and which application version is loaded?

Just to be sure: have you written the Application to the actuator after adding GAs to the IP interface?

Have you tried if it works without DataSecure on 3/1/0 ?

Hi,

Sorry for my delayed response!

What actuator is this? Looks like a Gira 213900 (if so, which Index version?) and which application version is loaded?

Correct. I don’t know the index version, can I check this somewhere? Program version 2.1 (latest acc to Gira’s update tool).

Just to be sure: have you written the Application to the actuator after adding GAs to the IP interface?

Yes

Have you tried if it works without DataSecure on 3/1/0 ?

I tested this, and that works perfectly! So the problem is most likely somewhere between KNX Secure in the HA implementation (or more likely my configuration related to it) and the KNX Secure in the GIra 2139 00. This is my only KNX Secure device (so far), so I cannot easily test if the issue is with the specific device or generally.

To minimize the risk of my mistakes affecting, I tried the following after having tested it without KNX Secure enabled.

  1. I enabled KNX Secure again for the setpoint group (Security auto, shield/secure symbols shows up)
  2. Partial download on the IP interface
  3. Partial download + application download on the Gira (to be sure, application is included )
  4. Export KNX keyring
  5. Enable Diagnostics recording in ETS
  6. Import KNX keyring to HA
  7. Reload KNX integration

During the KNX init in HA it requests the values including the setpoint (28), and the 213900 responds nicely with the setpoint value (29). When I again try to change the setpoint, the ETS log shows the command (34 and 38), but there is no response from the 213900. Also when the setpoint value is later sent cyclically, it is unchanged. The data looks correct in the ETS monitor so it feels strange… What is strange though is that I can change the preset (Eco, Sleeping, Comfort etc) and that works correctly. The data type is however different between these two.

Can you send a value to 3/1/0 from the ETS group monitor? Is that handled correctly by the actuator? (Not sure if this is possible due to DataSecure specialities, but worth a try).

Yes, and the 2139 00 accepted this value!

The commands from HA and from the ETS Diagnostics look a bit different. Line 73 is from HA, 74-77 is from ETS and the replies.

ETS cheats when writing DataSecure GAs to not interfere with running environments. This is directly setting the Value for the group object. When there were multiple devices connected to that GA it would have request one of them to send a telegram (like a proxy) - and we could have seen if it was handled correctly.

I wouldn’t rule out an implementation problem - since I wrote that myself and it is not very widely used afaic. Unfortunately its hard to debug :grimacing:

Right now I think I see 2 different issues.

This shouldn’t ever happen - but it did happen previously with a very old (<2013) Weinzierl device. Imho this has nothing to do with the heating actuator - this is only between the IP interface and HA (xknx).
But since you are using Secure Tunnelling a TCP dump (like wireshark) is unusable, and I’m not sure how far xknx logs would take us with Weinzierl support. But would be worth a try.

The issue with the Gira actuator may even be unrelated - since ETS can see and properly decode HAs secure telegrams. The only idea I would have for this is an invalid sequence number. But I’m not sure how to find out if this is the case. I think you’d see it in a .knxkeys file (SequenceNumber=“…”) but not sure if this applies to tunnel endpoints too :grimacing: On the other hand, it would ignore any secure telegrams from HAs IA, not only specific ones - and you wrote, that preset change works (is this DataSecure?)…

Hi,

ETS cheats when writing DataSecure GAs to not interfere with running environments. This is directly setting the Value for the group object. When there were multiple devices connected to that GA it would have request one of them to send a telegram (like a proxy) - and we could have seen if it was handled correctly.

I will within shortly purchase more KNX devices including one more 2139 00. I could then add multiple devices’ endpoints into one group to test it further. Or would it be helpful to do this with one device but with multiple endpoints in one group? I could for instance create another RTC and add the setpoint of that one to the same group?

This shouldn’t ever happen - but it did happen previously with a very old (<2013) Weinzierl device. Imho this has nothing to do with the heating actuator - this is only between the IP interface and HA (xknx).
But since you are using Secure Tunnelling a TCP dump (like wireshark) is unusable, and I’m not sure how far xknx logs would take us with Weinzierl support. But would be worth a try.

The IP interface that I have is a Weinzierl 732 secure. Thinking of this as you mentioned the manufacturer…

The issue with the Gira actuator may even be unrelated - since ETS can see and properly decode HAs secure telegrams. The only idea I would have for this is an invalid sequence number. But I’m not sure how to find out if this is the case. I think you’d see it in a .knxkeys file (SequenceNumber=“…”) but not sure if this applies to tunnel endpoints too :grimacing: On the other hand, it would ignore any secure telegrams from HAs IA, not only specific ones - and you wrote, that preset change works (is this DataSecure?)…

I can find sequence numbers in the knx key file. If it is of any help, I can share this with you?

I don’t think it would yield the information we are looking for if there is only one device involved.

Sure, I can have a look. You can DM me on Discord @_farmio, a sharing link here in DMs or I can share my email if you prefer.

Thank you, I sent you the file in a DM. :slight_smile:

I have a similar error relating to DPT encoding.

Using an MDT Blind Actuator JAL-0810M.02 latest firmware.

HA KNX Cover configuration:

cover:
      - name: "TV Sliding Door"
        move_long_address: "2/4/16" #DPT: 1.008 up/down
        move_short_address: "2/4/17" #DPT: 1.008 up/down
        stop_address: "2/4/17" #DPT: 1.008 up/down
        position_address: "2/4/20" #DPT: 5.001 percentage
        position_state_address: "2/4/21" #DPT: 5.001 percentage
        device_class: shutter

ETS Group Addresses:

ETS Actuator Bindings:

Warning/Error in logs:

Logger: xknx.ga_dpt
Source: runner.py:190
First occurred: 11:56:47 AM (6 occurrences)
Last logged: 11:56:55 AM

DPT decoding error for <class 'xknx.dpt.dpt_5.DPTScaling'> of <xknx.core.group_address_dpt.GroupAddressDPT object at 0x7ff9943a4640>: <CouldNotParseTelegram description="Invalid payload type for DPTScaling" expected_type="DPTArray" payload="<DPTBinary value="1" />"/>
DPT decoding error for <class 'xknx.dpt.dpt_5.DPTScaling'> of <xknx.core.group_address_dpt.GroupAddressDPT object at 0x7ff9943a4640>: <CouldNotParseTelegram description="Invalid payload type for DPTScaling" expected_type="DPTArray" payload="<DPTBinary value="0" />"/>

ETS Diagnostics:

My suspicion is that the various entities for up/down/stop (long/short/stop) on HA side are binary whereas MDT’s actuators use a binary GA with description.

The functionality of the covers is perfectly working, just annoying that the logs are full of warnings.

Any recommendations on how to change this?
thanks
Martin

Hi :wave:!
This points to a mismatch of a DPT as parsed from your project to actual received data. Try reading the project file again, maybe there were some GAs changed.

Unfortunately the logger seems to have a little bug so it doesn’t show the GA number (but the object reference instead - which is useless) :grimacing:

There is no such thing on the actual bus - it’s just a binary value. This is solely project-metadata that doesn’t interact with runtime behaviour :wink:

Thanks Matthias.

You are like a walking encyclopaedia :wink:

ETS project file re-imported, now all working fine.

I never knew that the project file is “actively used” within HA, always thought it was just to translate KNX events / GA into readable information.

Thanks for resolving this, no more warnings/errors in the logs.