Solar and power monitoring

We installed Solar a year ago. After digging through all the manuals and websites, unfortunately the technology inside inverters and battery chargers is still very primitive. At least 20 years behind what we’d consider modern functionality.

The battery chargers (from Midnite Solar) speak ModBus over Ethernet. The inverters (from Outback) spit out a lot of data over the network, but don’t allow any control via the internal network. Well, they do, but only via a proprietary protocol they don’t publish. It’s used by their hosted monitor/control website. If I could do just basic control (use/drop utility power, start/stop generator, use/charge batteries) via the network, I could build a significantly smarter system that would adapt to changes in solar production and power rates as well as weather predictions (make sure batteries are fully charged before a storm), but I’m stuck with a very clunky interface and features.

I also got a Rainforest smart meter device, which is a bit better. It gets information directly from my meter about how much I’m selling or consuming, which sends serial data via USB.

Putting all that together, wrote a ton of Python code on a Raspberry Pi to gather the current information from all the devices in the system, and using our power companies’ calendar of time of day rates, I display a current status of our power usage, which is displayed at the top of this post.

I also stash the gathered data in a database, so I can graph historical info as well…

This all works pretty well, it both hosts the information locally, and sends the graphs up to a hosted server, so I can view info when not at home.

I still want to come up with a better way to store the data outside of the Raspberry Pi, since the database will eventually fill the SD card, and SD cards aren’t the ideal medium for constantly changing data, so the card is eventually going to just fail. Probably a good winter project!