From 73002f92b8bc6a1c696f07ab1ac0d2d773b0cdf5 Mon Sep 17 00:00:00 2001 From: Tomer27cz Date: Sat, 13 Jun 2026 22:07:10 +0200 Subject: [PATCH] Update README.md --- README.cz.md | 40 ++++++++++++++++++++++------------------ README.md | 35 ++++++++++++++++++++++++----------- 2 files changed, 46 insertions(+), 29 deletions(-) diff --git a/README.cz.md b/README.cz.md index bee9982..ba458b2 100644 --- a/README.cz.md +++ b/README.cz.md @@ -1,13 +1,15 @@ # ESPHome DLMS/Cosem PUSH RS485 čtení -![Maintained](https://img.shields.io/maintenance/yes/2026) [![GitHub license](https://img.shields.io/github/license/Tomer27cz/xt211)](https://img.shields.io/github/license/Tomer27cz/xt211/blob/master/LICENSE) ![GitHub Repo stars](https://img.shields.io/github/stars/Tomer27cz/xt211?style=flat) ![GitHub issues](https://img.shields.io/github/issues/Tomer27cz/xt211?style=flat) ![GitHub Issues or Pull Requests](https://img.shields.io/github/issues-pr/Tomer27cz/xt211) -![GitHub Downloads (all assets, all releases)](https://img.shields.io/github/downloads/Tomer27cz/xt211/total) ![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/Tomer27cz/xt211) + + Buy Me A Coffee + + ### [[English Version]](README.md) Můj poskytovatel elektřiny (ČEZ Distribuce) mi právě nainstaloval nový chytrý elektroměr. Až do teď jsem používal [Home Assistant Glow](https://glow-energy.io/) pro sledování spotřeby domácnosti. Takže jsem byl nadšený, že se konečně dostanu k novému elektroměru a zkusím z něj číst data. Bohužel to nebylo tak jednoduché, jak jsem doufal, ale po mnoha neúspěšných pokusech se mi to povedlo rozchodit a chci se s vámi podělit o zkušenosti. @@ -138,12 +140,22 @@ Power Led (volitelné): # Custom ESPHome komponenta +> [!IMPORTANT] +> ### Aktualizace (2026-06): ESPHome komponenta v tomto repozitáři je nyní zastaralá a již není udržována +> Přepracoval jsem ([esphome#15458](https://github.com/esphome/esphome/pull/15458)) **nativní ESPHome** komponentu [dlms_meter](https://esphome.io/components/sensor/dlms_meter/) tak, aby fungovala s elektroměrem Sagemcom XT211 (a mnoha dalšími DLMS/COSEM měřiči) za použití knihovny [dlms_parser](https://github.com/esphome-libs/dlms_parser), kterou jsem vyvinul společně s [latonita](https://github.com/latonita) a [PolarGoose](https://github.com/PolarGoose). +> +> To znamená, že k vyčítání svého DLMS/COSEM měřiče nyní můžete používat oficiální ESPHome komponentu [dlms_meter](https://esphome.io/components/sensor/dlms_meter/) a zároveň využít všech nových funkcí a vylepšení, které jsme do [dlms_parser](https://github.com/esphome-libs/dlms_parser) přidali. Nativní komponenta má velmi podobnou konfiguraci jako komponenty v tomto repozitáři, takže by mělo být snadné na ni přejít. +> +> Fyzicky se nic nezměnilo, stále můžete používat stejný hardware a zapojení. Jedinou změnou je, že místo používání komponenty `dlms_push` z tohoto repozitáře budete používat nativní komponentu `dlms_meter` z ESPHome. Zbytek konfigurace by měl zůstat stejný. Více informací můžete najít v [dokumentaci nativní komponenty `dlms_meter`](https://esphome.io/components/sensor/dlms_meter/) (v angličtině). +> +> *Tato akualizace je k dispozici ve verzi ESPHome 2026.6.0 a později* + +Obě komponenty v tomto repozitáři budou i nadále k dispozici pro nahlédnutí a pro ty, kteří je chtějí používat tak, jak jsou. + Existují dvě verze komponenty v tomto repozitáři: - `xt211` - původní verze, kterou jsem použil pro svůj setup, založená na [esphome-dlms-cosem](https://github.com/latonita/esphome-dlms-cosem)) - `dlms_push` - napsaná od začátku (už nepoužívá Gurux knihovny) se strukturou esphome komponentů, je flexibilnější a snazší na údržbu. -- Používám a budu udržovat verzi `dlms_push`, ale verze `xt211` je stále k dispozici pro referenci a pro ty, kteří ji chtějí použít tak, jak je. - ## ESPHome konfigurace ### Kompletní konfigurace: [esphome-smartmeter.yaml](esphome-smartmeter.yaml) @@ -155,7 +167,7 @@ esp32: type: esp-idf ``` -Přidej externí komponentu: +Přidej externí komponentu (není potřeba, pokud používáš nativní komponentu `dlms_meter` z ESPHome): ```yaml external_components: @@ -164,14 +176,6 @@ external_components: refresh: 1s ``` -[//]: # (The configuration options are:) - -[//]: # (- `show_log` (optional, default: `false`) - whether to show the log of the DLMS/COSEM communication. This is useful for debugging and first setup, but it can be quite verbose.) - -[//]: # (- `receive_timeout` (optional, default: `50ms`) - the timeout for receiving data from the meter. If the meter does not send any data within this time, the communication is considered finished and it will be processed.) - -[//]: # (- `custom_pattern` (optional) - custom COSEM object pattern) - Konfigurační možnosti jsou: - `show_log` (volitelné, výchozí: `false`) - zda zobrazit log komunikace DLMS/COSEM. To je užitečné pro ladění a první nastavení, ale může být docela obsáhlé. - `receive_timeout` (volitelné, výchozí: `50ms`) - časový limit pro přijímání dat z elektroměru. Pokud elektroměr během této doby nepošle žádná data, komunikace se považuje za ukončenou a bude zpracována. @@ -196,7 +200,7 @@ uart: parity: NONE stop_bits: 1 -dlms_push: +dlms_push: # nativní komponenta ESPHome se jmenuje dlms_meter id: my_dlms_meter uart_id: bus_1 ``` @@ -210,7 +214,7 @@ Moje spotřeba elektřiny se měří v kWh, ale elektroměr odesílá hodnotu ve ```yaml sensor: - - platform: dlms_push + - platform: dlms_push # nativní komponenta ESPHome se jmenuje dlms_meter id: active_energy_consumed name: "Energy" obis_code: 1.0.1.8.0.255 @@ -227,7 +231,7 @@ Binární senzor má hodnotu `false`, pokud je hodnota 0, a hodnotu `true`, poku ```yaml binary_sensor: - - platform: dlms_push + - platform: dlms_push # nativní komponenta ESPHome se jmenuje dlms_meter name: "Relay 1" obis_code: 0.1.96.3.10.255 ``` @@ -236,7 +240,7 @@ binary_sensor: ```yaml text_sensor: - - platform: dlms_push + - platform: dlms_push # nativní komponenta ESPHome se jmenuje dlms_meter name: "Serial number" obis_code: 0.0.96.1.1.255 entity_category: diagnostic @@ -324,7 +328,7 @@ sensor: [... pulzní měřič z výše uvedeného configu ...] - - platform: dlms_push + - platform: dlms_push # nativní komponenta ESPHome se jmenuje dlms_meter id: active_power name: "Active power consumption" obis_code: 1.0.1.7.0.255 diff --git a/README.md b/README.md index 36b542d..8b0a92a 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,15 @@ # ESPHome DLMS/Cosem PUSH RS485 readout -![Maintained](https://img.shields.io/maintenance/yes/2026) [![GitHub license](https://img.shields.io/github/license/Tomer27cz/xt211)](https://img.shields.io/github/license/Tomer27cz/xt211/blob/master/LICENSE) ![GitHub Repo stars](https://img.shields.io/github/stars/Tomer27cz/xt211?style=flat) ![GitHub issues](https://img.shields.io/github/issues/Tomer27cz/xt211?style=flat) ![GitHub Issues or Pull Requests](https://img.shields.io/github/issues-pr/Tomer27cz/xt211) -![GitHub Downloads (all assets, all releases)](https://img.shields.io/github/downloads/Tomer27cz/xt211/total) ![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/Tomer27cz/xt211) + + Buy Me A Coffee + + ### For Sagemcom XT211 smart meter used by ČEZ Distribuce (Czechia) ### [[Česká verze]](README.cz.md) @@ -138,14 +140,25 @@ Power Led (optional): - Anode (longer leg) to 5V (with 4700 ohm resistor in series - lower brightness) - Cathode (shorter leg) to GND -# Custom ESPHome component +# Custom ESPHome component + +> [!IMPORTANT] +> ### Update (2026-06): The custom ESPHome component in this repository is now deprecated and no longer maintained +> I have refactored ([esphome#15458](https://github.com/esphome/esphome/pull/15458)) the **native ESPHome** [dlms_meter](https://esphome.io/components/sensor/dlms_meter/) component to work with Sagemcom XT211 (and many other DLMS/COSEM meters) using the [dlms_parser](https://github.com/esphome-libs/dlms_parser) library that I have developed together with [latonita](https://github.com/latonita) and [PolarGoose](https://github.com/PolarGoose). +> +> This means that you can now use the official ESPHome component [dlms_meter](https://esphome.io/components/sensor/dlms_meter/) to read out your DLMS/COSEM meter, and you can also benefit from all the new features and improvements that we have made to [dlms_parser](https://github.com/esphome-libs/dlms_parser). +> The native component has very similar configuration options to the custom components in this repository, so it should be easy to switch to it. +> +> The **hardware setup** and the ESPHome configuration examples in this repository are **still valid**, but you can replace the custom component with the native one. You can find more information about how to use the native component in the [ESPHome documentation](https://esphome.io/components/sensor/dlms_meter/). +> +> *This update is available in ESPHome version 2026.6.0 and later* + +The two components in this repository will still be available for reference and for those who want to use it as is. There are two versions in this repository: - `xt211` - the original version that I used for my setup, which is based on the [esphome-dlms-cosem](https://github.com/latonita/esphome-dlms-cosem) - `dlms_push` - written from scratch (no longer using Gurux Libraries) using common esphome component structure, it is more flexible and easier to maintain. -I will be using and maintaining the `dlms_push` version, but the `xt211` version is still available for reference and for those who want to use it as is. - ## ESPHome configuration ### For full configuration file, see: [esphome-smartmeter.yaml](esphome-smartmeter.yaml) @@ -159,7 +172,7 @@ esp32: type: esp-idf ``` -Add the external component to your ESPHome configuration: +Add the external component to your ESPHome configuration (not needed if you use the native `dlms_meter` component): ```yaml external_components: @@ -192,7 +205,7 @@ uart: stop_bits: 1 dlms_push: - id: my_dlms_meter + id: my_dlms_meter # native ESPHome component is named dlms_meter uart_id: bus_1 ``` @@ -205,7 +218,7 @@ My electricity consumption is measured in kWh, but the meter sends the value in ```yaml sensor: - - platform: dlms_push + - platform: dlms_push # native ESPHome component is named dlms_meter id: active_energy_consumed name: "Energy" obis_code: 1.0.1.8.0.255 @@ -222,7 +235,7 @@ The binary sensor is `false` when the value is 0, and `true` when the value is a ```yaml binary_sensor: - - platform: dlms_push + - platform: dlms_push # native ESPHome component is named dlms_meter name: "Relay 1" obis_code: 0.1.96.3.10.255 ``` @@ -232,7 +245,7 @@ The text sensor is used to display string values sent by the meter. ```yaml text_sensor: - - platform: dlms_push + - platform: dlms_push # native ESPHome component is named dlms_meter name: "Serial number" obis_code: 0.0.96.1.1.255 entity_category: diagnostic @@ -320,7 +333,7 @@ sensor: [... pulse meter from above ...] - - platform: dlms_push + - platform: dlms_push # native ESPHome component is named dlms_meter id: active_power name: "Active power consumption" obis_code: 1.0.1.7.0.255