esphome_elektromer_han/components/dlms_push
Tomer27cz 8fc10fb496 Optimize DLMS parser buffers and RX timing
Replace heavy std::string/iostream usage in the DLMS parser with stack-allocated char buffers and snprintf to avoid heap allocations and reduce runtime overhead. Introduce buffer-based helpers (data_to_string_, obis_to_string_) and switch hex formatting to format_hex_pretty_to; remove <sstream>/<iomanip> and include <cstdio>. Update header signatures accordingly. Also change DlmsPushComponent to use App.get_loop_component_start_time() instead of millis() when tracking last_rx_char_time_ for RX timeout handling.

Files changed: components/dlms_push/dlms_parser.cpp/.h (buffer-based string helpers, logging, include changes), components/dlms_push/dlms_push.cpp (use App loop time for timeout).

Note: The string helper APIs were converted to buffer-oriented versions — update any callers to provide an output buffer.
2026-03-07 20:33:20 +01:00
..
__init__.py new dlms_push component 2026-03-07 13:06:16 +01:00
binary_sensor.py new dlms_push component 2026-03-07 13:06:16 +01:00
dlms_parser.cpp Optimize DLMS parser buffers and RX timing 2026-03-07 20:33:20 +01:00
dlms_parser.h Optimize DLMS parser buffers and RX timing 2026-03-07 20:33:20 +01:00
dlms_push.cpp Optimize DLMS parser buffers and RX timing 2026-03-07 20:33:20 +01:00
dlms_push.h Optimize DLMS parser buffers and RX timing 2026-03-07 20:33:20 +01:00
sensor.py new dlms_push component 2026-03-07 13:06:16 +01:00
text_sensor.py new dlms_push component 2026-03-07 13:06:16 +01:00