goodwe 0.3.4__tar.gz → 0.3.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {goodwe-0.3.4/goodwe.egg-info → goodwe-0.3.5}/PKG-INFO +1 -1
- goodwe-0.3.5/VERSION +1 -0
- {goodwe-0.3.4 → goodwe-0.3.5}/goodwe/et.py +13 -7
- {goodwe-0.3.4 → goodwe-0.3.5/goodwe.egg-info}/PKG-INFO +1 -1
- {goodwe-0.3.4 → goodwe-0.3.5}/tests/test_et.py +25 -0
- goodwe-0.3.4/VERSION +0 -1
- {goodwe-0.3.4 → goodwe-0.3.5}/LICENSE +0 -0
- {goodwe-0.3.4 → goodwe-0.3.5}/README.md +0 -0
- {goodwe-0.3.4 → goodwe-0.3.5}/goodwe/__init__.py +0 -0
- {goodwe-0.3.4 → goodwe-0.3.5}/goodwe/const.py +0 -0
- {goodwe-0.3.4 → goodwe-0.3.5}/goodwe/dt.py +0 -0
- {goodwe-0.3.4 → goodwe-0.3.5}/goodwe/es.py +0 -0
- {goodwe-0.3.4 → goodwe-0.3.5}/goodwe/exceptions.py +0 -0
- {goodwe-0.3.4 → goodwe-0.3.5}/goodwe/inverter.py +0 -0
- {goodwe-0.3.4 → goodwe-0.3.5}/goodwe/modbus.py +0 -0
- {goodwe-0.3.4 → goodwe-0.3.5}/goodwe/model.py +0 -0
- {goodwe-0.3.4 → goodwe-0.3.5}/goodwe/protocol.py +0 -0
- {goodwe-0.3.4 → goodwe-0.3.5}/goodwe/sensor.py +0 -0
- {goodwe-0.3.4 → goodwe-0.3.5}/goodwe.egg-info/SOURCES.txt +0 -0
- {goodwe-0.3.4 → goodwe-0.3.5}/goodwe.egg-info/dependency_links.txt +0 -0
- {goodwe-0.3.4 → goodwe-0.3.5}/goodwe.egg-info/top_level.txt +0 -0
- {goodwe-0.3.4 → goodwe-0.3.5}/pyproject.toml +0 -0
- {goodwe-0.3.4 → goodwe-0.3.5}/setup.cfg +0 -0
- {goodwe-0.3.4 → goodwe-0.3.5}/tests/test_dt.py +0 -0
- {goodwe-0.3.4 → goodwe-0.3.5}/tests/test_es.py +0 -0
- {goodwe-0.3.4 → goodwe-0.3.5}/tests/test_modbus.py +0 -0
- {goodwe-0.3.4 → goodwe-0.3.5}/tests/test_protocol.py +0 -0
- {goodwe-0.3.4 → goodwe-0.3.5}/tests/test_sensor.py +0 -0
goodwe-0.3.5/VERSION
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.3.5
|
|
@@ -3,7 +3,7 @@ from __future__ import annotations
|
|
|
3
3
|
import logging
|
|
4
4
|
from typing import Tuple
|
|
5
5
|
|
|
6
|
-
from .exceptions import RequestRejectedException
|
|
6
|
+
from .exceptions import RequestFailedException, RequestRejectedException
|
|
7
7
|
from .inverter import Inverter
|
|
8
8
|
from .inverter import OperationMode
|
|
9
9
|
from .inverter import SensorKind as Kind
|
|
@@ -482,8 +482,11 @@ class ET(Inverter):
|
|
|
482
482
|
self._settings.update({s.id_: s for s in self.__settings_arm_fw_19})
|
|
483
483
|
except RequestRejectedException as ex:
|
|
484
484
|
if ex.message == 'ILLEGAL DATA ADDRESS':
|
|
485
|
-
logger.debug("
|
|
485
|
+
logger.debug("EcoModeV2 settings not supported, switching to EcoModeV1.")
|
|
486
486
|
self._has_eco_mode_v2 = False
|
|
487
|
+
except RequestFailedException as ex:
|
|
488
|
+
logger.debug("Cannot read EcoModeV2 settings, switching to EcoModeV1.")
|
|
489
|
+
self._has_eco_mode_v2 = False
|
|
487
490
|
|
|
488
491
|
# Check and add Peak Shaving settings added in (ETU fw 22)
|
|
489
492
|
try:
|
|
@@ -491,8 +494,11 @@ class ET(Inverter):
|
|
|
491
494
|
self._settings.update({s.id_: s for s in self.__settings_arm_fw_22})
|
|
492
495
|
except RequestRejectedException as ex:
|
|
493
496
|
if ex.message == 'ILLEGAL DATA ADDRESS':
|
|
494
|
-
logger.debug("
|
|
497
|
+
logger.debug("PeakShaving setting not supported, disabling it.")
|
|
495
498
|
self._has_peak_shaving = False
|
|
499
|
+
except RequestFailedException as ex:
|
|
500
|
+
logger.debug("Cannot read _has_peak_shaving settings, disabling it.")
|
|
501
|
+
self._has_peak_shaving = False
|
|
496
502
|
|
|
497
503
|
async def read_runtime_data(self) -> Dict[str, Any]:
|
|
498
504
|
response = await self._read_from_socket(self._READ_RUNNING_DATA)
|
|
@@ -505,7 +511,7 @@ class ET(Inverter):
|
|
|
505
511
|
data.update(self._map_response(response, self._sensors_battery))
|
|
506
512
|
except RequestRejectedException as ex:
|
|
507
513
|
if ex.message == 'ILLEGAL DATA ADDRESS':
|
|
508
|
-
logger.warning("
|
|
514
|
+
logger.warning("Battery values not supported, disabling further attempts.")
|
|
509
515
|
self._has_battery = False
|
|
510
516
|
else:
|
|
511
517
|
raise ex
|
|
@@ -516,7 +522,7 @@ class ET(Inverter):
|
|
|
516
522
|
self._map_response(response, self._sensors_battery2))
|
|
517
523
|
except RequestRejectedException as ex:
|
|
518
524
|
if ex.message == 'ILLEGAL DATA ADDRESS':
|
|
519
|
-
logger.warning("
|
|
525
|
+
logger.warning("Battery 2 values not supported, disabling further attempts.")
|
|
520
526
|
self._has_battery2 = False
|
|
521
527
|
else:
|
|
522
528
|
raise ex
|
|
@@ -527,7 +533,7 @@ class ET(Inverter):
|
|
|
527
533
|
data.update(self._map_response(response, self._sensors_meter))
|
|
528
534
|
except RequestRejectedException as ex:
|
|
529
535
|
if ex.message == 'ILLEGAL DATA ADDRESS':
|
|
530
|
-
logger.warning("
|
|
536
|
+
logger.warning("Extended meter values not supported, disabling further attempts.")
|
|
531
537
|
self._has_meter_extended = False
|
|
532
538
|
self._sensors_meter = tuple(filter(self._not_extended_meter, self._sensors_meter))
|
|
533
539
|
response = await self._read_from_socket(self._READ_METER_DATA)
|
|
@@ -545,7 +551,7 @@ class ET(Inverter):
|
|
|
545
551
|
data.update(self._map_response(response, self._sensors_mppt))
|
|
546
552
|
except RequestRejectedException as ex:
|
|
547
553
|
if ex.message == 'ILLEGAL DATA ADDRESS':
|
|
548
|
-
logger.warning("
|
|
554
|
+
logger.warning("MPPT values not supported, disabling further attempts.")
|
|
549
555
|
self._has_mppt = False
|
|
550
556
|
else:
|
|
551
557
|
raise ex
|
|
@@ -28,6 +28,8 @@ class EtMock(TestCase, ET):
|
|
|
28
28
|
if filename is not None:
|
|
29
29
|
if 'ILLEGAL DATA ADDRESS' == filename:
|
|
30
30
|
raise RequestRejectedException('ILLEGAL DATA ADDRESS')
|
|
31
|
+
if 'NO RESPONSE' == filename:
|
|
32
|
+
raise RequestFailedException()
|
|
31
33
|
with open(root_dir + '/sample/et/' + filename, 'r') as f:
|
|
32
34
|
response = bytes.fromhex(f.read())
|
|
33
35
|
if not command.validator(response):
|
|
@@ -1196,3 +1198,26 @@ class GW29K9_ET_Test(EtMock):
|
|
|
1196
1198
|
self.assertSensor('apparent_power3', 0, 'VA', data)
|
|
1197
1199
|
|
|
1198
1200
|
self.assertFalse(self.sensor_map, f"Some sensors were not tested {self.sensor_map}")
|
|
1201
|
+
|
|
1202
|
+
|
|
1203
|
+
class GW5K_BT_Test(EtMock):
|
|
1204
|
+
|
|
1205
|
+
def __init__(self, methodName='runTest'):
|
|
1206
|
+
EtMock.__init__(self, methodName)
|
|
1207
|
+
self.mock_response(self._READ_DEVICE_VERSION_INFO, 'GW5K-BT_device_info.hex')
|
|
1208
|
+
self.mock_response(ModbusReadCommand(self.comm_addr, 47547, 6), 'NO RESPONSE')
|
|
1209
|
+
|
|
1210
|
+
def test_GW5K_BT_device_info(self):
|
|
1211
|
+
self.loop.run_until_complete(self.read_device_info())
|
|
1212
|
+
self.assertEqual('GW5K-BT', self.model_name)
|
|
1213
|
+
self.assertEqual('95000BTU203W0000', self.serial_number)
|
|
1214
|
+
self.assertEqual(5000, self.rated_power)
|
|
1215
|
+
self.assertEqual(0, self.modbus_version)
|
|
1216
|
+
self.assertEqual(254, self.ac_output_type)
|
|
1217
|
+
self.assertEqual(3, self.dsp1_version)
|
|
1218
|
+
self.assertEqual(3, self.dsp2_version)
|
|
1219
|
+
self.assertEqual(124, self.dsp_svn_version)
|
|
1220
|
+
self.assertEqual(11, self.arm_version)
|
|
1221
|
+
self.assertEqual(147, self.arm_svn_version)
|
|
1222
|
+
self.assertEqual('04029-03-S10', self.firmware)
|
|
1223
|
+
self.assertEqual('02041-11-S00', self.arm_firmware)
|
goodwe-0.3.4/VERSION
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
0.3.4
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|