Predbat and summer

12 comments started 2024-05-15 last 2024-05-15
Home Automation
D
#1 deanjesper

Now that the days are long and I'm getting decent PV generation, I'd like to stop grid charging the battery so much at night. Ideally I'd like to charge the battery up during the day from PV and then export any excess, and then run on solar/battery until it gets dark, and then run on battery, and only charge up on the grid at night off-peak for a few kWh, or if it gets to say 10pm and I have 60% SOC then I just run off the battery until the sun comes up and continue. What's the best way of doing this? I tried to set an inflated rate of import during the night time to stop it from charging up but then it reckons I've spent £8 today already!

G
#2 geoffreycoan

You could create an automation that sets predbat to read only at say 10pm, wait a minute for it to take effect, then issue instructions to the inverter to set to the mode you want overnight, eg set Eco, then put predbat back on in the morning.

Or an automation to set a number of override select.predbat_force_idle or similar time slots?

I think the read only might be better.

D
#3 deanjesper

geoffreycoan wouldn't Predbat want to try and discharge my battery in anticipation of a grid charge at 11:30pm?

D
#4 DD

deanjesper I have 60% SOC then I just run off the battery until the sun comes up and continue.

What's your (overnight) tariff ? If it's worth charging overnight, then I'd have thought it was worth pausing the battery and running the house from the grid, rather than continuing to use the battery during the cheap rate.

D
#5 deanjesper

DD 7.5p 11:30-5:30, but I want to try and reduce my grid import as a trial, just trying to see if I can live off PV for a bit!

D
#6 deanjesper

Just to give an update on this, I've set 11:30pm-5:00am as 'Manual force charge freeze' and this has frozen charge tonight and Predbat has kept the SOC constant without discharging later on this evening!

G
#7 geoffreycoan

deanjesper geoffreycoan wouldn't Predbat want to try and discharge my battery in anticipation of a grid charge at 11:30pm?

yes possibly, if it thinks you have excess stored energy and can recharge overnight. For me I'm on 15p outgoing fixed so predbat doesn't do discharges unless my import rate is low enough to make it worthwhile

All good fun, the manual selects will work, I don't know what its like setting them in a burst in an automation. Maybe want to delay a bit between setting each to let predbat recognise the change. Each time you make a pause discharge setting from the dropdown it causes predbat to restart its calculation, so banging in 10 or so in an automation might cause predbat some confusion.

D
#8 deanjesper

geoffreycoan it would be good to be able to select them all in one go and would save Predbat having to recalculate each time

G
#9 geoffreycoan

deanjesper Yes it would be, I just tried multiple selects in an automation and it didn't work.

Limitation of the select command https://www.home-assistant.io/integrations/select/ that expects a single option to be selected.

Single selection works fine, so maybe experiment with how predbat handles repeated setting:

action:
  - service: select.select_option
    metadata: {}
    data:
      option: "02:00:00"
    target:
      entity_id: select.predbat_manual_freeze_charge
G
#10 geoffreycoan

geoffreycoan update:

I tried an automation with two force idle commands immediately one after another for 15:00:00 and 15:30:00, and predbat seemed to be OK with the triggering, even accepting the commands whilst it was busy doing something else. The logfile said:

2024-05-15 22:09:47.557576 INFO pred_bat: Inverter 1 with soc_max 4.18 kWh nominal_capacity 5.22 kWh battery rate raw 2600 w charge rate 2.6 kW discharge rate 2.6 kW battery_rate_min 0.0 w ac limit 5.0 kW export limit 5.0 kW reserve 4.0 % current_reserve 4.0 %
2024-05-15 22:09:48.201266 INFO pred_bat: select_event: manual_idle, select.predbat_manual_idle = 15:00:00
2024-05-15 22:09:48.212668 INFO pred_bat: select_event: manual_idle, select.predbat_manual_idle = 15:30:00
2024-05-15 22:09:48.627324 INFO pred_bat: Inverter 1 SOC: 4.09 kW 98 % Current charge rate 0.0 w Current discharge rate 2600.0 w Current power -77.0 w Current voltage 52.0
2024-05-15 22:09:48.632014 INFO pred_bat: Inverter 1 scheduled charge enable is True
2024-05-15 22:09:48.636124 INFO pred_bat: Inverter 1 charge windows currently [{'start': 1350, 'end': 1380, 'average': 0}, {'start': 2790, 'end': 2820, 'average': 0}]
2024-05-15 22:09:48.639360 INFO pred_bat: Inverter 1 Charge settings: 05-15 22:30:00-05-15 23:00:00 limit 100.0 power 0.0 kW

But whilst predbat ran ok, the resultant plan only showed the 15:00:00 force idle set, and the dropdown looked quite inconsistent:

Putting a 10 second delay in between the two selects, the dropdown looked better

Predbat ran, the plan showed the 15:00 force idle but not the 15:30, then in a second run the 15:30 force idle appeared.

I'm guessing predbat queued the multiple selects up and re-ran after each one. I only need to force idle at these two slots to work around a bug that is causing predbat to want to discharge at 3pm every day, so I'll probably put a 1 minute delay in the automation to be sure

S
#11 stevelewis

geoffreycoan won't SmartTarget do what you want out of the box instead of using Predbat and disabling features?

G
#12 geoffreycoan

stevelewis I use predbat to manage my battery on Agile with Fixed export. It works great for me but at the moment there's a bug/feature that it plans a force export every afternoon at 3:30-4:00pm. I'm guessing that it's because I haven export rate override on from 4-7pm to dissuade export in DFS period / peak period and for some reason that makes predbat want to discharge just before then. It's wasteful because after the discharge it then refills with pv solar.
My intent was just to stop this until the bug is fixed.

@deanjesper original request was how to change predbat overnight. There are other ways if you're not using predbat of course