Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Predbat charging at expensive rate #1040

Closed
jacekowski opened this issue May 4, 2024 · 13 comments
Closed

Predbat charging at expensive rate #1040

jacekowski opened this issue May 4, 2024 · 13 comments
Assignees
Labels
bug Something isn't working

Comments

@jacekowski
Copy link

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

@RobinCu
Copy link
Contributor

RobinCu commented May 4, 2024

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.

@jacekowski
Copy link
Author

jacekowski commented May 4, 2024

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
Copy link
Author

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

@mpartington
Copy link

mpartington commented May 5, 2024

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.

@jacekowski
Copy link
Author

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.

@mpartington
Copy link

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
Copy link

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
Copy link

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
Copy link

mpartington commented May 5, 2024

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

@springfall2008
Copy link
Owner

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

springfall2008 added a commit that referenced this issue May 6, 2024
springfall2008 added a commit that referenced this issue May 6, 2024
* Fix for metric battery cycle

#1040

* [pre-commit.ci lite] apply automatic fixes

---------

Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
@springfall2008 springfall2008 added the bug Something isn't working label May 6, 2024
@springfall2008
Copy link
Owner

Fix on main for testing

@mpartington
Copy link

mpartington commented May 6, 2024

@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

@jacekowski
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants