Open onetoomany opened 8 months ago
I will then immediately start to drain 1.5kW from my battery; batpred will then think I'm behind plan and bring in power from the grid to compensate.
I understand the problem as you are explaining it, but I think your expectation of Predbat's behaviour isn't quite right.
If you turn on your immersion, use the excess solar and still have extra house demand, what will happen next depends on what mode Predbat has your inverter in at the time.
If the current slot is a Charging slot then, the extra load to supply the immersion heater will come from directly from the grid.
If the current slot is a Discharging slot then the extra load will come from the battery discharge that's already going on (and possibly then grid import if that isn't enough)
And if it's an 'Idle' slot then yes the battery will be discharged to meet the immersion heater demand. After that though, Predbat will not automatically schedule a grid charge to replenish the lost power, it will re-evaluate the plan and if there is excess solar predicted then Predbat will just let the battery charge back up again. A grid import would only be scheduled if this is the most cost effective thing to do - e.g. future import rates are increasing, there isn't excess solar to replenish the battery and the predicted house load will exhaust the battery prematurely.
Sorry this isn't a short answer for you, but in the main, with lots of excess solar predicted, the battery filling up on solar and the excess being otherwise exported, Predbat will I think do the right thing.
I have been updating the solar diverter (iboost) documentation for predbat, a draft copy is here: https://github.com/gcoan/batpred/blob/main/docs/customisation.md
thanks - looks like I can use the iBoost capability to solve my challenge.
If I work with iBoost, will my immersion come on under power-ups and negative pricing scenarios as well?
I've set up the iBoost as per the instructions, with a min power of 2.4kW and max power of 2.5kW - as its binary as to whether the immersion is running or not. A new iBoost column has appeared in the plan.
Even though I'm exporting 1.5kW at the moment with a 100% battery, the plan remains 0. Shouldn't it drain down say 1kWh now then recharge later?
thanks - looks like I can use the iBoost capability to solve my challenge.
If I work with iBoost, will my immersion come on under power-ups and negative pricing scenarios as well?
The iboost model is designed to use excess solar to heat your hot water (or some other appliance) when you would otherwise be exporting it.
For Power-up's and negative pricing, it should only activate if there's excess (being exported) solar. The Power up events can be at any time but are usually when there's a grid-wide excess of solar or wind, and the negative pricing is again grid-wide but (in my experience) usually occurs overnight. And in both cases Predbat would normally be charging your battery up so less likely there is a solar excess in your house.
The safest thing is if you switch your immersion on yourself when the current rate drops to zero or below. I use sensor.octopus_energy_electricity_METERID_current_rate to control my own similar negative pricing automation
You can use predbat.rates as your current import rate but given that Predbat reads the data from the Octopus sensor and it only updates its output sensors when it runs every 5 minutes, I found it best to use the Octopus sensor itself.
HOWEVER the Octopus sensor doesn't know anything about Power up events (and neither does Predbat unless you put an import rate over-ride into apps.yaml) so you'll have to do something manual for that. I have a power up start time, end time and date sensors that I use myself
I've set up the iBoost as per the instructions, with a min power of 2.4kW and max power of 2.5kW - as its binary as to whether the immersion is running or not. A new iBoost column has appeared in the plan.
Even though I'm exporting 1.5kW at the moment with a 100% battery, the plan remains 0. Shouldn't it drain down say 1kWh now then recharge later?
Depends what's in your forecast. If your PV never rises to the point where PV - house load is > 2.4 then the iboost won't trigger.
Maybe you need a lower min trigger level for it to operate sooner and discharge then recharge the battery
Thanks - I'm trying out the iBoost with a lower figure of 500W. Not quite sure how that is going to play out if my immersion is fixed at 2.5kW. I'm hoping it will turn on when I'm expecting an excess of at least 500W, and turn off once I've exhausted that excess.
On the documentation front, the example automation works off predbat_iboost_active being "On" or "Off"; I'm seeing "True" and "False" in the data.
I'm still finding that the iBoost is causing power to be drawn from the grid. Behaviour:
Its steps 3 and 4 that are not behaving properly. I would expect batpred to turn off iboost_active when I've run out of excess, and not need to import any from the grid.
On the documentation front, the example automation works off predbat_iboost_active being "On" or "Off"; I'm seeing "True" and "False" in the data.
I've corrected the documentation, all of the other binary sensors (Predbat charging, high_rate_slot, car charging) use 'on' and 'off', but iBoost uses True and False in the code as you've found. Annoyingly when building an automation to use iboost_active it suggests the values on and off, but these don't match.
On your other point about Predbat grid charging, can you post your plan. Predbat should detect that the Soc has dropped and that there is excess solar that it can recharge the battery up with.
It was definitely Predbat forcing a grid charge, not the immersion heater being on that caused the grid charge because the house load+immersion exceeded the inverter output rate?
The plan shows that it was predbat triggering the charge
2024-03-20 15:35:01.165977 INFO pred_bat: Rate min forward looking: now 12.01 at end of forecast 12.01
2024-03-20 15:35:01.168141 INFO pred_bat: Import rates min 12.01 max 43.09 average 18.25
2024-03-20 15:35:01.172652 INFO pred_bat: Export rates min 0.0 max 0 average 0.0
2024-03-20 15:35:01.174255 INFO pred_bat: Rate thresholds (for charge/discharge) are import 42.59p (0.0) export 12.01p (0.0)
2024-03-20 15:35:01.176459 INFO pred_bat: High export rate found rates in range 99 to -99
2024-03-20 15:35:01.184088 INFO pred_bat: Low Import rate found rates in range 12.01 to 40.09
2024-03-20 15:35:01.205857 INFO pred_bat: Todays energy import 0 kWh export 0 kWh cost 45.56 p import 45.56 p export 0.0 p
2024-03-20 15:35:01.208126 INFO pred_bat: PV Data for pv_forecast_today total 17.71 kWh
2024-03-20 15:35:01.210036 INFO pred_bat: PV Data for pv_forecast_tomorrow total 11.6 kWh
2024-03-20 15:35:01.211965 INFO pred_bat: PV Data for pv_forecast_d3 total 5.43 kWh
2024-03-20 15:35:01.214124 INFO pred_bat: PV Data for pv_forecast_d4 total 21.32 kWh
2024-03-20 15:35:01.221191 INFO pred_bat: Historical data totals for days [5] are [16.13] - min 16.13
2024-03-20 15:35:01.222344 INFO pred_bat: Historical days now [5] weight [1]
2024-03-20 15:35:01.228267 INFO pred_bat: Today's load divergence 118.49 % in-day adjustment 117.57 % damping 0.95x, Predicted so far 7.85 kWh with 0.0 kWh car excluded and 0 kWh import ignored and 0 forecast extra, Actual so far 10.94 kWh with 0.0 kWh car excluded and 0 kWh import ignored
2024-03-20 15:35:01.254446 INFO pred_bat: Inverter 0: Type SF Sofar HYD)
2024-03-20 15:35:01.255101 INFO pred_bat: WARN: Inverter 0: Using inverter type SF - not all features are available
2024-03-20 15:35:01.256527 INFO pred_bat: Reserve min: 20.0% Battery_min:4.0%
2024-03-20 15:35:01.257476 INFO pred_bat: Inverter 0 with soc_max 4.8 kWh nominal_capacity 4.8 kWh battery rate raw 3000.0 w charge rate 3.0 kW discharge rate 3.0 kW battery_rate_min 0.0 w ac limit 5.0 kW export limit 5.0 kW reserve 20.0 % current_reserve 4.0 %
2024-03-20 15:35:01.261353 INFO pred_bat: Inverter 0 SOC: 4.27 kW 89 % Current charge rate 3000.0 w Current discharge rate 0.0 w Current power 3050.0 w Current voltage 52.0
2024-03-20 15:35:01.262303 INFO pred_bat: Inverter 0 scheduled charge enable is False
2024-03-20 15:35:01.263058 INFO pred_bat: Inverter 0 charge windows currently []
2024-03-20 15:35:01.263775 INFO pred_bat: Inverter 0 Charge settings: timed charged is disabled, power 3.0 kW
2024-03-20 15:35:01.265334 INFO pred_bat: Inverter 0 scheduled discharge enable is False
2024-03-20 15:35:01.266538 INFO pred_bat: Inverter 0 discharge windows currently [{'start': 0, 'end': 0, 'average': 0}, {'start': 1440, 'end': 1440, 'average': 0}]
2024-03-20 15:35:01.267358 INFO pred_bat: Note: Inverter does not support discharge freeze - disabled
2024-03-20 15:35:01.267987 INFO pred_bat: Note: Inverter does not support charge freeze - disabled
2024-03-20 15:35:01.268613 INFO pred_bat: Note: Inverter does not support reserve - disabling reserve functions
2024-03-20 15:35:01.269255 INFO pred_bat: Found 1 inverters totals: min reserve 0.96 current reserve 0.19 soc_max 4.8 soc 4.27 charge rate 3.0 kW discharge rate 0.0 kW battery_rate_min 0.0 w ac limit 5.0 export limit 5.0 kW loss charge 3 % loss discharge 3 % inverter loss 4 %
2024-03-20 15:35:01.288857 INFO pred_bat: Base charge window [ ]
2024-03-20 15:35:01.289579 INFO pred_bat: Base discharge window [ 20-03 00:00:00 - 20-03 00:00:00 @ 0p 100.0%, 21-03 00:00:00 - 21-03 00:00:00 @ 0p 100.0% ]
2024-03-20 15:35:01.290134 INFO pred_bat: Plan was last updated on 2024-03-20 15:30:00.002766+00:00 and is now 5.0 minutes old
2024-03-20 15:35:01.290933 INFO pred_bat: Best charge window [ 20-03 15:30:00 - 20-03 16:00:00 @ 17.32p 100%, 20-03 19:30:00 - 20-03 20:30:00 @ 22.02p 27%, 20-03 20:30:00 - 20-03 21:00:00 @ 15.82p 68%, 20-03 23:30:00 - 21-03 00:00:00 @ 15.04p 84%, 21-03 03:30:00 - 21-03 04:00:00 @ 12.38p 90%, 21-03 13:30:00 - 21-03 14:00:00 @ 13.01p 100%, 21-03 15:00:00 - 21-03 17:00:00 @ 15.07p 100%, 21-03 20:30:00 - 21-03 21:00:00 @ 12.53p 84%, 21-03 21:00:00 - 21-03 22:00:00 @ 14.24p 74%, 21-03 22:30:00 - 21-03 23:00:00 @ 12.01p 100%, 22-03 03:30:00 - 22-03 05:00:00 @ 12.38p 100% ]
2024-03-20 15:35:01.291521 INFO pred_bat: Best discharge window [ ]
2024-03-20 15:35:01.292502 INFO pred_bat: PV Forecast 18.0 kWh and 10% Forecast 5.6 kWh pv cloud factor 0.7
2024-03-20 15:35:01.298945 INFO pred_bat: Creating pool of 2 processes to match your CPU count
2024-03-20 15:35:01.325592 INFO pred_bat: predict base end_record 03-22 15:35:00 final soc 1.09 kWh metric 446.04 p metric_keep 198.8 min_soc 0.96 @ 03-20 19:10:00 kWh load 44.46 pv 31.92
2024-03-20 15:35:01.327267 INFO pred_bat: [ 15:35, 16:35, 17:35, 18:35, 19:35, 20:35, 21:35, 22:35, 23:35, 00:35, 01:35, 02:35, 03:35, 04:35, 05:35, 06:35, 07:35, 08:35, 09:35, 10:35, 11:35, 12:35, 13:35, 14:35, 15:35, 16:35, 17:35, 18:35, 19:35, 20:35, 21:35, 22:35, 23:35, 00:35, 01:35, 02:35, 03:35, 04:35, 05:35, 06:35, 07:35, 08:35, 09:35, 10:35, 11:35, 12:35, 13:35, 14:35]
2024-03-20 15:35:01.328505 INFO pred_bat: SOC: [ 4.27, 4.13, 3.0, 1.83, 0.96, 0.96, 0.96, 0.96, 0.96, 0.96, 0.96, 0.96, 0.96, 0.96, 0.96, 0.96, 0.96, 1.18, 1.17, 1.92, 2.82, 3.88, 3.8, 2.87, 2.28, 1.85, 1.12, 0.96, 0.96, 0.96, 0.96, 0.96, 0.96, 0.96, 0.96, 0.96, 0.96, 0.96, 0.96, 0.96, 0.96, 0.96, 0.98, 1.04, 1.4, 1.75, 2.09, 0.96]
2024-03-20 15:35:01.329636 INFO pred_bat: STATE: [ g~be~, g~be-, g~be-, g~be-, g<be-, g<be-, g<be-, g<be-, g<be-, g<be-, g<be-, g<be-, g<be-, g<be-, g<be-, g<be-, g<be-, g~be-, g~be-, g~be-, g~be+, g~be-, g~be-, g~be-, g~be-, g~be-, g~be-, g<be-, g<be-, g<be-, g<be-, g<be-, g<be-, g<be-, g<be-, g<be-, g<be-, g<be-, g<be-, g<be-, g<be-, g<be-, g<be-, g~be-, g~be-, g~be-, g~be-, g<be-]
2024-03-20 15:35:01.331181 INFO pred_bat: LOAD: [ 10.97, 11.57, 12.89, 13.99, 15.0, 15.78, 16.53, 17.14, 17.62, 17.94, 18.26, 18.62, 18.89, 19.23, 19.62, 19.96, 20.44, 20.9, 21.86, 22.58, 23.45, 23.77, 24.54, 26.62, 28.11, 29.05, 29.9, 31.45, 33.51, 34.28, 34.88, 35.62, 36.11, 36.41, 36.79, 37.08, 37.41, 37.71, 38.05, 38.37, 38.88, 39.49, 40.16, 40.81, 41.22, 41.69, 42.12, 43.88]
2024-03-20 15:35:01.332337 INFO pred_bat: PV: [ 13.88, 15.07, 15.33, 15.35, 15.35, 15.35, 15.35, 15.35, 15.35, 15.35, 15.35, 15.35, 15.35, 15.35, 15.35, 15.35, 15.46, 16.0, 17.02, 18.55, 20.39, 22.24, 23.87, 25.19, 26.2, 26.77, 26.94, 26.95, 26.95, 26.95, 26.95, 26.95, 26.95, 26.95, 26.95, 26.95, 26.95, 26.95, 26.95, 26.95, 27.01, 27.26, 27.67, 28.31, 29.11, 29.97, 30.76, 31.42]
2024-03-20 15:35:01.333500 INFO pred_bat: IMPORT: [ 0, 0, 0.0, 0.0, 0.2, 0.98, 1.73, 2.34, 2.83, 3.14, 3.46, 3.82, 4.09, 4.43, 4.82, 5.16, 5.53, 5.7, 5.7, 5.7, 5.7, 5.7, 5.7, 5.75, 5.75, 5.75, 5.75, 7.14, 9.2, 9.97, 10.57, 11.31, 11.8, 12.11, 12.49, 12.77, 13.1, 13.41, 13.74, 14.06, 14.51, 14.88, 15.19, 15.29, 15.29, 15.29, 15.29, 15.38]
2024-03-20 15:35:01.334689 INFO pred_bat: EXPORT: [ 0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
2024-03-20 15:35:01.335830 INFO pred_bat: IBOOST: [ 1.85, 2.51, 2.51, 2.51, 2.51, 2.51, 2.51, 2.51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.4, 1.27, 1.38, 1.38, 1.38, 1.38, 1.38, 1.38, 1.38, 1.38, 1.38, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
2024-03-20 15:35:01.336947 INFO pred_bat: METRIC: [ 45.56, 45.56, 45.56, 45.56, 50.56, 65.93, 78.54, 89.29, 96.62, 147.19, 152.81, 158.14, 161.76, 165.97, 171.41, 177.23, 184.57, 187.92, 187.92, 187.92, 187.92, 187.92, 187.92, 188.62, 188.62, 188.62, 188.62, 239.53, 300.83, 313.63, 321.72, 332.5, 339.11, 389.54, 396.3, 400.51, 404.88, 408.69, 413.33, 418.75, 427.93, 434.83, 440.09, 441.7, 441.7, 441.7, 441.7, 442.91]
2024-03-20 15:35:01.469668 INFO pred_bat: Battery has 3.58 hours left - now at 4.27
2024-03-20 15:35:01.495401 INFO pred_bat: predict base10 end_record 03-22 15:35:00 final soc 0.96 kWh metric 634.49 p metric_keep 265.85 min_soc 0.96 @ 03-20 18:50:00 kWh load 45.14 pv 19.45
2024-03-20 15:35:01.496619 INFO pred_bat: [ 15:35, 16:35, 17:35, 18:35, 19:35, 20:35, 21:35, 22:35, 23:35, 00:35, 01:35, 02:35, 03:35, 04:35, 05:35, 06:35, 07:35, 08:35, 09:35, 10:35, 11:35, 12:35, 13:35, 14:35, 15:35, 16:35, 17:35, 18:35, 19:35, 20:35, 21:35, 22:35, 23:35, 00:35, 01:35, 02:35, 03:35, 04:35, 05:35, 06:35, 07:35, 08:35, 09:35, 10:35, 11:35, 12:35, 13:35, 14:35]
2024-03-20 15:35:01.497717 INFO pred_bat: SOC: [ 4.27, 4.11, 2.73, 1.43, 0.96, 0.96, 0.96, 0.96, 0.96, 0.96, 0.96, 0.96, 0.96, 0.96, 0.96, 0.96, 0.96, 0.96, 0.97, 0.96, 1.12, 1.41, 1.15, 0.96, 0.96, 0.96, 0.96, 0.96, 0.96, 0.96, 0.96, 0.96, 0.96, 0.96, 0.96, 0.96, 0.96, 0.96, 0.96, 0.96, 0.96, 0.96, 0.96, 0.96, 0.96, 0.96, 0.96, 0.96]
2024-03-20 15:35:01.498774 INFO pred_bat: STATE: [ g~be~, g~be-, g~be-, g~be-, g<be-, g<be-, g<be-, g<be-, g<be-, g<be-, g<be-, g<be-, g<be-, g<be-, g<be-, g<be-, g<be-, g<be-, g<be-, g<be-, g~be-, g~be-, g~be-, g<be-, g<be-, g<be-, g<be-, g<be-, g<be-, g<be-, g<be-, g<be-, g<be-, g<be-, g<be-, g<be-, g<be-, g<be-, g<be-, g<be-, g<be-, g<be-, g<be-, g<be-, g<be-, g<be-, g<be-, g<be-]
2024-03-20 15:35:01.500039 INFO pred_bat: LOAD: [ 10.97, 11.63, 13.08, 14.29, 15.41, 16.26, 17.09, 17.75, 18.29, 18.62, 18.94, 19.3, 19.57, 19.91, 20.3, 20.64, 21.12, 21.59, 22.54, 23.26, 24.13, 24.45, 25.22, 27.3, 28.8, 29.73, 30.58, 32.13, 34.19, 34.96, 35.56, 36.3, 36.79, 37.09, 37.48, 37.76, 38.09, 38.4, 38.73, 39.05, 39.56, 40.17, 40.84, 41.49, 41.9, 42.38, 42.8, 44.56]
2024-03-20 15:35:01.501383 INFO pred_bat: PV: [ 13.88, 15.02, 15.19, 15.2, 15.2, 15.2, 15.2, 15.2, 15.2, 15.2, 15.2, 15.2, 15.2, 15.2, 15.2, 15.2, 15.24, 15.41, 15.72, 16.24, 16.88, 17.52, 18.07, 18.5, 18.81, 19.0, 19.06, 19.06, 19.06, 19.06, 19.06, 19.06, 19.06, 19.06, 19.06, 19.06, 19.06, 19.06, 19.06, 19.06, 19.07, 19.09, 19.12, 19.17, 19.23, 19.29, 19.35, 19.41]
2024-03-20 15:35:01.503148 INFO pred_bat: IMPORT: [ 0, 0, 0, 0, 0.67, 1.53, 2.35, 3.02, 3.56, 3.89, 4.21, 4.57, 4.84, 5.18, 5.57, 5.91, 6.35, 6.66, 7.32, 7.54, 7.96, 7.96, 7.96, 9.45, 10.65, 11.4, 12.19, 13.74, 15.8, 16.57, 17.17, 17.91, 18.4, 18.7, 19.08, 19.37, 19.7, 20.0, 20.34, 20.66, 21.16, 21.75, 22.4, 22.99, 23.35, 23.76, 24.13, 25.84]
2024-03-20 15:35:01.504441 INFO pred_bat: EXPORT: [ 0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
2024-03-20 15:35:01.505768 INFO pred_bat: IBOOST: [ 1.85, 2.43, 2.43, 2.43, 2.43, 2.43, 2.43, 2.43, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
2024-03-20 15:35:01.506981 INFO pred_bat: METRIC: [ 45.56, 45.56, 45.56, 45.56, 64.6, 81.5, 95.38, 107.19, 115.26, 166.11, 171.73, 177.06, 180.68, 184.89, 190.33, 196.14, 204.86, 210.75, 221.81, 225.6, 232.76, 232.76, 232.76, 252.56, 269.45, 286.88, 310.61, 366.72, 428.02, 440.82, 448.91, 459.7, 466.31, 516.73, 523.49, 527.7, 532.07, 535.88, 540.52, 545.94, 556.09, 566.88, 577.65, 587.58, 593.43, 599.25, 604.08, 626.96]
2024-03-20 15:35:01.566522 INFO pred_bat: predict best10 end_record 03-22 15:35:00 final soc 0.96 kWh metric 577.39 p metric_keep 107.47 min_soc 0.96 @ 03-20 19:15:00 kWh load 45.14 pv 19.45
2024-03-20 15:35:01.567791 INFO pred_bat: [ 15:35, 16:35, 17:35, 18:35, 19:35, 20:35, 21:35, 22:35, 23:35, 00:35, 01:35, 02:35, 03:35, 04:35, 05:35, 06:35, 07:35, 08:35, 09:35, 10:35, 11:35, 12:35, 13:35, 14:35, 15:35, 16:35, 17:35, 18:35, 19:35, 20:35, 21:35, 22:35, 23:35, 00:35, 01:35, 02:35, 03:35, 04:35, 05:35, 06:35, 07:35, 08:35, 09:35, 10:35, 11:35, 12:35, 13:35, 14:35]
2024-03-20 15:35:01.569478 INFO pred_bat: SOC: [ 4.27, 4.63, 3.25, 1.95, 1.2, 1.54, 2.21, 1.5, 1.21, 2.25, 1.91, 1.52, 1.5, 2.48, 2.06, 1.69, 1.21, 0.96, 0.97, 0.96, 1.12, 1.41, 1.37, 1.84, 2.74, 4.8, 4.53, 2.97, 0.96, 1.2, 3.55, 3.45, 4.4, 4.08, 3.67, 3.36, 3.29, 4.8, 4.57, 4.23, 3.69, 3.06, 2.37, 1.72, 1.34, 0.96, 0.96, 0.96]
2024-03-20 15:35:01.570574 INFO pred_bat: STATE: [ g<bf+, g~be-, g~be-, g~be-, g<bf+, g<bf+, g~be-, g~be-, g<bf+, g~be-, g~be-, g~be-, g<bf+, g~be-, g~be-, g~be-, g~be-, g<be-, g<be-, g<be-, g~be-, g~be-, g<bf+, g~be-, g<bf+, g<be-, g~be-, g~be-, g<be-, g<bf+, g<bf+, g<bf+, g~be-, g~be-, g~be-, g~be-, g<bf+, g<bf+, g~be-, g~be-, g~be-, g~be-, g~be-, g~be-, g~be-, g<be-, g<be-, g<be-]
2024-03-20 15:35:01.571687 INFO pred_bat: LOAD: [ 10.97, 11.63, 13.08, 14.29, 15.41, 16.26, 17.09, 17.75, 18.29, 18.62, 18.94, 19.3, 19.57, 19.91, 20.3, 20.64, 21.12, 21.59, 22.54, 23.26, 24.13, 24.45, 25.22, 27.3, 28.8, 29.73, 30.58, 32.13, 34.19, 34.96, 35.56, 36.3, 36.79, 37.09, 37.48, 37.76, 38.09, 38.4, 38.73, 39.05, 39.56, 40.17, 40.84, 41.49, 41.9, 42.38, 42.8, 44.56]
2024-03-20 15:35:01.572823 INFO pred_bat: PV: [ 13.88, 15.02, 15.19, 15.2, 15.2, 15.2, 15.2, 15.2, 15.2, 15.2, 15.2, 15.2, 15.2, 15.2, 15.2, 15.2, 15.24, 15.41, 15.72, 16.24, 16.88, 17.52, 18.07, 18.5, 18.81, 19.0, 19.06, 19.06, 19.06, 19.06, 19.06, 19.06, 19.06, 19.06, 19.06, 19.06, 19.06, 19.06, 19.06, 19.06, 19.07, 19.09, 19.12, 19.17, 19.23, 19.29, 19.35, 19.41]
2024-03-20 15:35:01.574197 INFO pred_bat: IMPORT: [ 0, 0.56, 0.56, 0.56, 1.0, 2.22, 3.85, 3.85, 4.15, 5.62, 5.62, 5.62, 5.91, 7.33, 7.33, 7.33, 7.33, 7.4, 8.06, 8.29, 8.7, 8.7, 8.94, 11.2, 13.47, 16.42, 16.96, 17.06, 17.24, 18.27, 21.39, 22.07, 23.63, 23.63, 23.63, 23.63, 23.92, 25.85, 25.98, 25.98, 25.98, 25.98, 25.98, 25.98, 25.98, 26.03, 26.4, 28.11]
2024-03-20 15:35:01.575797 INFO pred_bat: EXPORT: [ 0, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01]
2024-03-20 15:35:01.577200 INFO pred_bat: IBOOST: [ 1.85, 2.43, 2.43, 2.43, 2.43, 2.43, 2.43, 2.43, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
2024-03-20 15:35:01.578376 INFO pred_bat: METRIC: [ 45.56, 55.2, 55.2, 55.2, 65.5, 88.83, 114.55, 114.55, 119.15, 186.81, 186.81, 186.81, 190.39, 207.95, 207.95, 207.95, 207.95, 209.12, 220.17, 223.97, 231.13, 231.13, 234.2, 263.69, 297.47, 357.8, 373.41, 377.13, 381.22, 397.29, 438.92, 447.96, 466.59, 512.15, 512.15, 512.15, 515.81, 539.78, 541.35, 541.35, 541.35, 541.35, 541.35, 541.35, 541.35, 542.14, 546.97, 569.85]
2024-03-20 15:35:01.638013 INFO pred_bat: predict best end_record 03-22 15:35:00 final soc 2.27 kWh metric 429.28 p metric_keep 51.54 min_soc 0.96 @ 03-21 19:25:00 kWh load 44.46 pv 31.92
2024-03-20 15:35:01.639252 INFO pred_bat: [ 15:35, 16:35, 17:35, 18:35, 19:35, 20:35, 21:35, 22:35, 23:35, 00:35, 01:35, 02:35, 03:35, 04:35, 05:35, 06:35, 07:35, 08:35, 09:35, 10:35, 11:35, 12:35, 13:35, 14:35, 15:35, 16:35, 17:35, 18:35, 19:35, 20:35, 21:35, 22:35, 23:35, 00:35, 01:35, 02:35, 03:35, 04:35, 05:35, 06:35, 07:35, 08:35, 09:35, 10:35, 11:35, 12:35, 13:35, 14:35]
2024-03-20 15:35:01.640359 INFO pred_bat: SOC: [ 4.27, 4.65, 3.51, 2.34, 1.3, 1.55, 2.27, 1.62, 1.38, 2.42, 2.08, 1.69, 1.67, 2.65, 2.23, 1.86, 1.46, 1.5, 1.5, 2.25, 3.14, 3.79, 3.94, 4.47, 4.8, 4.8, 4.57, 3.02, 0.96, 1.2, 3.55, 3.45, 4.4, 4.08, 3.67, 3.36, 3.29, 4.8, 4.57, 4.23, 3.75, 3.35, 3.04, 2.99, 3.35, 3.62, 3.65, 2.38]
2024-03-20 15:35:01.641494 INFO pred_bat: STATE: [ g<bf+, g~be-, g~be-, g~be-, g<be-, g<bf+, g~be-, g~be-, g<bf+, g~be-, g~be-, g~be-, g<bf+, g~be-, g~be-, g~be-, g~be-, g~be-, g~be-, g~be-, g~be+, g~be-, g<bf+, g~be-, g<be-, g<be-, g~be-, g~be-, g<be-, g<bf+, g<bf+, g<bf+, g~be-, g~be-, g~be-, g~be-, g<bf+, g<bf+, g~be-, g~be-, g~be-, g~be-, g~be-, g~be-, g~be-, g~be-, g~be-, g~be-]
2024-03-20 15:35:01.642951 INFO pred_bat: LOAD: [ 10.97, 11.57, 12.89, 13.99, 15.0, 15.78, 16.53, 17.14, 17.62, 17.94, 18.26, 18.62, 18.89, 19.23, 19.62, 19.96, 20.44, 20.9, 21.86, 22.58, 23.45, 23.77, 24.54, 26.62, 28.11, 29.05, 29.9, 31.45, 33.51, 34.28, 34.88, 35.62, 36.11, 36.41, 36.79, 37.08, 37.41, 37.71, 38.05, 38.37, 38.88, 39.49, 40.16, 40.81, 41.22, 41.69, 42.12, 43.88]
2024-03-20 15:35:01.644362 INFO pred_bat: PV: [ 13.88, 15.07, 15.33, 15.35, 15.35, 15.35, 15.35, 15.35, 15.35, 15.35, 15.35, 15.35, 15.35, 15.35, 15.35, 15.35, 15.46, 16.0, 17.02, 18.55, 20.39, 22.24, 23.87, 25.19, 26.2, 26.77, 26.94, 26.95, 26.95, 26.95, 26.95, 26.95, 26.95, 26.95, 26.95, 26.95, 26.95, 26.95, 26.95, 26.95, 27.01, 27.26, 27.67, 28.31, 29.11, 29.97, 30.76, 31.42]
2024-03-20 15:35:01.646211 INFO pred_bat: IMPORT: [ 0, 0.55, 0.55, 0.55, 0.6, 1.64, 3.23, 3.23, 3.53, 4.99, 4.99, 4.99, 5.28, 6.7, 6.7, 6.7, 6.7, 6.7, 6.7, 6.7, 6.7, 6.7, 6.96, 8.59, 9.83, 10.3, 10.76, 10.86, 11.0, 12.03, 15.15, 15.83, 17.39, 17.39, 17.39, 17.39, 17.68, 19.61, 19.74, 19.74, 19.74, 19.74, 19.74, 19.74, 19.74, 19.74, 19.74, 19.75]
2024-03-20 15:35:01.647680 INFO pred_bat: EXPORT: [ 0, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.03, 0.03, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05]
2024-03-20 15:35:01.648813 INFO pred_bat: IBOOST: [ 1.85, 2.51, 2.51, 2.51, 2.51, 2.51, 2.51, 2.51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.81, 1.69, 1.91, 2.2, 2.25, 2.25, 2.25, 2.25, 2.25, 2.25, 2.25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.08, 0.38, 0.44]
2024-03-20 15:35:01.649999 INFO pred_bat: METRIC: [ 45.56, 55.15, 55.15, 55.15, 56.18, 75.67, 100.93, 100.93, 105.46, 172.9, 172.9, 172.9, 176.47, 194.04, 194.04, 194.04, 194.04, 194.04, 194.04, 194.04, 194.04, 194.04, 197.42, 218.63, 237.33, 248.56, 262.21, 265.93, 269.0, 285.06, 326.69, 335.73, 354.37, 399.93, 399.93, 399.93, 403.58, 427.56, 429.12, 429.12, 429.12, 429.12, 429.12, 429.12, 429.12, 429.12, 429.12, 429.28]
2024-03-20 15:35:01.802841 INFO pred_bat: Evaluate trigger {'name': 'large', 'minutes': 60, 'energy': 1.0} results off total_energy 0
2024-03-20 15:35:01.809485 INFO pred_bat: Evaluate trigger {'name': 'small', 'minutes': 15, 'energy': 0.25} results off total_energy 0
2024-03-20 15:35:01.815545 INFO pred_bat: Best charging limit socs [4.8, 1.3, 3.26, 4.04, 4.33, 4.8, 4.8, 4.04, 3.55, 4.8, 4.8] export [] gives import battery 18.79 house 0.96 export 0.05 metric 429.28 metric10 577.39
2024-03-20 15:35:01.869141 INFO pred_bat: Export threshold used for optimisation was 43.5p
2024-03-20 15:35:01.870920 INFO pred_bat: No high rate period found
2024-03-20 15:35:01.908114 INFO pred_bat: Import threshold used for optimisation was 16.6p
2024-03-20 15:35:01.937984 INFO pred_bat: Low import rate windows [0: 03-20 15:30:00 - 03-20 16:00:00 @ 17.32, 1: 03-20 16:00:00 - 03-20 16:30:00 @ 31.28, 2: 03-20 16:30:00 - 03-20 17:00:00 @ 32.93, 3: 03-20 17:00:00 - 03-20 17:30:00 @ 37.74, 4: 03-20 17:30:00 - 03-20 18:30:00 @ 40.09, 5: 03-20 19:00:00 - 03-20 19:30:00 @ 25.16, 6: 03-20 19:30:00 - 03-20 20:00:00 @ 22.02, 7: 03-20 20:00:00 - 03-20 20:30:00 @ 19.21, 8: 03-20 20:30:00 - 03-20 21:00:00 @ 15.82, 9: 03-20 21:00:00 - 03-20 21:30:00 @ 17.32, 10: 03-20 21:30:00 - 03-20 22:30:00 @ 17.9, 11: 03-20 22:30:00 - 03-20 23:30:00 @ 15.04, 12: 03-20 23:30:00 - 03-21 00:00:00 @ 15.04, 13: 03-21 00:00:00 - 03-21 00:30:00 @ 16.28, 14: 03-21 00:30:00 - 03-21 01:30:00 @ 17.96, 15: 03-21 01:30:00 - 03-21 02:00:00 @ 16.17, 16: 03-21 02:00:00 - 03-21 03:00:00 @ 13.61, 17: 03-21 03:00:00 - 03-21 03:30:00 @ 13.21, 18: 03-21 03:30:00 - 03-21 04:00:00 @ 12.38, 19: 03-21 04:00:00 - 03-21 05:00:00 @ 12.54, 20: 03-21 05:00:00 - 03-21 05:30:00 @ 14.82, 21: 03-21 05:30:00 - 03-21 06:00:00 @ 13.44, 22: 03-21 06:00:00 - 03-21 06:30:00 @ 19.38, 23: 03-21 06:30:00 - 03-21 07:00:00 @ 22.84, 24: 03-21 07:00:00 - 03-21 07:30:00 @ 17.17, 25: 03-21 07:30:00 - 03-21 08:00:00 @ 19.97, 26: 03-21 08:00:00 - 03-21 09:00:00 @ 17.04, 27: 03-21 09:00:00 - 03-21 09:30:00 @ 16.51, 28: 03-21 09:30:00 - 03-21 10:00:00 @ 15.45, 29: 03-21 10:00:00 - 03-21 11:00:00 @ 17.29, 30: 03-21 11:00:00 - 03-21 11:30:00 @ 15.94, 31: 03-21 11:30:00 - 03-21 12:00:00 @ 14.78, 32: 03-21 12:00:00 - 03-21 12:30:00 @ 13.76, 33: 03-21 12:30:00 - 03-21 13:30:00 @ 13.14, 34: 03-21 13:30:00 - 03-21 14:00:00 @ 13.01, 35: 03-21 14:00:00 - 03-21 15:00:00 @ 13.54, 36: 03-21 15:00:00 - 03-21 15:30:00 @ 15.07, 37: 03-21 15:30:00 - 03-21 16:00:00 @ 13.92, 38: 03-21 16:00:00 - 03-21 16:30:00 @ 27.55, 39: 03-21 16:30:00 - 03-21 17:00:00 @ 29.2, 40: 03-21 17:00:00 - 03-21 17:30:00 @ 31.48, 41: 03-21 17:30:00 - 03-21 18:00:00 @ 33.6, 42: 03-21 18:00:00 - 03-21 18:30:00 @ 36.67, 43: 03-21 18:30:00 - 03-21 19:00:00 @ 39.44, 44: 03-21 19:00:00 - 03-21 19:30:00 @ 22.78, 45: 03-21 19:30:00 - 03-21 20:00:00 @ 19.64, 46: 03-21 20:00:00 - 03-21 20:30:00 @ 15.93, 47: 03-21 20:30:00 - 03-21 21:00:00 @ 12.53, 48: 03-21 21:00:00 - 03-21 22:00:00 @ 14.24, 49: 03-21 22:00:00 - 03-21 22:30:00 @ 15.22, 50: 03-21 22:30:00 - 03-21 23:00:00 @ 12.01, 51: 03-21 23:00:00 - 03-22 00:00:00 @ 15.04, 52: 03-22 00:00:00 - 03-22 00:30:00 @ 16.28, 53: 03-22 00:30:00 - 03-22 01:30:00 @ 17.96, 54: 03-22 01:30:00 - 03-22 02:00:00 @ 16.17, 55: 03-22 02:00:00 - 03-22 03:00:00 @ 13.61, 56: 03-22 03:00:00 - 03-22 03:30:00 @ 13.21, 57: 03-22 03:30:00 - 03-22 04:00:00 @ 12.38, 58: 03-22 04:00:00 - 03-22 05:00:00 @ 12.54, 59: 03-22 05:00:00 - 03-22 05:30:00 @ 14.82, 60: 03-22 05:30:00 - 03-22 06:00:00 @ 13.44, 61: 03-22 06:00:00 - 03-22 06:30:00 @ 19.38, 62: 03-22 06:30:00 - 03-22 07:00:00 @ 22.84, 63: 03-22 07:00:00 - 03-22 07:30:00 @ 17.17, 64: 03-22 07:30:00 - 03-22 08:00:00 @ 19.97, 65: 03-22 08:00:00 - 03-22 09:00:00 @ 17.04, 66: 03-22 09:00:00 - 03-22 09:30:00 @ 16.51, 67: 03-22 09:30:00 - 03-22 10:00:00 @ 15.45, 68: 03-22 10:00:00 - 03-22 11:00:00 @ 17.29, 69: 03-22 11:00:00 - 03-22 11:30:00 @ 15.94, 70: 03-22 11:30:00 - 03-22 12:00:00 @ 14.78, 71: 03-22 12:00:00 - 03-22 12:30:00 @ 13.76, 72: 03-22 12:30:00 - 03-22 13:30:00 @ 13.14, 73: 03-22 13:30:00 - 03-22 14:00:00 @ 13.01, 74: 03-22 14:00:00 - 03-22 15:00:00 @ 13.54, 75: 03-22 15:00:00 - 03-22 15:30:00 @ 15.07, 76: 03-22 15:30:00 - 03-22 16:00:00 @ 13.92]
2024-03-20 15:35:01.945098 INFO pred_bat: Charge window will be: 2024-03-20 15:30:00+00:00 - 2024-03-20 16:00:00+00:00 - current soc 89 target 100
2024-03-20 15:35:01.946277 INFO pred_bat: Configuring charge window now (now 03-20 15:35:00 target set_window_minutes 30 charge start time 03-20 15:30:00
2024-03-20 15:35:01.947675 INFO pred_bat: Setting ECO mode as no discharge window planned
2024-03-20 15:35:01.949900 INFO pred_bat: Inverter 0 Adjust force discharge to False, change times from 00:00:00 - 00:00:00 to 00:00:00 - 00:00:00
2024-03-20 15:35:01.951230 INFO pred_bat: Inverter 0 Current Target SOC is 100 already at target
2024-03-20 15:35:01.954041 INFO pred_bat: Current SOC 89% is less than Target SOC 100. Grid charging enabled with charge current set to 65.00
2024-03-20 15:35:01.965568 INFO pred_bat: Will not recompute the plan, it is 5.0 minutes old and max age is 10 minutes
2024-03-20 15:35:01.966528 INFO pred_bat: IBoost model today updated to 1.85
2024-03-20 15:35:01.967359 INFO pred_bat: Completed run status Charging
Thanks. If you had it the html plan would have been useful to see what the future load and battery soc plan was which might help explain why predbat decided to charge the battery.
Think it needs input from Trefor @springfall2008
I'm struggling to capture this info as I'm watching after the event. However, it seems to occur as follows: iBoost goes to True I have a rule that turns the Immersion on only if I'm exporting - i.e. if I turn on the kettle, the immersion turns off temporarily. When the immersion turns off, batpred wants to charge the battery again from the grid.
Could the issue be that my immersion is drawing a fixed 2.5kW - and batpred recalculates every 10 minutes. This means that I've drawn far more power than batpred was expecting?
I can't really answer why predbat is recharging the battery from grid, would need to see more of the html plan to understand what the evening draw was and why predbat felt it needed to do grid charge.
But I can highlight a couple of things.
So yes, your fixed 2.5kW immersion discharge is drawing more than predbat expects and this is causing a plan recalculation. I believe the I boost logic is that predbat expects the iboost will just consume the excess exported solar (about 1kW on the charts) whereas you are drawing more than this and draining the battery as a result. And this brings me onto a problem with your automation. Iboost is being turned on by excess solar but then you're consuming more than the excess so you stop exporting, start draining the battery, and then your automation will turn off the immersion ☹️ and then the cycle repeats again.
It would probably be better if you ran the immersion for at least a minimum time period if you could understand/ control the battery grid recharge. Maybe only allow Iboost in the morning when the battery has enough time to fill back off solar - just realised your run today was just before the afternoon peak so that might be why predbat grid charged to replenish the battery?
A variable power immersion is another option. Just looked on google and there's lots of options available from diy upwards
Its taken me a while to get decent screenshots of the html plan whilst this is going on, but here goes: Time now is 12:40. Target SOC for end of period is 92%, immersion dropped SOC from 94% to 91%.
However, iBoost remained On, despite the SOC being behind plan. Instead, batpred chose to immediately bring in mains power to charge the battery. My view is that 1) iBoost should be turned off and 2) batpred should have waited until 14:30 to charge the battery, if charging was actually needed.
Sometimes, this forced recharge happens at the same time as the immersion, sometimes, its 10 mins later or so (I guess the frequency of the plan recalc). What is probably needed is a forced plan recalc before a forced battery charge, just to double check that is still the right action.
I suspect this is more of a "how can I...?" as I suspect its already supported; I just need to understand how!
I don't have an export tariff, so I want to dump all my excess solar into my immersion.
Challenge is that my immersion is fixed 2.5kW, and my excess solar might only be 1kW at a time. Currently, if I turn on my immersion, I will then immediately start to drain 1.5kW from my battery; batpred will then think I'm behind plan and bring in power from the grid to compensate.
If I'm generating an excess of, say, over 1kW, and I'm forecasting that I will have an excess of, say, over 3kWh over the next few hours, then I'd like to dump 3kWh into my immersion. This may involve running the immersion for 20mins, recharge the battery for 30mins on solar, and running the immersion again for another 20mins.