dewet22 / givenergy-modbus

A python library to access GivEnergy inverters via Modbus TCP on a local network, with no dependency on the GivEnergy Cloud.
Other
19 stars 15 forks source link

Hybrid Gen3 Serial Number not recognised (FA*******) #34

Open Geheee opened 1 year ago

Geheee commented 1 year ago

Description

Trying to use the HA GivEnergy local package from HACS (https://github.com/cdpuk/givenergy-local)

What I Did

Input Inverter IP in the Config Wizard, which failed with the following in the logs

Failed to validate inverter configuration Traceback (most recent call last): File "/config/custom_components/givenergy_local/config_flow.py", line 48, in async_step_user serial_no = await read_inverter_serial(self.hass, user_input) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/givenergy_local/config_flow.py", line 27, in read_inverter_serial serial_no: str = plant.inverter.inverter_serial_number ^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/givenergy_modbus/model/plant.py", line 32, in inverter return Inverter.from_orm(self.inverter_rc) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/pydantic/main.py", line 577, in from_orm values, fields_set, validation_error = validate_model(cls, obj) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/pydantic/main.py", line 1102, in validatemodel values = validator(cls, values) ^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/givenergy_modbus/model/inverter.py", line 212, in compute_model values['inverter_model'] = Model.from_serial_number(values['inverter_serial_number']) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/givenergy_modbus/model/inverter.py", line 39, in from_serial_number raise UnknownModelError(f"Cannot determine model number from serial number {serial_number}") givenergy_modbus.model.inverter.UnknownModelError: Cannot determine model number from serial number FA