Komponent wM-Bus do ESPHome (SzczepanLeon) wersja 4.x - wątek ogólny

Kod odbierający dane z CC1101 nie uległ zmianie. Jedynie obróbka telegramu kodem z wmbusmeters zajmuje więcej czasu (nie mierzyłem dokładnie ale tak na oko widać).
@Mariusz_Woszczyński dobrze napisał co trzeba zrobić.

Pisząc o problemach oddzielajcie odbiór (czy jest jakaś ramka) od problemów z dekodowaniem.

all_drivers dodaje do obrazu wszystkie drivery. Normalnie dodawane sa tylko te jawnie zdefiniowane w YAMLu.

Nic więcej ta opcja nie robi. Jedynie ułatwi definiowanie sensora - nie musisz wtedy podawać jego typu. Jak chcesz mieć jakiś sensor to już musisz sam go zdefiniować.

Definicja pod spodem nie tworzy sensora, dodaje tylko driver do obrazu (będzie on dostępny przy autodetekcji)

- platform: wmbus
    type: apator162

Definicja pod spodem też dodaje driver ale dodatkowo w przypadku obecności opcji mqtt zdekoduje telegram i wyśle JSONa

  - platform: wmbus
    type: izar
    meter_id: 0x414FDFAC

Na ESP8266 nigdy nie kompilowałem :wink:
Zerkne w wolnym czasie.

btw
Na dniach puszczę poprawkę z właściwą komwersją jednostek na potrzeby HA.

A jest taka możliwość, żeby dekodować wszystko co odbierze i wysyłać jsona, bez definiowania sensorów?

Próbuje zrozumieć sens tej autodetekcji. To jest tylko po to że nie musisz podawać w sensorze parametru -type?

W wersji 4.0.0 nie ma takiej mozliwości. W przyszłości będzie.

Tak - obecnie to jej jedyny sens. No prawie.
Jest jeszcze jeden. Nie wiesz czym dekodowac telegram to wstawiasz all_drivers na True log_all na True i patrzysz w logu co złapał i jaki driver wykrył.

2 polubienia

Ok, kumam. Dzięki za wyjaśnienie:)

1 polubienie

all_drivers na True
Na jakim sprzęcie mam 3 różne i wszędzie brak pamięci :slight_smile:

Na wstępie wywal webserwer.
Możesz też jakieś sensory debuga sobie porobić

Tak jak pisze @szopen, wywal inne sensory. U mnie z czynnikiem poziomu soli oraz temp i wilgotności, było już ponad 98% pamięci zajęte

Znając swoje liczniki, nie potrzebujesz all drivers true.
Chyba że testujesz:D

Cześć,
a czy miał ktoś problem z kompilacją?

INFO ESPHome 2024.9.0
INFO Reading configuration /config/esphome/water.yaml...
INFO Detected timezone 'Europe/Warsaw'
INFO Generating C++ source...
INFO Compiling app...
Processing water (board: nodemcuv2; framework: arduino; platform: platformio/espressif8266@4.2.1)
--------------------------------------------------------------------------------
HARDWARE: ESP8266 80MHz, 80KB RAM, 4MB Flash
Dependency Graph
|-- ESPAsyncTCP-esphome @ 2.0.0
|-- ESPAsyncWebServer-esphome @ 3.2.2
|-- DNSServer @ 1.1.1
|-- ESP8266WiFi @ 1.0
|-- ESP8266mDNS @ 1.2
|-- noise-c @ 0.1.6
|-- SPI @ 1.0
|-- SmartRC-CC1101-Driver-Lib @ 2.5.7
Compiling .pioenvs/water/src/esphome/components/wmbus/utils.cpp.o
Compiling .pioenvs/water/src/esphome/components/wmbus/wmbus.cpp.o
src/esphome/components/wmbus/utils.cpp: In function 'double addMonths(double, int)':
src/esphome/components/wmbus/utils.cpp:615:15: error: aggregate 'tm time' has incomplete type and cannot be defined
  615 |     struct tm time;
      |               ^~~~
src/esphome/components/wmbus/utils.cpp:616:5: error: 'localtime_r' was not declared in this scope; did you mean 'locale_t'?
  616 |     localtime_r( &ut,&time);
      |     ^~~~~~~~~~~
      |     locale_t
src/esphome/components/wmbus/utils.cpp:618:20: error: 'mktime' was not declared in this scope; did you mean 'mktemp'?
  618 |     return (double)mktime(&time);
      |                    ^~~~~~
      |                    mktemp
src/esphome/components/wmbus/utils.cpp: In function 'void addMonths(tm*, int)':
src/esphome/components/wmbus/utils.cpp:623:37: error: invalid use of incomplete type 'struct tm'
  623 |     bool is_last_day_in_month = date->tm_mday == get_days_in_month(date->tm_year, date->tm_mon);
      |                                     ^~
In file included from /data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/cwchar:44,
                 from /data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/bits/postypes.h:40,
                 from /data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/bits/char_traits.h:40,
                 from /data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/string:40,
                 from src/esphome/core/log.h:5,
                 from src/esphome/components/wmbus/utils.h:6,
                 from src/esphome/components/wmbus/utils.cpp:5:
/data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/wchar.h:82:8: note: forward declaration of 'struct tm'
   82 | struct tm;
      |        ^~
src/esphome/components/wmbus/utils.cpp:623:72: error: invalid use of incomplete type 'struct tm'
  623 |     bool is_last_day_in_month = date->tm_mday == get_days_in_month(date->tm_year, date->tm_mon);
      |                                                                        ^~
In file included from /data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/cwchar:44,
                 from /data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/bits/postypes.h:40,
                 from /data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/bits/char_traits.h:40,
                 from /data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/string:40,
                 from src/esphome/core/log.h:5,
                 from src/esphome/components/wmbus/utils.h:6,
                 from src/esphome/components/wmbus/utils.cpp:5:
/data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/wchar.h:82:8: note: forward declaration of 'struct tm'
   82 | struct tm;
      |        ^~
src/esphome/components/wmbus/utils.cpp:623:87: error: invalid use of incomplete type 'struct tm'
  623 |     bool is_last_day_in_month = date->tm_mday == get_days_in_month(date->tm_year, date->tm_mon);
      |                                                                                       ^~
In file included from /data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/cwchar:44,
                 from /data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/bits/postypes.h:40,
                 from /data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/bits/char_traits.h:40,
                 from /data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/string:40,
                 from src/esphome/core/log.h:5,
                 from src/esphome/components/wmbus/utils.h:6,
                 from src/esphome/components/wmbus/utils.cpp:5:
/data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/wchar.h:82:8: note: forward declaration of 'struct tm'
   82 | struct tm;
      |        ^~
src/esphome/components/wmbus/utils.cpp:625:20: error: invalid use of incomplete type 'struct tm'
  625 |     int year = date->tm_year + months / 12;
      |                    ^~
In file included from /data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/cwchar:44,
                 from /data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/bits/postypes.h:40,
                 from /data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/bits/char_traits.h:40,
                 from /data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/string:40,
                 from src/esphome/core/log.h:5,
                 from src/esphome/components/wmbus/utils.h:6,
                 from src/esphome/components/wmbus/utils.cpp:5:
/data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/wchar.h:82:8: note: forward declaration of 'struct tm'
   82 | struct tm;
      |        ^~
src/esphome/components/wmbus/utils.cpp:626:21: error: invalid use of incomplete type 'struct tm'
  626 |     int month = date->tm_mon + months % 12;
      |                     ^~
In file included from /data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/cwchar:44,
                 from /data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/bits/postypes.h:40,
                 from /data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/bits/char_traits.h:40,
                 from /data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/string:40,
                 from src/esphome/core/log.h:5,
                 from src/esphome/components/wmbus/utils.h:6,
                 from src/esphome/components/wmbus/utils.cpp:5:
/data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/wchar.h:82:8: note: forward declaration of 'struct tm'
   82 | struct tm;
      |        ^~
src/esphome/components/wmbus/utils.cpp:648:28: error: invalid use of incomplete type 'struct tm'
  648 |         day = std::min(date->tm_mday, get_days_in_month(year, month));
      |                            ^~
In file included from /data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/cwchar:44,
                 from /data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/bits/postypes.h:40,
                 from /data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/bits/char_traits.h:40,
                 from /data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/string:40,
                 from src/esphome/core/log.h:5,
                 from src/esphome/components/wmbus/utils.h:6,
                 from src/esphome/components/wmbus/utils.cpp:5:
/data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/wchar.h:82:8: note: forward declaration of 'struct tm'
   82 | struct tm;
      |        ^~
src/esphome/components/wmbus/utils.cpp:651:9: error: invalid use of incomplete type 'struct tm'
  651 |     date->tm_year = year;
      |         ^~
In file included from /data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/cwchar:44,
                 from /data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/bits/postypes.h:40,
                 from /data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/bits/char_traits.h:40,
                 from /data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/string:40,
                 from src/esphome/core/log.h:5,
                 from src/esphome/components/wmbus/utils.h:6,
                 from src/esphome/components/wmbus/utils.cpp:5:
/data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/wchar.h:82:8: note: forward declaration of 'struct tm'
   82 | struct tm;
      |        ^~
src/esphome/components/wmbus/utils.cpp:652:9: error: invalid use of incomplete type 'struct tm'
  652 |     date->tm_mon = month;
      |         ^~
In file included from /data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/cwchar:44,
                 from /data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/bits/postypes.h:40,
                 from /data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/bits/char_traits.h:40,
                 from /data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/string:40,
                 from src/esphome/core/log.h:5,
                 from src/esphome/components/wmbus/utils.h:6,
                 from src/esphome/components/wmbus/utils.cpp:5:
/data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/wchar.h:82:8: note: forward declaration of 'struct tm'
   82 | struct tm;
      |        ^~
src/esphome/components/wmbus/utils.cpp:653:9: error: invalid use of incomplete type 'struct tm'
  653 |     date->tm_mday = day;
      |         ^~
In file included from /data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/cwchar:44,
                 from /data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/bits/postypes.h:40,
                 from /data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/bits/char_traits.h:40,
                 from /data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/string:40,
                 from src/esphome/core/log.h:5,
                 from src/esphome/components/wmbus/utils.h:6,
                 from src/esphome/components/wmbus/utils.cpp:5:
/data/cache/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/wchar.h:82:8: note: forward declaration of 'struct tm'
   82 | struct tm;
      |        ^~
src/esphome/components/wmbus/utils.cpp: In function 'std::string strdate(tm*)':
src/esphome/components/wmbus/utils.cpp:673:5: error: 'strftime' was not declared in this scope
  673 |     strftime(buf, sizeof(buf), "%Y-%m-%d", date);
      |     ^~~~~~~~
src/esphome/components/wmbus/utils.cpp: In function 'std::string strdate(double)':
src/esphome/components/wmbus/utils.cpp:680:15: error: aggregate 'tm date' has incomplete type and cannot be defined
  680 |     struct tm date;
      |               ^~~~
src/esphome/components/wmbus/utils.cpp:682:5: error: 'localtime_r' was not declared in this scope; did you mean 'locale_t'?
  682 |     localtime_r( &t,&date);
      |     ^~~~~~~~~~~
      |     locale_t
src/esphome/components/wmbus/utils.cpp: In function 'std::string strdatetime(tm*)':
src/esphome/components/wmbus/utils.cpp:689:5: error: 'strftime' was not declared in this scope
  689 |     strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M", datetime);
      |     ^~~~~~~~
src/esphome/components/wmbus/utils.cpp: In function 'std::string strdatetime(double)':
src/esphome/components/wmbus/utils.cpp:696:15: error: aggregate 'tm datetime' has incomplete type and cannot be defined
  696 |     struct tm datetime;
      |               ^~~~~~~~
src/esphome/components/wmbus/utils.cpp:698:5: error: 'localtime_r' was not declared in this scope; did you mean 'locale_t'?
  698 |     localtime_r( &t,&datetime);
      |     ^~~~~~~~~~~
      |     locale_t
src/esphome/components/wmbus/utils.cpp: In function 'std::string strdatetimesec(tm*)':
src/esphome/components/wmbus/utils.cpp:705:5: error: 'strftime' was not declared in this scope
  705 |     strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S", datetime);
      |     ^~~~~~~~
src/esphome/components/wmbus/utils.cpp: In function 'std::string strdatetimesec(double)':
src/esphome/components/wmbus/utils.cpp:711:15: error: aggregate 'tm datetime' has incomplete type and cannot be defined
  711 |     struct tm datetime;
      |               ^~~~~~~~
src/esphome/components/wmbus/utils.cpp:713:5: error: 'localtime_r' was not declared in this scope; did you mean 'locale_t'?
  713 |     localtime_r( &t,&datetime);
      |     ^~~~~~~~~~~
      |     locale_t
src/esphome/components/wmbus/utils.cpp: In function 'std::string strTimestampUTC(double)':
src/esphome/components/wmbus/utils.cpp:783:15: error: aggregate 'tm ts' has incomplete type and cannot be defined
  783 |     struct tm ts;
      |               ^~
src/esphome/components/wmbus/utils.cpp:784:5: error: 'gmtime_r' was not declared in this scope; did you mean 'time_t'?
  784 |     gmtime_r( &d,&ts);
      |     ^~~~~~~~
      |     time_t
src/esphome/components/wmbus/utils.cpp:785:5: error: 'strftime' was not declared in this scope
  785 |     strftime(datetime, sizeof(datetime), "%FT%TZ", &ts);
      |     ^~~~~~~~
*** [.pioenvs/water/src/esphome/components/wmbus/utils.cpp.o] Error 1
In file included from src/esphome/components/web_server_base/web_server_base.h:11,
                 from src/esphome/components/captive_portal/captive_portal.h:11,
                 from src/esphome/components/wmbus/wmbus.cpp:11:
.piolibdeps/water/ESPAsyncWebServer-esphome/src/ESPAsyncWebServer.h:280:68: warning: 'warning_x' attribute directive ignored [-Wattributes]
  280 |     const String& ASYNCWEBSERVER_REGEX_ATTRIBUTE pathArg(size_t i) const;
      |                                                                    ^~~~~
src/esphome/components/wmbus/wmbus.cpp:14:25: error: expected constructor, destructor, or type conversion before '(' token
   14 | SET_LOOP_TASK_STACK_SIZE(16 * 1024);
      |                         ^
In file included from src/esphome/components/wmbus/wmbus.h:3,
                 from src/esphome/components/wmbus/wmbus.cpp:1:
src/esphome/components/wmbus/wmbus.cpp: In member function 'virtual void esphome::wmbus::WMBusComponent::dump_config()':
src/esphome/components/wmbus/wmbus.cpp:314:43: error: 'class EspClass' has no member named 'getEfuseMac'
  314 |     ESP_LOGCONFIG(TAG, "  MAC: %08X", ESP.getEfuseMac());
      |                                           ^~~~~~~~~~~
src/esphome/core/log.h:97:90: note: in definition of macro 'esph_log_config'
   97 |   esp_log_printf_(ESPHOME_LOG_LEVEL_CONFIG, tag, __LINE__, ESPHOME_LOG_FORMAT(format), ##__VA_ARGS__)
      |                                                                                          ^~~~~~~~~~~
src/esphome/components/wmbus/wmbus.cpp:314:5: note: in expansion of macro 'ESP_LOGCONFIG'
  314 |     ESP_LOGCONFIG(TAG, "  MAC: %08X", ESP.getEfuseMac());
      |     ^~~~~~~~~~~~~
*** [.pioenvs/water/src/esphome/components/wmbus/wmbus.cpp.o] Error 1
========================== [FAILED] Took 3.22 seconds ==========================

Mój config:

esphome:
  name: "water"

esp8266:
  board: nodemcuv2

external_components:
  - source: github://SzczepanLeon/esphome-components@main
  #- source: github://SzczepanLeon/esphome-components@3.2.3
    components: [ wmbus ]


# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "jHethNoYJTVa7Y8BmGro="
    
ota:
  platform: esphome

# web_server:
#   port: 80

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Esphome-Web-0E8F12"
    password: "ttrf8rP"

time:
  - platform: sntp
    id: time_sntp

captive_portal:
    
wmbus:
  mosi_pin: GPIO13
  miso_pin: GPIO12
  clk_pin: GPIO14
  cs_pin: GPIO15
  gdo0_pin: GPIO5
  gdo2_pin: GPIO4

  # frequency: 868.950
  # all_drivers: False
  # sync_mode: True
  # log_all: True

sensor:
- platform: wmbus
  meter_id: 0x2533145
  #add_prefix: false
  type: apator162
  key: "00000000000000000000000000000000"
  #total_water_m3:
    #name: "WaterCounter"
  sensors:
  - name: "WaterCounter"
    field: "total"
    accuracy_decimals: 3
    unit_of_measurement: "m³"
    device_class: "water"
    state_class: "total_increasing"
    icon: "mdi:water" 
- platform: wmbus
  meter_id: 0x7147257
  #add_prefix: false
  type: apator162
  key: "00000000000000000000000000000000"
  # total_water_m3:
  #   name: "GardenWaterCounter"
  sensors:
  - name: "GardenWaterCounter"
    field: "total"
    accuracy_decimals: 3
    unit_of_measurement: "m³"
    device_class: "water"
    state_class: "total_increasing"
    icon: "mdi:water" 
- platform: adc
  name: "WaterPressure"
  pin: A0
  id: pressure
  update_interval: 60s
  unit_of_measurement: "bar"
  accuracy_decimals: 2
  # attenuation: 11db
  filters:
    - calibrate_linear:
      - 0.0 -> 0.0
      - 0.51 -> 4.0

Tak, problem znany

Na ESP8266 nie działa wersja 4.0 (za mało pamięci). W wersji 4.0 nie będzie wsparcia dla ESP8266.

1 polubienie

Dzięki, nie wpadłem na to, żeby na githubie sprawdzić :slight_smile:

a u mnie na wersji 4.0 dostaje takie komunikaty : WARNING media @ 192.168.0.120: Connection error occurred: [Errno 104] Connection reset by peer
INFO Processing unexpected disconnect from ESPHome API for media @ 192.168.0.120
WARNING Disconnected from API

na pierwszej wersji jaka była działało bez problemów a dzis mnie podkusiło przejsc od nowa na 4.0

Logi logi po serialu + YAML.

I prawidłowo bo 4.0 jest lepsze od 3.x bo +1 :wink:

A na poważnie to kazdy sam musi określić swoje potrzeby.
Mi wystarczy tylko wysyłka telegramów do zdalnego wmbusmetersa - wszystko więcej w repo jest dla zabawy :slight_smile:

Cześć @_Szczepan
Jestem po testach wersji 4.0.3

Zaczyna czytać telegramy
apator162 - OK
unismart - OK
Gama350, driver amiplus komunikat Can’t find driver for T:
all drivers komunikat przy telegramie Gama350 Link modes not defined in driver . Processing anyway.
Sensorów z Gama350 brak
konfiguracja sensorów


# GAMA 350 LICZNIK ENERGII


  - platform: wmbus
    meter_id: 0x0000000
    #type: amiplus
    key: "xxxxxxxxxxxxxxxxxxxxxxxxx"
    sensors:

      - name: "Gama350 RSSI"
        field: "rssi"
        accuracy_decimals: 0
        unit_of_measurement: "dBm"
        device_class: "signal_strength"
        state_class: "measurement"
        entity_category: "diagnostic"        
        ########################################
        #####   Liczniki #######################

      - name: "Gama350 180"
        field: "total_energy_consumption"
        accuracy_decimals: 3
        unit_of_measurement: "kwh"
        device_class: "energy"
        state_class: "total_increasing"
        icon: "mdi:transmission-tower-import"        

      - name: "Gama350 280"
        field: "total_energy_production"
        accuracy_decimals: 3
        unit_of_measurement: "kwh"
        device_class: "energy"
        state_class: "total_increasing"
        icon: "mdi:transmission-tower-export"        

        ########################################
        #####   Moc      #######################

      - name: "Gama350 Moc importu"
        field: "current_power_consumption"
        accuracy_decimals: 3
        unit_of_measurement: "kw"
        device_class: "power"
        state_class: "measurement"
        icon: "mdi:lightning-bolt"

      - name: "Gama350 Moc exportu"
        field: "current_power_production"
        accuracy_decimals: 3
        unit_of_measurement: "kw"
        device_class: "power"
        state_class: "measurement"
        icon: "mdi:lightning-bolt"

        
        ########################################
        #####   Napięcia #######################

      - name: "Gama350 napiecie na fazie 1"
        field: "voltage_at_phase_1"      
        accuracy_decimals: 0
        unit_of_measurement: "v"
        device_class: "voltage"
        state_class: "measurement"
        icon: "mdi:sine-wave"

      - name: "Gama350 napiecie na fazie 2"
        field: "voltage_at_phase_2"      
        accuracy_decimals: 0
        unit_of_measurement: "v"
        device_class: "voltage"
        state_class: "measurement"
        icon: "mdi:sine-wave"



      - name: "Gama350 napiecie na fazie 3"
        field: "voltage_at_phase_3"      
        accuracy_decimals: 0
        unit_of_measurement: "v"
        device_class: "voltage"
        state_class: "measurement"
        icon: "mdi:sine-wave"

type odkomentuj ID popraw i dodaj całe logi VERBOSE

Jaka jest maksymalna ilość obsługiwanych urządzeń w wersji 4.x? Próbuję odczytać telegramy z czterech liczników wody i przy czterech dostaje tylko w logach informację:

Received T1 A frame

i nic więcej.
Przy wpisanych dwóch licznikach, wszystko działa poprawnie

Mój kod:

sensor:
- platform: wmbus
  meter_id: 0x7348273
  #add_prefix: false
  type: apator162
  key: "00000000000000000000000000000000"
  #total_water_m3:
    #name: "WaterCounter"
  sensors:
  - name: "Zimna woda"
    field: "total"
    accuracy_decimals: 3
    unit_of_measurement: "m³"
    device_class: "water"
    state_class: "total_increasing"
    icon: "mdi:water"
  - name: "RSSI Zimna woda"
    field: "rssi"
    accuracy_decimals: 0
    unit_of_measurement: "dBm"
    device_class: "signal_strength"
    state_class: "measurement"
    entity_category: "diagnostic"
- platform: wmbus
  meter_id: 0x7375077
  #add_prefix: false
  type: apator162
  key: "00000000000000000000000000000000"
  # total_water_m3:
  #   name: "GardenWaterCounter"
  sensors:
  - name: "Ciepla woda"
    field: "total"
    accuracy_decimals: 3
    unit_of_measurement: "m³"
    device_class: "water"
    state_class: "total_increasing"
    icon: "mdi:water"
  - name: "RSSI Ciepla woda"
    field: "rssi"
    accuracy_decimals: 0
    unit_of_measurement: "dBm"
    device_class: "signal_strength"
    state_class: "measurement"
    entity_category: "diagnostic"
- platform: wmbus
  meter_id: 0x7209111
  #add_prefix: false
  type: apator162
  key: "00000000000000000000000000000000"
  #total_water_m3:
    #name: "WaterCounter"
  sensors:
  - name: "Zimna woda u Mamy"
    field: "total"
    accuracy_decimals: 3
    unit_of_measurement: "m³"
    device_class: "water"
    state_class: "total_increasing"
    icon: "mdi:water"
  - name: "RSSI Zimna woda u Mamy"
    field: "rssi"
    accuracy_decimals: 0
    unit_of_measurement: "dBm"
    device_class: "signal_strength"
    state_class: "measurement"
    entity_category: "diagnostic"
- platform: wmbus
  meter_id: 0x7211876
  #add_prefix: false
  type: apator162
  key: "00000000000000000000000000000000"
  #total_water_m3:
  #name: "GardenWaterCounter"
  sensors:
  - name: "Ciepla woda u Mamy"
    field: "total"
    accuracy_decimals: 3
    unit_of_measurement: "m³"
    device_class: "water"
    state_class: "total_increasing"
    icon: "mdi:water"
  - name: "RSSI Ciepla woda u Mamy"
    field: "rssi"
    accuracy_decimals: 0
    unit_of_measurement: "dBm"
    device_class: "signal_strength"
    state_class: "measurement"
    entity_category: "diagnostic"
- platform: wifi_signal
  name: "WLAN Signal"
  id: wifi_signal_db
  update_interval: 60s
  filters:
    - lambda: return min(max(2 * (x + 100.0), 0.0), 100.0);
  entity_category: "diagnostic"
  unit_of_measurement: "%"
switch:
- platform: restart
  name: "Restart"
  id: restart_switch
  icon: mdi:restart

Nie ma sztywnej liczby. Wszystko zależy od tego czy starczy czasu na odebranie telegramu pomiędzy obróbką tego co odebrane.

Rozumiem, próbowałem jeszcze z trzeba licznikami i rezultat jest taki sam.
Zostawiłem na noc ale “nie przetworzył” żądnych telegramów.
W takim razie będę próbował wysyłać go do Wmbusmeters pod HA.

Możesz też powywalac z YAMLa wszystko inne.
Troche to dziwne bo apator162 powinien szybko sie parsowac.

Logi
logi wersja 4.0.2.zip (16,5 KB)
Konfiguracja sensorów


#_____________________________________________________________________________________
# GAMA 350 LICZNIK ENERGII
  - platform: wmbus
    meter_id: 0x30415995
    type: amiplus
    key: "32002304159950000000000000000000"
    sensors:

      - name: "Gama350 RSSI"
        field: "rssi"
        accuracy_decimals: 0
        unit_of_measurement: "dBm"
        device_class: "signal_strength"
        state_class: "measurement"
        entity_category: "diagnostic"        
        ########################################
        #####   Liczniki #######################

      - name: "Gama350 180"
        field: "total_energy_consumption"
        accuracy_decimals: 3
        unit_of_measurement: "kwh"
        device_class: "energy"
        state_class: "total_increasing"
        icon: "mdi:transmission-tower-import"        

      - name: "Gama350 280"
        field: "total_energy_production"
        accuracy_decimals: 3
        unit_of_measurement: "kwh"
        device_class: "energy"
        state_class: "total_increasing"
        icon: "mdi:transmission-tower-export"        

        ########################################
        #####   Moc      #######################

      - name: "Gama350 Moc importu"
        field: "current_power_consumption"
        accuracy_decimals: 3
        unit_of_measurement: "kw"
        device_class: "power"
        state_class: "measurement"
        icon: "mdi:lightning-bolt"

      - name: "Gama350 Moc exportu"
        field: "current_power_production"
        accuracy_decimals: 3
        unit_of_measurement: "kw"
        device_class: "power"
        state_class: "measurement"
        icon: "mdi:lightning-bolt"

        
        ########################################
        #####   Napięcia #######################

      - name: "Gama350 napiecie na fazie 1"
        field: "voltage_at_phase_1"      
        accuracy_decimals: 0
        unit_of_measurement: "v"
        device_class: "voltage"
        state_class: "measurement"
        icon: "mdi:sine-wave"

      - name: "Gama350 napiecie na fazie 2"
        field: "voltage_at_phase_2"      
        accuracy_decimals: 0
        unit_of_measurement: "v"
        device_class: "voltage"
        state_class: "measurement"
        icon: "mdi:sine-wave"



      - name: "Gama350 napiecie na fazie 3"
        field: "voltage_at_phase_3"      
        accuracy_decimals: 0
        unit_of_measurement: "v"
        device_class: "voltage"
        state_class: "measurement"
        icon: "mdi:sine-wave"

Odczyt telegramu wmbusmeters



telegram=|BE44ED149559413001027A5E00B0052F2F_066DE1356B1939800C78955941300E031273660100008E10031273660100008E20030000000000008E30030000000000008E8010030000000000000E833C9594300500008E10833C9594300500008E20833C0000000000008E30833C0000000000008E8010833C0000000000000B2B0000000BAB3C9742000BFB140000000BFB943C8804000AFDC9FC0150020AFDC9FC0249020AFDC9FC0351020BABC8FC100000072F2F2F2F2F2F2F2F2F2F2F2F|

Auto driver    : not found!
Similar driver : amiplus 66/91
Using driver   : amiplus 66/91
000   : be length (190 bytes)
001   : 44 dll-c (from meter SND_NR)
002   : ed14 dll-mfct (EGM)
004   : 95594130 dll-id (30415995)
008   : 01 dll-version
009   : 02 dll-type (Electricity meter)
010   : 7a tpl-ci-field (EN 13757-3 Application Layer (short tplh))
011   : 5e tpl-acc-field
012   : 00 tpl-sts-field (OK)
013   : b005 tpl-cfg 05b0 (AES_CBC_IV nb=11 cntn=0 ra=0 hc=0 )
015   : 2f2f decrypt check bytes (OK)
017   : 06 dif (48 Bit Integer/Binary Instantaneous value)
018   : 6D vif (Date and time type)
019 C!: E1356B193980 ("device_date_time":"2024-09-25 11:53:33")
025   : 0C dif (8 digit BCD Instantaneous value)
026   : 78 vif (Fabrication no)
027 C?: 95594130
031   : 0E dif (12 digit BCD Instantaneous value)
032   : 03 vif (Energy Wh)
033 C!: 127366010000 ("total_energy_consumption_kwh":1667.312)
039   : 8E dif (12 digit BCD Instantaneous value)
040   : 10 dife (subunit=0 tariff=1 storagenr=0)
041   : 03 vif (Energy Wh)
042 C!: 127366010000 ("total_energy_consumption_tariff_1_kwh":1667.312)
048   : 8E dif (12 digit BCD Instantaneous value)
049   : 20 dife (subunit=0 tariff=2 storagenr=0)
050   : 03 vif (Energy Wh)
051 C!: 000000000000 ("total_energy_consumption_tariff_2_kwh":0)
057   : 8E dif (12 digit BCD Instantaneous value)
058   : 30 dife (subunit=0 tariff=3 storagenr=0)
059   : 03 vif (Energy Wh)
060 C!: 000000000000 ("total_energy_consumption_tariff_3_kwh":0)
066   : 8E dif (12 digit BCD Instantaneous value)
067   : 80 dife (subunit=0 tariff=0 storagenr=0)
068   : 10 dife (subunit=0 tariff=4 storagenr=0)
069   : 03 vif (Energy Wh)
070 C?: 000000000000
076   : 0E dif (12 digit BCD Instantaneous value)
077   : 83 vif (Energy Wh)
078   : 3C combinable vif (BackwardFlow)
079 C!: 959430050000 ("total_energy_production_kwh":5309.495)
085   : 8E dif (12 digit BCD Instantaneous value)
086   : 10 dife (subunit=0 tariff=1 storagenr=0)
087   : 83 vif (Energy Wh)
088   : 3C combinable vif (BackwardFlow)
089 C!: 959430050000 ("total_energy_production_tariff_1_kwh":5309.495)
095   : 8E dif (12 digit BCD Instantaneous value)
096   : 20 dife (subunit=0 tariff=2 storagenr=0)
097   : 83 vif (Energy Wh)
098   : 3C combinable vif (BackwardFlow)
099 C!: 000000000000 ("total_energy_production_tariff_2_kwh":0)
105   : 8E dif (12 digit BCD Instantaneous value)
106   : 30 dife (subunit=0 tariff=3 storagenr=0)
107   : 83 vif (Energy Wh)
108   : 3C combinable vif (BackwardFlow)
109 C!: 000000000000 ("total_energy_production_tariff_3_kwh":0)
115   : 8E dif (12 digit BCD Instantaneous value)
116   : 80 dife (subunit=0 tariff=0 storagenr=0)
117   : 10 dife (subunit=0 tariff=4 storagenr=0)
118   : 83 vif (Energy Wh)
119   : 3C combinable vif (BackwardFlow)
120 C?: 000000000000
126   : 0B dif (6 digit BCD Instantaneous value)
127   : 2B vif (Power W)
128 C!: 000000 ("current_power_consumption_kw":0)
131   : 0B dif (6 digit BCD Instantaneous value)
132   : AB vif (Power W)
133   : 3C combinable vif (BackwardFlow)
134 C!: 974200 ("current_power_production_kw":4.297)
137   : 0B dif (6 digit BCD Instantaneous value)
138   : FB vif (First extension FB of VIF-codes)
139   : 14 vife (Reserved)
140 C?: 000000
143   : 0B dif (6 digit BCD Instantaneous value)
144   : FB vif (First extension FB of VIF-codes)
145   : 94 vife (Reserved)
146   : 3C combinable vif (BackwardFlow)
147 C?: 880400
150   : 0A dif (4 digit BCD Instantaneous value)
151   : FD vif (Second extension FD of VIF-codes)
152   : C9 vife (10^0 Volts)
153   : FC combinable vif (CombinableVIFExtension)
154   : 01 combinable extension vife (AtPhase1)
155 C!: 5002 ("voltage_at_phase_1_v":250)
157   : 0A dif (4 digit BCD Instantaneous value)
158   : FD vif (Second extension FD of VIF-codes)
159   : C9 vife (10^0 Volts)
160   : FC combinable vif (CombinableVIFExtension)
161   : 02 combinable extension vife (AtPhase2)
162 C!: 4902 ("voltage_at_phase_2_v":249)
164   : 0A dif (4 digit BCD Instantaneous value)
165   : FD vif (Second extension FD of VIF-codes)
166   : C9 vife (10^0 Volts)
167   : FC combinable vif (CombinableVIFExtension)
168   : 03 combinable extension vife (AtPhase3)
169 C!: 5102 ("voltage_at_phase_3_v":251)
171   : 0B dif (6 digit BCD Instantaneous value)
172   : AB vif (Power W)
173   : C8 combinable vif (UpperLimit)
174   : FC combinable vif (CombinableVIFExtension)
175   : 10 combinable extension vife (AccumulationOfAbsoluteValue)
176 C?: 000007
179   : 2F skip
180   : 2F skip
181   : 2F skip
182   : 2F skip
183   : 2F skip
184   : 2F skip
185   : 2F skip
186   : 2F skip
187   : 2F skip
188   : 2F skip
189   : 2F skip
190   : 2F skip

{
    "media":"electricity",
    "meter":"amiplus",
    "name":"",
    "id":"30415995",
    "current_power_consumption_kw":0,
    "current_power_production_kw":4.297,
    "total_energy_consumption_kwh":1667.312,
    "total_energy_consumption_tariff_1_kwh":1667.312,
    "total_energy_consumption_tariff_2_kwh":0,
    "total_energy_consumption_tariff_3_kwh":0,
    "total_energy_production_kwh":5309.495,
    "total_energy_production_tariff_1_kwh":5309.495,
    "total_energy_production_tariff_2_kwh":0,
    "total_energy_production_tariff_3_kwh":0,
    "voltage_at_phase_1_v":250,
    "voltage_at_phase_2_v":249,
    "voltage_at_phase_3_v":251,
    "device_date_time":"2024-09-25 11:53:33",
    "timestamp":"2024-09-25T09:54:11Z"
}

@Dariusz_Barczyński Spróbuj z wersją 4.0.4