The turn of the year has negated the counter of modbus ET112

Hey guys,

some strange thing here:

at my brother PV system, we got an ET112 at the output side.
Since the year turn 2020/2021 the value of this sensor is fully negated.

snippet from configuration.yaml

  - platform: modbus
    scan_interval: 10
    registers:
      - name: Test_ET112_Arbeit_Plus_TOT
        hub: hub1
        unit_of_measurement: kWh
        slave: 1
        register: 16
        scale: 0.1
        register_type: holding

The question is, what the fuck have i done wrong? :smiley:

Hi Raphael,

Its probably too late by now but your problem is you are missing the data type on your modbus sensor. Basically Home assistant reads the ET112 number as INT16 (-32768 up to 32768) and the ET112 is presenting a UINT16 number (0 up to 65536). So every time you hit the upper number Home assistant wraps the number to the extreme negative and counts back to 0.

  - name: victron_direct_usb
    type: serial
    method: rtu
    port: /dev/ttyUSB0
    baudrate: 9600
    stopbits: 1
    bytesize: 8
    parity: N
    sensors:
      - name: Victron - Grid Import RAW           
        scan_interval: 10                       
        unit_of_measurement: "kWh"           
        slave: 2                          
        address: 274
        data_type: uint16
      - name: Victron - Grid Current RAW           
        scan_interval: 10                       
        unit_of_measurement: "A AC"           
        slave: 2                          
        address: 256
        data_type: int32
        swap: byte
1 Like