Commit Graph
25338 Commits
Author SHA1 Message Date
J. Nick Koston 263324dec0 Merge remote-tracking branch 'origin/fix-time-timezone-offset' into integration 2026-03-19 21:43:09 -10:00
J. Nick Koston ab6bd0b8cc tidy 2026-03-19 21:27:13 -10:00
J. Nick Koston c3514d6496 Merge remote-tracking branch 'upstream/wifi-log-str-literal' into integration 2026-03-19 21:21:17 -10:00
J. Nick Koston 8211218483 [wifi] Use LOG_STR_LITERAL for scan complete log string literals
Wrap string literal ternary args in LOG_STR_LITERAL to keep them
in flash on ESP8266.
2026-03-19 21:00:12 -10:00
J. Nick Koston 609d60aa12 Merge branch 'number-call-cleanup' into integration 2026-03-19 20:53:03 -10:00
J. Nick Koston 310b50ffc6 [number] Clean up NumberCall::perform() increment/decrement logic
Extract cycle_or_clamp_ helper and simplify the increment/decrement
branches by flattening nested conditionals. Use LOG_STR_LITERAL for
cycling log strings.
2026-03-19 20:52:03 -10:00
J. Nick Koston 533301c909 Merge remote-tracking branch 'upstream/rp2040-lwip-tune' into integration 2026-03-19 19:57:09 -10:00
J. Nick Koston 0b0184f089 Merge remote-tracking branch 'upstream/esp32-pico-flash-pin-hint' into integration 2026-03-19 19:56:52 -10:00
J. Nick Koston d0726754c3 [esp32] Mention ignore_pin_validation_error in flash pin error message
ESP32 modules like the ESP32-PICO-V3-02 use a different flash pin
configuration where GPIO7 and GPIO8 are freely usable. The existing
ignore_pin_validation_error option allows bypassing this check but
the error message did not mention it, making it hard to discover.
2026-03-19 19:53:28 -10:00
J. Nick Koston 3f19012d66 Merge branch 'dev' into rp2040-lwip-tune 2026-03-19 19:35:01 -10:00
J. Nick Koston 1caeffbc73 Merge remote-tracking branch 'upstream/fix-httpd-stack-overflow' into integration 2026-03-19 19:19:13 -10:00
J. Nick Koston 402a308540 Fix clang-format: use lower_snake_case for function-local constant 2026-03-19 19:18:58 -10:00
J. Nick Koston 82620aa565 Merge remote-tracking branch 'upstream/fix-callback-function-ref-memcpy' into integration 2026-03-19 18:58:56 -10:00
J. Nick Koston 1c35ddf1f3 Merge remote-tracking branch 'upstream/fix-httpd-stack-overflow' into integration 2026-03-19 18:58:53 -10:00
J. Nick Koston 86f15b20ee Merge remote-tracking branch 'origin/integration' into integration 2026-03-19 18:58:19 -10:00
J. Nick Koston aaa911b7e4 Merge remote-tracking branch 'upstream/fix-time-timezone-offset' into integration 2026-03-19 18:58:04 -10:00
J. Nick Koston b877b4a57e [web_server] Increase httpd task stack size to prevent stack overflow
The SerializationBuffer introduced in #13625 places a 640-byte buffer
on the stack. When handling HTTP requests on the ESP-IDF httpd task
(which has a default stack of 4096 bytes), the deep call chain from
handleRequest through JSON serialization and lwip_send can overflow.

Increase the httpd task stack by 256 bytes to restore headroom.

Fixes #14991
2026-03-19 18:54:22 -10:00
J. Nick Koston 197dd332b1 [time] Fix timezone_offset() and recalc_timestamp_local() always using UTC fallback
time.h was missing #include "esphome/core/defines.h", so USE_TIME_TIMEZONE
was never defined when compiling time.cpp. Both functions always took the
#else path, returning 0 offset and treating local time as UTC.
2026-03-19 18:47:45 -10:00
J. Nick Koston 02ada93ea5 [wifi] Reject WiFi config on RP2040/RP2350 boards without CYW43 chip (#14990) 2026-03-19 18:40:33 -10:00
J. Nick Koston abd6a4f6a9 [core] Fix Callback::create memcpy from function reference
When Callback::create receives a function reference (e.g. void(&)(int)),
&callable gives the address of the function's machine code, not a
pointer variable. The memcpy then reads bytes from executable code
memory instead of copying a function pointer value.

Fix by decaying the callable into a local variable before memcpy,
which converts function references to function pointers stored on
the stack.

No current callers trigger this bug (all pass lambdas), but this
prevents incorrect behavior if bare function names are ever passed.
2026-03-19 18:01:48 -10:00
J. Nick Koston 5da2073d45 Merge branch 'dev' into rp2040-lwip-tune 2026-03-19 16:22:33 -10:00
J. Nick Koston 6348eafcb6 Merge remote-tracking branch 'upstream/fix-rp2040-wifi-validation' into integration 2026-03-19 16:15:46 -10:00
6e87f8eb4e [template] alarm_control_panel collapse SensorDataStore and bypassed_sensor_indicies into SensorInfo (#14852)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2026-03-20 02:06:58 +00:00
J. Nick Koston 74facf69a1 Merge remote-tracking branch 'upstream/fix-rp2040-wifi-validation' into integration 2026-03-19 16:03:30 -10:00
J. Nick Koston ec70166ad2 [wifi] Reject WiFi config on RP2040/RP2350 boards without CYW43 chip
Boards like rpipico2 (Raspberry Pi Pico 2) don't have WiFi hardware
but ESPHome allowed configuring wifi on them, leading to linker errors
from missing CYW43 driver symbols. Add validation to catch this at
config time with a clear error message.

- Add wifi detection to the board generator by checking for
  PICO_CYW43_SUPPORTED=1 in upstream extra_flags
- Add validation in wifi component to reject non-WiFi RP2040 boards

Closes https://github.com/esphome/esphome/issues/14989
2026-03-19 16:01:02 -10:00
Clyde Stubbs 7df550f2a9 Ensure lvgl libs available when editing for host (#14987) 2026-03-20 01:52:52 +00:00
Clyde Stubbs b02f0e3c5f [sdl] Fix get_width()/height() when rotation used (#14950) 2026-03-20 12:39:10 +11:00
J. Nick Koston d53fb75b98 Merge remote-tracking branch 'origin/splitmix32-random' into integration 2026-03-19 14:45:46 -10:00
J. Nick Koston d161757588 turns out random_bytes was broken on nrf52 2026-03-19 14:26:08 -10:00
J. Nick Koston 151f71e033 [ci] Add libretiny and zephyr to memory impact platform filter (#14985) 2026-03-19 14:12:15 -10:00
J. Nick Koston 7ac001e994 [mhz19] Fix unused function warning for detection_range_to_log_string (#14981) 2026-03-19 14:12:03 -10:00
J. Nick Koston de177d2445 [logger] Fix ESP8266 crash with VERY_VERBOSE log level (#14980) 2026-03-19 14:11:49 -10:00
J. Nick Koston a9cb7143dc [core] Inline calculate_looping_components_ into header (#14944) 2026-03-19 14:11:17 -10:00
J. Nick Koston 902258b56e [preferences] Compile out loop() when flash_write_interval is non-zero (#14943) 2026-03-19 14:11:06 -10:00
J. Nick Koston 8e6bc37785 Ensure non-zero seed after random_bytes() 2026-03-19 13:41:04 -10:00
J. Nick Koston e91e1edbe8 Merge remote-tracking branch 'origin/fix-memory-impact-platform-filter' into integration 2026-03-19 13:38:59 -10:00
J. Nick Koston bcc0180cd2 Merge remote-tracking branch 'upstream/splitmix32-random' into integration 2026-03-19 13:38:46 -10:00
J. Nick Koston e2a59daabc Add SplitMix32 references for reviewers 2026-03-19 13:37:26 -10:00
J. Nick Koston 2af50329f4 Document design trade-off for state==0 reseed 2026-03-19 13:36:08 -10:00
J. Nick Koston 1b090e6b95 Address review: use 'secure RNG' instead of 'hardware RNG' in comments 2026-03-19 13:35:43 -10:00
J. Nick Koston b5a1faac68 [ci] Add libretiny and zephyr to memory impact platform filter
Add libretiny and zephyr to PLATFORM_SPECIFIC_COMPONENTS so they
are correctly filtered out when an incompatible platform is selected
for memory impact analysis. Previously, libretiny was missing from
the set, causing it to be included in esp32-idf builds and producing
a misleading comment showing both platforms.
2026-03-19 13:32:40 -10:00
J. Nick Koston f02bf07630 [core] Use SplitMix32 PRNG for random_uint32() across platforms
Replace platform-specific random_uint32() implementations with a
unified SplitMix32 PRNG seeded from random_bytes(). This provides
consistent, fast, non-cryptographic random numbers on all platforms.

ESP8266 retains os_random() as it is already faster on that platform.

Benchmarked on real hardware (ns/call, before -> after):
- RP2040: 2815 -> 333 (8.5x faster)
- ESP32: 871 -> 354 (2.5x faster)
- BK72xx: 1073 -> 882 (1.2x faster, replaces weak rand())
- RTL87xx: 330 -> 283 (1.2x faster, replaces weak rand())
- ESP8266: 763 (unchanged, keeps os_random())

random_bytes() remains platform-specific hardware RNG for crypto use.
2026-03-19 13:17:24 -10:00
J. Nick Koston 8a28e40a9e Merge remote-tracking branch 'upstream/api-dump-progmem' into integration 2026-03-19 12:41:04 -10:00
J. Nick Koston 78b10a24b0 Move message_name() strings to flash via LOG_STR
message_name() returned bare string literals that stayed in RAM on
ESP8266. Change return type to const LogString * and wrap with LOG_STR()
so they are stored in flash. Update log_send_message_ to use
LOG_STR_ARG() accordingly.

Also fix clang-tidy: rename append_p_esp8266_ to append_p_esp8266,
add NOLINTNEXTLINE for conditionally-unused dump_field overloads.
2026-03-19 12:40:38 -10:00
J. Nick Koston 68340875dd Merge remote-tracking branch 'origin/api-dump-progmem' into integration 2026-03-19 12:38:52 -10:00
J. Nick Koston fb07c708b5 Move message_name() strings to flash via LOG_STR
message_name() returned bare string literals that stayed in RAM on
ESP8266. Change return type to const LogString * and wrap with LOG_STR()
so they are stored in flash. Update log_send_message_ to use
LOG_STR_ARG() accordingly.

Also fix clang-tidy: rename append_p_esp8266_ to append_p_esp8266,
add NOLINTNEXTLINE for conditionally-unused dump_field overloads.
2026-03-19 12:35:29 -10:00
J. Nick Koston 96616e3ccb Merge remote-tracking branch 'upstream/ci-ban-std-bind' into integration 2026-03-19 12:30:24 -10:00
J. Nick Koston 360207ca60 Merge remote-tracking branch 'upstream/api-dump-progmem' into integration 2026-03-19 12:30:22 -10:00
J. Nick Koston a79bb7f0fc Merge remote-tracking branch 'upstream/fix-mhz19-unused-warning' into integration 2026-03-19 12:30:07 -10:00
J. Nick Koston ad0c5cf5fa Merge remote-tracking branch 'upstream/esp32-sram1-as-iram' into integration 2026-03-19 12:30:01 -10:00