Invalid readouts with MODBUS and E3DC

Issue with E3DC Modbus Integration Showing Incorrect Values for Power Sensors

Description

I am trying to integrate my E3DC inverter with Home Assistant using the Modbus integration. The power sensors for the three phases (sensor.e3dc_inverter_power_l1, sensor.e3dc_inverter_power_l2, and sensor.e3dc_inverter_power_l3) work correctly when the power is above zero. However, when the inverter is idle or close to idle, the sensors display an incorrect value of 65533 Watts or even negative. (Negative for an inverter!?)

Current Setup

Modbus Configuration (modbus.yaml):

modbus:
  - name: "E3DC"
    type: tcp
    host: "192.168.1.100" 
    port: 502
    sensors:
      - name: "E3DC Inverter Power L1"
        unit_of_measurement: W
        address: 41005
        input_type: holding
        device_class: power
        data_type: int32
        slave: 1
        scale: 1
        precision: 0
        scan_interval: 5
      - name: "E3DC Inverter Power L2"
        unit_of_measurement: W
        address: 41007
        input_type: holding
        device_class: power
        data_type: int32
        slave: 1
        scale: 1
        precision: 0
        scan_interval: 5
      - name: "E3DC Inverter Power L3"
        unit_of_measurement: W
        address: 41009
        input_type: holding
        device_class: power
        data_type: int32
        slave: 1
        scale: 1
        precision: 0
        scan_interval: 5

Documentation of E3DC

  • E3DC says register 41000 for the inverter,
  • I have an offset of -1 (confirmed, other values are working flawlessly)
  • Offset for Watt are 4, 6 and 8
  • Length of 2
  • Data type is Int32

Issue

  • When the inverter power is above zero, the sensors display correct values.
  • When the inverter is idle or close to idle, the sensors show incorrect values such as 65533 Watts (or negative).

Examples of Current Sensor Readings

  • sensor.e3dc_inverter_power_l1 = 1050
  • sensor.e3dc_inverter_power_l2 = 65533
  • sensor.e3dc_inverter_power_l3 = -3

Request for Help

  • Is there something wrong with my current configuration?
  • Is there a better way to handle the signed 32-bit integer values in Home Assistant’s Modbus integration?
  • Any help or pointers to solve this issue would be greatly appreciated!

Additional Information

  • Home Assistant version: [Your HA version]
  • E3DC Inverter model: [Your Inverter model]
  • Network setup: [Basic description of your network setup]

Thank you in advance for your assistance!

@creis
I think you’ve used an incorrect data_type.

I am using the following configuration:

      - name: E3DC String 1 Power
        unique_id: e3dc_string1_power
        data_type: uint16
        address: 40101
        device_class: power
        unit_of_measurement: W
      - name: E3DC String 2 Power
        unique_id: e3dc_string2_power
        data_type: uint16
        address: 40102
        device_class: power
        unit_of_measurement: W