batpred icon indicating copy to clipboard operation
batpred copied to clipboard

Predbat charging at expensive rate

Open jacekowski opened this issue 1 year ago • 13 comments

Describe the bug For some reason, predbat decided to charge today at relatively expensive rate (20p, well above export rate) on a day with 50kWh solar forecast.

Expected behavior

Do nothing.

Predbat version

latest 7.17.7

Screenshots image

jacekowski avatar May 04 '24 08:05 jacekowski

Can you check if there was any significant draw from the grid? The limit was set to 48%, SOC already at 47%, PV was forecast to exceed load and the cost for the 30-minute period decreased slightly. It might have just been a blip in the calculation run.

RobinCu avatar May 04 '24 09:05 RobinCu

It has charged from the grid (not much, but it did).

And with my setup, it would have been actually correct to discharge early and not let battery hit 100% (i have 10kW of solar panels on 5kW inverter, so as soon as battery hits 100% i'm wasting solar)

jacekowski avatar May 04 '24 11:05 jacekowski

I've got it doing another stupid thing, it's preventing battery from discharging now. image

jacekowski avatar May 05 '24 03:05 jacekowski

What are your values for these: image image image

I tried to explain why holding charge is sensible in issue #1035, however it maybe your inputs to the fields above are a little high and are forcing this to happen at higher rates than you would like. Appreciate your scenario is a little different with the potential for clipping, but perhaps tweaking these settings will help.

mpartington avatar May 05 '24 06:05 mpartington

0.04 for all loss values and i don't have battery cycle cost entity.

Accounting for losses, it should use battery for anything above 17p, but it is doing freeze charge even at 19p+ rates.

jacekowski avatar May 05 '24 07:05 jacekowski

Strange, it was doing this for me at the very high 25p+ peak rates, but Trefor put a fix in that seems to have worked. Might be worth uploading a log filewith a few cycles in debug mode next time you catch it

mpartington avatar May 05 '24 07:05 mpartington

Looks like.mine.has also decided to do similar..Doesn't make sense, as can top up on solar for less cost. Slot force to Idle as was actually charging Screenshot_2024-05-05-15-48-11-029_io homeassistant companion android

mpartington avatar May 05 '24 14:05 mpartington

logs..

appdaemon.log appdaemon1.log

At 19:35 , the plan goes nuts and starts to use grid at high rates and also plan on charging at high rates. moving back a few versions, then reinstalling v7.7.12 restored the plan to something sensible download

and back to normal

image

mpartington avatar May 05 '24 19:05 mpartington

With debug for the latest change 21:25 is the relevant run

appdaemon.log

Screenshot_2024-05-05-21-27-51-943_io homeassistant companion android

mpartington avatar May 05 '24 20:05 mpartington

The issue seems to relate to the use of metric battery cycle when its non-zero, testing a fix now

springfall2008 avatar May 06 '24 08:05 springfall2008

Fix on main for testing

springfall2008 avatar May 06 '24 08:05 springfall2008

@springfall2008 Logs for the 0.5p and 2p battery metric.
The 2p seems to be planning to hold at very high rates around19:00 (>21p) appdaemon1.log appdaemon.log

Plans run around 10:30, so across 2 log files unfortunately

Screenshot_2024-05-06-10-38-40-411_io homeassistant companion android

mpartington avatar May 06 '24 10:05 mpartington

I've changed my settings slightly to limit battery charge rate (to start exporting early and not waste any solar), by making battery_rate_max an entity and using node-red to adjust it. Now that i have it set to 2000, predbat comes up with plan to force charge.

image

jacekowski avatar May 07 '24 09:05 jacekowski