Commit Graph
27389 Commits
Author SHA1 Message Date
J. Nick Koston 4696d70b8a Merge remote-tracking branch 'origin/light-addressable-gamma-transition-stall' into integration 2026-04-13 15:04:07 -10:00
J. Nick Koston 12b55f176f [light] Clearer uniformity scan + note edge case in uniform path 2026-04-13 14:56:48 -10:00
J. Nick Koston b324630f8e [light] Type-annotate to_code in mock_addressable_light 2026-04-13 14:56:02 -10:00
J. Nick Koston 8da24fd1d9 [light] Use existing integration test helpers in transition test 2026-04-13 14:54:39 -10:00
J. Nick Koston 32130e1cb1 [light] Address Copilot review feedback on PR #15726
- mock_addressable_light.h: add direct <memory>/<cstdint>/<cstddef> includes
- test: use asyncio.get_running_loop() instead of deprecated get_event_loop()
- test: rebase timing to command-issue time (not first-nonzero) and use
  absolute progress for assertion 2, so late-transition check can't skew
  when the first nonzero sample happens to land near the assertion-1 limit
2026-04-13 14:53:17 -10:00
J. Nick Koston 93893e02a7 Revert: raw-byte uniformity check (didn't help inlining) 2026-04-13 14:35:23 -10:00
J. Nick Koston 6edadaa33b [light] Use raw byte compare for uniformity scan to keep apply() hot path inlinable 2026-04-13 14:31:42 -10:00
J. Nick Koston 4e8f98e767 [light] Collapse uniform-start flag+Color into optional<Color> 2026-04-13 14:22:13 -10:00
J. Nick Koston 3f56e0255a [light] Avoid addressable transition stall at low gamma-corrected values
When a uniform-colored addressable strip transitions from one color to
another, interpolate math-only against a cached start color instead of
reading each LED's current value back through the 8-bit stored byte.

The old algorithm used led.get_red()/etc. every step as the source for
the delta, which round-tripped through gamma uncorrect/correct and the
8-bit stored byte. At gamma 2.8, any pre-gamma value below ~27 rounds
to stored byte 0, so small early-transition steps produced stored 0 and
the next step read back 0, stalling progress until ~90% of the transition
before a single step produced a large-enough pre-gamma value to clear
the gamma threshold. Result: dark for the first 9s of a 10s fade, then
jump on in the final 1s.

Detect uniform start state in start() and take a cheap math-only lerp
path when true, so the stored byte advances through each gamma threshold
as smoothed_progress crosses it. Falls back to the existing per-LED
read-back algorithm when the buffer is non-uniform (e.g. when
transitioning out of an addressable effect).
2026-04-13 14:17:21 -10:00
J. Nick Koston 21df5d9bf6 [web_server] Reset OTA backend on new upload to avoid brick after interrupted OTA (#15720) 2026-04-13 13:59:45 -10:00
J. Nick Koston 73c972a604 [adc] Place ADC oneshot control functions in IRAM for cache safety (#15717) 2026-04-13 13:59:32 -10:00
J. Nick Koston 4dfdcfc46d Merge remote-tracking branch 'upstream/adc-iram-safety' into integration 2026-04-13 13:51:21 -10:00
J. Nick Koston ddf5ab6d1c Merge remote-tracking branch 'upstream/esptool-skip-missing-flash-images' into integration 2026-04-13 13:51:03 -10:00
J. Nick Koston 5f76b78cfa [esphome] Skip missing extra flash images in upload_using_esptool
PlatformIO's idedata may list flash images that do not exist on disk
(e.g. a tasmota tinyuf2.bin referenced by the adafruit_qtpy_esp32s3_n4r2
board). Previously the CLI passed every entry straight to esptool, which
aborted the entire flash with "No such file or directory". The dashboard
path is unaffected because it flashes the pre-merged firmware.factory.bin
produced by the post-build step, which already tolerates missing inputs.

Filter non-existent extra_flash_images with a warning so a stale or
incorrect platform-declared image no longer breaks esphome run.

Fixes https://github.com/esphome/esphome/issues/15634
2026-04-13 13:37:29 -10:00
J. Nick Koston 48a611b625 Merge remote-tracking branch 'upstream/captive-portal-ota-resume-brick' into integration 2026-04-13 13:21:31 -10:00
J. Nick Koston c26d180325 Emit OTA_ABORT state when tearing down a stale session on retry
Addresses Copilot review suggestion on #15720: when the handler aborts a
previously interrupted OTA session because a new upload arrived, also fire
the OTA_ABORT state notification so user-facing on_abort: automations and
other OTA state listeners observe the teardown. Without this, the abort
would be silent to listeners (distinct from OTA_ERROR, which signals a
failed session rather than a superseded one).
2026-04-13 13:07:50 -10:00
J. Nick Koston ba2558edf6 Gate OTA session init on index==0 && len>0 instead of request pointer
The previous fix tracked the AsyncWebServerRequest pointer to distinguish
web_server_idf's double index==0 callbacks (Start marker with data==nullptr,
then the first real data chunk) from a retry after an interrupted upload.
That is unreliable: AsyncWebServerRequest is a stack-allocated object in the
httpd task, so a new request that happens to reuse the same stack address
as an interrupted one compares equal and silently skips the abort. Closing
a browser tab mid-upload and starting a fresh upload from another window
could then concatenate partial data from the first upload with the new
image.

Gate the init block on 'index == 0 && len > 0' instead. This uniquely
identifies the first real byte of an upload on both IDF (start-marker has
len==0) and Arduino, no identity tracking needed.
2026-04-13 12:56:52 -10:00
J. Nick Koston 3042a910fe Extract ota_end_session_ helper to DRY backend reset paths 2026-04-13 12:49:44 -10:00
J. Nick Koston ccdb5a3bfb Track request pointer to avoid re-init on web_server_idf's double index==0 call
web_server_idf invokes handleUpload twice with index==0 at the start of every
upload (once as a 'Start' signal with nullptr data, then with the first data
chunk). The previous fix treated the second call as a stale-session retry,
wastefully aborting and re-initializing the backend on every single upload.

Store the AsyncWebServerRequest pointer that owns the current session and only
tear down the backend when a different request arrives at index==0. Clear the
tracked pointer on every backend reset path so a stack-reused request pointer
from a later upload cannot collide.
2026-04-13 12:49:11 -10:00
J. Nick Koston 81a2caee36 [web_server] Reset OTA backend on new upload to avoid bricked device after interrupted OTA
If a captive_portal or web_server OTA upload is interrupted mid-stream (e.g. TCP
connection reset), the shared OTARequestHandler's ota_backend_ is left open. When
the browser resends the multipart POST, the guard 'index == 0 && !ota_backend_'
skipped re-initialization, so new bytes were written at the previous session's
offset. The Updater's end() then reports success with a concatenated image in
flash, bricking the device on reboot.

Abort and reset any in-progress backend whenever a new multipart upload starts
(index == 0) so the fresh upload begins a clean OTA session.
2026-04-13 12:41:12 -10:00
J. Nick Koston 70ee6a5031 Add type annotations to _require_adc_iram 2026-04-13 12:28:09 -10:00
J. Nick Koston 8c0436cc7e [adc] Move require_adc_oneshot_iram to config validation
The esp32 to_code runs at PLATFORM priority (1000) before component
to_code at COMPONENT priority (0), so the flag was set too late.
Move to config validation to ensure it is set before esp32 processes
sdkconfig options.
2026-04-13 12:25:38 -10:00
Jonathan Swoboda 8cdffef82a [heatpumpir] Bump tonia/HeatpumpIR to 1.0.41 (#15711) 2026-04-13 17:06:56 -04:00
J. Nick Koston d1d96d488d [adc] Place ADC oneshot control functions in IRAM for cache safety
When flash cache is disabled during background flash operations (NVS
writes by WiFi, BLE, Zigbee, Thread, power management, etc.), the ADC
oneshot read function will crash if it is in flash. This places the
ADC oneshot control functions in IRAM by setting
CONFIG_ADC_ONESHOT_CTRL_FUNC_IN_IRAM when the ADC component is used.

Adds require_adc_oneshot_iram() helper and adc_oneshot_in_iram advanced
config option.
2026-04-13 11:04:29 -10:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 4034809281 Bump actions/create-github-app-token from 3.0.0 to 3.1.1 (#15712)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-13 11:00:46 -10:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> ce6bffb65c Bump actions/cache from 5.0.4 to 5.0.5 (#15713)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-13 11:00:24 -10:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> e8bc4bedb4 Bump actions/cache from 5.0.4 to 5.0.5 in /.github/actions/restore-python (#15714)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-13 11:00:11 -10:00
J. Nick Koston b85a7ef317 [scheduler] Force-inline process_to_add() fast path (#15685) 2026-04-13 08:40:58 -10:00
J. Nick Koston 9f7e310526 [scheduler] Force-inline cleanup_() fast path (#15683) 2026-04-13 08:40:39 -10:00
J. Nick Koston af7cb1d81e [scheduler] Force-inline process_defer_queue_() fast path (#15686) 2026-04-13 08:40:25 -10:00
J. Nick Kostonandpre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> 53ce2a2f7f [api] Add speed_optimized to SubscribeLogsResponse (#15698)
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
2026-04-14 06:25:05 +12:00
Jonathan Swoboda fb0283e0ee [esp32] Update the recommended platform to 55.03.38-1 (#15705) 2026-04-13 14:18:52 -04:00
Jonathan Swoboda 5d0cfc31fa [core] Move FILTER_PLATFORMIO_LINES into platformio_runner (#15707) 2026-04-13 14:18:44 -04:00
J. Nick Koston f30f0a0edc [zephyr] Remove redundant yield() from main loop (#15694) 2026-04-13 09:43:17 -04:00
Kevin Ahrendt 6aa538a61d [micro_wake_word] Bugfix: Use es-nn v1.1.2 (last known working version) (#15703) 2026-04-13 09:42:02 -04:00
Diorcet YannandJonathan Swoboda 7918a93a7f [esp32] Fix some compiler warnings & bugs (#15610)
Co-authored-by: Jonathan Swoboda <154711427+swoboda1337@users.noreply.github.com>
2026-04-13 09:40:49 -04:00
Diorcet Yann fe6ecb24b4 [bme68x_bsec2] use esphome-libs wrappers for ESP32 (#15697) 2026-04-13 07:49:13 -04:00
J. Nick Koston 34c617f046 Merge branch 'proto-speed-log-response' into integration 2026-04-12 22:45:34 -10:00
J. Nick Koston 4bcf3b9661 fix existing bug 2026-04-12 22:44:02 -10:00
J. Nick Koston c5927fff49 Merge branch 'dev' into proto-speed-log-response 2026-04-12 22:14:24 -10:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 6db787d5e4 Bump aioesphomeapi from 44.14.0 to 44.15.0 (#15699)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-13 08:12:57 +00:00
J. Nick Koston 450d753184 Merge branch 'dev' into proto-speed-log-response 2026-04-12 21:52:43 -10:00
J. Nick Koston b4982b9bff Merge remote-tracking branch 'upstream/proto-speed-log-response' into integration 2026-04-12 21:50:41 -10:00
J. Nick Kostonandpre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> 5b4385a084 [api] Add speed_optimized proto option for hot encode paths (#15691)
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
2026-04-13 07:42:31 +00:00
pre-commit-ci-lite[bot] 2a0e39901e [pre-commit.ci lite] apply automatic fixes 2026-04-13 07:22:54 +00:00
J. Nick Koston 1ccf72dd41 [api] Add speed_optimized to SubscribeLogsResponse
Mark SubscribeLogsResponse with (speed_optimized) = true so its
encode() and calculate_size() are compiled with -O2. Log messages
are among the most frequent messages sent over the API, especially
during debug sessions.
2026-04-12 21:20:59 -10:00
J. Nick Koston 58326bcd56 Merge branch 'dev' into proto-speed-optimized-v2 2026-04-12 21:07:02 -10:00
J. Nick Koston 4f69c3b850 [benchmark] Add SubscribeLogsResponse encode benchmarks (#15696) 2026-04-13 02:03:53 -05:00
J. Nick Koston bccd0375fe Merge branch 'dev' into proto-speed-optimized-v2 2026-04-12 20:42:04 -10:00
J. Nick Koston c62a75ee17 [benchmark] Use -Os to match firmware optimization level (#15688) 2026-04-13 01:40:33 -05:00