Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update deye #1691

Merged
merged 2 commits into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/modules/devices/deye/bat.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def update(self, client: ModbusTcpClient_, device_type: DeviceType) -> None:
unit = self.component_config.configuration.modbus_id

if device_type == DeviceType.THREE_PHASE:
power = client.read_holding_registers(590, ModbusDataType.INT_16, unit=unit) * -1
power = client.read_holding_registers(590, ModbusDataType.INT_16, unit=unit) * -10
soc = client.read_holding_registers(588, ModbusDataType.INT_16, unit=unit)
# 516: Geladen in kWh * 0,1
imported = client.read_holding_registers(516, ModbusDataType.UINT_16, unit=unit) * 100
Expand Down
4 changes: 2 additions & 2 deletions packages/modules/devices/deye/counter.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ def update(self, client: ModbusTcpClient_, device_type: DeviceType):
currents = [c / 100 for c in client.read_holding_registers(613, [ModbusDataType.INT_16]*3, unit=unit)]
voltages = [v / 10 for v in client.read_holding_registers(644, [ModbusDataType.INT_16]*3, unit=unit)]
powers = client.read_holding_registers(616, [ModbusDataType.INT_16]*3, unit=unit)
power = sum(powers)
frequency = client.read_holding_registers(187, ModbusDataType.INT_32, unit=unit) * 100
power = client.read_holding_registers(625, ModbusDataType.INT_16, unit=unit)
frequency = client.read_holding_registers(609, ModbusDataType.INT_16, unit=unit) / 100

# Wenn der Import/export Netz in wh gerechnet wird => *100 !! kommt in kw/h *0.1
imported = client.read_holding_registers(522, ModbusDataType.INT_16, unit=unit) * 100
Expand Down
2 changes: 1 addition & 1 deletion packages/modules/devices/deye/inverter.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def update(self, client: ModbusTcpClient_, device_type: DeviceType) -> None:

if device_type == DeviceType.THREE_PHASE:
# Wechselrichter hat 2 mppt Tracker
power = sum(client.read_holding_registers(672, [ModbusDataType.INT_16]*2, unit=unit)) * -1
power = sum(client.read_holding_registers(672, [ModbusDataType.INT_16]*2, unit=unit)) * -10
# 534: Gesamt Produktion Wechselrichter unsigned integer in kWh * 0,1
exported = client.read_holding_registers(534, ModbusDataType.UINT_16, unit=unit) * 100
elif device_type == DeviceType.SINGLE_PHASE_STRING or device_type == DeviceType.SINGLE_PHASE_HYBRID:
Expand Down