Commit Graph
28472 Commits
Author SHA1 Message Date
J. Nick Koston 67b839c4bb Merge remote-tracking branch 'upstream/api-logs-decode-noraise' into integration 2026-05-01 12:06:19 -05:00
J. Nick Koston f4d3fb1a18 [api] Short-circuit log-line decoder after first failure
_decode_pc shells out to PlatformIO via _run_idedata; without a
populated build dir for the device that subprocess fails for every
PC/BT line in a crash dump. Disable decoding after the first
EsphomeError (per logs session) and emit a single user-facing warning
instead of retrying on every line.

Also rename the helper to _LogLineProcessor since it now owns the
per-session decode-enabled state, not just the decode call.
2026-05-01 12:01:19 -05:00
J. Nick Koston fcc6f04805 [api] Don't tear down log connection on stack-trace decode failure
When 'esphome logs' processes a crash backtrace from the device,
process_stacktrace -> _decode_pc -> _run_idedata can raise
EsphomeError if the local build dir hasn't been populated (e.g. the
device was flashed from a different machine). on_log runs inside an
asyncio protocol callback, so the unhandled exception triggers
'Fatal error: protocol.data_received() call failed.', the loop tears
the connection down, and ReconnectLogic immediately reconnects. The
device replays the same crash trace and we loop forever.

Wrap the per-line decode in a helper that swallows EsphomeError so
the connection stays up. Also covered with unit tests for the new
helper.
2026-05-01 11:56:19 -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 918b1fac71 Merge branch 'ota-extended-protocol' into integration 2026-05-01 09:23:11 -05:00
J. Nick Koston 7f1cff1866 address bot nits 2026-05-01 09:22:37 -05:00
J. Nick Koston 588701fa9a Merge branch 'ota-extended-protocol' into integration 2026-05-01 09:10:26 -05:00
J. Nick Koston 28e1b32259 enforce size 2026-05-01 09:09:23 -05:00
J. Nick Koston 54ac510a25 cover 2026-05-01 09:08:58 -05:00
J. Nick Koston a6cd2a9f4d improve error reporting in case we mess it up later 2026-05-01 09:08:07 -05:00
J. Nick Koston 45c78dd5d2 bail early so listeners do not stop bluetooth if its an error 2026-05-01 09:06:37 -05:00
J. Nick Koston 4c9260d96d reduce memory 2026-05-01 09:05:46 -05:00
J. Nick Koston fd921fb9e0 Merge branch 'ota-extended-protocol' into integration 2026-05-01 09:01:46 -05:00
Kevin Ahrendt 3dd60c5713 [core] Support allocating ring buffer in internal memory (#16187) 2026-05-01 07:55:08 -05:00
Oliver Kleinecke f073c1cabe [usb_host][usb_uart] Add configurable max packet size (#14584) 2026-05-01 20:43:13 +10:00
Mat931 23ac2ead27 Merge branch 'dev' into ota-extended-protocol 2026-05-01 09:12:47 +00:00
Mat931 6182beb1f2 Apply suggestions 2026-05-01 10:15:58 +02:00
J. Nick Koston 5cc447e0da [core] Move per-platform hal_platform.h into components/platform/hal.h (#16183) 2026-04-30 21:27:31 -05:00
Clyde Stubbs 0980630f68 [lvgl] Clamp values for meter line indicators (#16180) 2026-04-30 22:23:14 -04:00
J. Nick Koston b8dfffdf06 [core] Enable ruff FLY (flynt) lint family (#16182) 2026-04-30 21:20:07 -05:00
J. Nick Koston 9d93c5a37c Merge remote-tracking branch 'upstream/move-hal-headers-to-components' into integration 2026-04-30 21:11:36 -05:00
J. Nick Koston 4e560dbd2e Merge remote-tracking branch 'upstream/dev' into integration 2026-04-30 21:11:33 -05:00
luar123 f6e39d305d [zigbee] Add newlib compatibility for zigbee sdk in idf 6 (#16174) 2026-04-30 22:08:55 -04:00
Jonathan Swoboda 08e5cb5576 [esp32_hosted] Bump esp_hosted to 2.12.6 and esp_wifi_remote to 1.5.1 (#16176) 2026-04-30 20:47:22 -05:00
Kevin Ahrendt faa61696e0 [sendspin] Use sendspin-cpp to v0.4.0 to reduce stuttering (#16178) 2026-04-30 20:43:24 -05:00
J. Nick Koston 64ab62aaf9 [core] Move per-platform hal_<platform>.h into components/<platform>/hal.h
Last step in the HAL reorg started in #15977 and continued in the
per-platform follow-ups #16111 (esp32), #16112 (esp8266), #16113
(libretiny), #16114 (rp2040), #16115 (host), #16116 (zephyr) — each of
which moved its platform's out-of-line HAL bodies from
components/<platform>/core.cpp into a new components/<platform>/hal.cpp.

This PR moves each platform's HAL header next to its hal.cpp inside
components/<platform>/, rather than under core/hal/. The dispatcher
core/hal.h is updated to include from the new locations and the
now-empty core/hal/ directory is removed.

Unlike the wake split (#15978) where freertos-class platforms (ESP32 +
LibreTiny) share a single wake_freertos.{h,cpp}, HAL primitives are
genuinely per-platform — there is no shared HAL implementation across
platforms — so the natural home is alongside each platform component
rather than in a separate core/ subdirectory.

Each .h file gains an empty 'namespace esphome::<platform> {}' block to
satisfy ci-custom's lint_namespace check. HAL functions live in
'namespace esphome' (root); they are not part of the per-component API,
matching the convention used by the corresponding hal.cpp files.

Comment-only updates to the components/<platform>/hal.cpp files to
reflect the new include path. No public API change, no behavior change.
2026-04-30 20:37:40 -05:00
J. Nick Koston 9999913d07 [zephyr] Move HAL bodies into components/zephyr/hal.cpp + inline trivial dispatches (#16116) 2026-04-30 20:10:51 -05:00
J. Nick Koston 92aa98f680 [host] Move HAL bodies into components/host/hal.cpp + inline trivial dispatches (#16115) 2026-05-01 00:42:38 +00:00
J. Nick Koston 3d69169141 [climate] Fold ControlAction fields into a single stateless lambda (#16044) 2026-04-30 19:16:16 -05:00
J. Nick Koston 24fdfcf1a1 [rp2040] Move HAL bodies into components/rp2040/hal.cpp + inline trivial dispatches (#16114) 2026-04-30 19:15:41 -05:00
J. Nick Koston 550444dc34 [binary_sensor] Drop Component from filter classes, use self-keyed scheduler (#16131) 2026-04-30 19:15:18 -05:00
J. Nick Koston ba7c06785a [mdns] Broadcast config_hash TXT record on _esphomelib._tcp (#16145) 2026-04-30 19:14:55 -05:00
J. Nick Koston b708d1a826 [core] Drop unused DELAY_ACTION from InternalSchedulerID enum (#16151) 2026-04-30 19:14:34 -05:00
J. Nick Koston 148d478dec [api] Add encode/decode benchmarks for Z-Wave, IR/RF, and serial proxy messages (#16157) 2026-04-30 19:14:20 -05:00
J. Nick Koston 45e78e4114 [core] Inline loop gate expression to avoid stale local reuse (#16167) 2026-04-30 19:13:54 -05:00
J. Nick Koston 3b3e003aa3 [sensor] Pack ThrottleAverageFilter have_nan_ into n_ bitfield (-4 B/instance) (#16169) 2026-04-30 19:13:10 -05:00
J. Nick Koston 2f3e16b482 [bk72xx] Apply CFG_SUPPORT_BLE=0 SDK option to BK7238 (#16181) 2026-04-30 19:12:06 -05:00
J. Nick Koston e085cb50d9 [sensor] Drop Component from filter classes, use self-keyed scheduler (#16132) 2026-04-30 19:11:30 -05:00
J. Nick Koston 2fbfb4c385 [ci] Split integration tests into 3 buckets when count is more than 10 (#16152) 2026-04-30 19:10:53 -05:00
Mat931 cba3fc51be Delete partition_access test 2026-04-30 20:18:30 +02:00
Mat931 5aef5df18b Apply suggestions 2026-04-30 20:16:52 +02:00
Mat931 68334cdd44 Remove conditional compilation 2026-04-30 20:02:07 +02:00
J. Nick Koston 61261b4a59 [libretiny] Move HAL bodies into components/libretiny/hal.cpp + inline trivial dispatches (#16113) 2026-04-30 12:33:22 -05:00
J. Nick Koston d48aad8c4d [esp32] Replace 512B stack buffer in printf wraps with picolibc cookie FILE (#16170) 2026-04-30 13:27:54 -04:00
Mat931 5535b05bf5 Fix tests 2026-04-30 19:13:40 +02:00
J. Nick Koston 1baee65d85 Merge remote-tracking branch 'upstream-ssh/scheduler-pool-unbounded-freelist' into integration 2026-04-30 12:03:29 -05:00
J. Nick Koston 0651a905bc [core] Avoid std::bad_array_new_length pull in shrink_scheduler_vector_
The classic std::vector swap-with-copy idiom (vector<T>(other).swap(other))
instantiates the iterator-range copy constructor, which pulls in
std::__throw_bad_array_new_length and the related typeinfo + vtable + dtor +
what() method (~118 B of stdlib RTTI). Build into a temp via reserve +
push_back instead, then move-assign:

- reserve uses ::operator new (throws bad_alloc, already linked).
- push_back without growth is the noexcept tail path.
- move-assign just swaps pointers, no allocation.

Same shrink semantics, saves ~128 B flash on ESP32. Also adds a fast-path
early return for the case where capacity already equals size (common after
a quiet period, since vector capacity only grows when crossing the doubling
threshold).
2026-04-30 12:02:55 -05:00
J. Nick Koston 27d7b2caec [core] Drop static on shrink_scheduler_vector_ for clang-tidy compliance
Project's .clang-tidy applies different naming rules to static methods
(ClassMethodCase, no suffix) vs instance methods (PrivateMethodCase /
ProtectedMethodCase, _ suffix required). The helper had a trailing _ but
was static, so clang-tidy flagged it. Drop static -- the helper is already
noinline'd and called only at trim time, so the hidden this arg is free
in any meaningful sense.
2026-04-30 11:58:52 -05:00
J. Nick Koston ce116a69e7 [core] Drop static on shrink_scheduler_vector_ for clang-tidy compliance
Project's .clang-tidy applies different naming rules to static methods
(ClassMethodCase, no suffix) vs instance methods (PrivateMethodCase /
ProtectedMethodCase, _ suffix required). The helper had a trailing _ but
was static, so clang-tidy flagged it. Drop static -- the helper is already
noinline'd and called only at trim time, so the hidden this arg is free
in any meaningful sense.
2026-04-30 11:58:44 -05:00
J. Nick Koston 0fcbc442fe Merge remote-tracking branch 'upstream-ssh/scheduler-pool-unbounded-freelist' into integration 2026-04-30 11:38:57 -05:00