Collect Fronius inverter data and save in Influxdb for Grafana. This tool collects the most basic Fronius inverter data for a most basic fotovoltaic setup. If your installation is more sophisticated, then probably some extra work will be reqired.
This tool collects data from one or many of the three endpoints below. Endpoints that can be used (adjust DeviceId accordingly):
http://<fronius_ip>/solar_api/v1/GetInverterRealtimeData.cgi?Scope=Device&DataCollection=3PInverterData&DeviceId=1
http://<fronius_ip>/solar_api/v1/GetInverterRealtimeData.cgi?Scope=Device&DataCollection=CommonInverterData&DeviceId=1
http://<fronius_ip>/solar_api/v1/GetInverterRealtimeData.cgi?Scope=Device&DataCollection=MinMaxInverterData&DeviceId=1
To install requirements:
pip install -r requirements.txt
To run this tool with real inverter data, first copy the src/dev.py
file to src/prod.py
and adjust configuration (IP addresses, port numbers, user names and passwords, list of endpoints):
vim src/prod.py
Then run:
python src/prod.py
To install dev environment:
pip install -r requirements/dev.txt
To run mock fronius server:
export FLASK_APP=json_server
flask run
For development, I used this Grafana + Influx Docker image: https://hub.docker.com/r/philhawthorne/docker-influxdb-grafana/
Edit the dev.py
file and adjust accordingly. Then run:
python src/dev.py
I put my dashboards in grafana_dashboards
directory. Feel free to use them.