Commit Graph
23 Commits
Author SHA1 Message Date
J. Nick Koston e158cd2de2 Treat a UDP send failure on the last chunk like a lost final ack
Surface a device error code waiting on the channel, and do not retry once
the whole image was queued, since the device may already be committing.
2026-10-10 15:43:59 -10:00
J. Nick Koston 0e6b966352 Back the UDP resend timer off while acks come back untimed
On a slow, congested link every message was resent before its ack came back,
so no round trip could be timed and the timer stayed at 0.5 s: 16 datagrams per
message. Eight progress acks in a row with no timed round trip now double the
timer, up to its 2 s cap, until a sample resets it. Random loss still yields
samples, so it never triggers there.
2026-10-10 15:36:50 -10:00
J. Nick Koston d0fc2c182e Count Windows' reset as a refused UDP port 2026-10-10 13:22:31 -10:00
J. Nick Koston e5fe8cc351 Fail fast when the device's UDP port refuses, include <algorithm> 2026-10-10 13:17:06 -10:00
J. Nick Koston 5faadcdbf8 Log every UDP decline, report a client close in the commit wait, fall back when the UDP socket fails 2026-10-10 13:09:24 -10:00
J. Nick Koston 00955d449a Cover the UDP client paths in the espota2 unit tests 2026-10-10 13:06:14 -10:00
J. Nick Koston bfa0a5fc94 Add host UDP support with end to end tests, surface device errors over UDP
The host platform now offers UDP through a socket drained by the wait
loops, so the host OTA integration tests cover UDP with loss, the TCP
fallback, a device error mid upload and Noise. Over UDP the device no
longer waits for the final ack, the client stops and reads a device error
as soon as one arrives, socket errors are named in the no progress error,
and the device notices the commit within 100 ms. LibreTiny without core
locking drops the UDP code at build time.
2026-10-10 12:56:41 -10:00
J. Nick Koston 54b34edf2d [ota] Fall back to a UDP data phase when the link is lossy
TCP gives up on links that lose many packets: retransmit timers back off and
the connection drops, so devices on poor Wi-Fi cannot be updated without being
moved. After the TCP handshake, a client that saw loss moves the upload to a
UDP byte stream that the device acks from lwIP's receive callback as datagrams
arrive, keeping at most four of them like TCP's window. Clean links stay on
TCP; blocked UDP falls back to TCP.
2026-10-10 12:15:36 -10:00
J. Nick Koston d970e9292e [esphome][ota][core] Compress OTA uploads on ESP32, RP2040, LibreTiny and host (#19037) 2026-10-02 08:00:10 -05:00
J. Nick Koston 6c5ab89d5f [esphome][core] Give a lost OTA chunk ack time to be retransmitted (#19041) 2026-09-09 09:08:16 +12:00
J. Nick Koston 19866c60ee [core] Parallelize registry and tool downloads (#18662) 2026-08-24 15:59:00 -05:00
J. Nick Koston c062d0c717 [ota] Log prepare, upload, and total OTA timing in espota2 (#18582) 2026-08-22 20:57:13 -05:00
J. Nick Koston 7420d23867 [ota] Retry uploads that fail from network errors (#18332) 2026-08-13 13:31:06 -05:00
b5e50144e3 [ota] Improve OTA error messages (#16327)
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick+github@koston.org>
2026-05-12 02:32:58 +00:00
e9cc10fedc [core] Native idf full support (#14678)
Co-authored-by: Jonathan Swoboda <154711427+swoboda1337@users.noreply.github.com>
Co-authored-by: Jonathan Swoboda <swoboda1337@users.noreply.github.com>
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2026-05-11 02:12:07 +00:00
1365251365 [ota] Add bootloader update functionality to ota component (#16238)
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@home-assistant.io>
2026-05-08 21:36:06 +00:00
7cfab58a05 [ota] Add partition table update functionality to ota component (#15780)
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@home-assistant.io>
Co-authored-by: J. Nick Koston <nick@koston.org>
2026-05-03 19:42:10 -05:00
Mat931andJ. Nick Koston 58cb7effd4 [ota] Add extended OTA protocol (#16164)
Co-authored-by: J. Nick Koston <nick@home-assistant.io>
2026-05-01 10:40:14 -05:00
J. Nick Koston 1c60efa4b6 [ota] Use secrets module for OTA authentication cnonce (#13863) 2026-02-09 08:30:49 -06:00
J. Nick Koston 123ee02d39 [ota] Improve error message when device closes connection without responding (#13562) 2026-01-26 17:13:18 -10:00
Jesse Hills 3054c2bc29 [ota.esphome] Handle blank password the same as no password defined (#11271) 2025-10-16 13:07:37 +13:00
J. Nick Koston 6bc9ed0810 [ota] Increase handshake timeout to 20s now that auth is non-blocking (#11186) 2025-10-13 07:27:43 +13:00
J. Nick KostonandJesse Hills abf522bbb9 [ota] Add SHA256 password authentication with backward compatibility (#10809)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2025-09-26 17:50:27 -05:00