victronenergy / dbus-fronius

Venus OS driver for Fronius PV Inverters as well as other Sunspec ModbusTCP compliant inverters
MIT License
22 stars 9 forks source link

dbus-fronius

This application communicates with Fronius, ABB, SolarEdge, SMA, and possibly also other brands of PV Inverters. The data is then made available on D-Bus, the internal Data bus in Venus OS.

The Venus OS gui application contains several pages to change the behaviour of this application, especially settings on how to detect the inverters on the LAN.

In order to build the application, you need a linux system, a recent version of QT creator, the Venus OS SDK and a not publicly available library called velib.

You can find the SDK here:

https://github.com/victronenergy/venus/wiki

The there linked documentation also contains information on how to configure QT creator to use the cross compiler that comes with the SDK.

Next you can load the project file software/dbus-fronius.pro in QT creator and create the binary.

WARNING: this repository depends on a closed source library, velib.

PV Inverter Compatibility

Fronius: All Fronius inverters supporting the solar API v1. Also the sunspec modbus TCP standard is supported. If ModbusTCP is enabled on the Fronius using the web interface, then their ModbusTCP api is used, not the JSON. Power limiting, aka Zero feed-in, only works via ModbusTCP.

ABB: both monitoring and power limiting works. Uses the ModbusTCP sunspec API.

SMA: only monitoring works. Power limiting could be done, but requires more work, as SMA doesn’t follow the Sunspec API for that. Abandoned.

Solar Edge: only monitoring works. Its not possible to enable power limiting without help or even a firmware change on Solar Edge side. See details below. Abandoned.

Other PV inverters that implement the sunspec standard might work as well.

Note that as the code is now, it assumes that the sunspec registers are available at unit ID

  1. There is currently no mechanism to change this for the user, nor auto detection. This means that for some brands it might be necessary to change the config in the PV Inverter to that unit ID.

More information in the CCGX manual, section PV Inverter monitoring, as well as the PV Inverter manuals linked from there.

Sunspec quirks & more compatibility details

Fronius: The Fronius inverter appears to be compliant with the sunspec standard regarding the registers needed in this project. However, there may be multiple PV inverters sharing a single IP address. Multiple inverters are connected to a data manager, and not directly to the network. The data manager is connected to the network, and acts as a gateway for modbus TCP communication. Each inverter has its own unit ID. The unit IDs are retrieved using the solar API.

SMA sunny boy:

Solar Edge:

Development & toolchain

To compile and run on a (linux) PC you will also need a QT SDK (version 4.8.x), including QT D-Bus support. Because you do not have access to the system D-Bus (unless you run as root or adjust the D-Bus configuration) you should start the fronius application with: 'dbus-fronius --dbus session' Note that QT for windows does not support D-Bus, so you cannot build a windows executable.

The dbus-fronius executable expects the CCGX settings manager (localsettings) to be running. localsettings is available on github:

https://github.com/victronenergy/localsettings

The README.md of localsettings contains some information on how to run localsettings on your PC.

Unit tests

In order to run the unit tests, you need to install a python interpreter (v2.7 or newer).

Architecture

The application consists of 3 layers: