This is my small framework to fetch, store and display data from my Bosswerk inverter without a connection to the cloud.
This framework works in my home setup with a Bosswerk MI-600.
- The script fetches the
status.htmlfrom the inverter and converts the inline JavaScript variables to JSON. - The current power value is written into a rrd for graphing purposes.
- The script generates svg graphs for different timespans.
- The
wwwsubdirectory can be published to access the index page with current and historical data.
- bash
- curl
- rrdtool
useradd -m solar
sudo -i -u solar
git clone https://github.com/jcorporation/bosswerk.git
cd bosswerk
echo "PV_URI=\"http://10.10.100.254/status.html\"" > .config
cat > ~/.netrc << EOL
machine 10.10.100.254
login admin
password admin
EOL
./solar.sh
After the first run, there should be following new files:
rrd/solar.rrd: the rrd file with historical datawww/data/data.json: the json data filewww/graphs/last_*.svg: the svg graphs of historical data
Run the script only at daytime every 5 minutes. The rrdfile expects one datapoint each 5 minutes.
*/5 6-20 * * * /home/solar/bosswerk/solar.sh 2>&1 | logger -p local1.info
Publish the www directory via nginx:
location /bosswerk {
alias /home/solar/bosswerk/www;
}
