A Python wrapper for the Huawei Inverter Modbus TCP API. Current version is 3.0.0 (stable), released 2024. Releases are semi-regular. The v3 major release introduced breaking changes, including migration from pyModbus to tModbus, renaming of "bridge" classes to "device" classes, and replacement of `slave_id` with `unit_id`.
pip install huawei-solarVerified import paths — ran on the pinned version, not inferred.
Connects to a Huawei inverter over TCP and reads a register.
Change `slave_id=1` to `unit_id=1` when instantiating HuaweiSun2000.
Always use `await` when calling methods like `read()`, `write()`, `start()`, `stop()`.
Replace `HuaweiSolarBridge` with the appropriate device class depending on the hardware.
Check the device's capabilities via `inverter.capabilities` attribute.