Category Archives: PVout

Photo voltic power generation at Fjord Alle 27 Ringkobing Denmark.
The array consists of 6 250W panels oriented at azimuth 212° (South West) with an elevation of 45°.
The plant export power to the net via a1500W Growatt inverter which is monitored with a Raspberry Pi.

A Raspberry Pi is used to read data from a PV inverter (Growatt 1500) with firmware version G1.8 (modbus protocol) via the RS232 serial port. The data is automatically uploaded to pvoutput.org. Upload is sceduled every 5 min by setting up a cronjob for running a dedicated python script.
Feel free to use any bit of the code you like. Due reference is appreciated.
The code has been tested over some days and seem stable enough. It spits out a glitch AttributeError: ‘NoneType’ object has no attribute ‘registers’ when the inverter is not connected to the grid. But the effect is just that nothing is uploaded to pvout.org.

For older versions of the Growatt inverters a standard serial protocol is used. If you happen to own one of these you cannot use the python script as it is. Either the script should be modified for the serial protocol or you may want to look at : http://www.snafu.priv.at/mystuff/ where a perl script is provided which basically does the same stuff just for a serial protocol

The most resent upload from the system is here read with a portlet from pvoutput.org.

PVoutput.org

Go through the tabs below for information on the parts I used for this project.

To connect to the inverter you need a serial port on you RPI. I used a USB/Serial adapter but you may also try it out with TTL/Serial. Recommended: The FT232RL from Adafruit provides +-10V serial (RS232) not 5V serial (TTL). Don’t buy your USB/serial adapter cheap since it is really annoying debugging on a faulty connection. The above displayed product from Adafruit is high quality and reliable: http://www.adafruit.com/products/18 It is plug and play and automatically available on /dev/ttyUSB0 on your pi. You can check if it is correctly recognised by

Any Micro USB Charger will do. Buy one with at least 750 mA since the RPI needs to power both a WiFi dongle and a USB/serial adapter.

If your inverter is placed somewhere with poor signal you may consider an external antenna type adapter. But make sure it is compatible with the chipset on the RPI!
Seek information here: http://elinux.org/RPi_USB_Wi-Fi_Adapters
I used a RALINK RA5370 with an external antenna.
RALINK RA5370 USB WiFi

Pictures of setup

Here is a picture of the setup.

Growatt PV inverter and RPI

Python stuff

You will need a few libraries installed in Python before running the code.
A Python wrapper around the OpenWeatherMap web API