diff --git a/.clang-tidy.hash b/.clang-tidy.hash index 55239f961c..a1dcdf5799 100644 --- a/.clang-tidy.hash +++ b/.clang-tidy.hash @@ -1 +1 @@ -a172e2f65981e98354cc6b5ecf69bdb055dd13602226042ab2c7acd037a2bf41 +08c21fa4c044fd80c8f3296371f30c4f5ff3418f1bc1efe63c5bad938301f122 diff --git a/esphome/components/async_tcp/__init__.py b/esphome/components/async_tcp/__init__.py index 1ff4805f03..2a07903b68 100644 --- a/esphome/components/async_tcp/__init__.py +++ b/esphome/components/async_tcp/__init__.py @@ -38,8 +38,10 @@ async def to_code(config): # https://github.com/ESP32Async/ESPAsyncTCP cg.add_library("ESP32Async/ESPAsyncTCP", "2.0.0") elif CORE.is_rp2040: - # https://github.com/khoih-prog/AsyncTCP_RP2040W - cg.add_library("khoih-prog/AsyncTCP_RP2040W", "1.2.0") + # https://github.com/ayushsharma82/RPAsyncTCP + # RPAsyncTCP is a drop-in replacement for AsyncTCP_RP2040W with better + # ESPAsyncWebServer compatibility + cg.add_library("ayushsharma82/RPAsyncTCP", "1.3.2") # Other platforms (host, etc) use socket-based implementation diff --git a/esphome/components/async_tcp/async_tcp.h b/esphome/components/async_tcp/async_tcp.h index 6d9211f023..21fcfe239f 100644 --- a/esphome/components/async_tcp/async_tcp.h +++ b/esphome/components/async_tcp/async_tcp.h @@ -8,8 +8,8 @@ // Use ESPAsyncTCP library for ESP8266 (always Arduino) #include #elif defined(USE_RP2040) -// Use AsyncTCP_RP2040W library for RP2040 -#include +// Use RPAsyncTCP library for RP2040 +#include #else // Use socket-based implementation for other platforms #include "async_tcp_socket.h" diff --git a/esphome/components/web_server/__init__.py b/esphome/components/web_server/__init__.py index 3f1e094afc..8b02a6baee 100644 --- a/esphome/components/web_server/__init__.py +++ b/esphome/components/web_server/__init__.py @@ -31,6 +31,7 @@ from esphome.const import ( PLATFORM_ESP32, PLATFORM_ESP8266, PLATFORM_LN882X, + PLATFORM_RP2040, PLATFORM_RTL87XX, ) from esphome.core import CORE, CoroPriority, coroutine_with_priority @@ -213,6 +214,7 @@ CONFIG_SCHEMA = cv.All( PLATFORM_ESP8266, PLATFORM_BK72XX, PLATFORM_LN882X, + PLATFORM_RP2040, PLATFORM_RTL87XX, ] ), diff --git a/esphome/components/web_server_base/__init__.py b/esphome/components/web_server_base/__init__.py index e0eec7dedb..6c756575d4 100644 --- a/esphome/components/web_server_base/__init__.py +++ b/esphome/components/web_server_base/__init__.py @@ -47,5 +47,10 @@ async def to_code(config): cg.add_library("ESP8266WiFi", None) if CORE.is_libretiny: CORE.add_platformio_option("lib_ignore", ["ESPAsyncTCP", "RPAsyncTCP"]) + if CORE.is_rp2040: + # Ignore bundled AsyncTCP libraries - we use RPAsyncTCP from async_tcp component + CORE.add_platformio_option( + "lib_ignore", ["ESPAsyncTCP", "AsyncTCP", "AsyncTCP_RP2040W"] + ) # https://github.com/ESP32Async/ESPAsyncWebServer/blob/main/library.json cg.add_library("ESP32Async/ESPAsyncWebServer", "3.9.5") diff --git a/platformio.ini b/platformio.ini index accc40ecf2..c5a6768ad2 100644 --- a/platformio.ini +++ b/platformio.ini @@ -200,6 +200,7 @@ platform_packages = framework = arduino lib_deps = ${common:arduino.lib_deps} + ayushsharma82/RPAsyncTCP@1.3.2 ; async_tcp bblanchon/ArduinoJson@7.4.2 ; json ESP32Async/ESPAsyncWebServer@3.9.5 ; web_server_base build_flags = diff --git a/tests/components/web_server/test.rp2040-ard.yaml b/tests/components/web_server/test.rp2040-ard.yaml new file mode 100644 index 0000000000..7e6658e20e --- /dev/null +++ b/tests/components/web_server/test.rp2040-ard.yaml @@ -0,0 +1 @@ +<<: !include common_v2.yaml