Open rknight20772 opened 2 months ago
The predbat code is exactly the same whether it runs in appdaemon or the predbat add-on.
If you are getting different results then it's likely a problem with either your apps.yaml or your predbat configuration.
Assume you just copied your appdaemon apps.yaml across over the top of the template apps.yaml supplied with the predbat addon?
Can you try shutting down the predbat add-on and starting appdaemon up, 8.4.4 works just fine in appdaemon, you just don't have the new web interface. Then running under appdaemon, see what the results are.
Then it will probably be a matter of trying to find what configuration is different between two environments
Hey Yes, I just followed the instructions on upgrading to the add-on. apps.yaml's contents from the old version was just pasted into the new version. Just checked to make sure id selected everything to replace and I have. I don't have the appdeamon version as I removed it as per the instructions.
Is there any setting to force discharge at the end of the day, rather than throughout the day that Ive not toggled on (or have turned off that I shouldn't)?
Thanks for the quick response Rich
No there isn't a single setting for 'force end of day discharge', predbat should work this out automatically based on your import rates, solar generation and forecast load demand.
You can manually override specific slot behaviour using select.predbat_manual_discharge but that will become tiresome quite quickly.
If you don't have the appdaemon, no issue. Do you know what version of predbat you were running in appdaemon? It could be that there's a problem with 8.4.4 that didn't appear in whatever you were on before so one option could be to downgrade (use select.predbat_update) to an older version and see if the plan improves.
Can you share your current predbat plan?
I was using 8.4.2 previously. I still have the logs from the previous few days for the previous version if that would help. They are obviously fairly long.
Current plan below.
best_soc_min 0.0 best_soc_max 0.0 best_soc_keep 0.8 carbon_metric 0 metric_self_sufficiency 0.0 metric_battery_value_scaling 1.0 Time | Import p | Export p | State | | Limit % | PV kWh | Load kWh | Car kWh | SOC % | Cost | Total Thu 18:35 | 22.28 | 15.00 | ↘ | | 0.03 | 0.34 | | 45↘ | → | £1.18 Thu 19:00 | 22.28 | 15.00 | ↘ | | 0.01 | 0.29 | | 42↘ | → | £1.18 Thu 19:30 | 22.28 | 15.00 | ↘ | | | 0.22 | | 38↘ | → | £1.18 Thu 20:00 | 22.28 | 15.00 | ↘ | | | 0.24 | | 36↘ | → | £1.18 Thu 20:30 | 22.28 | 15.00 | ↘ | | | 0.28 | | 33↘ | → | £1.18 Thu 21:00 | 22.28 | 15.00 | ↘ | | | 0.29 | | 30↘ | → | £1.18 Thu 21:30 | 22.28 | 15.00 | ↘ | | | 0.29 | | 27↘ | → | £1.18 Thu 22:00 | 22.28 | 15.00 | ↘ | | | 0.3 | | 24↘ | → | £1.18 Thu 22:30 | 22.28 | 15.00 | ↘ | | | 0.25 | | 20↘ | → | £1.18 Thu 23:00 | 22.28 | 15.00 | ↘ | Dis↘ | 4 | | 0.3 | | 17↘ | -7 p ↘ | £1.18 Thu 23:30 | 7.00 | 15.00 | Chrg↗ | 100 | | 0.29 | | 8↗ | +14 p ↗ | £1.11 Fri 00:00 | 7.00 | 15.00 | | 0.51 | | 26↗ | +81 p ↗ | £1.25 Fri 00:30 | 7.00 | 15.00 | | 0.21 | | 44↗ | +14 p ↗ | £2.07 Fri 01:00 | 7.00 | 15.00 | | 0.19 | | 61↗ | +13 p ↗ | £2.21 Fri 01:30 | 7.00 | 15.00 | | 0.17 | | 79↗ | +13 p ↗ | £2.35 Fri 02:00 | 7.00 | 15.00 | | 0.15 | | 96↗ | +4 p ↗ | £2.48 Fri 02:30 | 7.00 | 15.00 | | 0.16 | | 100→ | +1 p ↗ | £2.52 Fri 03:00 | 7.00 | 15.00 | | 0.2 | | 100→ | +1 p ↗ | £2.53 Fri 03:30 | 7.00 | 15.00 | | 0.2 | | 100→ | +1 p ↗ | £2.55 Fri 04:00 | 7.00 | 15.00 | | 0.2 | | 100→ | +1 p ↗ | £2.56 Fri 04:30 | 7.00 | 15.00 | | 0.15 | | 100→ | +1 p ↗ | £2.58 Fri 05:00 | 7.00 | 15.00 | | 0.16 | | 100→ | +1 p ↗ | £2.59 Fri 05:30 | 22.28 | 15.00 | ↘ | | | 0.18 | | 100↘ | → | £2.60 Fri 06:00 | 22.28 | 15.00 | ↘ | | | 0.18 | | 98↘ | → | £2.60 Fri 06:30 | 22.28 | 15.00 | ↘ | | 0.02 | 0.18 | | 96↘ | → | £2.60 Fri 07:00 | 22.28 | 15.00 | ↘ | | 0.05 | 0.29 | | 94↘ | → | £2.60 Fri 07:30 | 22.28 | 15.00 | ↘ | | 0.09 | 0.33 | | 91↘ | → | £2.60 Fri 08:00 | 22.28 | 15.00 | ↘ | | 0.12☀ | 0.58 | | 89↘ | → | £2.60 Fri 08:30 | 22.28 | 15.00 | ↘ | | 0.13☀ | 0.38 | | 83↘ | → | £2.60 Fri 09:00 | 22.28 | 15.00 | ↘ | | 0.17☀ | 0.39 | | 80↘ | → | £2.60 Fri 09:30 | 22.28 | 15.00 | ↗ | | 0.33☀ | 0.22 | | 78↗ | → | £2.60 Fri 10:00 | 22.28 | 15.00 | ↗ | | 0.51☀ | 0.27 | | 79↗ | → | £2.60 Fri 10:30 | 22.28 | 15.00 | ↗ | | 0.69☀ | 0.25 | | 81↗ | → | £2.60 Fri 11:00 | 22.28 | 15.00 | ↗ | | 0.88☀ | 0.31 | | 85↗ | → | £2.60 Fri 11:30 | 22.28 | 15.00 | ↗ | | 1.04☀ | 0.28 | | 91↗ | -1 p ↘ | £2.60 Fri 12:00 | 22.28 | 15.00 | ↗ | | 1.18☀ | 0.39 | | 98↗ | -7 p ↘ | £2.58 Fri 12:30 | 22.28 | 15.00 | → | | 1.29☀ | 0.3 | | 100→ | -14 p ↘ | £2.51 Fri 13:00 | 22.28 | 15.00 | → | | 1.38☀ | 0.23 | | 100→ | -16 p ↘ | £2.36 Fri 13:30 | 22.28 | 15.00 | → | | 1.46☀ | 0.22 | | 100→ | -17 p ↘ | £2.20 Fri 14:00 | 22.28 | 15.00 | → | | 1.49☀ | 0.24 | | 100→ | -17 p ↘ | £2.03 Fri 14:30 | 22.28 | 15.00 | → | | 1.5☀ | 0.19 | | 100→ | -18 p ↘ | £1.85 Fri 15:00 | 22.28 | 15.00 | → | | 1.48☀ | 0.21 | | 100→ | -17 p ↘ | £1.67 Fri 15:30 | 22.28 | 15.00 | → | | 1.41☀ | 0.14 | | 100→ | -18 p ↘ | £1.50 Fri 16:00 | 22.28 | 15.00 | → | | 1.31☀ | 0.2 | | 100→ | -15 p ↘ | £1.31 Fri 16:30 | 22.28 | 15.00 | → | | 1.19☀ | 0.19 | | 100→ | -14 p ↘ | £1.15 Fri 17:00 | 22.28 | 15.00 | → | | 1.02☀ | 0.2 | | 100→ | -11 p ↘ | £1.01 Fri 17:30 | 22.28 | 15.00 | → | | 0.77☀ | 0.24 | | 100→ | -7 p ↘ | £0.90 Fri 18:00 | 22.28 | 15.00 | → | | 0.52☀ | 0.28 | | 100→ | -3 p ↘ | £0.82 Fri 18:30 | 22.28 | 15.00 | FrzDis→ | 99 | 0.22☀ | 0.19 | | 100→ | -0 p ↘ | £0.79 Fri 19:00 | 22.28 | 15.00 | ↘ | | 0.03 | 0.24 | | 100↘ | → | £0.78 Fri 19:30 | 22.28 | 15.00 | ↘ | | | 0.22 | | 97↘ | → | £0.78 Fri 20:00 | 22.28 | 15.00 | → | | | 0.0 | | 95→ | → | £0.78 Fri 20:30 | 22.28 | 15.00 | → | | | 0.0 | | 95→ | → | £0.78 Fri 21:00 | 22.28 | 15.00 | ↗ | Dis↘ | 4 | | 0.0 | | 95↘ | -8 p ↘ | £0.78 Fri 21:30 | 22.28 | 15.00 | Dis↘ | 4 | | 0.0 | | 88↘ | -25 p ↘ | £0.69 Fri 22:00 | 22.28 | 15.00 | | 0.0 | | 69↘ | -25 p ↘ | £0.44 Fri 22:30 | 22.28 | 15.00 | | 0.0 | | 49↘ | -25 p ↘ | £0.18 Fri 23:00 | 22.28 | 15.00 | | 0.0 | | 30↘ | -25 p ↘ | -£0.08
`
Thanks for sharing, so you were on a reasonably up to date predbat version before moving to running Predbat within the predbat add-on.
Looking at the plan you've shared, it looks reasonable to me.
The battery is dropping down tonight from house load, then there's a forced discharge at 23:00 which takes the SoC down to 8% at 23:30
Then forced charging overnight in the cheap period.
During the day your battery SoC goes up and down but its entirely due to house load and solar generation, there's no 'Chg' or 'Dis' when predbat is driving the battery up or down.
e.g. 08:00-08:30, house load is 0.58kWh, solar generation 0.12kWh so the SoC will drop as a result (89 to 83%)
There's a freeze discharge at 18:30 and then there's a couple of forced discharges at 21:00 and 21:30, but these are almost certainly there because that's the end of the plan and Predbat doesn't know what the future prices and load are after 23:00 Friday. As it gets nearer the plan will evolve to more like what it's doing tonight.
Im happy with the plan as it is now, but earlier in the day it was planned to discharge throughout the day. It's only due to me setting to 'control charge only' that the earlier discharges were removed. Historically, this hasn't happened, with the only discharges being later on in the day. This is important as the history for the house isn't always reliable. Some days with excess solar and battery, the washing machine and dryer gets used a lot (we've not been able to do that today due to the earlier discharges and lack of solar) Ideally a setting that was 'leave discharge til after 8pm' would be great (which is how the plan was working out previously)
If your household load varies a lot there's a couple of strategies you could adopt:
I understand what you mean by a 'keep battery to 8pm' type of switch but different people will have different desires as to when they keep the battery level. If predbat is working properly it should keep the battery until it's sure that you won't need it. If 8.4.2 was improved over 8.4.4 then next time it gives a 'bad' plan, do try downgrading and compare the results
Just looking at the release history between 8.4.2 and 8.4.4, the changes have been to the new web interface, not the core predbat optimisation engine, so strange that you are getting different results https://github.com/springfall2008/batpred/releases
Thanks for the update. I'll give some of the suggestions a try.
It may just be a coincidence. I'll probably monitor for a day or so and see what's happening. Maybe today was just a day for a daytime discharge.
Describe the bug Prior to installing the Predbat Add-on, I was using the Appdeamon version. When controlling Charge and Discharge, the battery would stay charged throughout the day, and then usually there would be a discharge slots starting around 10pm, that discharged the battery to 4% by 1130pm, ready to charge again during the intelligent slots from 1130pm-530am. Since updating to the Add-on, the discharge slots are now happening throughout the day, without enough battery left now to get to the 1130pm slot. This happened yesterday too.
Expected behavior A clear and concise description of what you expected to happen.
Predbat version
8.4.4
Environment details
GivEnergy 5KW hybrid inverter with 9.5Kwh battery HA is on a VM
Screenshots If applicable, add screenshots to help explain your problem. The most useful ones can be your battery chart, the Predbat HTML plan and your current settings in HA.
Log file