Skip to content

Commit

Permalink
Add PV4 values to ETT inverters
Browse files Browse the repository at this point in the history
Add PV4 values to ETT inverters
  • Loading branch information
mletenay committed Jan 1, 2024
1 parent bff0fef commit 76f49c2
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
4 changes: 2 additions & 2 deletions goodwe/et.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ class ET(Inverter):
Apparent4("meter_apparent_power_total", 36041, "Meter Apparent Power Total", Kind.GRID),
Integer("meter_type", 36043, "Meter Type", "", Kind.GRID), # (0: Single phase, 1: 3P3W, 2: 3P4W, 3: HomeKit)
Integer("meter_sw_version", 36044, "Meter Software Version", "", Kind.GRID),
# Sensors added in some ARM fw update
# Sensors added in some ARM fw update, read when flag _has_meter_extended is on
Power4("meter2_active_power", 36045, "Meter 2 Active Power", Kind.GRID),
Float("meter2_e_total_exp", 36047, 1000, "Meter 2 Total Energy (export)", "kWh", Kind.GRID),
Float("meter2_e_total_imp", 36049, 1000, "Meter 2 Total Energy (import)", "kWh", Kind.GRID),
Expand All @@ -273,7 +273,7 @@ class ET(Inverter):
# Modbus registers from offset 0x89e5 (35301)
__all_sensors_mptt: Tuple[Sensor, ...] = (
Power4("ppv_total", 35301, "PV Power Total", Kind.PV),
# 35303 PV channel RO U16 1 1 PV channel
Integer("pv_channel", 35303, "PV Channel", "", Kind.PV),
Voltage("vpv5", 35304, "PV5 Voltage", Kind.PV),
Current("ipv5", 35305, "PV5 Current", Kind.PV),
Voltage("vpv6", 35306, "PV6 Voltage", Kind.PV),
Expand Down
8 changes: 4 additions & 4 deletions goodwe/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@

SINGLE_PHASE_MODELS = ["DSN", "DST", "NSU", "SSN", "SST", "SSX", "SSY", # DT
"MSU", "MST", "PSB", "PSC",
"MSC", # Found on third gen MS
"MSC", # Found on third gen MS
"EHU", "EHR", "HSB", # ET
"ESN", "EMN", "ERN", "EBN", "HLB", "HMB", "HBB", "SPN"] # ES Gen 2

MPPT3_MODELS = ["MSU", "MST", "PSC", "MSC",
"25KET", "29KET", "29K9ET", "30KET"]
MPPT3_MODELS = ["MSU", "MST", "PSC", "MSC"]

MPPT4_MODELS = ["HSB"]
MPPT4_MODELS = ["HSB",
"25KET", "29KET", "29K9ET", "30KET"]

BAT_2_MODELS = ["25KET", "29KET", "29K9ET", "30KET"]

Expand Down
8 changes: 7 additions & 1 deletion tests/test_et.py
Original file line number Diff line number Diff line change
Expand Up @@ -914,7 +914,7 @@ def test_GW25K_ET_runtime_data(self):
self.sensor_map = {s.id_: s.unit for s in self.sensors()}

data = self.loop.run_until_complete(self.read_runtime_data(True))
self.assertEqual(231, len(data))
self.assertEqual(237, len(data))

self.assertSensor('timestamp', datetime.strptime('2023-12-03 14:07:07', '%Y-%m-%d %H:%M:%S'), '', data)
self.assertSensor('vpv1', 737.9, 'V', data)
Expand All @@ -926,7 +926,12 @@ def test_GW25K_ET_runtime_data(self):
self.assertSensor('vpv3', 755.4, 'V', data)
self.assertSensor('ipv3', 1.3, 'A', data)
self.assertSensor('ppv3', 0, 'W', data)
self.assertSensor('vpv4', 755.4, 'V', data)
self.assertSensor('ipv4', 0.0, 'A', data)
self.assertSensor('ppv4', 0, 'W', data)
self.assertSensor('ppv', 2014, 'W', data)
self.assertSensor('pv4_mode', 0, '', data)
self.assertSensor('pv4_mode_label', 'PV panels not connected', '', data)
self.assertSensor('pv3_mode', 0, '', data)
self.assertSensor('pv3_mode_label', 'PV panels not connected', '', data)
self.assertSensor('pv2_mode', 2, '', data)
Expand Down Expand Up @@ -1103,6 +1108,7 @@ def test_GW25K_ET_runtime_data(self):
self.assertSensor('meter_current2', 2.2, 'A', data)
self.assertSensor('meter_current3', 1.9, 'A', data)
self.assertSensor('ppv_total', 529, 'W', data)
self.assertSensor('pv_channel', 2, '', data)
self.assertSensor('vpv5', 0.0, 'V', data)
self.assertSensor('ipv5', 0.0, 'A', data)
self.assertSensor('vpv6', 0.0, 'V', data)
Expand Down

0 comments on commit 76f49c2

Please sign in to comment.