reinhard-brandstaedter / solarflow-control

A tool to automatically control Zendure's Solarflow hub with more flexibility to match home power demand
70 stars 12 forks source link

FEATURE: Revised steering logic aligned with time #78

Closed tuxianerDE closed 11 months ago

tuxianerDE commented 1 year ago

Overarching rule:

Battery Low:

If packSoC/single battery is below configured BATTERY_LOW ensure that solarFlow charges only (SF limit 0). If direct panels are connected inverters limited is demand + 50W.

Since the inverter steers the limit on all MPPTS equally the following math determine the factor applied to the limit: 1) how many INVERTER_INPUTS_USED 2) How many MPPTS are connected to the INPUTS USED? -> Should we introduce a new config variable instead? i.e. steering factor? Since the math is not consistent.

Night: Time window: sunset till sunrise

If CHARGE_THROUGH_THRESHOLD is No (default):

If CHARGE_THROUGH_THRESHOLD is Yes:

Sunrise: Time window: sunrise till sunrise + offset (i.e. 60min)

If CHARGE_THROUGH_THRESHOLD is No (default):

If CHARGE_THROUGH_THRESHOLD is Yes:

Day: Time window: (sunrise + offset (i.e. 60 min)) till (sunset - offset (i.e. 60 min))

If packSoC is larger then CHARGE_THROUGH_THRESHOLD or packSoC is larger or equal to DAY_DISCHARGE_LIMIT: set CHARGE_THROUGH_THRESHOLD indicator to No

Sunset: Time window: (sunset - offset (i.e. 60 min)) till sunset If packSoc is greater then CHARGE_THROUGH_THRESHOLD:

If packSoC is smaller then CHARGE_THROUGH_THRESHOLD:

reinhard-brandstaedter commented 1 year ago

The initial idea of the steering logic had two goals:

Revised Goals

Ideas

reinhard-brandstaedter commented 1 year ago

Idea for Charge-Through Instead of working with thresholds on battery level, we can remember the timestamp when the battery reached 100% and then take the decision if it should be discharged again. e.g. only allow discharging if 100% has been reached within 7 days.

On the other hand we could also ensure that the battery will be discharged to 0% from time to time, but I guess that happens anyway...

tuxianerDE commented 1 year ago

ChargeThrough: might be difficult especially during the "dark" months of Winter. So making it configurable (if not set or timestamp cannot be determined start counter from 0) dont take decision and let system "just" run.