Circular reasoning (Rolfe's solar energy system)

Big test tonight. Set-up as described, but the car is on charge for he entirety of the cheap-rate period. I also started the washing machine just before eleven. (Well, it was only going to take the battery export whichever way you slice it.)

I'm on my way to bed. There was enough hot water for a very acceptable wash, although it wasn't scalding by this time. In the morning the car should be charged, the battery should have discharged and charged again, and the water should be hot. All by 5.30 am. I suppose there's not really any point in letting the battery discharge when it's all going to be used for the car rather than exported, and I could simply set it to charge for the whole of the off-peak period. That would spare it a charge/discharge cycle.

I think I'll do that from now on, but I'll leave it for now just to see what happens if I don't alter the settings at all.
 
All by 5.30 am. I suppose there's not really any point in letting the battery discharge when it's all going to be used for the car rather than exported, and I could simply set it to charge for the whole of the off-peak period. That would spare it a charge/discharge cycle.
100% correct, leave your battery set to charge for all of the off peak period.
 
If I'm not charging the car though, I'm discharging the battery to get some export credit from it. Leaving the car charging aside, I reckon the best plan is simply to dump what's left in the battery starting at 11.30 then recharge it from 2 am. That has worked perfectly when no car charging is involved.

I could start the discharge earlier but I'm thinking ahead to making this a set up and forget system. It might happen in winter that there's little left in the battery by the end of the day (solar might be entirely absent) and if the discharge starts too soon then there could be a risk of it bottoming out before the cheap rate begins, thus leading to peak rate import.

Leaving this setting alone during car charging is neutral, I think. The battery simply does a pointless discharge/charge cycle while it all happens. It's arguably better to go in and change the settings when a car charge session has been set up so it doesn't do that, but all that gains is sparing the battery a charge/discharge cycle. It's fiscally neutral.

What I'm wondering about is whether it's worth discharging the battery before 11.30 when a car charge schedule has been set, while making sure the discharge doesn't finish before 11.30. If I don't do anything at all it's fine, but if I'm changing the battery schedule on a night when the car is charging, that might be the more beneficial way to play it.
 
Last night worked out fine. I started the washing machine about eleven, and shortly after I posted post #521 above, the thing bleeped at me that it was done, rather earlier than its original prediction. I had intended to hang the washing out in the morning, but the forecast looked a bit dodgy so I thought, what the hell, and chucked the entire load into the tumble dryer. This was all while the car was charging, but the system made light of it. In fact power was coming from the battery as well as the mains, but I think it would all have been fine even if the battery hadn't been discharging.

In the morning the clothes were washed and dried. I thought just as well, as there was a very heavy rain shower, but to be fair I could have got them dried outside in the afternoon. As it is, they're just airing on the pulley in the kitchen, saved possibly rushing out to unpeg things in the middle of a deluge. (Why does nobody make a lightweight plastic cover for a rotary clothes dryer that could be flipped over it when the dark clouds gather then whipped off again when the rain has stopped? I've been wondering this for literally decades.)

Car and home battery fully charged before 5.30 am. This time the car didn't hiccup between charging slots at all, and balanced properly, according to the MyEnergi app. While both car and home battery were charging together the house was importing 11 kw, but it didn't seem to bother it at all.

There was evidence that the Eddi hadn't quite got the water up to temperature by 5.30 am, but it was still very hot, so no complaints there.

This proves I can do what I like without changing any settings and nothing goes wrong. My only decision is whether to leave everything alone when the car is charging, or whether to switch the home battery to charging between 11.30 pm and 5.30 am to spare it an unnecessary discharge/charge cycle.

Or alternatively, to look at what's there and set it to discharge with a projected finishing time of just beyond 11.30, so I get export credit for that. If I can be bothered. If I'm in the Octopus app setting the scheduled charge it's not much more trouble just to go into the GivEnergy app and do that at the same time, I suppose. For example last night I set the scheduled charge just before ten. At that point the home battery was still at 93%. If I'd set that to discharge at that point I could have exported most of it to the grid for 15p before the car started to charge.

I think that's a net gain. I think. So many wrinkles. I'll try that next time I charge, I think. It suits me fine, because if I can't be arsed thinking about it then the system will be fine as it is, but if I choose to fiddle with the battery settings then I could gain about 50p a go (summertime).
 
OK, another re-think. Watching what was happening when the car was charging last night, and the pointless discharge/charge cycle of the battery, set me thinking again. I think I was right the first time, trying to time the battery reaching empty for as close to 11.30 as possible. But then I thought, this is so difficult to organise, I could end up emptying the battery before the off-peak rate kicks in, and have no option but to import peak rate power for the house.

So I leaped to the conclusion that I should start late, to make sure this never happened. Mistake, I realise. Doing this reduces the amount of export benefit I get by anything the house uses after 11.30, because the house is using the potential export rather than the grid. This seemed minimal, was minimal, when all that was happening were the fridge, freezer, some lights, a radio and a computer. 350 watts all told. I still got a decent amount of export.

But last night, with the car charging and the washing machine (and then the tumble dryer) running, obviously there was no export at all. The potential export, that I could have had if I'd started the battery discharging at about ten o'clock, was gobbled up by these loads. The difference is only 8p/kwh, but this is about small gains, made regularly, mounting up.

So, rather than freaking out and being over-concerned about avoiding a couple of minutes peak-rate usage if I miscalculate, I need to go back to where I was and set the discharge to start at something like ten o'clock. It takes the battery about 95 minutes to discharge from about 95%, which is where it tends to be at ten o'clock this time of year. So starting at ten was my plan, give it time to finish discharging, hopefully as close to 11.30 as possible, then set the start charging time for maybe 11.45 or midnight.

I fluffed the settings this evening and it didn't start to discharge as soon as I'd anticipated, but I'll see how it goes. I can do better tomorrow. If I get this right it means that I can start the washing machine or whatever as soon as the battery has discharged and I'll be using 7p/unit from the mains rather than a potential 15p/unit that the battery could have exported. Anything I want to use before 11.30 will reduce the export gain of course, but that's OK, the power is first and foremost there to be used when it's needed.

Sigh. Why isn't there a nice little idiot's guide to explain these things? Maybe there is, but I haven't seen it.

This is the first thing I have encountered which will require fairly regular intervention, rather than complete set-and-forget, as the optimum time to start the discharge is going to get later as more power is needed to meet the house load between dusk and the start of the discharge, so it will be starting from a lower % charge. I think. This is doing my head in. However, it doesn't have to be exact (it never can be exact, because a sunny evening and a cloudy evening behave differently), and if I get it roughly right for this time of year I can keep an eye on it for a bit and figure out when it needs adjusting. Hopefully I might find that one setting is OK for maybe a month.
 
Sigh. Why isn't there a nice little idiot's guide to explain these things? Maybe there is, but I haven't seen it.
I guess because there are many different set-ups (solar and battery size, EV battery size and use), with different equipment (MyEnergy, Givenergy), and many different energy tariffs as well.

Plus the solar generation and consumption patterns will vary throughout the year.

Put all these together and you've got a lot of potential permutations!
 
I suppose so. You'd think there might be some general principles that could be outlined for the novice, though!

The battery didn't finish discharging till 12.30 am this time, because I was messing with the app and getting things wrong. Better luck tomorrow. I'll start at ten again because I still think that's the right time, but build in enough wiggle-room so that it can take longer than an hour and a half if it's going to do that. It's not as if the recharging has to start early - starting by 2 am seems to give plenty time.

If this will simply work the next time without needing to be fiddled with, I can get the timings better refined and make a better guess at the best start time.
 
I suppose so. You'd think there might be some general principles that could be outlined for the novice, though!

The battery didn't finish discharging till 12.30 am this time, because I was messing with the app and getting things wrong. Better luck tomorrow. I'll start at ten again because I still think that's the right time, but build in enough wiggle-room so that it can take longer than an hour and a half if it's going to do that. It's not as if the recharging has to start early - starting by 2 am seems to give plenty time.

If this will simply work the next time without needing to be fiddled with, I can get the timings better refined and make a better guess at the best start time.
I have mentioned before, all of what youre wanting to do I actually do by using Home Assistant. This may be a step too far for you but rest assured, it can be done. You would however need to install HA (it runs on many platforms, Raspberry Pi, PC etc, has a strong following of enthusiasts and you can configure it to do almost anything.
My system loads the tracker gas price daily, looks at the current temperatures outside, the forecast and uses this data to heat / cool the house the most cost efficient way. It tracks the usage through the day and monitors the SOC on the batteries. It will then initiate export to the grid aiming to stop at 23:30 with 10% remaining. The charge cycle then starts and process repeats.
 
I have mentioned before, all of what youre wanting to do I actually do by using Home Assistant. This may be a step too far for you but rest assured, it can be done. You would however need to install HA (it runs on many platforms, Raspberry Pi, PC etc, has a strong following of enthusiasts and you can configure it to do almost anything.
My system loads the tracker gas price daily, looks at the current temperatures outside, the forecast and uses this data to heat / cool the house the most cost efficient way. It tracks the usage through the day and monitors the SOC on the batteries. It will then initiate export to the grid aiming to stop at 23:30 with 10% remaining. The charge cycle then starts and process repeats.
That looks fantastic, If I end up getting a battery and more panels, I'll probably give it a go

I just love Open Source stuff, and have a bit of experience with an early Pi.
 
Last edited by a moderator:
I'm sure it's great, and yes you did mention it before, but as you said, it's a step too far for me at the moment. I'm trying to work out the best way to set it up on first principles, then leave it alone.

But you have given me another idea about what to do to make this work better, so thanks.
 
I'm sure it's great, and yes you did mention it before, but as you said, it's a step too far for me at the moment. I'm trying to work out the best way to set it up on first principles, then leave it alone.

But you have given me another idea about what to do to make this work better, so thanks.
No problem, us country oiks in carrot crunching land have our moments ;)
 
It was what you said about not discharging the battery fully. I can see that would allow a bit of wiggle room to allow for the discharge starting a bit too soon.
 
It was what you said about not discharging the battery fully. I can see that would allow a bit of wiggle room to allow for the discharge starting a bit too soon.
hehe,

I've been playing around with chatgpt on a few different topics, I just asked it to write a home assistant script to check of fuel prices and then decide to run heatpump or gas boiler. Amazingly, it did it!

I asked:
"write a home assistant script to compare energy prices between gas and electricity and decide to operate heat pump or gas boiler"

"ChatGPT said:​


To create a script for Home Assistant that compares energy prices between gas and electricity and decides whether to operate a heat pump or a gas boiler, you'll need to use Home Assistant's scripting and template features. Below is an example of how you might implement such a script.

Step 1: Set Up Sensors for Gas and Electricity Prices​

First, ensure you have sensors that track the current prices for both gas and electricity. You might use sensors from energy providers or APIs, or you could set up manual sensors if the rates are static.
For example:
yaml
Copy code
sensor:
- platform: template
sensors:
gas_price_per_kwh:
value_template: "{{ states('input_number.gas_price_per_kwh') | float }}"
unit_of_measurement: "€/kWh"
electricity_price_per_kwh:
value_template: "{{ states('input_number.electricity_price_per_kwh') | float }}"
unit_of_measurement: "€/kWh"
heat_pump_efficiency:
value_template: "{{ states('input_number.heat_pump_efficiency') | float }}"
unit_of_measurement: "COP"

Step 2: Set Up Input Numbers for Manual Price Input​

If your energy prices are variable and you want to input them manually:
yaml
Copy code
input_number:
gas_price_per_kwh:
name: Gas Price per kWh
min: 0
max: 1
step: 0.01
unit_of_measurement: "€/kWh"

electricity_price_per_kwh:
name: Electricity Price per kWh
min: 0
max: 1
step: 0.01
unit_of_measurement: "€/kWh"

heat_pump_efficiency:
name: Heat Pump Coefficient of Performance (COP)
min: 1
max: 5
step: 0.1
unit_of_measurement: "COP"

Step 3: Create an Automation Script​

Now, create a script that compares the effective cost of operating the heat pump versus the gas boiler:
yaml
Copy code
script:
choose_heat_source:
alias: "Choose Heat Source"
sequence:
- variables:
gas_price: "{{ states('sensor.gas_price_per_kwh') | float }}"
electricity_price: "{{ states('sensor.electricity_price_per_kwh') | float }}"
heat_pump_efficiency: "{{ states('sensor.heat_pump_efficiency') | float }}"
electricity_cost_per_kwh_output: "{{ electricity_price / heat_pump_efficiency }}"

  • choose:
  • conditions:
# If gas is cheaper than electricity considering the heat pump's efficiency
- condition: template
value_template: "{{ gas_price < electricity_cost_per_kwh_output }}"
sequence:
- service: switch.turn_on
target:
entity_id: switch.gas_boiler
- service: switch.turn_off
target:
entity_id: switch.heat_pump

- conditions:
# If electricity is cheaper
- condition: template
value_template: "{{ gas_price >= electricity_cost_per_kwh_output }}"
sequence:
- service: switch.turn_on
target:
entity_id: switch.heat_pump
- service: switch.turn_off
target:
entity_id: switch.gas_boiler

Step 4: Automation to Trigger the Script​

You may want to trigger this script periodically or based on specific events (like a significant price change):
yaml
Copy code
automation:
- alias: "Check Heat Source"
trigger:
- platform: time_pattern
minutes: "/30" # every 30 minutes
- platform: state
entity_id:
  • sensor.gas_price_per_kwh
  • sensor.electricity_price_per_kwh
  • sensor.heat_pump_efficiency
action:
- service: script.choose_heat_source

Explanation:​

  1. Sensors: These track the prices of gas and electricity and the efficiency of the heat pump.
  2. Input Numbers: These allow for manual input of prices and efficiency.
  3. Script: The script calculates the effective cost of using the heat pump versus the gas boiler. It then decides which system to operate based on the cost comparison.
  4. Automation: This runs the script periodically or when a relevant sensor value changes.
You can further customize this to fit your specific setup or add more conditions if necessary."

I'm going to try a much more complex program request to include efficiencies, outside air temp, occupancy times, day of week etc and see how it goes.

AI is scary
 
Good grief!

I wonder where it copied that from, though. My closest experience with ChatGPT was when I was discussing something on Twitter that involved the surprising lack of EV chargers in Drymen. I used the phrase, "Drymen, the town ChargePlace Scotland forgot." The person I was talking to for some reason asked ChatGPT about chargers in Drymen, and the short response included the phrase, "Drymen appears to be the town that ChargePlace Scotland forgot." The syntax was slightly different from my tweet, but it was absolutly obvious that's where it got it from.

Seeing your comment about not discharging the battery as far as it will go was a good hint to me. If I start the discharge about 9.45, and protect 7% of the battery (it will go down to 4% minimum) then that gives 20-30 minutes of base house load left at the end if the discharge ends before 11.30. That's a first guess anyway, I'll see how it performs tonight, then tweak it.

I was thinking about that stuff about not exporting from your battery. I can't stop the battery charging during the day on the sunshine, and obviously I am going to charge it up at the cheap rate from 11.30 till 5.30, therefore the damn thing is going to spend the entire summer at almost 100%. It's at 100% during the off-peak time, and it's at 100% from dawn to dusk. Even now, going into September, it only dips to about 97% from 5.30 till sunrise, and only to about 93% from sunset till 11.30. I'm barely using it. It's forcing all my daytime usage to come from the solar rather than from the 7p/unit power stored in the battery. This is not my choice, but the system forces it on me.

Thus it is my contention that what is in the battery after sunset is indeed my own solar generation, that I would have preferred to export, but am prevented from exporting. So hey, Octopus, you're getting it in the evening rather than over the course of the day. It's true that sometimes they may be getting more than the solar generation I have been forced to use rather than export, but in that case it's still green energy if it came from Octopus in the first place, right? I really can't see that it's reasonable to expect me to monitor what I actually used in the house in a day, and only export that amount. Plus an allowance for losses. Oh, give it up already.

It sounds to me as if Octopus have just agreed to take your export, which includes discharging your battery in the evening, even though you'll have filled that battery using Tomato energy. So it would appear they're not that fussy anyway. (I was concerned that the objection would be about churning, not about non-green electricity. If it's about non-green electricity, well, they say that what they supply me with is green, so that should cover it.)
 
It sounds to me as if Octopus have just agreed to take your export, which includes discharging your battery in the evening, even though you'll have filled that battery using Tomato energy. So it would appear they're not that fussy anyway. (I was concerned that the objection would be about churning, not about non-green electricity. If it's about non-green electricity, well, they say that what they supply me with is green, so that should cover it.)
from what I can see, Tomato is renewable?
 
I gather that, but Octopus is maybe going to have to take Tomato at their word on that one. Whereas if you both import and export on Octopus, it at least knows where your export is coming from first-hand.
 
I gather that, but Octopus is maybe going to have to take Tomato at their word on that one. Whereas if you both import and export on Octopus, it at least knows where your export is coming from first-hand.
Ah ok, see where youre coming from. I have found other companies that will take export and some of them pay more than Octopus.
 
I hadn't realised that the "green" credentials of the export were such a big deal. I had been more concerned that someone would come along and say, hey you can't do that, we just sold you that for 7p, now you want us to buy it back for you at 15p, are you having a laugh? But it seems that's not the issue?

At least if you are selling and buying with the same company, there isn't quite the same potential for disputes about the provenance of the stuff.

One minor advantage of finishing the export at 11.30 or thereabouts is that it's easier to see what has happened on a day to day basis, compared to the battery export straddling midnight. I'm looking forward to seeing what happens tonight.

Looking at the figures for the days when I was away, the system was exporting between 7 and 7.4 kWh from the battery most nights. I imagine it would have been a bit more if I'd started the export discharge sooner, but probably not by much. It's not till you're using electricity on big loads after 11.30 that you realise the difference it can make. This will decrease as dusk gets earlier, and as I use electricity from the battery in the evening of course.

I'm finding it impossible to figure out how much solar the house plus battery are swiping during the day rather than exporting it, but it's probably well under 7 kWh, so if anything I'm up on the game doing it this way, assuming it's all kosher which it seems to be. It does mean the battery is cycling every day, but the alternative is to leave it at 100% for the vast majority of every day. Given that it's LFP, I doubt it cares.
 
Last edited by a moderator:
I hadn't realised that the "green" credentials of the export were such a big deal. I had been more concerned that someone would come along and say, hey you can't do that, we just sold you that for 7p, now you want us to buy it back for you at 15p, are you having a laugh? But it seems that's not the issue?
Electron pawnbroking :)
At least if you are selling and buying with the same company, there isn't quite the same potential for disputes about the provenance of the stuff.
They should have thought about that before lying to me :unsure:
 
Support us by becoming a Premium Member

Latest MG EVs video

MG Hybrid+ EVs OVER-REVVING & more owner feedback
Subscribe to our YouTube channel
Back
Top Bottom