Commit Graph
23181 Commits
Author SHA1 Message Date
J. Nick Koston 59a2f6f538 Add comment explaining early guard 2026-02-09 09:28:51 -06:00
J. Nick Koston a9c37cae26 Add comment explaining early guard 2026-02-09 09:28:32 -06:00
J. Nick Koston c8a93f31e9 Add comment explaining early guard 2026-02-09 09:28:15 -06:00
J. Nick Koston f79448a09a Remove verbose available() comment 2026-02-09 09:27:57 -06:00
J. Nick Koston 5e096826c3 Remove verbose available() comment 2026-02-09 09:27:42 -06:00
J. Nick Koston 457d68256d Keep early guard to avoid stack buffer allocation 2026-02-09 09:27:20 -06:00
J. Nick Koston a9029fb67a Keep early guard to avoid stack buffer allocation 2026-02-09 09:27:05 -06:00
J. Nick Koston cd891d4b16 Keep early guard to avoid stack buffer allocation 2026-02-09 09:26:50 -06:00
J. Nick Koston 2784059a64 Keep early guard to avoid stack buffer allocation 2026-02-09 09:26:29 -06:00
J. Nick Koston 4827f53156 Keep early guard to avoid stack buffer allocation 2026-02-09 09:26:13 -06:00
J. Nick Koston 8dff0ee449 Remove redundant early guard 2026-02-09 09:25:23 -06:00
J. Nick Koston a7f04a6cf9 Remove redundant early guard 2026-02-09 09:25:05 -06:00
J. Nick Koston 53bde863f5 Remove redundant early guard 2026-02-09 09:24:50 -06:00
J. Nick Koston dfb0c8670d Remove redundant early guard 2026-02-09 09:24:34 -06:00
J. Nick Koston 7490efedd7 Remove redundant early guard 2026-02-09 09:24:15 -06:00
c28c97fbaf [mixer] Refactor for stability and to support Sendspin (#12253)
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: J. Nick Koston <nick+github@koston.org>
2026-02-09 10:19:00 -05:00
J. Nick Koston e24bb092e5 Merge branch 'merge_read_message' into no_gen_empty_messages 2026-02-09 09:09:30 -06:00
J. Nick Koston 9c74efe265 Merge remote-tracking branch 'upstream/dev' into merge_read_message 2026-02-09 08:49:04 -06:00
J. Nick Koston 3cde3daceb [api] Collapse APIServerConnection intermediary layer (#13872) 2026-02-09 08:45:33 -06:00
J. Nick Koston be4e573cc4 [esp32_hosted] Replace set_retry with set_interval to avoid heap allocation (#13844) 2026-02-09 08:45:18 -06:00
J. Nick Koston 66af998098 [dashboard] Handle malformed Basic Auth headers gracefully (#13866) 2026-02-09 08:45:03 -06:00
J. Nick Koston 938a11595d [speaker] Replace set_retry with set_interval to avoid heap allocation (#13843) 2026-02-09 08:44:50 -06:00
J. Nick Koston c812ac8b29 [ms8607] Replace set_retry with set_timeout chain to avoid heap allocation (#13842) 2026-02-09 08:44:35 -06:00
J. Nick Koston 248fc06dac [scheduler] Eliminate heap allocation in full_cleanup_removed_items_ (#13837) 2026-02-09 08:44:20 -06:00
J. Nick Koston 8b8acb3b27 [dashboard] Use constant-time comparison for username check (#13865) 2026-02-09 08:31:06 -06:00
J. Nick Koston 1c60efa4b6 [ota] Use secrets module for OTA authentication cnonce (#13863) 2026-02-09 08:30:49 -06:00
J. Nick Koston 4ef238eb7b [analyze-memory] Attribute third-party library symbols via nm scanning (#13878) 2026-02-09 08:26:03 -06:00
J. Nick Koston c990da265a Add unit tests for FlashStringLiteral
Cover the three lines reported uncovered by codecov in
cpp_generator.py (FlashStringLiteral.__init__ and __str__).
2026-02-09 07:45:03 -06:00
J. Nick Koston 91487e7f14 [api] Store HomeAssistant action strings in PROGMEM on ESP8266
On ESP8266, .rodata is copied to RAM at boot. Every string literal in
HomeAssistantServiceCallAction (service names, data keys, data values)
permanently consumes RAM even though the action may rarely fire.

Add FLASH_STRING type to TemplatableValue that stores PROGMEM pointers
on ESP8266 via the existing __FlashStringHelper* type. At play() time,
strings are copied from flash to temporary std::string storage — safe
because service calls are not in the hot path.

Add FlashStringLiteral codegen helper (cg.FlashStringLiteral) that wraps
strings in ESPHOME_F() — expands to F() on ESP8266 (PROGMEM), plain
string on other platforms (no-op). This helper can be adopted by other
components incrementally.

On non-ESP8266 platforms, FLASH_STRING is never set and all existing
code paths are unchanged.
2026-02-09 07:39:06 -06:00
J. Nick Koston ce5b93d9ca Merge branch 'dev' into compact_string_wifi 2026-02-09 07:24:27 -06:00
J. Nick Koston 5e8f9c938e Merge branch 'scheduler_uint32t_core_filters' into integration 2026-02-09 06:45:29 -06:00
J. Nick Koston 22c77866d8 [e131] Remove unnecessary heap allocation from packet receive loop (#13852) 2026-02-09 06:42:26 -06:00
J. Nick Koston 790ac620ab [web_server_idf] Use C++17 nested namespace style (#13856) 2026-02-09 06:42:12 -06:00
J. Nick Koston 4b92465afd [scheduler] Fix stale bitfield comments for name_type_ 2026-02-09 06:39:03 -06:00
J. Nick Koston 65c2b29678 Merge remote-tracking branch 'origin/integration' into integration 2026-02-09 06:33:05 -06:00
J. Nick Koston a6345eea08 Merge branch 'scheduler_uint32t_core_filters' into integration 2026-02-09 06:32:01 -06:00
J. Nick Koston 78ddacd766 [scheduler] Update NameType comment to mention internal numeric IDs 2026-02-09 06:26:53 -06:00
J. Nick Koston dd2c5838e1 [scheduler] Use enum class for InternalSchedulerID to avoid materialized constant
The struct + constexpr namespace approach caused the compiler to
materialize POLLING_UPDATE as a 4-byte symbol. An enum class with
uint32_t underlying type gives the same type safety but enum values
are true compile-time constants that never get materialized.
2026-02-09 06:25:55 -06:00
J. Nick Koston d9f7c26b16 Revert "[scheduler] Inline all trivial Scheduler forwarding methods"
This reverts commit d2728f2ccd.
2026-02-09 06:24:49 -06:00
J. Nick Koston d2728f2ccd [scheduler] Inline all trivial Scheduler forwarding methods
Move all set_timeout, cancel_timeout, set_interval, cancel_interval
overloads (const char*, uint32_t, std::string) from scheduler.cpp to
inline in scheduler.h. These are all trivial one-liner forwarding calls
to set_timer_common_ or cancel_item_ and benefit from inlining at
call sites rather than being separate symbols.
2026-02-09 06:16:49 -06:00
J. Nick Koston 769d4e4444 [scheduler] Inline InternalSchedulerID overloads to eliminate code size overhead
Move the 4 Scheduler InternalSchedulerID methods from .cpp to inline
in the header. They're trivial one-liners that extract .id and forward
to set_timer_common_/cancel_item_, so the compiler can fold them into
call sites instead of emitting separate function bodies.
2026-02-09 06:07:49 -06:00
J. Nick Koston 3d2b9641a4 [scheduler] Add integration test for internal vs numeric ID isolation
Verifies that NUMERIC_ID_INTERNAL and NUMERIC_ID are completely
independent matching namespaces — same uint32_t value on the same
component does not collide. Tests that cancelling one type does not
affect the other, and that string names also don't cross-match.
2026-02-09 06:05:13 -06:00
J. Nick Koston ed3acd582e [scheduler] Make core timer ID collisions impossible with type-safe internal IDs
Previously, PollingComponent used the string "update" and DelayAction
used "delay" as scheduler names. If a component subclassing
PollingComponent or using DelayAction also happened to use these same
strings for its own timers, the core timer would be silently cancelled
— a subtle bug that would be extremely hard to track down.

This introduces InternalSchedulerID, a type-safe wrapper that routes
through a new NUMERIC_ID_INTERNAL NameType. Since the scheduler
matches by (component, name_type, id, type), internal IDs can never
collide with component-level NUMERIC_ID or string-based names, even
if the underlying uint32_t values overlap.

Also migrates binary_sensor filters, MultiClickTrigger, and sensor
filters from string-based to uint32_t scheduler IDs. Each filter is
its own Component instance so IDs are scoped per-instance with no
collision risk.
2026-02-09 05:50:41 -06:00
J. Nick Koston ba2ac54932 Merge branches 'cse7766_batch_read', 'ld2410_batch_read', 'ld2412_batch_read', 'ld2420_batch_read', 'ld2450_batch_read', 'modbus_batch_read', 'nextion_batch_read', 'pylontech_batch_read', 'seeed_mr_batch_read', 'dsmr_batch_read', 'tuya_batch_read', 'dlms_meter_batch_read', 'pipsolar_batch_read', 'rd03d_batch_read', 'rf_bridge_batch_read' and 'dfplayer_batch_read' into integration 2026-02-09 04:35:39 -06:00
J. Nick Koston a0f736b7aa Future-proof available() check to handle negative return values 2026-02-09 04:35:11 -06:00
J. Nick Koston 21f270677b Future-proof available() check to handle negative return values 2026-02-09 04:34:49 -06:00
J. Nick Koston d6e692e302 Future-proof available() check to handle negative return values 2026-02-09 04:34:32 -06:00
J. Nick Koston 991ce396a9 Future-proof available() check to handle negative return values 2026-02-09 04:34:14 -06:00
J. Nick Koston 68dfb844bd Future-proof available() check to handle negative return values 2026-02-09 04:32:14 -06:00
J. Nick Koston 9742880bf7 Add comment explaining available() <= 0 check 2026-02-09 04:31:16 -06:00