Commit Graph
24609 Commits
Author SHA1 Message Date
J. Nick Koston acdc24971c Merge remote-tracking branch 'origin/fix-rp2040-testing-mode-flash' into integration 2026-03-12 13:38:56 -10:00
J. Nick Koston 5203305060 Merge remote-tracking branch 'origin/fix-rp2040-crash-handler-section-attr' into integration 2026-03-12 13:38:48 -10:00
J. Nick Koston 1b78f55bdf Merge branch 'fix-rp2040-i2c-bus-selection' into integration 2026-03-12 13:38:29 -10:00
J. Nick Koston 975854bd9f Merge remote-tracking branch 'upstream/fix-wifi-eap-rp2040-validation' into integration 2026-03-12 13:38:21 -10:00
J. Nick KostonandClaude Opus 4.6 ce2e0381c1 [rp2040] Use full flash for sketch in testing mode
In testing mode, set filesystem_size to 0m so the full 2MB flash is
available for the sketch partition. This prevents linker overflow when
CI groups many components into a single build, matching the approach
used by ESP8266's testing mode.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 13:34:20 -10:00
J. Nick KostonandCopilot fb88550a8d Update esphome/components/mdns/mdns_rp2040.cpp
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-12 13:31:53 -10:00
J. Nick Koston d7310fff32 [wifi] Reject EAP/WPA2 Enterprise config on unsupported platforms
WPA2 Enterprise (EAP) is only implemented for ESP32 and ESP8266 but the
config schema accepted it on all platforms. On RP2040 this caused a
bootloop with no useful error message. Now rejects EAP config at
validation time on unsupported platforms.

Closes https://github.com/esphome/esphome/issues/14743
2026-03-12 13:26:44 -10:00
J. Nick Koston 32e8efb7b7 Use formula-based description instead of incomplete GPIO pin lists
Addresses review feedback: the hard-coded pin lists only covered RP2040
GPIOs and were incomplete for RP2350 (GPIO up to 47). Now describes the
(gpio / 2) % 2 rule instead.
2026-03-12 13:24:27 -10:00
J. Nick Koston 75a546bd96 Add datasheet references for RP2040/RP2350 I2C pin mapping 2026-03-12 13:21:03 -10:00
J. Nick Koston 0400c2d3a3 [i2c] Fix RP2040 I2C bus selection based on pin assignment instead of definition order
The RP2040 I2C bus was previously assigned Wire/Wire1 based on the order
I2C buses were defined in YAML, not based on which GPIO pins were used.
This caused I2C1 to not work when only a single bus was configured with
I2C1 pins (e.g., GPIO6/GPIO7).

Now selects the correct Wire instance using the RP2040/RP2350 GPIO pin
mapping formula: (pin / 2) % 2. Also adds config validation to catch
SDA/SCL pin mismatches and duplicate controller assignments.

Closes https://github.com/esphome/esphome/issues/14742
2026-03-12 13:19:20 -10:00
J. Nick Koston 6e3b2743fa Merge branch 'fix-rp2040-debug-reset-reason' into integration 2026-03-12 12:43:46 -10:00
J. Nick Koston 2cb758899c Document str param as non-null in buf_append_str 2026-03-12 12:43:25 -10:00
J. Nick Koston 5faa34886d Avoid dangling else across preprocessor boundary 2026-03-12 12:42:39 -10:00
J. Nick Koston 7f8e12a679 Merge fix-rp2040-debug-reset-reason into integration 2026-03-12 12:27:07 -10:00
J. Nick Koston 1017ce87d6 [debug] Implement reset reason for RP2040/RP2350
The debug component's reset reason text sensor was returning an empty
string on RP2040/RP2350 platforms. Read the chip reset registers to
report the actual reset source.

RP2040: reads VREG_AND_CHIP_RESET for POR and RUN pin.
RP2350: reads POWMAN chip_reset for POR, brown-out, RUN pin, and
power supply glitch.
Both: checks watchdog_caused_reboot() from the Pico SDK, and
distinguishes between crash (HardFault), watchdog timeout, and
software reset by consulting the crash handler data.

Also adds buf_append_str() helper to helpers.h for efficient plain
string appends without format parsing overhead.
2026-03-12 12:26:37 -10:00
J. Nick Koston 9826af8af1 Merge remote-tracking branch 'origin/fix-rp2040-crash-handler-section-attr' into integration 2026-03-12 12:19:57 -10:00
J. Nick Koston 06cb1839f2 [rp2040] Fix compiler warnings in crash_handler and mdns
Fix two GCC warnings on RP2040 builds:

1. crash_handler.cpp: Move __attribute__((section(".noinit"))) from
   the struct type to the variable declaration where it belongs.

2. mdns_rp2040.cpp: Suppress IRAM_ATTR macro redefinition warning
   caused by Arduino-Pico's PolledTimeout.h redefining it to empty.
2026-03-12 12:19:38 -10:00
J. Nick Koston 1e3925c5a3 Merge remote-tracking branch 'origin/fix-rp2040-crash-handler-section-attr' into integration 2026-03-12 12:17:20 -10:00
J. Nick Koston 5da6fff7be Merge remote-tracking branch 'upstream/fix-rp2040-debug-reset-reason' into integration 2026-03-12 12:17:08 -10:00
J. Nick Koston 662f14e10b [debug] Implement reset reason for RP2040/RP2350
The debug component's reset reason text sensor was returning an empty
string on RP2040/RP2350 platforms. Read the chip reset registers to
report the actual reset source.

RP2040: reads VREG_AND_CHIP_RESET for POR, RUN pin, and debug port.
RP2350: reads POWMAN chip_reset for POR, brown-out, RUN pin, watchdog
variants, glitch detect, debugger, rescue, and core powerdown.
Both: checks watchdog_caused_reboot() from the Pico SDK.

Also adds buf_append_str() helper to helpers.h for efficient plain
string appends without format parsing overhead.
2026-03-12 12:16:16 -10:00
J. Nick Koston 35d060154c [rp2040] Fix -Wattributes warning in crash_handler
Move __attribute__((section(".noinit"))) from the struct type to the
variable declaration where it belongs. GCC warns because the section
attribute applies to variables, not types.
2026-03-12 12:13:58 -10:00
J. Nick Koston 3fb393456c Merge remote-tracking branch 'origin/fix-rp2040-mdns-reconnect' into integration 2026-03-12 12:06:21 -10:00
J. Nick Koston c7560f6878 [mdns] Fix RP2040 mDNS not restarting after WiFi reconnect
The RP2040's LEAmDNS library relies on LwipIntf::stateUpCB() to
restart mDNS when the network interface reconnects. However, this
callback is stubbed out in arduino-pico because the original ESP8266
implementation used schedule_function() which doesn't exist in
arduino-pico, and the callback can't safely run directly since netif
status callbacks fire from IRQ context while _restart() allocates
UDP sockets.

The previous workaround blocked all component setup via can_proceed()
until WiFi connected, which only helped on initial boot but did not
handle reconnects.

Replace with a proper fix: detect WiFi reconnection from the existing
50ms mDNS update interval (main loop context) and call
MDNS.notifyAPChange() to restart mDNS probing and announcing.
2026-03-12 12:05:32 -10:00
J. Nick Koston c1a4320c62 Merge remote-tracking branch 'origin/fix-rp2040-mdns-reconnect' into integration 2026-03-12 11:58:57 -10:00
J. Nick Koston f869bbcfa6 Merge remote-tracking branch 'origin/captive-portal-auth-bypass' into integration 2026-03-12 11:58:52 -10:00
J. Nick Koston b0dd029e9b Merge remote-tracking branch 'origin/fix-light-set-effect-ambiguous-overload' into integration 2026-03-12 11:58:45 -10:00
J. Nick Koston 4d7ab65ab6 Merge branch 'refactor/sliding-window-static-ring-buffer' into integration 2026-03-12 11:58:34 -10:00
J. Nick Koston f6d3ce7eb3 [mdns] Fix RP2040 mDNS not restarting after WiFi reconnect
The RP2040's LEAmDNS library relies on LwipIntf::stateUpCB() to
restart mDNS when the network interface reconnects. However, this
callback is stubbed out in arduino-pico because the original ESP8266
implementation used schedule_function() which doesn't exist in
arduino-pico, and the callback can't safely run directly since netif
status callbacks fire from IRQ context while _restart() allocates
UDP sockets.

The previous workaround blocked all component setup via can_proceed()
until WiFi connected, which only helped on initial boot but did not
handle reconnects.

Replace with a proper fix: detect WiFi reconnection from the existing
50ms mDNS update interval (main loop context) and call
MDNS.notifyAPChange() to restart mDNS probing and announcing.
2026-03-12 11:55:03 -10:00
J. Nick Koston 7ce12c31f3 add clear for https://github.com/esphome/esphome/pull/14733 2026-03-12 11:19:34 -10:00
J. Nick Koston bdf7608990 [sensor] Add FixedRingBuffer and use it in SlidingWindowFilter
Add FixedRingBuffer<T, MAX_CAPACITY> to helpers.h as the runtime-sized
equivalent of StaticRingBuffer. Uses std::conditional_t to auto-select
uint8_t/uint16_t/uint32_t index types based on MAX_CAPACITY.

Convert SlidingWindowFilter from manual ring buffer logic on FixedVector
to FixedRingBuffer<float>, eliminating window_head_, window_count_,
and window_size_ fields.
2026-03-12 11:07:35 -10:00
J. Nick KostonandCopilot 2f4d7eae05 Update esphome/components/web_server_base/web_server_base.h
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-12 10:15:58 -10:00
J. Nick Koston b20a2a12a8 [captive_portal] Fix captive portal inaccessible when web_server auth is configured
Closes https://github.com/esphome/esphome/issues/12710
2026-03-12 10:06:07 -10:00
J. Nick Koston 2c087bc2e1 Add test for set_effect with const char* literal
Ensures the const char* overload resolves the ambiguous call
reported in #14728.
2026-03-12 08:13:25 -10:00
J. Nick Koston 8884a0d163 [light] Fix ambiguous set_effect overload for const char*
When calling set_effect("None") from a lambda, the compiler cannot
choose between set_effect(optional<std::string>) and
set_effect(const std::string&) since both require one implicit
conversion from const char*. Add explicit const char* overload to
resolve the ambiguity.

Fixes https://github.com/esphome/esphome/issues/14728
2026-03-12 07:52:07 -10:00
J. Nick Koston 05d285ba86 [api] Fix heap-buffer-overflow in protobuf message dump for StringRef (#14721) 2026-03-12 07:16:53 -10:00
J. Nick Koston 186ca4e458 [uart] Allow hardware UART with single pin on RP2040 (#14725) 2026-03-12 07:16:38 -10:00
J. Nick Koston 618312f0ee [api] Fix undefined behavior in noise handshake with empty rx buffer (#14722) 2026-03-12 07:16:23 -10:00
J. Nick Koston 70d188202a [adc] Fix PICO_VSYS_PIN compile error on RP2350 boards (#14724) 2026-03-12 07:16:08 -10:00
J. Nick Koston 4a21afe7ce [ota][socket] Fix ESP8266/RP2040 OTA timeout by using SO_RCVTIMEO instead of polling (#14675) 2026-03-12 07:15:48 -10:00
J. Nick KostonandCopilot fd1d016795 [time] Fix settimeofday() failure on ESP8266 (#14707)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-12 07:15:34 -10:00
J. Nick KostonandClaude Opus 4.6 03c091adfc [esp32_ble_client] Fix disconnect race that causes stuck connections (#14211)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 07:15:21 -10:00
J. Nick Koston a3a88acfcf [socket] Fast path for TCP_NODELAY bypasses lwip_setsockopt overhead (#14693) 2026-03-12 07:15:04 -10:00
J. Nick Koston 07f8ae6c82 [socket] Fix use-after-free in LWIP PCB close/abort path (#14706) 2026-03-12 07:14:49 -10:00
Matthias Königandpre-commit-ci-lite[bot] 25c30ac5bb [mqtt] Fixed permission denied error for client certificates on Windows (#13525)
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
2026-03-12 12:00:08 -04:00
guillempagesandJonathan Swoboda a76767a0ab [runtime_image] Update jpegdec lib version (#14726)
Co-authored-by: Jonathan Swoboda <154711427+swoboda1337@users.noreply.github.com>
2026-03-12 10:15:20 -04:00
Kevin Ahrendt 511d185772 [audio] Bump microOpus to v0.3.5 (#14727) 2026-03-12 08:56:01 -04:00
Brian Kaufman c4c19c8a6c [web_server] use DETAIL_ALL in update_all_json_generator (#14711) 2026-03-11 23:07:26 -10:00
Massimo Antonello fe2d60ccec [one_wire] allow changing address at runtime (#12150) 2026-03-12 01:52:58 -07:00
Keith Burzinski 657890695f [ledc] Fix high-pressure crash & recovery (#14720) 2026-03-12 03:16:02 -05:00
J. Nick Koston 69997bb486 Merge remote-tracking branch 'origin/ota-so-rcvtimeo' into integration 2026-03-11 22:08:30 -10:00