hoggyhoggy / givenergy-modbus-async

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

inverter class changes #28

Closed divenal closed 2 months ago

divenal commented 2 months ago

Next round of structural changes, for review/comment. closes #20 closes #16

divenal commented 2 months ago

These are again relative to the prepare-for-1.0 branch rather than the dev branches.

Main changes are getting rid of pydantic for inverter and battery classes, so that the classes now convert values on the fly when individual attributes are accessed, rather than converting everything to friendly format in python attributes when the inverter object itself is instantiated.

And then subsequent to that, introduce an optional 'valid' field to the master copy of the holding register definitions in inverter.py. Provide a mechanism to remove the register list in commands.py but I haven't actually gone ahead and converted the existing commands yet.

divenal commented 2 months ago

Doh! Sorry, I didn't first pull the 'merge' change from the previous pull request. Sorry, I'll rebase to that and have another go...