Skip to content

Commit

Permalink
read dc_power (openWB#2147)
Browse files Browse the repository at this point in the history
  • Loading branch information
ndrsnhs authored Jan 14, 2025
1 parent 5fdb6ad commit 859edfe
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/modules/devices/sungrow/sungrow/inverter.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,19 @@ def update(self) -> float:
if self.device_config.configuration.version in (Version.SH, Version.SH_winet_dongle):
power = self.__tcp_client.read_input_registers(13033, ModbusDataType.INT_32,
wordorder=Endian.Little, unit=unit) * -1
dc_power = self.__tcp_client.read_input_registers(5016, ModbusDataType.UINT_32,
wordorder=Endian.Little, unit=unit) * -1
else:
power = self.__tcp_client.read_input_registers(5030, ModbusDataType.INT_32,
wordorder=Endian.Little, unit=unit) * -1
dc_power = self.__tcp_client.read_input_registers(5016, ModbusDataType.UINT_32,
wordorder=Endian.Little, unit=unit) * -1

_, exported = self.sim_counter.sim_count(power)

inverter_state = InverterState(
power=power,
dc_power=dc_power,
exported=exported
)
self.store.set(inverter_state)
Expand Down

0 comments on commit 859edfe

Please sign in to comment.