My custom solar monitoring system (PVS6)
I’ve been tinkering with monitoring my solar system and have come to a fairly nice useful setup. Time for a post documenting where I am. The details on how I did all this are in previous blog posts but I’m summarizing here. Some code in this gist.
The Display

The daily view is focused on giving me a basic picture of my electricity usage. Green is production for the day, black is the PVS6 measurement of net (ie: production - consumption). Yellow is PG&E’s own view of net. I suspect PG&E’s data may be more correct; I’m not sure if the PVS6 CT sensors measure reactive loads correctly. Doesn’t much matter anyway; PG&E is the authority whether they are right or wrong. Mostly I just care that they are close. (Jan 7 is a data measurement anomaly.)

This view gives a lot of detail minute by minute. The top panel is a detailed view of production and consumption, what is a single bar in the daily graph. The second graph compares production to a forecast. Below that are details of individual panel production. The individual sparklines towards the bottom are fun; the panel in the upper left goes to 0 in the morning in the shadow of the chimney on my roof. At the bottom is a simple sparkline of lifetime net production, I had a little party when it passed 1MWh.
Implementation
The data import code is all in this gist. The Grafana panels are not shared anywhere, sorry.
Here’s all the places I’m pulling data.
- PVS6: the Sunpower solar monitoring system
- PG&E: manual downloads via their “Big Green Button”
- Predictions: forecast.solar
The whole system is built with Telegraf collecting the data into an Influx database and a Grafana dashboard to visualize it. What a great set of tools those are! A real pleasure to learn and work with.
The PVS6 stuff is the bulk of it. Turns out Sunpower has a JSON endpoint on a web server in your PVS6 and folks have worked out how to interpret the data. It’s pretty hacky; I’m using a Raspberry Pi to proxy the data onto the rest of the network. I’ve written a ~200 line Python script to collect the JSON data from the PVS6 every minute and emit it in Influx wire format for import. It also does a little analysis within the minute’s dataset to facilitate easier graphing.
The PG&E import is a very simple bit of Python code that converts PG&E’s data into Influx. I have to do this download by hand in the website right now. They do have an API but it requires some sort of signup I haven’t tried to do yet. I should add that PG&E’s Big Green Button CSV export is really quite good. The CSV data is clean and simple. And they have history! I was able to get 9 years of this house’s electricity usage. Nicely done.
The forecast.solar import is also very simple. They have a easy-to-use API where you tell them your location and the size and orientation of your solar system. Then they give predictions for power generated, including weather-corrected. The free version of the API is fine for this use; I download a new prediction every six hours.
Next steps
I plan to keep tinkering with the data display. I suspect as time goes on I’ll be more interested in the daily summaries than the per minute view, so I’ll probably pay more attention to that.
It’d be nice to automate the PG&E data download.
I’ve had some thought about packaging this all up as a Raspberry Pi image. I think the whole thing could run on pretty much any flavor of RPi, it’d be like an add-on to the PVS6 with a nice local web dashboard. But that’s a lot of work and I have zero interest in offering a product that uses an unauthorized Sunpower interface. Sunpower has a fairly decent monitoring website with something much like my daily summary view. They also have tools for installers showing per-minute data. Those aren’t available to end consumers, I think on purpose, and I suspect they would not be thrilled by me offering a competing product.