Integration of an Eltako Modbus Electric Meter

I was a little surprised that nobody tried to integrate a dsz15dzmod-3x80a via modbus directly into Homeassistant

So i tried it and failed - but probably you could help me here:
in linux i can read each of the entities via mbpoll like this:

mbpoll -m rtu -a 1 -b 9600 -d 8 -s 1 -P none -t 3:hex -r 99 -c 2 /dev/ttyUSB1

This is the modbus documentation of the electric meter:

but in homeassistant i accordingly created a modbus.yaml but the readings don’t work there - here my testing config:

- name: eltako
  type: serial
  method: rtu
  port: /dev/ttyUSB1
  #port: /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A5069RR4-if00-port0
  baudrate: 9600
  stopbits: 1
  bytesize: 8
  parity: N
  timeout: 5
  sensors:
    # mbpoll -m rtu -a 1 -b 9600 -d 8 -s 1 -P none -t 3:hex -r 1 -c 2 /dev/ttyUSB1
    - name: "Spannung L1-N"
      unit_of_measurement: "V"
      slave: 1
      address: 0
      input_type: holding
      # liest zwei Register aus:
      data_type: int16
#      count: 2
      scale: 0.1

    # mbpoll -m rtu -a 1 -b 9600 -d 8 -s 1 -P none -t 3:hex -r 3 -c 2 /dev/ttyUSB1
    - name: "Spannung L2-N"
      unit_of_measurement: "V"
      slave: 1
      address: 2
      input_type: holding
      data_type: int32
      scale: 0.1

    # mpoll -m rtu -a 1 -b 9600 -d 8 -s 1 -P none -t 3:hex -r 5 -c 2 /dev/ttyUSB1
    - name: "Spannung L3-N"
      unit_of_measurement: "V"
      slave: 1
      address: 4
      input_type: holding
      data_type: int64
      scale: 0.1

    # mbpoll -m rtu -a 1 -b 9600 -d 8 -s 1 -P none -t 3:hex -r 7 -c 2 /dev/ttyUSB1
    - name: "Strom L1"
      unit_of_measurement: "A"
      slave: 1
      address: 6
      input_type: holding
      data_type: float16
      scale: 0.001

    # mbpoll -m rtu -a 1 -b 9600 -d 8 -s 1 -P none -t 3:hex -r 9 -c 2 /dev/ttyUSB1
    - name: "Strom L2"
      unit_of_measurement: "A"
      slave: 1
      address: 8
      input_type: holding
      data_type: float32
      scale: 0.001

    # mbpoll -m rtu -a 1 -b 9600 -d 8 -s 1 -P none -t 3:hex -r 11 -c 2 /dev/ttyUSB1
    - name: "Strom L3"
      unit_of_measurement: "A"
      slave: 1
      address: 10
      input_type: holding
      data_type: float64
      scale: 0.001

    # L1 active power
    # mbpoll -m rtu -a 1 -b 9600 -d 8 -s 1 -P none -t 3:hex -r 13 -c 2 /dev/ttyUSB1
    - name: "L1 Active Power"
      unit_of_measurement: "kW"
      slave: 1
      address: 12
      input_type: holding
      data_type: uint16
      scale: 0.001

    # L2 active power
    # mbpoll -m rtu -a 1 -b 9600 -d 8 -s 1 -P none -t 3:hex -r 15 -c 2 /dev/ttyUSB1
    - name: "L2 Active Power"
      unit_of_measurement: "kW"
      slave: 1
      address: 14
      input_type: holding
      data_type: uint32
      scale: 0.001

    # L3 active power
    # mbpoll -m rtu -a 1 -b 9600 -d 8 -s 1 -P none -t 3:hex -r 17 -c 2 /dev/ttyUSB1
    - name: "L3 Active Power"
      unit_of_measurement: "kW"
      slave: 1
      address: 16
      input_type: holding
      data_type: uint64
      scale: 0.001

    # L1 power factor
    # mbpoll -m rtu -a 1 -b 9600 -d 8 -s 1 -P none -t 3:hex -r 31 -c 2 /dev/ttyUSB1
    - name: "L1 Power Factor"
      unit_of_measurement: ""
      slave: 1
      address: 30
      input_type: holding
      data_type: int16
#      scale: 0.001

    # L2 power factor
    # mbpoll -m rtu -a 1 -b 9600 -d 8 -s 1 -P none -t 3:hex -r 33 -c 2 /dev/ttyUSB1
    - name: "L2 Power Factor"
      unit_of_measurement: ""
      slave: 1
      address: 32
      input_type: holding
      data_type: int32

    # L3 power factor
    # mbpoll -m rtu -a 1 -b 9600 -d 8 -s 1 -P none -t 3:hex -r 35 -c 2 /dev/ttyUSB1
    - name: "L3 Power Factor"
      unit_of_measurement: ""
      slave: 1
      address: 34
      input_type: holding
      data_type: int64

    # mbpoll -m rtu -a 1 -b 9600 -d 8 -s 1 -P none -t 3:hex -r 53 -c 2 /dev/ttyUSB1
    - name: "Total active power"
      unit_of_measurement: "kW"
      slave: 1
      address: 52
      input_type: holding
      data_type: int32
      scale: 1

    # mbpoll -m rtu -a 1 -b 9600 -d 8 -s 1 -P none -t 3:hex -r 63 -c 2 /dev/ttyUSB1
    - name: "Total Power Factor"
      unit_of_measurement: ""
      slave: 1
      address: 62
      input_type: holding
      data_type: int32
      scale: 1

    # mbpoll -m rtu -a 1 -b 9600 -d 8 -s 1 -P none -t 3:hex -r 73 -c 2 /dev/ttyUSB1
    - name: "Gesamtbezogene Wirkenergie"
      unit_of_measurement: "kWh"
      slave: 1
      address: 72
      input_type: holding
      data_type: float32
      # count: 2
      scale: 0.001

      # mbpoll -m rtu -a 1 -b 9600 -d 8 -s 1 -P none -t 3:hex -r 75 -c 2 /dev/ttyUSB1
    - name: "Gesamteingespeiste Wirkenergie"
      unit_of_measurement: "kWh"
      slave: 1
      address: 74
      input_type: holding
      data_type: string
      count: 2
      scale: 0.001

    # mbpoll -m rtu -a 1 -b 9600 -d 8 -s 1 -P none -t 3:hex -r 97 -c 2 /dev/ttyUSB1
    - name: "Teilbezogene Wirkenergie"
      unit_of_measurement: "kWh"
      slave: 1
      address: 96
      input_type: holding
      data_type: float32

    # mbpoll -m rtu -a 1 -b 9600 -d 8 -s 1 -P none -t 3:hex -r 99 -c 2 /dev/ttyUSB1
    - name: "Teileingespeiste Wirkenergie"
      unit_of_measurement: "kWh"
      slave: 1
      address: 98
      input_type: holding
      data_type: float32
      scale: 0.001

but none of the data_types produces working entries:

what can i do?

My HAOS Instance:

Home Assistant
Core 2024.11.3
Supervisor 2024.11.4
Operating System 13.2
Frontend 20241106.2

The FTDI in HAOS:

in the Error log are repeated error-entries

2024-12-04 11:51:23.280 ERROR (MainThread) [homeassistant.components.modbus.modbus] Pymodbus: eltako: Error: device: 1 address: 6 -> pymodbus returned isError True
2024-12-04 11:51:23.526 ERROR (MainThread) [homeassistant.components.modbus.modbus] Pymodbus: eltako: Error: device: 1 address: 12 -> pymodbus returned isError True
2024-12-04 11:51:23.726 ERROR (MainThread) [homeassistant.components.modbus.modbus] Pymodbus: eltako: Error: device: 1 address: 30 -> pymodbus returned isError True
2024-12-04 11:51:38.267 ERROR (MainThread) [homeassistant.components.modbus.modbus] Pymodbus: eltako: Error: device: 1 address: 6 -> pymodbus returned isError True
2024-12-04 11:51:38.465 ERROR (MainThread) [homeassistant.components.modbus.modbus] Pymodbus: eltako: Error: device: 1 address: 12 -> pymodbus returned isError True
2024-12-04 11:51:38.709 ERROR (MainThread) [homeassistant.components.modbus.modbus] Pymodbus: eltako: Error: device: 1 address: 30 -> pymodbus returned isError True
2024-12-04 11:51:53.260 ERROR (MainThread) [homeassistant.components.modbus.modbus] Pymodbus: eltako: Error: device: 1 address: 6 -> pymodbus returned isError True
2024-12-04 11:51:53.435 ERROR (MainThread) [homeassistant.components.modbus.modbus] Pymodbus: eltako: Error: device: 1 address: 12 -> pymodbus returned isError True
2024-12-04 11:51:53.644 ERROR (MainThread) [homeassistant.components.modbus.modbus] Pymodbus: eltako: Error: device: 1 address: 30 -> pymodbus returned isError True
2024-12-04 11:52:08.232 ERROR (MainThread) [homeassistant.components.modbus.modbus] Pymodbus: eltako: Error: device: 1 address: 6 -> pymodbus returned isError True
2024-12-04 11:52:08.442 ERROR (MainThread) [homeassistant.components.modbus.modbus] Pymodbus: eltako: Error: device: 1 address: 12 -> pymodbus returned isError True
2024-12-04 11:52:08.688 ERROR (MainThread) [homeassistant.components.modbus.modbus] Pymodbus: eltako: Error: device: 1 address: 30 -> pymodbus returned isError True
2024-12-04 11:52:23.375 ERROR (MainThread) [homeassistant.components.modbus.modbus] Pymodbus: eltako: Error: device: 1 address: 6 -> pymodbus returned isError True
2024-12-04 11:52:23.624 ERROR (MainThread) [homeassistant.components.modbus.modbus] Pymodbus: eltako: Error: device: 1 address: 12 -> pymodbus returned isError True
2024-12-04 11:52:23.867 ERROR (MainThread) [homeassistant.components.modbus.modbus] Pymodbus: eltako: Error: device: 1 address: 30 -> pymodbus returned isError True

For easier debugging i reduced the config to one value:

- name: eltako
  type: serial
  method: rtu
  port: /dev/ttyUSB1
  #port: /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A5069RR4-if00-port0
  baudrate: 9600
  stopbits: 1
  bytesize: 8
  parity: N
  timeout: 5
  sensors:
    # mbpoll -m rtu -a 1 -b 9600 -d 8 -s 1 -P none -t 3:hex -r 1 -c 2 /dev/ttyUSB0
    - name: "Spannung L1-N"
      unit_of_measurement: "V"
      slave: 1
      address: 0
      input_type: holding
      data_type: int32  # Korrekt für 4-Byte-Integer
      scale: 0.1

in the debug logs than appears this:

2024-12-04 14:56:21.298 DEBUG (SyncWorker_4) [pymodbus.logging] Current transaction state - TRANSACTION_COMPLETE
2024-12-04 14:56:21.298 DEBUG (SyncWorker_4) [pymodbus.logging] Running transaction 228
2024-12-04 14:56:21.298 DEBUG (SyncWorker_4) [pymodbus.logging] SEND: 0x0 0xe4 0x0 0x0 0x0 0x6 0x2 0x3 0x40 0x69 0x0 0x3c
2024-12-04 14:56:21.298 DEBUG (SyncWorker_4) [pymodbus.logging] New Transaction state "SENDING"
2024-12-04 14:56:21.301 DEBUG (SyncWorker_4) [pymodbus.logging] Changing transaction state from "SENDING" to "WAITING FOR REPLY"
2024-12-04 14:56:21.575 DEBUG (SyncWorker_4) [pymodbus.logging] Changing transaction state from "WAITING FOR REPLY" to "PROCESSING REPLY"
2024-12-04 14:56:21.575 DEBUG (SyncWorker_4) [pymodbus.logging] RECV: 0x0 0xe4 0x0 0x0 0x0 0x7b 0x2 0x3 0x78 0xc 0x1c 0x0 0x4a 0x0 0x0 0x0 0x0 0x0 0xe5 0x0 0xe6 0x3 0xe8 0x0 0x0 0x8 0xd 0x0 0x1e 0x0 0x3d 0x1b 0x86 0x0 0x23 0x0 0xf6 0xff 0xff 0xff 0xff 0x0 0x0 0xff 0xff 0xff 0xff 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x9 0xf 0x0 0x0 0x0 0x0 0x0 0xa2 0x9 0x9 0x0 0xe7 0x9 0x12 0x1 0xa4 0x0 0x1 0x0 0x1 0xff 0xff 0x0 0x1 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x1 0xfa 0x0 0x1e 0x0 0x0 0x0 0x0 0x0 0x0
2024-12-04 14:56:21.575 DEBUG (SyncWorker_4) [pymodbus.logging] Processing: 0x0 0xe4 0x0 0x0 0x0 0x7b 0x2 0x3 0x78 0xc 0x1c 0x0 0x4a 0x0 0x0 0x0 0x0 0x0 0xe5 0x0 0xe6 0x3 0xe8 0x0 0x0 0x8 0xd 0x0 0x1e 0x0 0x3d 0x1b 0x86 0x0 0x23 0x0 0xf6 0xff 0xff 0xff 0xff 0x0 0x0 0xff 0xff 0xff 0xff 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x9 0xf 0x0 0x0 0x0 0x0 0x0 0xa2 0x9 0x9 0x0 0xe7 0x9 0x12 0x1 0xa4 0x0 0x1 0x0 0x1 0xff 0xff 0x0 0x1 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x1 0xfa 0x0 0x1e 0x0 0x0 0x0 0x0 0x0 0x0
2024-12-04 14:56:21.575 DEBUG (SyncWorker_4) [pymodbus.logging] Factory Response[ReadHoldingRegistersResponse': 3]
2024-12-04 14:56:21.575 DEBUG (SyncWorker_4) [pymodbus.logging] Adding transaction 228
2024-12-04 14:56:21.576 DEBUG (SyncWorker_4) [pymodbus.logging] Very short frame (NO MBAP):  wait for more data
2024-12-04 14:56:21.576 DEBUG (SyncWorker_4) [pymodbus.logging] Getting transaction 228
2024-12-04 14:56:21.576 DEBUG (SyncWorker_4) [pymodbus.logging] Changing transaction state from "PROCESSING REPLY" to "TRANSACTION_COMPLETE"
2024-12-04 14:56:21.576 DEBUG (SyncWorker_4) [pymodbus.logging] [3100, 74, 0, 0, 229, 230, 1000, 0, 2061, 30, 61, 7046, 35, 246, 65535, 65535, 0, 65535, 65535, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2319, 0, 0, 162, 2313, 231, 2322, 420, 1, 1, 65535, 1, 0, 0, 0, 0, 0, 0, 0, 506, 30, 0, 0, 0]
2024-12-04 14:56:21.577 DEBUG (SyncWorker_42) [pymodbus.logging] Current transaction state - TRANSACTION_COMPLETE
2024-12-04 14:56:21.577 DEBUG (SyncWorker_42) [pymodbus.logging] Running transaction 229
2024-12-04 14:56:21.577 DEBUG (SyncWorker_42) [pymodbus.logging] SEND: 0x0 0xe5 0x0 0x0 0x0 0x6 0x2 0x3 0x40 0xbf 0x0 0x58
2024-12-04 14:56:21.577 DEBUG (SyncWorker_42) [pymodbus.logging] New Transaction state "SENDING"
2024-12-04 14:56:21.577 DEBUG (SyncWorker_42) [pymodbus.logging] Changing transaction state from "SENDING" to "WAITING FOR REPLY"

as the value is allways “0” in Homeassistant - there seems to be something wrong with the interpreted HEX-values or it conversion?
grafik