Qundis digitaler Wasserzähler

Hab ich auch in der Config aber das Problem liegt nicht beim ESP32 sondern schon beim übersetzen des Frames. Bei mir kommen u.a. Werte im Minusbereich vor

@andifidi kannst du mir mal so ein Frame von dir schicken. Würde das gerne mal im wmbusters vergleichen.

Hab dir eine Chatnachricht geschickt mit dem Frame :slight_smile:

Der Payload kann auch innerhalb des Frames verschlüsselt sein. Ich vermute mal jeder Frame weicht bezüglich Volumen/Datum komplett von den anderen ab?

Wie sieht deine ESP Konfig aus, welchen Mode hast du aktiv?

@meloneA

Ja die werte weichen komplett voneinander ab.

Hier mal meine ESP Config:

  • habe auch auf C1 Modus gestellt.
---
## ---------------------------------------------------------------------------
## WMBUS METER az-delivery-devkit-v4 + CC1101 for Diehl IZAR RC 868 I R4 PL
## Hardware: ESP32 240MHz, 520KB RAM, 4MB Flash
##
## this version shows all watermeters. Use this for the first test
##
##  1. uses the latest wmbusmeter component from github
##  2. Optional uses syslog component
##
##  SYSLOG:  tail -f /var/log/syslog | grep "water-meter"
##
## ---------------------------------------------------------------------------
substitutions:

  ## device settings
  device_name_short: "water-meter-esp"
  device_description: "Wasserzähler ESP32, CUL - CC1101, IZAR module (Diehl IZAR RC 868 I R4 PL (SzczepanLeon) - all watermeters"
  projectname: "Diehl IZAR RC 868.Watermeter"
  appversion: "2.0.7"

  ## all watermeters   wmid: "0"
  ## your watermeter: wmid: !secret watermeterId
  wmid: !secret watermeterId

  ## logger settings
  log_level: "DEBUG"  # not that logging need memory, so in production mode use "WARN"
  log_wmbus: "DEBUG" # Loglevel for wmbus meters component
  log_baudrate: "0" # 0 disable uart logger messages

## ----------------------------------------------------------------
## APPLICATION ESPHOME
## ----------------------------------------------------------------
esphome:
  name: ${device_name_short}
  comment: ${device_description}
  # Automatically add the mac address to the name
  # so you can use a single firmware for all devices
  name_add_mac_suffix: false
  project:
    name: ${projectname}
    version: ${appversion}
  build_path: ./build/${device_name_short}
  on_boot:
    priority: 200
    then:
      - globals.set:
          id: boot_counter
          value: !lambda "return id(boot_counter)+=1;"
      - logger.log:
          level: INFO
          tag: "system"
          format: "BOOTMESSAGE:${device_name_short} API is connected, Device ready!"
      - component.update: bootcounter
  on_shutdown:
    priority: 700
    then:
      - logger.log:
          level: ERROR
          tag: "system"
          format: "BOOTMESSAGE:${device_name_short} is down!"

## ----------------------------------------------------------------
## HARDWARE az-delivery-devkit-v4
##          ESP32 240MHz, 520KB RAM, 4MB Flash
## ----------------------------------------------------------------
esp32:
  board: az-delivery-devkit-v4
  framework:
    type: arduino

## ----------------------------------------------------------------
## EXTERNAL COMPONENTS
## ----------------------------------------------------------------
external_components:

  # uses the latest version from SzczepanLeon
  # https://github.com/SzczepanLeon/esphome-components
  # You can make ESPHome check the repository every time by setting this option to 0s
  - source: github://SzczepanLeon/esphome-components@main
    refresh: 0s
    components: [wmbus]

  # use local component from
  # https://github.com/zdzichu6969/esphome-components
  - source:
      type: local
      path: custom_components
    components: [backup]

  # use local component from
  # https://github.com/TheStaticTurtle/esphome_syslog
  # - source:
  #     type: local
  #     path: custom_components
  #   components: [syslog]

## ---------------------------------------------------
## syslog service
## tail -f /var/log/syslog | grep "water-meter"
## ---------------------------------------------------
# syslog:
#   ip_address: !secret syslog_server
#   port: !secret syslog_port
#   min_level: DEBUG
#   enable_logger: true

# ----------------------------------------------------------------
# Save your ESPHome device configuration in firmware and and
# recover it if you lost source files.
# ----------------------------------------------------------------
backup:
  auth:
    username: !secret web_username
    password: !secret web_password
  force_update: false

## ----------------------------------------------------------------
## Global variables
## ----------------------------------------------------------------
globals:

  - id: boot_counter
    type: int
    restore_value: yes
    initial_value: "0"

  - id: last_value
    type: float
    restore_value: yes
    initial_value: "0.00"

  - id: alarm_error_text
    type: std::vector<std::string>
    restore_value: no
    initial_value: '{"no error", "general_alarm","leakage","meter_blocked","back_flow","underflow","overflow","submarine","sensor_fraud","mechanical_fraud"}'

## ---------------------------------------------------
## WIFI Settings 3 wifis
## ---------------------------------------------------
wifi:
  networks:
    - ssid: !secret wifi_ssid
      password: !secret wifi_password
      priority: 0
  domain: !secret domain

## ---------------------------------------------------
## mDNS Component
## ---------------------------------------------------
mdns:
  # if mDNS is disabled, they will no longer be able to automatically find your devices.
  disabled: false

## ---------------------------------------------------
## The captive portal component in ESPHome is a
## fallback mechanism for when connecting to the
## configured WiFi fails.
## ---------------------------------------------------
captive_portal:

## ---------------------------------------------------
## LOGGER COMPONENT
## ---------------------------------------------------
logger:
  id: appslogger
  level: ${log_level}
  baud_rate: ${log_baudrate}
  logs:
    wmbus: ${log_wmbus}
    wMBus-lib: ${log_wmbus}

## ---------------------------------------------------
## OTA COMPONENT
## ---------------------------------------------------
ota:
  password: !secret ota_pswd
  safe_mode: false
  on_begin:
    then:
      - logger.log:
          format: "OTA Start"
          tag: "OTA"
          level: WARN
  on_progress:
    then:
      - logger.log:
          level: WARN
          tag: "OTA"
          format: "OTA progress %0.1f%%"
          args: ["x"]
  on_end:
    then:
      - logger.log:
          format: "OTA End"
          tag: "OTA"
          level: WARN
  on_error:
    then:
      - logger.log:
          format: "OTA update error %d"
          tag: "OTA"
          level: ERROR
          args: ["x"]

## ---------------------------------------------------
## COMPONENT WEBSERVER
## ---------------------------------------------------
web_server:
  port: 80
  version: 2
  js_url: !secret webserver_jsurl

## ---------------------------------------------------
## Home Assistant API COMPONENT
## ---------------------------------------------------
api:
  id: espapi_wmbus_esp32
  port: 6053
  reboot_timeout: 0s

## ---------------------------------------------------
## SNTP COMPONENT
## ---------------------------------------------------
time:
  - platform: sntp
    id: time_sntp
    timezone: Europe/Berlin
    servers:
      - 0.at.pool.ntp.org
      - 0.pool.ntp.org
      - 1.pool.ntp.org
    on_time_sync:
      then:
        - logger.log:
            tag: "system"
            level: INFO
            format: "Synchronized sntp clock"


## ------------------------------------------------------------------
##           WMBUS CC1101 --> ESP32 az-delivery-devkit-v4
## ------------------------------------------------------------------
##
##
##                                                               o 1 (3.3V)
##                                                               |
##   ╭――x――x――x――x――x――x――x――x――x――x――x――x――x――x――x――x――x――x――x――o―╮
##   |                                                             |
##   |                                                             |
## - | 5v               az-delivery-devkit-v4                      | -- ANT
##   |                                                             |
##   |                          16 17 5  18 19               23    |
##   ╰――x――x――x――x――x――x――x――x――o――x――o――o――o――o――o――o――o――o――o――o―╯
##                              |  |  |  |  |                 |   |
##                              o  |  |  o  |                 |   ╰-o - 2 (GND)
##                              7  o  |  4  o                 o
##                            GDO0 6  | CLK 5                 3
##                               GD02 o    MISO              M0SI
##                                    8
##                                   CSN
##
## ------------------------------------------------------------------
wmbus:
  mosi_pin: GPIO23    ## SI:   braun
  miso_pin: GPIO19    ## SO:   grün
  clk_pin: GPIO18     ## SCLK: violett
  cs_pin: GPIO05      ## CSN:  orange
  gdo0_pin: GPIO16    ## GD00: gelb (rx)
  gdo2_pin: GPIO17    ## GD02: weiss (tx)

  # log_unknown (Optional): Show telegrams from not configured meters in log.
  # Defaults to False
  log_unknown: False


## ---------------------------------------------------
## SWITCHES
## ---------------------------------------------------
switch:
  # reset boot counter value
  - platform: template
    name: Device Boot Counter reset
    turn_on_action:
      then:
        - lambda: |-
            id(boot_counter) = 0;
            id(bootcounter).publish_state(id(boot_counter));
        - logger.log:
            level: WARN
            tag: "system"
            format: "${device_name_short} reset boot counter o.k!"
        - component.update: bootcounter

  - platform: safe_mode
    name: "Device Restart (Safe Mode)"

  - platform: restart
    name: "Restart"
    id: restart_switch

  - platform: factory_reset
    name: Device Restart Factory

## ---------------------------------------------------
## SENSORS
## ---------------------------------------------------
sensor:

  - platform: wmbus
    # Meter ID (usually from sticker). Can be specified as decimal or hex.
    # only hex is working for my watermeter !
    # see: https://github.com/SzczepanLeon/esphome-components/issues/6
    # edit watermeterid in the secrets file
    meter_id: ${wmid}
    mode: C1
    type: qwater
    add_prefix: true

    # The LQI value reported by the CC1101 is a 7 bit unsigned number with a range from 0 to 127.
    # Note that a lower value indicates a better link.
    # The LQI of a received packet will be bad (higher number) when there is lot of interference.
    lqi:
      id: wmbus_cc1101_lqi
      name: "Watermeter CC1101 LQI"
      unit_of_measurement: "lqi"
      entity_category: "diagnostic"

    # The RSSI value reported by the CC1101 is a 8 bit signed number with an effective
    # range from -138 dBm to -10.5 dBm when the CC1101 is operating around 868 MHz.
    # RSSI stands for received signal strength (power) indication (in dBm).
    # A higher value indicates higher power.
    rssi:
      id: wmbus_cc1101_rssi
      name: "Watermeter CC1101 RSSI"
      unit_of_measurement: "%"
      entity_category: "diagnostic"

    # reports the watermeter display value
    total_water_m3:
      id: "waterdisplay"
      name: "Watermeter Display"
      unit_of_measurement: "m³"
      state_class: total_increasing
      device_class: "water"
      accuracy_decimals: 3
      icon: mdi:counter
      # update and calulatet all watermeter data values
      on_value:
        then:
          - lambda: |-
              ESP_LOGI("wmbus", "Water Display value: %.3f, last value: %.3f", id(waterdisplay).state, id(last_value));
              id(last_value)=id(waterdisplay).state;

    # get the last month total watermter m3 from the wmbus telegram  (wM-Bus 2.1.10)
    last_month_total_water_m3:
      name: "Water last month"
      id: "waterdisplay_lastmonth"
      unit_of_measurement: "m³"
      state_class: total_increasing
      device_class: "water"
      accuracy_decimals: 3
      icon: mdi:counter

    # water current month (wM-Bus v2.1.4)
    current_month_total_water_l:
      name: "Water current month"
      id: "watermonth"
      accuracy_decimals: 2
      unit_of_measurement: "L"
      state_class: total_increasing
      device_class: "water"

    # get the battery life time (wM-Bus v2.1.4)
    remaining_battery_life_y:
      name: "Watermeter Battery Life"
      id: "watermeter_batterie"
      accuracy_decimals: 2
      unit_of_measurement: "Years"
      icon: mdi:battery

    # get the last transmit periode (wM-Bus v2.1.4)
    transmit_period_s:
      name: "Watermeter transmit periode"
      id: "watermeter_transmit_periode"
      unit_of_measurement: "sec"
      accuracy_decimals: 2
      icon: mdi:timelapse

    ## get the current watermeter alarms and publish the text message (wM-Bus 2.1.10)
    current_alarms:
      id: "watermeter_current_alarms"
      name: "Watermeter current alarm code"
      icon: mdi:alarm-light
      entity_category: "diagnostic"

    ## get the prevois watermeter alarms and publish the text message (wM-Bus 2.1.10)
    previous_alarms:
      id: "watermeter_previous_alarms"
      name: "Watermeter pervious alarm code"
      icon: mdi:alarm-light
      entity_category: "diagnostic"

  # Wifi quality RSSI, internal used to calculate the Wifi quality RSSI in percentage
  - platform: wifi_signal
    id: wifi_signal_db
    update_interval: 60s
    internal: true
    disabled_by_default: true

  # Wifi quality RSSI in percentage
  # Received Signal Strength (RSSI) is a measure of incoherent
  ## (raw) RF power in a channel.
  - platform: copy # Reports the WiFi signal strength in %
    source_id: wifi_signal_db
    name: "Device WLAN Signal"
    filters:
      - lambda: return min(max(2 * (x + 100.0), 0.0), 100.0);
    unit_of_measurement: "%"
    entity_category: "diagnostic"

  # device boot counter
  - platform: template
    name: Device Boot counter
    id: bootcounter
    icon: mdi:counter
    accuracy_decimals: 0
    state_class: "measurement"
    entity_category: "diagnostic"
    lambda: return (id(boot_counter));

Ich finde deine Nachricht nicht?

Die Antwort ist im Chatfenster, Schau mal oben rechts in der “Sprechblase”

Ist mir schon fast unangenehm :smiley: aber ich sehe keine Sprechblase :rofl:

Den Chat musst du ggf. in deinem Userprofil aktivieren…:slight_smile:

Inzwischen ist das gedruckte Gehäuse für den ESP und Zubehör auch eingetroffen.
Ist etwas größer geworden (dafür passt auch alles sicher rein), aber ist an einer unauffälligen Stelle in der Nähe der Wasseruhr angebracht. Funktioniert bis jetzt alles super :slight_smile:
Gruß, AndiFidi


Für das tolle Gehäuse besten Dank an eBay-Home

Danke an @meloneA & @andifidi ich bin durch diesen Beitrag echt sehr weit gekommen. Leider scheitere ich an etwas vermutlich ganz einfachen, ich weiß nicht wie ich an die Meter-ID komme. Meine zwei Kalt- und Warmwasserzähler hängen in der Mietwohnung und auf den Zählern stehen viele Nummern. Auch im offiziellen Handbuch kann ich dazu nichts finden. Im Display wird mir eine Prüfziffer angezeigt, aber laut Recherche ist das auch nichts Brauchbares.

Wenn ich die ID auf 0 stelle, bekomme ich dieselben fragwürdigen Log-Einträge wie wenn ich einfach irgendeine Zahl eintrage.

[15:05:40][D][crc:035]:     calculated: 0x3E63, read: 0xFF29  !!!
[15:06:02][D][mbus:013]: Processing C1 A frame
[15:06:02][D][crc:035]:     calculated: 0x0FAE, read: 0x13FF  !!!
[15:06:24][D][mbus:013]: Processing C1 A frame
[15:06:24][D][crc:035]:     calculated: 0x361F, read: 0xAB4C  !!!
[15:06:40][D][mbus:013]: Processing C1 A frame
[15:06:40][D][crc:035]:     calculated: 0x5D22, read: 0xFF48  !!!
[15:06:40][D][mbus:013]: Processing C1 A frame
[15:06:40][D][crc:035]:     calculated: 0x8A97, read: 0xFF1A  !!!
[15:07:08][D][mbus:013]: Processing C1 A frame
[15:07:08][D][crc:035]:     calculated: 0x5F9C, read: 0x09A8  !!!
[15:07:33][D][mbus:013]: Processing C1 A frame
[15:07:33][D][crc:035]:     calculated: 0x5958, read: 0x0D1F  !!!
[15:07:56][D][mbus:013]: Processing C1 A frame
[15:07:56][D][crc:035]:     calculated: 0x1E83, read: 0x1E1E  !!!
[15:08:14][D][mbus:013]: Processing C1 A frame
[15:08:14][D][crc:035]:     calculated: 0xECCB, read: 0xFF1E  !!!
[15:08:34][D][mbus:013]: Processing C1 A frame
[15:08:34][D][crc:035]:     calculated: 0x42DA, read: 0xFFA6  !!!
[15:09:24][D][mbus:013]: Processing C1 A frame
[15:09:24][D][crc:035]:     calculated: 0x9A36, read: 0x13FF  !!!
[15:09:41][D][mbus:013]: Processing C1 A frame
[15:09:41][D][crc:035]:     calculated: 0x4946, read: 0x8286  !!!
[15:09:47][D][mbus:013]: Processing C1 A frame
[15:09:47][D][crc:035]:     calculated: 0xE243, read: 0x1EA0  !!!
[15:10:08][D][mbus:013]: Processing C1 A frame
[15:10:08][D][crc:035]:     calculated: 0x445F, read: 0xFF38  !!!

Kann mir hier jemand weiterhelfen?

Hast du mal wie hier beschrieben versucht deine ID rauszufinden?

Ganz nachvollziehen kann ich den Schritt leider nicht, da die verlinkte Datei: wm-esp32_test.yaml leider nicht auffindbar ist - aber es steht ja auch beschrieben, dass man die ID auf 0 und das log_level auf Verbose setzen soll, das habe ich getan - erhalte dabei dann immer noch detaillierte Informationen, aus denen ich aber keine Meter-ID herauslesen kann - oder übersehe ich hier was:

[17:43:11][V][rxLoop:167]: Have 86 bytes from CC1101 Rx, RSSI: -57 dBm LQI: 128
[17:43:11][D][mbus:013]: Processing C1 A frame
[17:43:11][V][mbus:017]: Frame: 49449344710508141807740B780DFF5F35008282270000EF0007C113FF2248FF89650300FF2C407202001E365654031056007B007C007F006F0084009D009400CD49449344710508141807740B780DFF5F350082 (84) [with CRC]
[17:43:11][V][mbus:095]: Validating CRC for Block1
[17:43:11][V][crc:031]:     calculated: 0x740B, read: 0x740B
[17:43:11][V][mbus:115]: Validating CRC for Block2
[17:43:11][D][crc:035]:     calculated: 0x2F0C, read: 0xFF22  !!!
[17:43:11][V][rxLoop:167]: Have 86 bytes from CC1101 Rx, RSSI: -87 dBm LQI: 128
[17:43:11][D][mbus:013]: Processing C1 A frame
[17:43:11][V][mbus:017]: Frame: 49449344630508141807F127780D0D2A101F37A2580000810007C113FF5507FF51960800FF2C539605001E36553208CCF2003901450120011101F200BF002F00CD49449344630508141807F127780DFF5F350082 (84) [with CRC]
[17:43:11][V][mbus:095]: Validating CRC for Block1
[17:43:11][V][crc:031]:     calculated: 0xF127, read: 0xF127
[17:43:11][V][mbus:115]: Validating CRC for Block2
[17:43:11][D][crc:035]:     calculated: 0x4B92, read: 0xFF55  !!!
[17:43:18][V][rxLoop:167]: Have 86 bytes from CC1101 Rx, RSSI: -60 dBm LQI: 128
[17:43:18][D][mbus:013]: Processing C1 A frame
[17:43:18][V][mbus:017]: Frame: 49449344113004141806C498780DFFFF101F37F9190000110007C113FF7D2AFF51481300FF2C609209001E36849612872400E701D901E201B601F601F501F301CD49449344113004141806C498780DFF5F350082 (84) [with CRC]
[17:43:18][V][mbus:095]: Validating CRC for Block1
[17:43:18][V][crc:031]:     calculated: 0xC498, read: 0xC498
[17:43:18][V][mbus:115]: Validating CRC for Block2
[17:43:18][D][crc:035]:     calculated: 0xE8D4, read: 0xFF7D  !!!
[17:43:29][V][rxLoop:167]: Have 68 bytes from CC1101 Rx, RSSI: -87 dBm LQI: 128
[17:43:29][D][mbus:013]: Processing C1 A frame
[17:43:29][V][mbus:017]: Frame: 3944934463050814180772307AC20000200C13515100007E0007C113FF8F47FF11470300FF2C201101001E36159802F7DF003F002B003A00410037003B001A00CD39 (66) [with CRC]
[17:43:29][V][mbus:095]: Validating CRC for Block1
[17:43:29][V][crc:031]:     calculated: 0x7230, read: 0x7230
[17:43:29][V][mbus:115]: Validating CRC for Block2
[17:43:29][D][crc:035]:     calculated: 0x6916, read: 0xFF8F  !!!
[17:43:39][I][safe_mode:041]: Boot seems successful; resetting boot loop counter
[17:43:48][V][rxLoop:167]: Have 86 bytes from CC1101 Rx, RSSI: -91 dBm LQI: 128
[17:43:48][D][mbus:013]: Processing C1 A frame
[17:43:48][V][mbus:017]: Frame: 49449344372904141806B8A9780D0DFF0000200C13514813004C136092092D7C00426CFF2CCC081384961200C2086C1E22573602BB560000326CFFFF046D2A101FCD49449344372904141806B8A9780D5F350082 (84) [with CRC]
[17:43:48][V][mbus:095]: Validating CRC for Block1
[17:43:48][V][crc:031]:     calculated: 0xB8A9, read: 0xB8A9
[17:43:48][V][mbus:115]: Validating CRC for Block2
[17:43:48][D][crc:035]:     calculated: 0xB4C5, read: 0x9209  !!!
[17:45:05][V][rxLoop:167]: Have 86 bytes from CC1101 Rx, RSSI: -57 dBm LQI: 128
[17:45:05][D][mbus:013]: Processing C1 A frame
[17:45:05][V][mbus:017]: Frame: 49449344710508141807740B780D0DFF101F3776CD0000800007C113FF04F2FF89650300FF2C407202001E365654031056007B007C007F006F0084009D00940082CD49449344710508141807740B780D5F350082 (84) [with CRC]
[17:45:05][V][mbus:095]: Validating CRC for Block1
[17:45:05][V][crc:031]:     calculated: 0x740B, read: 0x740B
[17:45:05][V][mbus:115]: Validating CRC for Block2
[17:45:05][D][crc:035]:     calculated: 0xF980, read: 0xFF04  !!!
[17:45:06][V][rxLoop:167]: Have 86 bytes from CC1101 Rx, RSSI: -87 dBm LQI: 128
[17:45:06][D][mbus:013]: Processing C1 A frame
[17:45:06][V][mbus:017]: Frame: 49449344630508141807F127780DFF5F3500828200000E0007C113FF0FC6FF51960800FF2C539605001E36553208CCF2003901450120011101F200BF002F0089CD49449344630508141807F127780DFF5F350082 (84) [with CRC]
[17:45:06][V][mbus:095]: Validating CRC for Block1
[17:45:06][V][crc:031]:     calculated: 0xF127, read: 0xF127
[17:45:06][V][mbus:115]: Validating CRC for Block2
[17:45:06][D][crc:035]:     calculated: 0xA805, read: 0x0FC6  !!!
[17:45:08][V][rxLoop:167]: Have 86 bytes from CC1101 Rx, RSSI: -60 dBm LQI: 128
[17:45:08][D][mbus:013]: Processing C1 A frame
[17:45:08][V][mbus:017]: Frame: 49449344113004141806C498780DFF5F350082B3B30000610107C113FF7F36FF51481300FF2C609209001E36849612872400E701D901E201B601F601F501F301CD49449344113004141806C498780DFF5F350082 (84) [with CRC]
[17:45:08][V][mbus:095]: Validating CRC for Block1
[17:45:08][V][crc:031]:     calculated: 0xC498, read: 0xC498
[17:45:08][V][mbus:115]: Validating CRC for Block2
[17:45:08][D][crc:035]:     calculated: 0x510B, read: 0xFF7F  !!!

https://wmbusmeters.org/analyze/49449344630508141807F127780DFF5F3500828200000E0007C113FF0FC6FF51960800FF2C539605001E36553208CCF2003901450120011101F200BF002F0089CD49449344630508141807F127780DFF5F350082:qcaloric

probiers ggf mal mit der ID 14080563 und dem Treiber “qcaloric”. Hast du noch eine genaue Typenbezeichung der Zähler?

Ok, ich habe die ID mal verwendet und angegeben, das Ergebnis ist aber unverändert. Auch den Treiber habe ich mal auf “qcaloric” geändert. Es handelt sich wie bei @andifidi um ein Qwater 5.5 von Qundis

ok, kannst du bitte deine Konfig posten?

Nachdem ich nun auch einen ESP32 statt einen D1 Mini ESP8266 verwende und ich endlich dahinter gekommen bin wie das mit der meter_id ist, klappt es nun auch bei mir. Warum beim ESP8266 immer nur halbe Messages ankamen weiß ich nicht, jetzt jedenfalls kommen immer saubere Messages an. Und bei mir kommen sogar noch weitere Informationen an:

{
    "media":"water",
    "meter":"qwater",
    "name":"",
    "id":"14080571",
    "due_date":"2023-12-31",
    "due_17_date":"2024-07-31",
    "due_17_date_m3":89.656,
    "due_date_m3":59.653,
    "error_date":"2128-03-31",
    "total_m3":90.144,
    "volume_flow_m3h":0,
    "meter_datetime":"2024-08-04 14:34",
    "status":"OK",
    "timestamp":"2024-08-04T13:39:40Z"
}

Da ich mein eigentliches Problem mit der Zählernummer aber nochmal aufgreifen möchte, um auch anderen zu helfen, denen es ähnlich wie mir geht.

Es muss lediglich die Zählernummer (steht meistens oben ganz groß drauf), ich habe sie mal im Bild markiert + vorangestellt 0x als meter_id angegeben werden. Ich habe mich hier von der Doku und irgendwelchen Hex-Werten irritieren lassen.

Folgender Zähler:

Wird wie folgt in der Konfig angegeben:

sensor:
  - platform: wmbus
    meter_id: 0x14043011
    type: qwater
    add_prefix: true
    mode: C1

    lqi:
      id: wmbus_warmwater_lqi
      name: "Watermeter LQI - Warmwasser"
      unit_of_measurement: "lqi"
      entity_category: "diagnostic"

    rssi:
      id: wmbus_warmwater_rssi
      name: "Watermeter RSSI - Warmwasser"
      unit_of_measurement: "dBm"
      entity_category: "diagnostic"

    total_water_m3:
      name: "Warmwasser"
      id: "warmwater"
      unit_of_measurement: "m³"
      state_class: total_increasing
      device_class: "water"
      accuracy_decimals: 3
      icon: mdi:counter

Meine Finale PIN-Belegung:

wmbus:
  mosi_pin: GPIO23  # D23 auf ESP32
  miso_pin: GPIO19  # D19 auf ESP32
  clk_pin: GPIO18   # D18 auf ESP32
  cs_pin: GPIO5     # D5 auf ESP32
  gdo0_pin: GPIO16  # RX2 auf ESP32
  gdo2_pin: GPIO17  # TX2 auf ESP32
  led_pin: GPIO2 # Lässt blaue LED auf ESP32 blinken, wenn eine Telegramm Message empfangen wird
  log_unknown: false # Nur bekannte Zähler werden geloggt

Das ist das verkabelte Ergebnis:

Danke trotzdem @meloneA für deine Bemühungen!

Danke für eure Mithilfe an alle in diesem Thread, echt super!

@syn_ack könntest du mir deine Hardwareliste posten? Von der anderen Liste weiter oben im Thread ist leider nicht mehr alles verfügbar.

Mit dem hier genannten Setup kann ich mehrere Zähler auslesen, korrekt? Ich habe 4 Stück (2x warm, 2x kalt).

Korrekt, du kannst ohne Probleme mehrere Wasserzähler auslesen, ich z.B. kann ohne weiteres den Wasserzähler der Nachbarn auch ablesen, wenn man das flag beim wmbus “log_unknown” auf true stellt, wird im Log jedes Signal der Wasserzähler ausgewertet.

Meine verwendete Hardware:

  • ESP32 Typ C ESP-WROOM-32 (Amazon.de)
  • CC1101 Funkmodul (Amazon.de)
  • ein paar Steckkabel, falls man nicht Löten möchte (Amazon.de)
  • USB-Netzteil (versteht sich von selbst)

Hier mal noch meine komplette Config:

esphome:
  name: "esp32-watermeter"
  friendly_name: ESP32-Watermeter

esp32:
  board: esp32dev
  framework:
    type: arduino


# Enable Home Assistant API
api:
  encryption:
    key: "******"

ota:
  - platform: esphome
    password: "****"

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

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Esp32-Dev Fallback Hotspot"
    password: "****"

captive_portal:
    
logger:

web_server:
  port: 80

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

wmbus:
  mosi_pin: GPIO23  # D23 auf ESP32
  miso_pin: GPIO19  # D19 auf ESP32
  clk_pin: GPIO18   # D18 auf ESP32
  cs_pin: GPIO5     # D5 auf ESP32
  gdo0_pin: GPIO16  # RX2 auf ESP32
  gdo2_pin: GPIO17  # TX2 auf ESP32
  led_pin: GPIO2
  log_unknown: false

sensor:
  - platform: wmbus
    meter_id: 0x14080571
    type: qwater
    add_prefix: true
    mode: C1

    total_water_m3:
      name: "Kaltwasser"
      id: "coldwater"
      unit_of_measurement: "m³"
      state_class: total_increasing
      device_class: "water"
      accuracy_decimals: 3
      icon: mdi:water
      on_value:
        then:
          - text_sensor.template.publish:
              id: cold_water_last_update
              state: !lambda 'return id(sntp_time).now().strftime("%Y-%m-%d %H:%M:%S");'


  - platform: wmbus
    meter_id: 0x14043011
    type: qwater
    add_prefix: true
    mode: C1

    total_water_m3:
      name: "Warmwasser"
      id: "warmwater"
      unit_of_measurement: "m³"
      state_class: total_increasing
      device_class: "water"
      accuracy_decimals: 3
      icon: mdi:counter
      on_value:
        then:
          - text_sensor.template.publish:
              id: hot_water_last_update
              state: !lambda 'return id(sntp_time).now().strftime("%Y-%m-%d %H:%M:%S");'

time:
  - platform: sntp
    id: sntp_time
    timezone: Europe/Sofia
    servers:
     - 0.pool.ntp.org
     - 1.pool.ntp.org
     - 2.pool.ntp.org

text_sensor:
  - platform: version
    name: "ESPHome Version"
  - platform: template
    name: "Kaltwasserzähler Letztes Update"
    id: cold_water_last_update
  - platform: template
    name: "Warmwasserzähler Letztes Update"
    id: hot_water_last_update



#status_led:
#  pin:
#    number: GPIO2
#    inverted: false

Viel Spass beim auslesen! Mein Setup läuft nun seit mehreren Wochen ohne Probleme :slight_smile:

2 „Gefällt mir“

Vielen Dank - soeben bestellt. Bin gespannt, wie einfach das Setup dann ist, meine erste Berührung mit einem ESP32.
Falls es euch interessiert werde ich dann noch zu diesem spezifischen Setup den Stromverbrauch nachliefern.

Der Aufbau funktioniert grundsätzlich.

Meine Zähler sind im S-Modus. Muss das auch noch im ESP konfiguriert werden, oder ist nur die Sendestärke schlechter? (Ich habe gesehen es gibt ja zumindest bei der Konfiguration des Sensors mode C1 oder T1 oder T1C1).

Bisher sehe ich die gesamten Rauchmelder, und habe ein paar mal einen Wasserzähler (vom Nachbarn) gesehen.

Wie oft kommt bei euch ein Telegramm vom Wasserzähler? Ich habe unterschiedliche Angaben online dazu gefunden… z.B. alle 50 Liter, oder im S-Modus alle 4 Stunden. Habe aber wie gesagt noch keines meiner Wasserzähler erhalten.

Anbei mal noch der Log vom ESP32:

|Time|level|Tag|Message|
| --- | --- | --- | --- |
|10:51:34|[D]|[mbus:013]|Processing C1 A frame|
|10:51:34|[D]|[crc:035]|calculated: 0xD809, read: 0x48D9 !!!|
|10:51:50|[D]|[mbus:013]|Processing C1 A frame|
|10:51:50|[D]|[wmbus:182]|Meter ID [0x47421152] RSSI: -71 dBm LQI: 128 Frame: C1 A not found in configuration T: 3E44934452114247231A7801FD086081027C034955230082026CFFFF81037C034C41230082036CFFFF03FD17000000326CFFFF046D3809183802FDAC7E0F00 (63)|
|10:51:52|[D]|[mbus:013]|Processing C1 A frame|
|10:51:52|[D]|[crc:035]|calculated: 0xE991, read: 0x8654 !!!|
|10:51:54|[D]|[mbus:013]|Processing C1 A frame|
|10:51:54|[D]|[crc:035]|calculated: 0x3495, read: 0xD338 !!!|
|10:51:54|[D]|[mbus:013]|Processing C1 A frame|
|10:51:54|[D]|[wmbus:182]|Meter ID [0x47421144] RSSI: -83 dBm LQI: 130 Frame: C1 A not found in configuration T: 3E44934444114247231A7801FD084281027C034955230082026CFFFF81037C034C41230082036CFFFF03FD17000000326CFFFF046D3809183802FDAC7EF100 (63)|
|10:52:05|[D]|[mbus:013]|Processing C1 A frame|
|10:52:05|[D]|[wmbus:182]|Meter ID [0x47421152] RSSI: -70 dBm LQI: 128 Frame: C1 A not found in configuration T: 3744934452114247231A7A6100002081027C034955230082026CFFFF81037C034C41230082036CFFFF02FD170000326CFFFF046D39091838 (56)|