Repository navigation
Releases: farmio/fronius-solarapi
Releases · farmio/fronius-solarapi
Release list
0.1.1
0.1.0 Initial release
First release of fronius-solarapi, an async Python library for the Fronius Solar API built on aiohttp.
Warning
Alpha version. The API may still change while the Home Assistant integration moves over.
Features
- Supports Solar API v0 and v1. The highest version a device supports is detected on the first request.
- Works with Datamanager, Datalogger Web, Symo Hybrid and GEN24/Tauro/Verto devices.
- Covers every realtime request:
- inverter info and inverter data (common, 3-phase, cumulation, system)
- logger info and LED info
- active devices
- meters, storages and Ohmpilots
- power flow, including Ohmpilot Eco and secondary meters
- Returns typed, frozen dataclasses instead of nested dicts. Values are in the API's base units, and missing values are
None. - Decodes the codes from the spec:
- inverter device types and status codes
- meter locations
- Ohmpilot states
- Fronius Solar Battery, LG Chem RESU H and BYD Battery-Box battery states
- Provides enums for power flow mode, battery mode, meter categories, Ohmpilot states and LED states.
- Raises clear exceptions:
FroniusConnectionError,InvalidResponseError,EndpointNotFoundError,NotSupportedError,StatusErrorandRequestNotSupportedError. - Retries requests that fail with transient Solar Net status codes 7, 8 and 9, which Datamanagers return now and then. This can be configured.
- Limits requests to two in parallel, as the spec asks.
Fronius quirks handled
- HTML-escaped names and units on Datamanagers
- negative UTC offsets reported as unsigned integers
- GEN24 integers and flags sent as floats
- old GEN24 firmware reporting the state string as
StatusCode - GEN24 renamed and misplaced keys in system scope and active device responses
SMARTMETER_*andACBRIDGE_*meter channel aliasesBody.LoggerInfoinstead ofBody.Datain logger info responses- responses sent as
text/javascript
Battery serial numbers are passed through unchanged, including their whitespace padding, so identifiers built from them stay stable.
Testing
The parsers are tested against recorded responses from:
- a Symo
- a Primo pair with an S0 meter
- an IG Plus
- two GEN24 devices, one with a BYD battery and an Ohmpilot
- a Datamanager serving API v0
- the examples in the official Fronius specification
Licensed under GPL-3.0-or-later. Thanks to pyfronius by Niels Mündler and Gerrit Beine, whose handling of device quirks this library builds on.