This page details how the solar energy readings on this website are updated.

Data Gathering

The real-time power output of the solar panels is measured by the inverter using a Fronius Interface Card Easy. This card allows a computer system to query the inverter for various operating parameters, including real-time, daily, and total output. Much like an expansion card for a computer, this card installs into a slot on the inverter.

The connection on the card is a DB9 serial port, and the connection is made to a computer's serial port via a null modem cable. (Due to the distance involved, for this install we made our own cable.)

This particular card is for the do-it-yourself computer programmer. Communicating with a device via a low-level serial protocol is not for the faint of heart. For those who want more of a "plug and play" solution, Fronius offers a pre-packaged web data logging module.

Querying the Inverter

The other end of the serial cable connects to a computer running linux. This machine is always on, as it is performing various server functions. Monitoring the inverter does not take up many computer resources, so it is not necessary to dedicate a separate machine to this.

A program (written by Kevin Paulisse, webmaster of this site) launches daily at 5:00 AM. It queries the inverter every 3 seconds, asking for the current power output. The power output is then uploaded to the web server (see next section). This continues until 10:00 PM, at which time the program exits automatically.

Web Server

The middletongreenhome.com website is hosted on a virtual machine by a web hosting provider. The results from the inverter are stored in a database table. For each uploaded measurement, the power reading, timestamp, and a sequential identification number are recorded.

When a visitor hits a page on the website for which the real-time solar tracker is enabled, a separate PHP script queries the database. The current power is simply the most recent measurement in the database. Because the inverter reports its daily power output in kWh only, the daily energy is approximated to the hundredth of a kWh using the trapezoidal rule.  (The calculated energy has matched the actual energy reported by the inverter each day that this script has been in operation.)

The visitor's web browser requests updated data every 5 seconds, and the numbers are refreshed based on the then-current measurement. This creates the illusion of watching the inverter's output in real-time.

Daily Stats

At 11:00 PM daily, a script is run on the web server to gather the day's maximum output and calculate the day's total energy generation, and put these numbers into a separate database table. This is used to provide the daily output summary table on the Solar page.

At midnight, as a new day is upon us, the total energy generation for the day resets to 0.00 kWh, and remains there until 5:00 AM when the entire process starts anew.

Tags: