diff --git a/solax/inverters/x1_mini_v34.py b/solax/inverters/x1_mini_v34.py index 5d3b4cf..90906ed 100644 --- a/solax/inverters/x1_mini_v34.py +++ b/solax/inverters/x1_mini_v34.py @@ -27,6 +27,7 @@ class X1MiniV34(Inverter): [vol.Coerce(float)], vol.Any( vol.Length(min=69, max=69), + vol.Length(min=100, max=100), vol.Length(min=200, max=200), ), ) diff --git a/tests/fixtures.py b/tests/fixtures.py index 4868ff7..f47368f 100644 --- a/tests/fixtures.py +++ b/tests/fixtures.py @@ -19,6 +19,7 @@ X3V34_HYBRID_VALUES_EPS_MODE, X3V34_HYBRID_VALUES_NEGATIVE_POWER, XHYBRID_VALUES, + X1_MINI_VALUES_V34_VER3, ) from tests.samples.responses import ( QVOLTHYBG33P_RESPONSE_V34, @@ -39,6 +40,7 @@ X3_MICPRO_G2_RESPONSE, XHYBRID_DE01_RESPONSE, XHYBRID_DE02_RESPONSE, + X1_MINI_RESPONSE_V34_VER3, ) X_FORWARDED_HEADER = {"X-Forwarded-For": "5.8.8.8"} @@ -238,6 +240,16 @@ def simple_http_fixture(httpserver): headers=None, data=None, ), + InverterUnderTest( + uri="/", + method="POST", + query_string=None, + response=X1_MINI_RESPONSE_V34, + inverter=inverter.X1MiniV34, + values=X1_MINI_VALUES_V34, + headers=None, + data="optType=ReadRealTimeData", + ), ] diff --git a/tests/samples/expected_values.py b/tests/samples/expected_values.py index f3d7a05..849bff2 100644 --- a/tests/samples/expected_values.py +++ b/tests/samples/expected_values.py @@ -365,6 +365,26 @@ "Inverter Temperature": 41, } + +X1_MINI_VALUES_V34_VER3 = { + "Network Voltage": 234.8, + "Output Current": 0.7, + "AC Power": 144.0, + "PV1 Voltage": 96.6, + "PV2 Voltage": 0.0, + "PV1 Current": 1.6, + "PV2 Current": 0.0, + "PV1 Power": 154.0, + "PV2 Power": 0.0, + "Grid Frequency": 49.94, + "Total Energy": 6.7, + "Today's Energy": 3.1, + "Total Feed-in Energy": 2.5, + "Total Consumption": 0.0, + "Power Now": 0.0, + "Inverter Temperature": 39.0, +} + X1_SMART_VALUES = { "Network Voltage": 239.6, "Output Current": 12.6, diff --git a/tests/samples/responses.py b/tests/samples/responses.py index ad65b18..04f9a93 100644 --- a/tests/samples/responses.py +++ b/tests/samples/responses.py @@ -441,6 +441,115 @@ "Information": [0.700, 4, "XXXXXXXXXXXXXX", 1, 1.19, 0.00, 1.32, 0.00, 0.00, 1], } +X1_MINI_RESPONSE_V34_VER3 = { + "sn": "XXXXXXXXXX", + "ver": "3.006.04", + "type": 4, + "Data": [ + 2348, + 7, + 144, + 966, + 0, + 16, + 0, + 154, + 0, + 4994, + 2, + 67, + 0, + 31, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 34, + 0, + 25, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 39, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + ], + "Information": [1.500, 4, "XXXXXXXXXXXXXX", 8, 2.27, 0.00, 1.43, 0.00, 0.00, 1], +} + X1_SMART_RESPONSE = { "sn": "XXXXXXX", "ver": "2.033.20",