PVOutput with the Raspberry Pi and SolarRiver Inverters

From KlavoWiki
Revision as of 09:22, 17 November 2013 by David (talk | contribs)
Jump to navigationJump to search

This was a lot simpler to what I was expecting. many thanks for all those that have posted their steps for pvoutput and the Raspberry Pi.

raspbian

Download, write image to SD card and boot.

Hardware

Wireless USB Key

If required you can use a wireless USB key which I have working with Raspbian. Just plug and play. $8.85 from ebay.

USB to RS232 Serial DB9

As the Raspberry Pi does not have any Serial ports I purchased the following USB to RS232 Serial DB9 Adapter Cable from eBay for $12.99 each. These are also plug and play.

Install PVOutput

Download and extract pvoutput.tar.gz
I have modified the pvoutput perl file to also include the inverters voltage which was previously not logging.

This will extract files to:

  • /opt
  • /opt/solar

I have 2 inverts so under /opt/solar I have 2 folders called 2kw and 3kw separating the 2 inverters.

Install Prerequisite

apg-get install libdevice-serialport-perl libappconfig-perl libwww-perl

Edit pvoutput

On lines 59, 60 and 61 enter the details of your pvoutput account.

SERIAL_NUM    => "S22123T486",
API_KEY       => "a84af5efb4ea4daa0dccd4f0a7c27ec31c194a8c",
SYSTEM_ID     => "12345",

cron

I have a bash file that creates cron entries so everything runs. Based on South East Queensland time the scripts will create 2 cron entries for sunrise to start the monitoring of the inverters. Once the inverters power off of an afternoon the inverter.pl scripts will try to contact the inverters for 5 attempts with a minute retry before terminating.

Run the following command to setup the cron entires.

/opt/solar-cron-setup.php

Sunrise

Edit the file paying attention to...

SUNFUNCS_RET_STRING, -27.34, 151.56, 90, 10

The is the longitude and latitude, specifically -27.34 and 151.56 which calculates the sunrise times for that area. As I'm located in Brisbane I have chosen Toowoomba for the sunrise times to allow for 1-2 minutes after the sun rises in Brisbane so I know the inverts would have powered on before the scripts runs. If the script runs and the inverters are not powered on the scripts will try to connect 5 times with a minute wait between retries.

If for some reason the inverters still have not powered on there is another script called solar-check.sh which is setup in cron to run at 5:30am at 7:00am to run the inverter.pl script if they are not already running.

My PVOutput Data

Reference