From 740d60a4c552256770a4617f03a2729a1087302a Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Wed, 12 Aug 2026 18:30:39 -0500 Subject: [PATCH] Log when the connection is established and the handshake completes --- esphome/espota2.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/esphome/espota2.py b/esphome/espota2.py index 521c6e5c07..dffa2b13f2 100644 --- a/esphome/espota2.py +++ b/esphome/espota2.py @@ -318,7 +318,7 @@ def perform_ota( send_check(sock, MAGIC_BYTES, "magic bytes") _, version = receive_exactly(sock, 2, "version", RESPONSE_OK) - _LOGGER.debug("Device support OTA version: %s", version) + _LOGGER.info("Connection established; device supports OTA version %s", version) supported_versions = (OTA_VERSION_1_0, OTA_VERSION_2_0) if version not in supported_versions: raise OTAError( @@ -429,6 +429,8 @@ def perform_ota( hash_func, nonce_size, hash_name = _AUTH_METHODS[auth] perform_auth(sock, password, hash_func, nonce_size, hash_name) + _LOGGER.info("Handshake complete") + # Timeout must match device-side OTA_SOCKET_TIMEOUT_DATA to prevent premature failures sock.settimeout(90.0)