Commit Graph
975 Commits
Author SHA1 Message Date
J. Nick Koston 9f1cc209d2 Merge branch 'extend_ultra_low_latency_select_libretiny' into integration 2026-02-26 08:45:13 -10:00
J. Nick Koston 2b25245a30 Merge branch 'dev' into extend_ultra_low_latency_select_libretiny 2026-02-26 11:25:53 -07:00
J. Nick Koston ae16c3bae7 Add socket compile tests for libretiny platforms (#14314) 2026-02-26 08:25:36 -10:00
J. Nick Koston da93485ae2 dry 2026-02-26 06:40:38 -10:00
J. Nick Koston 4c4a22b0c0 drop compile tests move to other pr 2026-02-26 06:30:30 -10:00
J. Nick Koston 3e50a22c76 Merge remote-tracking branch 'upstream/dev' into extend_ultra_low_latency_select_libretiny
# Conflicts:
#	esphome/components/socket/__init__.py
#	esphome/core/application.cpp
#	esphome/core/application.h
#	esphome/core/lwip_fast_select.c
#	esphome/core/lwip_fast_select.h
#	tests/components/socket/test_wake_loop_threadsafe.py
2026-02-26 06:27:15 -10:00
J. Nick Koston a05d0202e6 [core] ESP32: massively reduce main loop socket polling overhead by replacing select() (#14249) 2026-02-26 06:21:27 -10:00
J. Nick Koston 9494d58e07 Merge remote-tracking branch 'upstream/dev' into integration 2026-02-25 09:06:07 -07:00
J. Nick Koston 1dac501b04 [light] Add additional light effect test cases (#14266) 2026-02-24 21:39:51 -06:00
J. Nick Koston 3660363eaf Merge remote-tracking branch 'upstream/noinline-mark-matching-items-removed' into integration 2026-02-24 11:18:10 -06:00
J. Nick Koston f1810550f3 Merge branch 'extend_ultra_low_latency_select_libretiny' into integration 2026-02-24 10:47:58 -06:00
J. Nick Koston 2e6d10474e Add socket build tests for LibreTiny platforms
Add bk72xx-ard, rtl87xx-ard, and ln882x-ard YAML build tests to
verify the fast select code path compiles on all LibreTiny platforms.
2026-02-24 10:29:49 -06:00
J. Nick Koston 3f74726f00 [core] Extend fast select optimization to LibreTiny platforms
Extend the ESP32 lwip_select() replacement (direct rcvevent reads +
FreeRTOS task notifications) to all LibreTiny platforms (bk72xx,
rtl87xx, ln882h).

All LibreTiny platforms have LwIP >= 2.1.3 with
lwip_socket_dbg_get_socket() and FreeRTOS task notifications. The
thread safety argument is actually stronger on LibreTiny since all
platforms are single-core ARM Cortex-M, eliminating cross-core
memory ordering concerns entirely.

Introduces USE_LWIP_FAST_SELECT feature define (set from Python
codegen for ESP32 and LibreTiny) replacing per-platform USE_ESP32
guards. The only platform-specific difference is FreeRTOS header
paths (freertos/FreeRTOS.h on ESP-IDF vs FreeRTOS.h on LibreTiny).

Expected impact on LibreTiny (same as ESP32):
- ~17x faster socket polling (direct rcvevent vs lwip_select)
- ~3.5 KB flash savings (dead code elimination of lwip_select)
- ~56 bytes static RAM savings (fd_set members excluded)
- ~200-300 bytes heap savings (UDP wake socket eliminated)
2026-02-24 09:39:38 -06:00
H. Árkosi Róbertandpre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> 72263eda85 [version] text sensor add option hide_hash to restore the pre-2026.1 behavior (#14251)
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
2026-02-24 07:31:58 -06:00
J. Nick Koston ccdaf9b940 Merge branch 'ultra_low_latancy_select_esp32' into integration 2026-02-23 22:16:37 -06:00
J. Nick Koston 29416061ea comments 2026-02-23 21:20:38 -06:00
J. Nick Koston fd6d0de7a2 cleanup 2026-02-23 21:00:00 -06:00
J. Nick Koston 70bcbfaae6 Merge branch 'remove_posix_tz_parser' into integration 2026-02-23 16:43:21 -06:00
J. Nick Koston 199288b813 [time] Fix test namespace for RecalcTimestampLocal and TimezoneOffset tests
Move tests that use make_us_central(), set_global_tz(), ParsedTimezone,
and DSTRuleType into esphome::time::testing namespace where those symbols
are declared.
2026-02-23 16:41:20 -06:00
J. Nick Koston 8374ccf7b5 [time] Remove C++ POSIX TZ string parser (bridge code)
Remove the runtime POSIX TZ string parser and all associated bridge code
now that timezone data is sent as pre-parsed structs via protobuf.

Removed:
- parse_posix_tz() and internal parsing helpers (skip_tz_name, parse_offset,
  parse_dst_rule, parse_uint, parse_transition_time)
- RealTimeClock::set_timezone() overloads and apply_timezone_()
- API connection fallback path for string-based timezone

Kept:
- All conversion functions (epoch_to_local_tm, is_in_dst, calculate_dst_transition)
- Internal helpers used by conversion functions
- localtime_r/localtime overrides
- Tests for all permanent functions
2026-02-23 16:34:14 -06:00
J. Nick Koston 06981cd4d3 Merge remote-tracking branch 'upstream/wifi-manual-ip-esp8266-rodata' into integration 2026-02-23 16:13:28 -06:00
J. Nick Koston abcd89cd1f [wifi] Avoid .rodata RAM cost for ManualIP on ESP8266
On ESP8266, .rodata is mapped to DRAM (RAM), not flash. When
StructInitializer is used with all compile-time constant fields,
the compiler places the entire struct as a const blob in .rodata,
silently consuming ~20 bytes of RAM.

Switch to field-by-field assignment on ESP8266 so the IP address
values are encoded as immediate operands in flash instructions
instead of a .rodata blob. Other platforms continue to use the
aggregate initializer since their .rodata is flash-mapped.
2026-02-23 16:06:28 -06:00
J. Nick Koston 5e94b10375 Merge branch 'posix_tz_proto' into integration 2026-02-23 16:02:34 -06:00
J. Nick Koston 1a99abc629 [time] Add context to test file about bridge code removal timeline 2026-02-23 14:45:37 -06:00
J. Nick Koston 5e95b9b36c Merge branch 'dev' into posix_tz 2026-02-23 12:45:16 -06:00
J. Nick Koston 9bf34be20d Merge remote-tracking branch 'upstream/dev' into integration 2026-02-23 12:07:15 -06:00
Joshua SingJesse Hillspre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>Jonathan Swoboda
1f945a334a [hdc302x] Add new component (#10160)
Co-authored-by: Jesse Hills <3060199+jesserockz@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: Jonathan Swoboda <154711427+swoboda1337@users.noreply.github.com>
2026-02-23 12:01:23 -05:00
ded457c2c1 [libretiny] Tune oversized lwIP defaults for ESPHome (#14186)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-23 13:52:46 +13:00
J. Nick Koston 1fa340c6a4 Merge remote-tracking branch 'origin/dev' into integration 2026-02-22 10:23:01 -06:00
J. Nick Koston 49e4ae54be [bme68x_bsec2] Fix compilation on ESP32 Arduino (#14194) 2026-02-22 05:22:59 +00:00
J. Nick Koston f87a0b24a9 Merge remote-tracking branch 'origin/libretiny-lwip-tune' into integration 2026-02-21 17:34:47 -06:00
J. Nick Koston e74506b957 Merge branch 'scheduler_de_template' into integration 2026-02-21 17:34:37 -06:00
J. Nick Koston 5a07908dfa [api] Fix build error when lambda returns StringRef in homeassistant.event data (#14187) 2026-02-21 13:54:20 -06:00
J. Nick Koston 482721d1ce [libretiny] Tune oversized lwIP defaults for ESPHome
The Beken/RTL SDKs ship lwIP defaults tuned for a general-purpose WiFi
SoC: TCP_SND_BUF=10*MSS (14.6KB), MEM_SIZE=32KB, 12 TCP + 22 UDP
sockets. These waste significant RAM on memory-constrained chips.
ESPAsyncWebServer allocates malloc(tcp_sndbuf()) per response chunk,
and at 14.6KB this causes OOM on BK7231N.

This tunes lwIP to match ESP32/ESP8266 ranges:
- TCP_SND_BUF/TCP_WND: 4*MSS (was 10*MSS)
- MEM_SIZE: 12KB BK72XX / 16KB RTL,LN (was 32KB)
- Socket counts: dynamic from component registrations
- All derived pool sizes adjusted accordingly

Also splits socket consumer tracking into TCP/UDP, adds
get_socket_counts() API, and updates ESP32 to use it.

Closes https://github.com/esphome/esphome/issues/14095
2026-02-21 11:50:29 -06:00
J. Nick Koston 7fb09da7cf [dsmr] Add deprecated std::string overload for set_decryption_key (#14180) 2026-02-21 11:08:13 -06:00
Sxt FovandJonathan Swoboda 6ecb01dedc [cc1101] actions to change general and tuner settings (#14141)
Co-authored-by: Jonathan Swoboda <154711427+swoboda1337@users.noreply.github.com>
2026-02-21 08:45:15 -05:00
J. Nick Koston 5de56714c0 Merge branch 'setup_heap_stats' into integration 2026-02-20 19:31:55 -06:00
J. Nick Koston c6c01f85af [setup_heap_stats] Add component to track per-component heap allocation during boot
Tracks heap usage per component during both construction and setup() phases.
Logs deltas inline as components are registered and set up, then prints a
sorted summary after setup() completes. Storage is freed after the summary.

This is a diagnostic tool - not intended for production use. It was used to
discover the logger's unused UART event queue allocation (#14168).
2026-02-20 19:29:41 -06:00
J. Nick Koston 09ac3bc1cb Merge remote-tracking branch 'origin/fix_logger_loop_disable' into integration 2026-02-20 17:04:06 -06:00
tomaszduda23 1d3054ef5e [nrf52,logger] Early debug (#11685) 2026-02-20 16:12:50 -06:00
Jonathan SwobodaandClaude Opus 4.6 db6aa58f40 [max7219digit] Fix typo in action names (#14162)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 16:06:46 -05:00
J. Nick Koston 4c70f2001a Merge branch 'fix_logger_loop_disable' into integration 2026-02-20 13:21:08 -06:00
Jonathan SwobodaandClaude Opus 4.6 403235e2d4 [wifi] Add band_mode configuration for ESP32-C5 dual-band WiFi (#14148)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 11:20:29 -05:00
Jonathan SwobodaandClaude Opus 4.6 9ce01fc369 [esp32] Add engineering_sample option for ESP32-P4 (#14139)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 11:20:05 -05:00
J. Nick Koston d4765bb21d Merge remote-tracking branch 'upstream/dev' into integration 2026-02-19 22:34:05 -06:00
Jonathan SwobodaandClaude Opus 4.6 efe54e3b5e [ld2410/ld2450] Replace header sync with buffer size increase for frame resync (#14138)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 23:25:25 -05:00
J. Nick Koston f4e412d1d6 Merge remote-tracking branch 'swoboda1337/fix/ld24xx-buffer-size' into integration 2026-02-19 22:02:34 -06:00
Jonathan SwobodaandClaude Opus 4.6 dbe3dfb265 [ld2410/ld2450] Replace header sync with buffer size increase for frame resync
Reverts the frame header synchronization added in #14135 and #14136
in favor of a simpler fix: increasing MAX_LINE_LENGTH so that the
existing footer-based resynchronization can recover after losing sync.

Both components already check for frame footers at every byte position,
which naturally resyncs the parser. The problem was that the buffers
were sized exactly to fit the largest frame, so a desynced parser's
footer could land at the overflow boundary and get discarded. Increasing
the buffer by 4 bytes (footer size) ensures the footer always lands
inside the buffer.

- ld2450: 41 -> 45 (zone query response = 40 bytes + 1 null + 4 footer)
- ld2410: 46 -> 50 (engineering data frame = 45 bytes + 1 null + 4 footer)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 22:47:58 -05:00
Jonathan SwobodaClaude Opus 4.6pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
b67b2cc3ab [ld2450] Add frame header synchronization to fix initialization regression (#14135)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
2026-02-20 02:56:20 +00:00
J. Nick Koston b6913a9fb3 Merge branch 'fix/ld2450-frame-sync' into integration 2026-02-19 20:44:15 -06:00