Hi, I have an inverter from Solarmax, which I would like to read out with HA via Modbus TCP/IP. The value for the charging and discharging power of the battery (charging power positive and discharging power negative) is in same register 114 (32-bit integer low word) and register 115 (32-bit integer high word). I can also read this out. However, I would like to have the charging power and the discharging power in separate sensors. As the HA energy dashboard for the battery system requires two separate sensors for the charging power and the discharging power. That’s why I tried it as follows:
modbus:
- name: solarmax
type: tcp
host: 192.168.178.134
port: 502
sensors:
- name: Battery charging power
unit_of_measurement: Wh
slave: 1
address: 114
input_type: input
data_type: int32
scale: 1
precision: 2
swap: word
count: 2
scan_interval: 10
device_class: energy
min_value: 0
- name: Battery discharging power
unit_of_measurement: Wh
slave: 1
address: 114
input_type: input
data_type: int32
scale: -1
precision: 2
swap: word
count: 2
scan_interval: 10
device_class: energy
state_class: total
min_value: 0
However, I then get this error message:
2024-01-26 16:24:31.371 WARNING (MainThread) [homeassistant.components.modbus.validators] Modbus sensor/Battery discharging power address 114_input_1 is duplicate, second entry not loaded!
The Modbus data sheet from Solarmax:
Data sheet
Is there a way to split the register between two sensors?