I want to use the source address of a knx event in an automation trigger, but the trigger data of knx_event
only contains destination address (address
) and event data (data
).
The xknx module however deals with the source address as well, as it is printed to the log in debug mode:
2019-10-04 17:47:31 DEBUG (MainThread) [xknx.knx] Received: <KNXIPFrame <KNXIPHeader HeaderLength="6" ProtocolVersion="16" KNXIPServiceType="KNXIPServiceType.TUNNELLING_REQUEST" Reserve="0" TotalLength="21" />
body="<TunnellingRequest communication_channel_id="1" sequence_counter="152" cemi="<CEMIFrame SourceAddress="PhysicalAddress("1.1.57")" DestinationAddress="GroupAddress("3/1/16")" Flags="1011110011100000" Command="APCICommand.GROUP_WRITE" payload="<DPTBinary value="0" />" />" />" />
Is there any elegant way to retrieve the source address from a knx_event, except from configuring debug mode for xknx and parsing the log for these events?