The End Of The Solar Dance

Apologies for the lack of updates on the projects for managing solar, but something happened in January that changed everything.

My original solar installer wrote to us suggesting a battery upgrade for the house. They provided a lot of data on what we had used and when since the installation. They had a payback that was at around three years. Since I’d done a lot of the maths the previous year, I pushed all the data into a spreadsheet and it became obvious that this was the way forward for us.

More On Presence Automation - ESPresence

More On Presence Automation - ESPresence

It’s got to that time of year when the nights are drawing in and the central heating is back on. The shorter gloomier days also mean that the abundance of solar generation we had through the summer is over and my mind turns back to how to be as efficient as possible with what’s created.

Last year I discussed some of the automations I had created through Home Assistant to help reduce energy costs. The basic idea was to try to “turn down” electricity and gas usage in rooms that were not in use. This was achieved through a combination of motion sensors and examining light states. (No motion plus no lights on equals an empty room).

Prusa Printers Octoprint Pausing

I’m writing this up after wasting over eight hours wrestling with an issue today.

My problem was straightforward. I had created an object that had a void in it. The idea was to pause the print at a specific layer, add a magnet into the created void and then allow the print to continue.

A simplified version is to think about a cube with a smaller cube removed from the centre. The printer prints up to the top level of the central cube and pauses while a magnet is placed in the centre. Once the magnet is in place it continues and completes the large cube.

Automating Heating - Intro

I can’t justify the extra expense of adding significant additional battery capacity to my solar installation with its current pricing. However, it’s interesting to note that having crunched the numbers, vehicle-to-home would have virtually eliminated all our grid consumption through the summer. It would only have been days when we needed to perform longer trips in the car on repeated days that would have caused us to import any energy at all.

Shutting Down Rooms Using Home Assistant

Shutting Down Rooms Using Home Assistant

Looking at optimising solar usage in the house is pointless without examining the background power draw of the house. If the background usage is high, we will burn through the energy stored in the house battery and start importing from the grid once the sun goes in.

The stored data/live views of the house can show the overall background power consumption, but not the specific detail. To avoid differences in consumption caused by appliances like TVs and cookers, I looked at the data when everyone was asleep.

Solar Car Charging Dance In Software

After thinking about how to use the solar power my home generates in the most efficient way I realised that this is a generic problem. Effectively we have three types of devices in play :

  • Generation Sources. eg. my solar panels, the house battery, the grid.
  • Switchable Consuming Devices. eg. My car, a heat pump, the house battery. The load generated by these devices can be turned on/off.
  • Background Load. The overall usage at the site. eg. my house load.

This general abstraction is a way of trying to come up with a common interface for each type of device so that we can easily add new devices as households get more connected.

Solar Excess And Energy Pricing

After creating the monitoring system for our solar installation earlier in the year I began to notice a few things about how it performed.

  • The solar output of the system is 9.6kWh and our house battery is around 10kWh.
  • The battery system has a maximum charge rate that the panels often exceed.
  • Whilst we get credit for energy exported back to the grid, the payment credit per kWh exported is approximately 8x less than the charge for 1kWh imported.

So as we rolled into summer, we got into the habit of waiting for peak sun to turn on dishwashers/washing machines and the car charger.

Solar Data Handling With Prometheus, Grafana And Docker

Solar Data Handling With Prometheus, Grafana And Docker

Now that we can pull the data from the local solar inverters, we need somewhere to store it. The excellent solismon3 discussed in the last post presents a simple page that Prometheus can consume to store the historic data.

The reporting partner to Prometheus is Grafana. This allows the creation of graphs/basic reporting of the data like this :

Data Logger Web Interface

To bundle everything together I created two solismon3 docker images with the configuration for each inverter added. I then used docker-compose to run those along with Prometheus and Grafana as follows :

Solar Inverter Fun

As per the previous posts on this solar project, I had managed to identify that It was possible to talk to the data loggers connected to my inverters from my local network. Reading up further on this I found that loggers use a proprietary protocol (Solarman v5 protocol). Several fantastic folks have done the leg work on and built libraries that use Modbus type calls to pull the data.

The project that I had the best initial experience with was solismon3. This one was able to collect data from one of the sticks I used straight away.

Solar Data Logging

Solar Data Logging


The data loggers that I discovered at the end of my installation have been connected to my home wifi by the installer. The default behaviour is that they probe the two inverters and send a burst of data to a cloud service every 5 minutes or so.

The loggers also have a local web interface that provides a way of controlling the device along with some basic data. The default username/password for these devices is admin/admin.