Skip to content

Releases: farmio/fronius-solarapi

0.1.1

Choose a tag to compare

@github-actions github-actions released this 26 Oct 21:35
de024eb

What's Changed

Full Changelog: 0.1.0...0.1.1

0.1.0 Initial release

Choose a tag to compare

@farmio farmio released this 25 Oct 08:30
b7becd1

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, StatusError and RequestNotSupportedError.
  • 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_* and ACBRIDGE_* meter channel aliases
  • Body.LoggerInfo instead of Body.Data in 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.