Commit Graph
22232 Commits
Author SHA1 Message Date
J. Nick Koston 4b59ea322a Merge remote-tracking branch 'origin/socket_ready_devirtualize' into integration 2026-02-10 17:41:47 -06:00
J. Nick Koston fd683a5609 [socket] Implement working ready() for LWIP raw TCP sockets (ESP8266/RP2040)
Previously ready() always returned true on ESP8266/RP2040, causing
every socket to be checked on every loop iteration even when no data
was available.

Override ready() in LWIPRawImpl to check rx_buf_/rx_closed_/pcb_ state,
and in LWIPRawListenImpl to check accepted_socket_count_. This uses
existing fields so no extra memory is needed per socket.

Keep ready() virtual only on the non-select path (ESP8266/RP2040) so
the select()-based path (ESP32) retains the non-virtual optimization
from the previous commit.
2026-02-10 17:37:42 -06:00
J. Nick Koston bc5bab7bc7 Merge remote-tracking branch 'origin/mdns-throttle-update-polling' into integration 2026-02-10 14:40:16 -06:00
J. Nick Koston 591c0e9c65 [mdns] Remove mDNS from per-iteration loop on ESP8266 and RP2040
On ESP8266 and RP2040, MDNS.update() was called every loop iteration
(~120 Hz) but only manages timer-driven probe/announce state machines.
Incoming mDNS packets are handled independently via the lwIP onRx UDP
callback and are unaffected by update() frequency.

Replace the loop() override with set_interval() at 50ms. This removes
the component from the loop list entirely via has_overridden_loop(),
eliminating all per-iteration overhead including virtual dispatch.

The 50ms interval provides sufficient resolution for all internal
timers (shortest is 250ms probe interval per RFC 6762 Section 8.1).
2026-02-10 14:37:46 -06:00
J. Nick Koston 16e5d4d172 Merge branch 'mdns-throttle-update-polling' into integration 2026-02-10 14:30:24 -06:00
J. Nick Koston 1b13f49e1b [mdns] Throttle MDNS.update() polling on ESP8266 and RP2040
On ESP8266 and RP2040, MDNS.update() is called every loop iteration
(~120 Hz) but only manages timer-driven probe/announce state machines.
Incoming mDNS packets are handled independently via the lwIP onRx UDP
callback and are unaffected by update() frequency.

The shortest internal timer is the 250ms probe interval (RFC 6762).
Throttling to 50ms provides sufficient resolution while reducing CPU
overhead by ~84% (from ~360ms to ~60ms per 60s measurement period).
2026-02-10 14:28:26 -06:00
J. Nick Koston d152438335 [libretiny] Update LibreTiny to v1.12.1 (#13851) 2026-02-10 20:07:09 +00:00
J. Nick Koston cf8f7ef0a1 Merge branch 'hardening/web-server-constant-time-compare' into integration
# Conflicts:
#	esphome/components/debug/debug_esp8266.cpp
#	esphome/components/rtttl/rtttl.cpp
2026-02-10 14:00:58 -06:00
J. Nick Koston e4b6bea51a Merge remote-tracking branch 'upstream/dev' into hardening/web-server-constant-time-compare
# Conflicts:
#	esphome/components/web_server_idf/web_server_idf.cpp
2026-02-10 13:57:43 -06:00
J. Nick Koston 868a2151e3 [web_server_idf] Reduce heap allocations by using stack buffers (#13549) 2026-02-10 13:56:12 -06:00
J. Nick Koston c65d3a0072 [mqtt] Add zero-allocation topic getters to MQTT_COMPONENT_CUSTOM_TOPIC macro (#13811) 2026-02-10 13:55:16 -06:00
J. Nick Koston e2fad9a6c9 [sprinkler] Convert state and request origin strings to PROGMEM_STRING_TABLE (#13806) 2026-02-10 13:55:01 -06:00
J. Nick Koston 5365faa877 [debug] Move ESP8266 switch tables to flash with PROGMEM_STRING_TABLE (#13813) 2026-02-10 13:54:48 -06:00
J. Nick KostonandCopilot 86feb4e27a [rtttl] Convert state_to_string to PROGMEM_STRING_TABLE (#13807)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-10 13:54:37 -06:00
J. Nick Koston 2a6d9d6325 [mqtt] Avoid heap allocation in on_log by using const char* publish overload (#13809) 2026-02-10 13:54:22 -06:00
J. Nick Koston 727bb27611 [bmp3xx_base/bmp581_base] Convert oversampling and IIR filter strings to PROGMEM_STRING_TABLE (#13808) 2026-02-10 13:54:07 -06:00
J. Nick Koston c03abcdb86 [http_request] Reduce heap allocations in update check by parsing JSON directly from buffer (#13588) 2026-02-10 13:53:53 -06:00
J. Nick Koston 1a6c67f92e [ssd1306_base] Move switch tables to PROGMEM with lookup tables (#13814) 2026-02-10 13:45:03 -06:00
J. Nick Koston 3f7178599a Merge remote-tracking branch 'origin/libretiny_1120' into integration 2026-02-10 13:16:03 -06:00
J. Nick Koston 19abc28aa9 Merge remote-tracking branch 'upstream/dev' into libretiny_1120
# Conflicts:
#	.clang-tidy.hash
2026-02-10 13:04:50 -06:00
J. Nick Koston bed3e7307d Merge remote-tracking branch 'upstream/socket_ready_devirtualize' into integration 2026-02-10 12:52:20 -06:00
J. Nick Koston 0e8d4da3fe Merge branch 'api-server-extract-accept' into integration 2026-02-10 12:51:36 -06:00
J. Nick Koston 419ea723b8 Merge remote-tracking branch 'upstream/dev' into api-server-extract-accept
# Conflicts:
#	esphome/components/api/api_server.cpp
2026-02-10 12:49:40 -06:00
J. Nick Koston 4a6eb0b16d [socket] Devirtualize Socket::ready() and get_fd() for hot loop path
Move fd_, closed_, and loop_monitored_ fields from BSD/LWIP socket
implementations to the base Socket class. Since only one socket
implementation is active per build, these can be non-virtual.

Make Socket::ready() and get_fd() non-virtual, eliminating vtable
dispatch on every main loop iteration. Inline is_socket_ready via
friendship for the fast path while keeping the public API with
bounds checking for external callers.

Saves ~316 bytes of flash on ESP32-IDF builds.
2026-02-10 12:30:20 -06:00
J. Nick Koston 2585779f11 [api] Remove duplicate peername storage to save RAM (#13540) 2026-02-11 07:23:16 +13:00
J. Nick Koston 7f88191856 Merge remote-tracking branch 'upstream/dev' into integration 2026-02-10 11:52:34 -06:00
Jonathan SwobodaandClaude Opus 4.6 b8ec3aab1d [ci] Pin ESP-IDF version for Arduino framework builds (#13909)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 12:16:25 -05:00
Jonathan SwobodaandClaude Opus 4.6 c4b109eebd [esp32_rmt_led_strip, remote_receiver, pulse_counter] Replace hardcoded clock frequencies with runtime queries (#13908)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 17:09:56 +00:00
Jonathan SwobodaandClaude Opus 4.6 03b41855f5 [esp32_hosted] Bump esp_wifi_remote and esp_hosted versions (#13911)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 16:03:26 +00:00
J. Nick Koston 458939df07 Merge remote-tracking branch 'origin/dev' into integration 2026-02-10 09:17:12 -06:00
Jonathan SwobodaandClaude Opus 4.6 13a124c86d [pulse_counter] Migrate from legacy PCNT API to new ESP-IDF 5.x API (#13904)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 10:10:27 -05:00
Kevin AhrendtandJ. Nick Koston 298efb5340 [resampler] Refactor for stability and to support Sendspin (#12254)
Co-authored-by: J. Nick Koston <nick@home-assistant.io>
2026-02-10 09:56:31 -05:00
J. Nick Koston d4ccc64dc0 [http_request] Fix IDF chunked response completion detection (#13886) 2026-02-10 08:55:59 -06:00
J. Nick Koston 402cf1eb43 Merge branch 'optimize_batching' into integration 2026-02-10 07:26:04 -06:00
J. Nick Koston a932ea343d [api] Split process_batch_ to reduce stack on single-message hot path
Clamp buffer pre-allocation to MAX_BATCH_PACKET_SIZE.
2026-02-10 07:23:22 -06:00
J. Nick Koston 6f4a26083f Merge branch 'optimize_batching' into integration 2026-02-10 07:11:06 -06:00
J. Nick Koston 937715c91c [api] Split process_batch_ to reduce stack on single-message hot path
Clamp buffer pre-allocation to MAX_BATCH_PACKET_SIZE.
2026-02-10 07:09:45 -06:00
J. Nick Koston 7f0b86a5cc Merge branch 'optimize_batching' into integration 2026-02-10 06:51:54 -06:00
J. Nick Koston bab8d1e8b2 optimize batching 2026-02-10 06:50:13 -06:00
e3141211c3 [water_heater] Add On/Off and Away mode support to template platform (#13839)
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: J. Nick Koston <nick@home-assistant.io>
2026-02-10 12:45:18 +00:00
J. Nick Koston aed45d15f0 Merge remote-tracking branch 'upstream/dev' into integration 2026-02-10 06:25:09 -06:00
J. Nick Koston 75c952eaef Merge branch 'template_water_heater_onoff' into integration 2026-02-10 06:21:45 -06:00
J. Nick Koston 1b3f3c04b9 Use mutable globals in water heater test fixture
Use globals for away/is_on lambdas and sync them in set_action
so optimistic state changes persist across loop iterations.
2026-02-10 06:17:52 -06:00
J. Nick Koston 6410c6cf9b improve tests 2026-02-10 06:14:41 -06:00
J. Nick Koston 0503760af4 Add integration tests for toggling away and on/off state flags 2026-02-10 06:09:18 -06:00
J. Nick Koston 820afea83a Fix publish action skipping away: false and is_on: false
The walrus operator treats false as falsy, so publishing
away: false or is_on: false was silently ignored. Use key
presence check instead.
2026-02-10 06:06:54 -06:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> e85a022c77 Bump esphome-dashboard from 20260110.0 to 20260210.0 (#13905)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-10 11:49:59 +00:00
J. Nick Koston 22b038f6a4 Import WaterHeaterFeature from aioesphomeapi instead of redefining locally 2026-02-10 05:47:46 -06:00
J. Nick Koston 3410ee2420 Merge branch 'dev' into template_water_heater_onoff 2026-02-10 05:46:27 -06:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 1c3af30299 Bump aioesphomeapi from 43.14.0 to 44.0.0 (#13906)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-10 11:45:31 +00:00