0.1.0
First release of fronius-modbus, an async library for the Modbus TCP (SunSpec) interface of Fronius inverters, built on modbus-connection.
Warning
Alpha. The read paths are verified against a GEN24 and a SnapINverter, but the write operations change inverter behaviour and have only been exercised against a mock. Try them deliberately.
Supported devices
- GEN24 / Tauro — the inverter serves Modbus TCP itself (unit ID 1)
- SnapINverter behind a Datamanager 2.0 — one unit ID per inverter in the Solar Net ring (
00maps to 100)
The SunSpec register map is discovered at runtime, so the float vs int+SF setting is detected automatically and no register configuration is needed. Only Modbus itself has to be enabled on the inverter's web interface.
Reading
- Common (1) — manufacturer, model, software version, serial number
- Inverter (101-103 / 111-113), both encodings — AC power, frequency, lifetime energy, per-phase currents and voltages, apparent/reactive power, power factor, DC totals, operating and vendor state, event flags
- Multiple MPPT (160) — per-tracker DC current, voltage, power and lifetime energy, with module roles classified (PV string / storage charge / storage discharge) and derived totals: PV-only energy and battery charge/discharge energy, which the HTTP Solar API does not expose
- Basic Storage Control (124) — state of charge, battery status, charge/discharge limits and their enable flags, minimum reserve, grid charging
Every model is read in as few pooled block requests as possible, and values are read together with their scale factors so the two can never disagree.
Writing
Requires inverter control via Modbus to be enabled on the device.
set_power_limit()/clear_power_limit()— output power limiting (model 123)set_limits()— battery charge/discharge rates, including forced chargingset_minimum_reserve(),set_grid_charging()probe_write_access()— reports whether the device accepts writes at all
Limit setters take a revert_seconds auto-revert, so a controller that dies cannot leave the inverter constrained.
Also included
fronius_modbus.testing— build SunSpec register maps formodbus_connection.mock, used by this library's own tests and available to consumersscripts/read_inverter.py— one-shot dump of everything, plus write commandsscripts/monitor.py— live terminal UI with a power graph and a write dialog
Requirements
Python 3.12+ and modbus-connection>=4.1.0,<5.