wm-Bus auslesen mittels iM871A-USB

Hallo
Zunächst erst einmal mein Kompliment zum Forum und dem YouTube Channel. Sehr sehr hilfreich.
Meine Frage bezieht sich auf den immer weiter verbreiteten WM-Bus.
Ich habe Zenner-Zähler (zelsius® C5-IUF, Aufputzwasserzähler Minomess) und NES (Stromzähler) im Keller. alle haben wm-Bus. Dank der Anleitung auf YouTube habe ich MQTT zum laufen bekommen. Aus das wmbusmeters-Plugin (wmbusmeters · GitHub) läuft. Ich bekomme aber keinen Output. Wo der Fehler liegt weiß ich nicht. Vielleicht falsches Device, Treiber, mangelhafte MQTT-Weitergabe oder Fehler in der Entität. Im wmBus-Protokoll sind keine Fehler, aber auch keine Werte. AES-Keys habe ich bekommen.
Wäre eine Anleitung als Video denkbar?

Nachtrag:

Auszug aus dem WMbusmeters:

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
cont-init: info: running /etc/cont-init.d/nginx.sh
cont-init: info: /etc/cont-init.d/nginx.sh exited 0
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun nginx (no readiness notification)
s6-rc: info: service legacy-services successfully started
[19:48:15] INFO: CONFIG_CONF …
[19:48:15] INFO: {“device”:“device=im871a:c1,t1”,“donotprobe”:“/dev/ttyAMA0”,“format”:“json”,“logfile”:“/dev/stdout”,“loglevel”:“normal”,“logtelegrams”:false,“shell”:“/wmbusmeters/mosquitto_pub.sh "wmbusmeters/$METER_NAME" "$METER_JSON"”}
[19:48:15] INFO: CONFIG_METERS …
[19:48:15] INFO: [{“driver”:“auto”,“id”:“552xxxxx”,“key”:“30xxxxxxxxxxxxxxxxE”,“name”:“TOP1WWasser”}]
[19:48:15] INFO: Syncing wmbusmeters configuration …
[19:48:15] INFO: Registering meters …
[19:48:15] INFO: Adding meter-0001 …
[19:48:15] INFO: Generating MQTT configuration …
[19:48:16] INFO: Broker core-mosquitto will be used.
[19:48:16] INFO:
MQTT Discovery …
tar: wmbusmeters-master/ha-addon/mqtt_discovery: not found in archive
[19:48:18] INFO: Adding meter: TOP1WWasser …
[19:48:18] INFO: File /config/wmbusmeters/etc/mqtt_discovery/auto.json not found.
[19:48:18] INFO: MQTT Discovery cleanup…
[19:48:20] INFO: Starting web configuration service.
[19:48:20] INFO: Running wmbusmeters …
Started config device=im871a[00104384] on /dev/ttyUSB0 listening on t1,c1
[19:48:21] INFO: Starting Nginx…
2023/12/04 19:48:21 [notice] 83#83: using the “epoll” event method
2023/12/04 19:48:21 [notice] 83#83: nginx/1.24.0
2023/12/04 19:48:21 [notice] 83#83: OS: Linux 6.1.21-v8
2023/12/04 19:48:21 [notice] 83#83: getrlimit(RLIMIT_NOFILE): 1073741816:1073741816
2023/12/04 19:48:21 [notice] 83#83: start worker processes
2023/12/04 19:48:21 [notice] 83#83: start worker process 246

:crayon:by HarryP: Zusammenführung Doppelpost

im Config-Ordner /homeassistant
chmod 777 wmbusmeters -R

/homeassistant/wmbusmeters/etc/wmbusmeters.conf

alarmexpectedactivity=mon-sun(00-23)
alarmshell=/usr/bin/mosquitto_pub -h localhost -t wmbusmeters_alarm -m "$ALARM_TYPE $ALARM_MESSAGE"
alarmtimeout=1h
device=/dev/ttyUSB0:im871a:c1,t1
donotprobe=/dev/ttyACM2
format=json
ignoreduplicates=true
logfile=/dev/stdout
loglevel=debug
logtelegrams=false
meterfiles=/var/log
meterfilesaction=overwrite
meterfilesnaming=name
meterfilestimestamp=day
shell=/usr/bin/mosquitto_pub -h localhost -t wmbusmeters/$METER_ID -m "$METER_JSON"
/homeassistant/wmbusmeters/etc/wmbusmeters.d/meter-0001

driver=minomess
id=55xxxxxx
key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
name=Top3WW
/homeassistant/configuration.yaml
mqtt:
  sensor:
    - state_topic: "wmbusmeters/Top3WW"
      json_attributes_topic: "wmbusmeters/Top3WW"
      unit_of_measurement: m³
      value_template: "{{ value_json.total_m3 }}"
      name: Top3WW
      icon: "mdi:gauge"
      state_class: total_increasing
      device_class: water
    - state_topic: "wmbusmeters/Top3KW"
      json_attributes_topic: "wmbusmeters/Top3KW"
      unit_of_measurement: m³
      value_template: "{{ value_json.total_m3 }}"
      name: Top3KW
      icon: "mdi:gauge"
      state_class: total_increasing
      device_class: water
    - state_topic: "wmbusmeters/Top3WMM"
      json_attributes_topic: "wmbusmeters/Top3WMM"
      unit_of_measurement: kWh
      value_template: "{{ value_json.METER_TOTAL_ENERGY_CONSUMPTION_LAST_MONTH_KWH }}"
      name: Top3WMM
      icon: "mdi:gauge"
      state_class: total_increasing
      device_class: energy

Im WMbusmeters-Protokoll stehen nun werte der 3 Testsensoren, jedoch immer abbrüche:

(shell) env "METER_PREV_3_MONTH_M3=null"
(shell) env "METER_PREV_4_MONTH_M3=null"
(shell) env "METER_PREV_5_MONTH_M3=null"
(shell) env "METER_PREV_6_MONTH_M3=null"
(shell) env "METER_PREV_7_MONTH_M3=null"
(shell) env "METER_PREV_8_MONTH_M3=null"
(shell) env "METER_PREV_9_MONTH_M3=null"
(shell) env "METER_PREV_10_MONTH_M3=null"
(shell) env "METER_PREV_11_MONTH_M3=null"
(shell) env "METER_PREV_12_MONTH_M3=null"
(shell) env "METER_PREV_13_MONTH_M3=null"
(shell) env "METER_PREV_14_MONTH_M3=null"
(shell) env "METER_DUE_ENERGY_CONSUMPTION_KWH=0"
(shell) env "METER_DUE_DATE=2023-01-01"
(shell) env "METER_VOLUME_FLOW_M3H=0"
(shell) env "METER_POWER_KW=0"
(shell) env "METER_TOTAL_ENERGY_CONSUMPTION_LAST_MONTH_KWH=0"
(shell) env "METER_LAST_MONTH_DATE=null"
(shell) env "METER_MAX_POWER_LAST_MONTH_KW=0"
(shell) env "METER_FLOW_TEMPERATURE_C=21.6"
(shell) env "METER_RETURN_TEMPERATURE_C=21.33"
(shell) waiting for child 303 to complete.
(shell) /bin/sh: return code 1
(shell) /bin/sh exited with non-zero return code: 1

oder

(meters) trying field info volume_flow(Flow)[8]...
(meters) trying field info target(Volume)[9]...
(meters) using field info target(Volume)[9] to extract 8C0413 at offset 43
(meter) Volume target_m3 decoded m3 default m3 value 0.038
(meters) trying field info target_date(Text)[10]...
(meters) using field info target_date(Text)[10] to extract 82046C at offset 38
(meters) trying field info target(Volume)[11]...
(meters) trying field info target_date(Text)[12]...
(meters) trying field info status(Text)[13]...
(meters) using field info status(Text)[13] to extract 02FD17 at offset 99
(minomess) 000   : 66 length (102 bytes)
(minomess) 001   : 44 dll-c (from meter SND_NR)
(minomess) 002   : 496a dll-mfct (ZRI)
(minomess) 004   : 18072555 dll-id (55xxxxxx)
(minomess) 008   : 18 dll-version
(minomess) 009   : 37 dll-type (Radio converter (meter side))
(minomess) 010   : 72 tpl-ci-field (EN 13757-3 Application Layer (long tplh))
(minomess) 011   : 30602625 tpl-id (25xxxxxx)
(minomess) 015   : 496a tpl-mfct (ZRI)
(minomess) 017   : 01 tpl-version
(minomess) 018   : 06 tpl-type (Warm Water (30°C-90°C) meter)
(minomess) 019   : ad tpl-acc-field
(minomess) 020   : 00 tpl-sts-field (OK)
(minomess) 021   : 5005 tpl-cfg 0550 (AES_CBC_IV nb=5 cntn=0 ra=0 hc=0 )
(minomess) 023   : 2f2f decrypt check bytes (OK)
(minomess) 025   : 0C dif (8 digit BCD Instantaneous value)
(minomess) 026   : 13 vif (Volume l)
(minomess) 027 C!: 56000000 ("total_m3":0.056)
(minomess) 031   : 02 dif (16 Bit Integer/Binary Instantaneous value)
(minomess) 032   : 6C vif (Date type G)
(minomess) 033 C!: E92C ("meter_date":"2023-12-09")
(minomess) 035   : 82 dif (16 Bit Integer/Binary Instantaneous value)
(minomess) 036   : 04 dife (subunit=0 tariff=0 storagenr=8)
(minomess) 037   : 6C vif (Date type G)
(minomess) 038 C!: E12C ("target_date":"2023-12-01")
(minomess) 040   : 8C dif (8 digit BCD Instantaneous value)
(minomess) 041   : 04 dife (subunit=0 tariff=0 storagenr=8)
(minomess) 042   : 13 vif (Volume l)
(minomess) 043 C!: 38000000 ("target_m3":0.038)
(minomess) 047   : 8D dif (variable length Instantaneous value)
(minomess) 048   : 04 dife (subunit=0 tariff=0 storagenr=8)
(minomess) 049   : 93 vif (Volume l)
(minomess) 050   : 13 combinable vif (InverseCompactProfile)
(minomess) 051   : 2C varlen=44
(minomess) 052 C?: 33FE000080000080000080000080000080000080000080000080000080000080000080000080000080000080
(minomess) 096   : 02 dif (16 Bit Integer/Binary Instantaneous value)
(minomess) 097   : FD vif (Second extension FD of VIF-codes)
(minomess) 098   : 17 vife (Error flags (binary))
(minomess) 099 C!: 0000 ("status":"OK")
(minomess) 101   : 2F skip
(minomess) 102   : 2F skip
(meters) render field meter_date(Text txt)[4] with dventry @33 key 026C data E92C
(meters)             "meter_date":"2023-12-09"
(meters) render field total(Volume m3)[6] with dventry @27 key 0C13 data 56000000
(meters)             "total_m3":0.056
(meters) render field target(Volume m3)[9] with dventry @43 key 8C0413 data 38000000
(meters)             "target_m3":0.038
(meters) render field target_date(Text txt)[10] with dventry @38 key 82046C data E12C
(meters)             "target_date":"2023-12-01"
(meters) render field status(Text txt)[13] with dventry @99 key 02FD17 data 0000
(meters)             "status":"OK"
(shell) exec "/bin/sh"
(shell) arg "-c"
(shell) arg "/usr/bin/mosquitto_pub -h localhost -t wmbusmeters/$METER_ID -m "$METER_JSON""
(shell) env "METER_JSON={"media":"warm water","meter":"minomess","name":"Top3WW","id":"25xxxxxx","meter_date":"2023-12-09","total_m3":0.056,"target_m3":0.038,"target_date":"2023-12-01","status":"OK","timestamp":"2023-12-09T12:07:27Z","device":"im871a[00104384]","rssi_dbm":-43}"
(shell) env "METER_ID=25xxxxxx"
(shell) env "METER_NAME=Top3WW"
(shell) env "METER_MEDIA=warm water"
(shell) env "METER_TYPE=minomess"
(shell) env "METER_TIMESTAMP=2023-12-09T12:07:27Z"
(shell) env "METER_TIMESTAMP_UTC=2023-12-09T12:07:27Z"
(shell) env "METER_TIMESTAMP_UT=1702123647"
(shell) env "METER_TIMESTAMP_LT=2023-12-09 13:07.27"
(shell) env "METER_DEVICE=im871a[00104384]"
(shell) env "METER_RSSI_DBM=-43"
(shell) env "METER_FABRICATION_NO=null"
(shell) env "METER_OPERATING_TIME_Hour=null"
(shell) env "METER_ON_TIME_Hour=null"
(shell) env "METER_ON_TIME_AT_ERROR_Hour=null"
(shell) env "METER_METER_DATE=2023-12-09"
(shell) env "METER_METER_DATETIME=null"
(shell) env "METER_TOTAL_M3=0.056"
(shell) env "METER_TOTAL_BACKWARD_M3=null"
(shell) env "METER_VOLUME_FLOW_M3H=null"
(shell) env "METER_TARGET_M3=0.038"
(shell) env "METER_TARGET_DATE=2023-12-01"
(shell) env "METER_TARGET_M3=0.038"
(shell) env "METER_TARGET_DATE=2023-12-01"
(shell) env "METER_STATUS=OK"
(shell) waiting for child 305 to complete.
Error: Address not available
(shell) /bin/sh: return code 1
(shell) /bin/sh exited with non-zero return code: 1
(wmbus) parseDLL @0 103
(wmbus) parseELL @10 93
(wmbus) parseNWL @10 93
(wmbus) parseAFL @10 93
(wmbus) parseTPL @10 93
(meter) Top3WMM: for me? 55xxxxxx,25xxxxxxx in 110xxxxxx
(meter) Top3WMM: not for me: not my id

z.B.

Probleme:

  1. In “meterfiles=/var/log” werden keinerlei Einträge abgespeichert.
  2. MQTT hat in den Entitäten (welche durch die configuration.Yaml angelegt werden (sensor.top3ww, sensor.top3kw und sensor.top3wmm) keinerlei Werte.

:crayon:by HarryP: Code-/Logzeilen formatiert

Habe es geschafft. Das Problem war wohl die HA und die Installationsreihenfolge und der Umstand, dass ich versucht hatte einen RPi3 (1GB RAM) zu verwenden.

Meine funktionierende Lösung:
RPi 4 mit 2 oder mehr GB Ram
HAOS neu aufgesetzt
MQTT nach Simons Video installiert und konfiguriert
Ebenfalls dem MQTT-Explorer
dann wmbusmeters installiert und im neuen Menureiter eingestellt mit:
device: /dev/ttyUSB0:im871a:c1,t1 und
donotprobe: /dev/ttyAMA0

sowie minomess als device

Alles läuft

Grüße, läuft denn noch alles zu deiner Zufriedenheit?Habe jetzt Warmwasser und Kaltwasserzähler bekommen und werde versuchen sie in HA zu implementieren.Brauchtest du einen AES Key zum entschlüsseln?

Ja, der AES ist im Addon einzugeben, sonst werden über MQTT keine brauchbaren Werte geliefert.

Sehr schön danke.Habe da heute mal angefragt und die meinten sowas gibt es nicht.Nala da muss die Hausverwaltung sich halt darum kümmern.Hast du nur über das Addon alles eingegeben und hattest deine Entitäten?Oder müsstest du noch was in Yaml schreiben?