Commit Graph

14 Commits (8fc10fb496087f8803040ad5d6390efbcaff1d0e)

Author SHA1 Message Date
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
Tomer27cz 81bbd19c09 Enable UART pull-up
Add explicit pull-up configuration for the UART RX pin and disable the logger (baud_rate: 0) to avoid pin conflicts with an RS485 converter. Updates applied to esphome-smartmeter.yaml and both README (EN/CZ) files with notes explaining that esp-idf > 5.x defaults pins to floating so RX needs pull-up, and that the logger was turned off because the same pins are shared with the RS485 converter.
2026-03-07 13:44:06 +01:00
Tomer27cz 1db8e48acf new dlms_push component
dlms_push is a complete rewrite of the component using common esphome structure. The new component no longer uses Gurux library so it is significantly smaller and easier to maintain.

Update README (EN/CZ) to document dlms_push, replace xt211 examples, and expose new config options (show_log, receive_timeout, custom_pattern).

Also update esphome-smartmeter.yaml accordingly.
2026-03-07 13:06:16 +01:00
Tomer27cz ffec2a901f Update xt211_uart.h
remove obsolete UART lock for newer ESPHome versions
2026-02-28 22:36:15 +01:00
Tomer27cz b9c2cd3fbe Add status and repository badges to README files
Introduced various shields.io badges to both Czech and English README files to display project maintenance status, license, stars, issues, pull requests, downloads, and code size. This improves project visibility and provides quick repository insights for users.
2026-01-25 01:13:13 +01:00
Tomer27cz 2d6b7f1053 Remove esp-idf 5.4.1 downgrade instructions from README
The README files no longer mention the need to downgrade to esp-idf version 5.4.1, reflecting that this workaround is no longer necessary. Updated both Czech and English documentation accordingly.
2026-01-23 23:56:44 +01:00
Tomer27cz ce199326a1 Improve UART locking and fallback read logic
Refactored XT211Uart to handle cases where the lock is not initialized, preventing null dereference. Added fallback to base read_array for non-hardware UARTs in read_array_quick_, improving compatibility with BLE-backed UARTs.
2026-01-23 21:04:55 +01:00
Tomer27cz 81b71206a6 document fix 2025-12-17 23:40:52 +01:00
Tomer27cz f6d657d2a0 fix version
newer versions of esp-idf break this component, so for the time being (until i have time to fix it), i will just define a needed esp-idf version
2025-12-17 23:35:57 +01:00
Tomer27cz c33b888d9d
Update README.cz.md
fix rezistor value
2025-11-18 19:39:49 +01:00
Tomer27cz 130006565f add refresh 2025-11-09 22:49:19 +01:00
Tomer27cz 10cc1d1afa fix README 2025-11-09 22:41:33 +01:00
Tomer27cz a273f7c976 documentation 2025-11-09 22:38:03 +01:00
Tomer27cz 9c23deac0e Initial commit 2025-11-04 18:39:59 +01:00