Moin,
beide Szenarien sind im jeweils laufenden Betrieb beider Komponenten, es geht um einen
neustart. Es kommt sehr viel häufiger vor, dass HA zumindest teilweise neu startet als das es der TWS tut. Hier liefen also beide Instanzen, dann wurde HA nach einem Update neu gestartet und bekommt solange keine Verbindung, bis der TWS auch neustartet.
Das log sieht so aus wie der erste Codeblock und wiederholt sich alle paar Sekunden. Sobald der TWS nach dem Restart wieder auch nur teilweise oben ist, kommt sofort die Verbindung zustande. HA pingt also permanent die Verbindung, bis er ein ACK bekommt und dann über den Tunnel läuft.
noch einmal nachgestellt. HA im laufenden Betrieb neugestartet, TWS läuft durch
Code: Alles auswählen
2024-06-11 09:35:20.881 INFO (MainThread) [xknx.log] XKNX v2.12.2 starting automatic connection to KNX bus.
2024-06-11 09:35:20.927 DEBUG (KNX Interface) [xknx.log] Using local ip: 10.10.30.2
2024-06-11 09:35:20.929 DEBUG (KNX Interface) [xknx.log] Searching on enp0s18 / 10.10.30.2
2024-06-11 09:35:20.929 DEBUG (KNX Interface) [xknx.knx] Sending to 224.0.23.12:3671: <KNXIPFrame <KNXIPHeader HeaderLength="6" ProtocolVersion="16" KNXIPServiceType="SEARCH_REQUEST_EXTENDED" TotalLength="20" /> body="<SearchRequestExtended discovery_endpoint="10.10.30.2:56009/udp" srps="[<xknx.knxip.srp.SRP object at 0x7fdc76078da0>]" />" />
2024-06-11 09:35:20.931 DEBUG (KNX Interface) [xknx.knx] Sending to 224.0.23.12:3671: <KNXIPFrame <KNXIPHeader HeaderLength="6" ProtocolVersion="16" KNXIPServiceType="SEARCH_REQUEST" TotalLength="14" /> body="<SearchRequest discovery_endpoint="10.10.30.2:56009/udp" />" />
2024-06-11 09:35:23.933 DEBUG (KNX Interface) [xknx.log] Closing UDP transport.
2024-06-11 09:35:33.064 INFO (MainThread) [xknx.log] XKNX v2.12.2 starting automatic connection to KNX bus.
2024-06-11 09:35:33.150 DEBUG (KNX Interface) [xknx.log] Using local ip: 10.10.30.2
2024-06-11 09:35:33.166 DEBUG (KNX Interface) [xknx.log] Searching on enp0s18 / 10.10.30.2
2024-06-11 09:35:33.168 DEBUG (KNX Interface) [xknx.knx] Sending to 224.0.23.12:3671: <KNXIPFrame <KNXIPHeader HeaderLength="6" ProtocolVersion="16" KNXIPServiceType="SEARCH_REQUEST_EXTENDED" TotalLength="20" /> body="<SearchRequestExtended discovery_endpoint="10.10.30.2:54478/udp" srps="[<xknx.knxip.srp.SRP object at 0x7fdc5b6601d0>]" />" />
2024-06-11 09:35:33.168 DEBUG (KNX Interface) [xknx.knx] Sending to 224.0.23.12:3671: <KNXIPFrame <KNXIPHeader HeaderLength="6" ProtocolVersion="16" KNXIPServiceType="SEARCH_REQUEST" TotalLength="14" /> body="<SearchRequest discovery_endpoint="10.10.30.2:54478/udp" />" />
2024-06-11 09:35:36.172 DEBUG (KNX Interface) [xknx.log] Closing UDP transport.
2024-06-11 09:35:46.632 INFO (MainThread) [xknx.log] XKNX v2.12.2 starting automatic connection to KNX bus.
2024-06-11 09:35:46.671 DEBUG (KNX Interface) [xknx.log] Using local ip: 10.10.30.2
2024-06-11 09:35:46.672 DEBUG (KNX Interface) [xknx.log] Searching on enp0s18 / 10.10.30.2
2024-06-11 09:35:46.672 DEBUG (KNX Interface) [xknx.knx] Sending to 224.0.23.12:3671: <KNXIPFrame <KNXIPHeader HeaderLength="6" ProtocolVersion="16" KNXIPServiceType="SEARCH_REQUEST_EXTENDED" TotalLength="20" /> body="<SearchRequestExtended discovery_endpoint="10.10.30.2:45212/udp" srps="[<xknx.knxip.srp.SRP object at 0x7fdc5a3c6390>]" />" />
2024-06-11 09:35:46.672 DEBUG (KNX Interface) [xknx.knx] Sending to 224.0.23.12:3671: <KNXIPFrame <KNXIPHeader HeaderLength="6" ProtocolVersion="16" KNXIPServiceType="SEARCH_REQUEST" TotalLength="14" /> body="<SearchRequest discovery_endpoint="10.10.30.2:45212/udp" />" />
2024-06-11 09:35:49.676 DEBUG (KNX Interface) [xknx.log] Closing UDP transport.
2024-06-11 09:36:09.778 INFO (MainThread) [xknx.log] XKNX v2.12.2 starting automatic connection to KNX bus.
2024-06-11 09:36:09.817 DEBUG (KNX Interface) [xknx.log] Using local ip: 10.10.30.2
2024-06-11 09:36:09.818 DEBUG (KNX Interface) [xknx.log] Searching on enp0s18 / 10.10.30.2
2024-06-11 09:36:09.818 DEBUG (KNX Interface) [xknx.knx] Sending to 224.0.23.12:3671: <KNXIPFrame <KNXIPHeader HeaderLength="6" ProtocolVersion="16" KNXIPServiceType="SEARCH_REQUEST_EXTENDED" TotalLength="20" /> body="<SearchRequestExtended discovery_endpoint="10.10.30.2:42945/udp" srps="[<xknx.knxip.srp.SRP object at 0x7fdc5850b3b0>]" />" />
2024-06-11 09:36:09.818 DEBUG (KNX Interface) [xknx.knx] Sending to 224.0.23.12:3671: <KNXIPFrame <KNXIPHeader HeaderLength="6" ProtocolVersion="16" KNXIPServiceType="SEARCH_REQUEST" TotalLength="14" /> body="<SearchRequest discovery_endpoint="10.10.30.2:42945/udp" />" />
2024-06-11 09:36:12.822 DEBUG (KNX Interface) [xknx.log] Closing UDP transport.
In der TWS Schnittstellen Sicht verschwindet HA beim klick auf Neustart direkt aus der Liste der Verbindungen und kommt nicht wieder.
Nach einem Restart vom TWS bei laufendem HA sieht das log so aus. Einen fehlgeschlagenen Versuch habe ich zu dokumentationszwecken drin gelassen:
Code: Alles auswählen
2024-06-11 09:39:39.945 INFO (MainThread) [xknx.log] XKNX v2.12.2 starting automatic connection to KNX bus.
2024-06-11 09:39:39.992 DEBUG (KNX Interface) [xknx.log] Using local ip: 10.10.30.2
2024-06-11 09:39:39.993 DEBUG (KNX Interface) [xknx.log] Searching on enp0s18 / 10.10.30.2
2024-06-11 09:39:39.993 DEBUG (KNX Interface) [xknx.knx] Sending to 224.0.23.12:3671: <KNXIPFrame <KNXIPHeader HeaderLength="6" ProtocolVersion="16" KNXIPServiceType="SEARCH_REQUEST_EXTENDED" TotalLength="20" /> body="<SearchRequestExtended discovery_endpoint="10.10.30.2:37059/udp" srps="[<xknx.knxip.srp.SRP object at 0x7fdc58436900>]" />" />
2024-06-11 09:39:39.993 DEBUG (KNX Interface) [xknx.knx] Sending to 224.0.23.12:3671: <KNXIPFrame <KNXIPHeader HeaderLength="6" ProtocolVersion="16" KNXIPServiceType="SEARCH_REQUEST" TotalLength="14" /> body="<SearchRequest discovery_endpoint="10.10.30.2:37059/udp" />" />
2024-06-11 09:39:42.995 DEBUG (KNX Interface) [xknx.log] Closing UDP transport.
2024-06-11 09:41:03.181 INFO (MainThread) [xknx.log] XKNX v2.12.2 starting automatic connection to KNX bus.
2024-06-11 09:41:03.221 DEBUG (KNX Interface) [xknx.log] Using local ip: 10.10.30.2
2024-06-11 09:41:03.222 DEBUG (KNX Interface) [xknx.log] Searching on enp0s18 / 10.10.30.2
2024-06-11 09:41:03.223 DEBUG (KNX Interface) [xknx.knx] Sending to 224.0.23.12:3671: <KNXIPFrame <KNXIPHeader HeaderLength="6" ProtocolVersion="16" KNXIPServiceType="SEARCH_REQUEST_EXTENDED" TotalLength="20" /> body="<SearchRequestExtended discovery_endpoint="10.10.30.2:51028/udp" srps="[<xknx.knxip.srp.SRP object at 0x7fdc6ca75670>]" />" />
2024-06-11 09:41:03.223 DEBUG (KNX Interface) [xknx.knx] Sending to 224.0.23.12:3671: <KNXIPFrame <KNXIPHeader HeaderLength="6" ProtocolVersion="16" KNXIPServiceType="SEARCH_REQUEST" TotalLength="14" /> body="<SearchRequest discovery_endpoint="10.10.30.2:51028/udp" />" />
2024-06-11 09:41:03.225 DEBUG (KNX Interface) [xknx.raw_socket] Received from ('10.10.30.5', 3671): 06100202004c08010a0a1e050e743601020010010000009fa4ac22cc00000000d83addbab0c654696d626572776f6c6620536572766572000000000000000000000000000802020104010301
2024-06-11 09:41:03.225 DEBUG (KNX Interface) [xknx.knx] Received from 10.10.30.5:3671: <KNXIPFrame <KNXIPHeader HeaderLength="6" ProtocolVersion="16" KNXIPServiceType="SEARCH_RESPONSE" TotalLength="76" /> body="<SearchResponse control_endpoint="10.10.30.5:3700/udp" dibs="[
2024-06-11 09:41:03.226 DEBUG (KNX Interface) [xknx.log] Found KNX/IP device at 10.10.30.5:3671/udp: GatewayDescriptor(
2024-06-11 09:41:03.226 DEBUG (KNX Interface) [xknx.log] Using interface: enp0s18
2024-06-11 09:41:03.226 DEBUG (KNX Interface) [xknx.log] Starting tunnel from 10.10.30.2:0 to 10.10.30.5:3700
2024-06-11 09:41:03.227 DEBUG (KNX Interface) [xknx.knx] Sending to 10.10.30.5:3700: <KNXIPFrame <KNXIPHeader HeaderLength="6" ProtocolVersion="16" KNXIPServiceType="CONNECT_REQUEST" TotalLength="26" /> body="<ConnectRequest control_endpoint="10.10.30.2:41341/udp" data_endpoint="10.10.30.2:41341/udp" cri="<ConnectRequestInformation connection_type="TUNNEL_CONNECTION" knx_layer="DATA_LINK_LAYER" />" />" />
2024-06-11 09:41:03.233 DEBUG (KNX Interface) [xknx.raw_socket] Received from ('10.10.30.5', 3700): 061002060014010008010a0a1e050e7404041002
2024-06-11 09:41:03.233 DEBUG (KNX Interface) [xknx.knx] Received from 10.10.30.5:3700: <KNXIPFrame <KNXIPHeader HeaderLength="6" ProtocolVersion="16" KNXIPServiceType="CONNECT_RESPONSE" TotalLength="20" /> body="<ConnectResponse communication_channel="1" status_code="ErrorCode.E_NO_ERROR" data_endpoint="10.10.30.5:3700/udp" crd="<ConnectResponseData request_type="ConnectRequestType.TUNNEL_CONNECTION" individual_address="1.0.2" />" />" />
2024-06-11 09:41:03.233 DEBUG (KNX Interface) [xknx.log] Tunnel established. communication_channel=1, address=1.0.2
2024-06-11 09:41:03.233 DEBUG (KNX Interface) [xknx.log] Closing UDP transport.
Der TWS scheint also nur einmal auf einen Broadcast einer bestimmten IP zu reagieren und danach nicht mehr. Kann man das irgendwo anpassen?