Commit Graph
23987 Commits
Author SHA1 Message Date
J. Nick Koston e1fef3aa2a Merge branch 'integration' of https://github.com/esphome/esphome into integration 2026-03-05 07:34:44 -10:00
J. Nick Koston 414bf6120e Merge branch 'wifi-cache-is-connected' into integration 2026-03-05 07:33:53 -10:00
J. Nick KostonandJonathan Swoboda 7b05ad690b Update esphome/components/wifi/wifi_component.cpp
Co-authored-by: Jonathan Swoboda <154711427+swoboda1337@users.noreply.github.com>
2026-03-05 07:33:29 -10:00
J. Nick Koston 60cab9b784 Merge branch 'dev' into wifi-cache-is-connected 2026-03-05 07:30:52 -10:00
J. Nick Koston 2777d35990 [api] Devirtualize frame helper calls when protocol is fixed at compile time (#14468) 2026-03-05 07:21:44 -10:00
J. Nick KostonandCopilot c49c23d5d9 [network] Inline network::is_connected() and ethernet is_connected() (#14464)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-05 07:21:04 -10:00
J. Nick Koston 8c6fa636c9 Merge branch 'dev' into wifi-cache-is-connected 2026-03-05 01:28:47 -10:00
J. Nick Koston ca67a667fa Merge branch 'enable-captive-portal-rp2040' into integration 2026-03-05 01:17:46 -10:00
J. Nick Koston 980b55710a Merge remote-tracking branch 'origin/fix-rp2040-wifi-ap-fallback' into enable-captive-portal-rp2040 2026-03-05 01:17:33 -10:00
J. Nick Koston 296b412bd3 Fix AP not being disabled and ap_started_ when ap is nullopt 2026-03-05 01:16:37 -10:00
J. Nick Koston a84b04fa91 Merge branch 'enable-captive-portal-rp2040' into integration 2026-03-05 01:15:22 -10:00
J. Nick Koston 7b071793fb [captive_portal] Enable support for RP2040 2026-03-05 01:15:02 -10:00
J. Nick Koston 2789884133 Use is_connected_() for wifi_rssi() to check internal state 2026-03-05 01:14:52 -10:00
J. Nick Koston 31e4da5543 Merge branch 'enable-captive-portal-rp2040' into integration 2026-03-05 01:08:01 -10:00
J. Nick Koston caa50ca199 [captive_portal] Enable support for RP2040 2026-03-05 01:06:46 -10:00
J. Nick Koston 1ea0ea935f Remove debug logging 2026-03-05 00:52:24 -10:00
J. Nick Koston 837ac62b7e fix 2026-03-05 00:46:52 -10:00
J. Nick Koston 58329c52de bump 2026-03-05 00:37:42 -10:00
J. Nick Koston fc07796acf [wifi] Remove WiFi.disconnect() from wifi_mode_ to fix AP_STA mode
WiFi.disconnect() sets _wifiHWInitted=false and _mode=WIFI_OFF, which
causes beginAP to run in AP-only mode (_mode=WIFI_AP). In AP-only mode,
subsequent beginNoBlock() calls hit the ESP8266 compatibility hack in
_beginInternal that redirects to beginAP() instead of starting a STA
connection, creating a connect/disconnect loop.

Without WiFi.disconnect(), _wifiHWInitted stays true and beginAP
correctly enters AP_STA mode, allowing STA reconnection attempts to
work properly alongside the fallback AP.

The wifi_sta_connected() helper from the previous commit is sufficient
to prevent false CONNECTED reports by checking WiFi.localIP() instead
of the AP-contaminated WiFi.status().
2026-03-05 00:05:22 -10:00
J. Nick Koston de85e75bfb fix 2026-03-04 23:58:42 -10:00
J. Nick Koston b71965b031 fix 2026-03-04 23:56:27 -10:00
J. Nick Koston bad6a62226 [wifi] Fix RP2040 falsely reporting WiFi connected after AP fallback
Two bugs combined to make the RP2040 Pico W immediately think it was
connected to WiFi after starting the fallback AP, causing it to disable
the AP and stop retrying:

1. wifi_mode_(false, {}) was a no-op for STA disable — restart_adapter()
   calls this to tear down STA, but the implementation only handled
   sta=true. The CYW43 STA link state remained CYW43_LINK_JOIN from
   the timed-out connection attempt.

2. wifi_ap_ip_config_() called WiFi.config(192.168.4.1) which configured
   the STA interface's IP (not the AP's). When wifi_sta_connect_status_()
   checked WiFi.status(), CYW43lwIP::status() saw CYW43_LINK_JOIN +
   localIP().isSet() and returned WL_CONNECTED.

Fix wifi_mode_() to call WiFi.disconnect() when sta=false to clear stale
link state. Remove the WiFi.config() call from wifi_ap_ip_config_() since
WiFi.beginAP() already configures the AP IP internally. Also fix
wifi_soft_ap_ip() to use WiFi.softAPIP() instead of WiFi.localIP().
2026-03-04 23:39:58 -10:00
J. Nick Koston 17b1f59bda Merge remote-tracking branch 'origin/integration' into integration 2026-03-04 23:22:55 -10:00
J. Nick Koston 445e049976 Merge branch 'rp2040-socket-wake' into integration 2026-03-04 23:22:36 -10:00
J. Nick Koston 1a353fedc2 Wire wake_loop_any_context() for RP2040 via socket_wake() 2026-03-04 23:22:13 -10:00
J. Nick Koston 89f190af56 Merge branch 'rp2040-socket-wake' into integration 2026-03-04 22:52:49 -10:00
J. Nick Koston 1e2c892139 Consume pre-existing socket_wake before sleeping 2026-03-04 22:52:42 -10:00
J. Nick Koston 3c90c0bf28 Merge branch 'rp2040-socket-wake' into integration 2026-03-04 22:50:52 -10:00
J. Nick Koston fe20550127 Add comment explaining why no IRAM_ATTR needed on RP2040 2026-03-04 22:50:13 -10:00
J. Nick Koston bd82c83f3a Simplify alarm failure fallback to delay(ms) 2026-03-04 22:48:41 -10:00
J. Nick Koston 9310d78ed3 Merge remote-tracking branch 'origin/integration' into integration 2026-03-04 22:48:20 -10:00
J. Nick Koston ca49741daa Merge remote-tracking branch 'origin/integration' into integration 2026-03-04 22:40:41 -10:00
J. Nick Koston 2d862c9cb6 Merge remote-tracking branch 'upstream/rp2040-socket-wake' into integration 2026-03-04 22:40:31 -10:00
J. Nick Koston eed6d396b2 Address review: yield on ms==0, fallback on alarm failure, fix stale comment 2026-03-04 22:40:06 -10:00
J. Nick Koston 6e99bc96a2 Merge remote-tracking branch 'upstream/rp2040-socket-wake' into integration 2026-03-04 22:37:44 -10:00
J. Nick Koston 6401165398 Merge remote-tracking branch 'upstream/rp2040-socket-wake' into integration 2026-03-04 22:32:45 -10:00
J. Nick Koston 12616bcc60 Code quality: consistent elif includes, fix callback name, handle alarm error 2026-03-04 22:31:35 -10:00
J. Nick Koston 8050fa6801 Use #elif for mutually exclusive platform guards 2026-03-04 22:30:28 -10:00
J. Nick Koston 6af723e87d [socket] Add socket wake support for RP2040
Enable instant wake on socket activity for RP2040 using ARM WFE/SEV
hardware instructions, matching ESP8266's esp_delay/esp_schedule pattern.

Previously, RP2040 used plain delay() in the main loop which could not
be interrupted by incoming socket data. Now LWIP recv/accept callbacks
call socket_wake() which sets a flag and sends a hardware event (__sev)
to wake the main loop from __wfe() sleep immediately.

The implementation uses a one-shot pico-sdk timer alarm for timeout
(same pattern as ESP8266's os_timer_arm) combined with __wfe() for
true hardware sleep between events.
2026-03-04 22:28:04 -10:00
rwrozelleandJ. Nick Koston 0e2a10c5f0 [openthread] Cache is_connected() for cheap inline access (#14484)
Co-authored-by: J. Nick Koston <nick@home-assistant.io>
2026-03-04 17:34:13 -10:00
Clyde Stubbs f5c37bf486 [packet_transport] Minimise heap allocations (#14482) 2026-03-05 14:24:01 +11:00
J. Nick KostonandClaude Opus 4.6 0ff5270632 [ci] Fix codeowner approval label workflow for fork PRs (#14490)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 16:57:19 -10:00
J. Nick Koston 97f7bd98a9 Merge remote-tracking branch 'upstream/dev' into integration 2026-03-04 16:45:10 -10:00
J. Nick Koston 5df4fd0a27 [tests] Fix flaky uart_mock integration tests (#14476) 2026-03-04 15:51:51 -10:00
c0143ac6d6 [ai] Add docs note about keeping component index pages in sync (#14465)
Co-authored-by: Brandon Harvey <bharvey88@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2026-03-04 15:46:40 -10:00
J. Nick Koston cfc74ad638 Merge branch 'rp2040-upload-improvements' into integration 2026-03-04 14:25:09 -10:00
J. Nick Koston f886aa7f9a [rp2040] Fix firmware.bin.signed creation for nobuild upload
Move signed bin creation from post_build script to upload_using_platformio.
The post_build AddPostAction only runs during build, not during nobuild
upload, so the file was missing when PlatformIO tried to upload.
Now create firmware.bin.signed before calling PlatformIO upload.
2026-03-04 14:24:48 -10:00
J. Nick Koston 1d85fa8ed3 Merge remote-tracking branch 'upstream/dev' into integration 2026-03-04 14:18:36 -10:00
J. Nick Koston d30175d84d Merge branch 'rp2040-upload-improvements' into integration 2026-03-04 14:18:29 -10:00
J. Nick Koston d856046830 [rp2040] Add test coverage for Linux and Windows mass storage detection
Add tests for get_rp2040_mass_storage_volumes() on Linux, Windows,
and unsupported platforms to improve test coverage.
2026-03-04 14:12:39 -10:00