Solar panels - trying to make the most of them
I had the “misfortune” of installing solar panels at the start of November as the nights drew in. Moreover, December seems to have been eternally grey so the amount of generation I’ve had over the past couple of months has been low to put it mildly! However, I have been able to develop a strategy that, while not perhaps getting the greatest benefit out of them, does I think get pretty close.
What am I trying to do?
I need to define, however crudely, what the benefit I’m trying to achieve is. So in crude terms, I want to minimise my energy bill. Of course that will primarily be through my electricity use but I also will try to reduce my gas use.
At this time I am not on a tariff that will pay me for exporting electricity. This means any exported electricity is wasted, I need to use every electron I generate rather than give it to the National Grid! In March I’ll review this.
Daily baseline
In winter, and especially with the winter we’re having, there is no chance that there will be enough sunlight to fully charge my battery from zero (actually from its permitted minimum of 10%). So each night, during the Economy 7 time, I charge my battery and, if I did nothing else, this would save me some money as a greater proportion of my electricity usage is at Economy 7 rates.
Usually, I charge my battery to 100% but, on some days, when the forecast has lots of sunshine for the following day (which sadly has been too rare this winter), I charge my battery rather less. This can be anywhere from 50% to 80%. Unfortunately, I’ve learnt to not be aggressive as the weather forecast has usually suggested more sunlight than we end up getting.
How I optimise my usage
I have developed the following Node-RED flow that turns on different switches depending on how much charge is in the battery and whether I’m exporting to the grid (ignore the “lights” below, some of my ZigBee switches are registered as lights):
So what’s happening here?
Every 5s I check what amount is being exported (if any)
I then check if this poll is between sunrise and early afternoon (as I want to give a chance for the last couple of hours of daylight to charge the battery as much as possible)
If it’s outside of this time, I make sure I switch off everything that might be on.
If it is within the allowed time, I then do a “case” on how much is being exported:
If nothing is being exported, again I switch off everything that might be on.
If only a tiny amount is being exported (<0.1kW) and if I’m generating <0.4kW, I switch off the underfloor heater in the ensuite bathroom (it only draws 250W or so).
If I’m exporting >0.2kW and, as long as the battery is >25% charged, I switch on the ensuite bathroom underfloor heater. Note the 25% charged limit is fairly arbitrary and, since my underfloor heater uses so little power, I’ve left it like this although I’ve no doubt it could be better optimised.
If I’m exporting “lots”, >0.5kW, and the battery is >75% charged, I switch on the immersion heater. This uses 3kW so I need to be careful how I use it as it quickly drains the battery and ideally I want to be able to recharge the battery after the immersion heater has been switched on. I therefore switch off the immersion heater if the battery is <75% charged to allow the battery to be charged more quickly.
By heating the water in this way (and before I had solar panels I’d never used the immersion heater), my gas consumption is reduced as otherwise all the hot water is heated by gas.
I suspect that here there is certainly scope for greater optimisation.
There are some general actions I take irrespective of which of the above steps is active:
Before switching anything on or off, I check its current state and only switch it on or off if it’s not already on or off.
It’s possible that I want the ensuite underfloor heater or (less likely) the immersion heater on irrespective of anything else, for example I might want to shower in a warm bathroom. I use a Home Assistant (HA) binary helper for each switch to request the device be turned on via simple Node-RED flows.
As can be seen in the image above, before a switch is turned off, its respective HA helper is checked and the switch only turned off if the helper itself is off ie a “user” request takes priority over an automation request.
If the immersion heater is turned on by this or the following automation, then it will stay on for a minimum of five minutes before switching off. Before enforcing this I was finding the immersion heater could be coming on and off every minute (the actual frequency my solar data logger updates the data in HA).
Finally, if the battery is <90% charged, or I am importing from the grid, I have another automation (not shown) that will switch off the immersion heater. I use this as a “failsafe”. Obviously I never want to run my immersion heater from the grid, as this is expensive, and I consider having my battery as charged as possible from the sun as the ideal situation to be in at the end of the afternoon at this time of year.
Note the ensuite underfloor and immersion heaters are controlled by ZigBee switches (the latter rated at 20A) through Home Assistant (HA).
Octopus Energy free power curveball
As a customer of Octopus Energy, I am occasionally (once a week or so) offered the option of having a period of free electricity through an email the day before telling me when the electricity free period will be in the following day. To date, these have lasted from two to four whole hours and can start on any hour from 7am until 5pm. Who wouldn’t opt in to free electricity?!
These periods of free electricity turn almost every consideration above on its head! On any day with a free electricity period, I:
maximise use of the immersion heater and turn on any electric heating device I can (I will have to change this as winter ends)
charge my solar battery from the grid - charging from the grid is fast so I don’t want to charge it any more than I have to in advance of the free electricity period (so the overnight charging using Economy 7 needs to be reduced appropriately - but what is appropriate?!)
So far, I have been able to automate some of this:
the email from Octopus is detected by HA and, at 7pm (well after my usage optimisation flow would turn anything on or off), a Node-RED automation sets a binary helper true
At the end of the free electricity period, this binary helper is reset to false through another automation
In the Node-RED flow that tries to exploit solar generation in the previous section, there are several nodes called Free power today?. These nodes check the binary helper to see if there is free electricity due today and, if so, prevent the immersion heater from being switched off. The logic being that however much power it uses, it will be more than recovered during the free electricity period. Remember the immersion heater isn’t switched on unless the battery is at least 75% charged.
However, currently I have to manually:
Set my solar system so the battery is charged to an appropriate level overnight and then during the free electricity period it is charged to 100% reaching that at (ideally) the last moment of the free electricity period. This requires judgement that takes into account the weather forecast and so my likely generation, the time of the free electricity period and my anticipated demand for that day.
Update the timers that start and stop the Node-RED flows that maximise my use of electricity to the time of the free electricity period.
Future improvements
There are a few improvements I’d like to make to this approach:
Parse the Octupus free electricity email to extract the start and end time and set the timers in Node-RED without any manual intervention.
Automatically set my battery charging parameters (rate, max charge, start and end time(s)) depending on the weather forecast and whether there’s any free energy due. This would use a replacement for the Growatt servers that is currently in development, Grottserver.
I’ve already made a start on setting parameters without using the Growatt servers and hopefully will have more to report in the near future.