| 2026-03-05 |

G12W: Solcast-based charging optimization for 15:00-22:00 coverage
...
Old logic: check if instantaneous PV surplus > battery deficit (100% target).
Problem: moment of cloud = wrong decision; always aimed for 100% SOC.
New logic:
- Target SOC at 15:00 = what's needed to cover 15:00-22:00 consumption
(expensive tariff) minus expected PV after 15:00, + 15% buffer
- Uses Solcast prognoza_na_nastepna_godzine * 1.8 to estimate PV in 13-15h window
- Uses Solcast pozostala_prognoza_na_dzis to estimate PV after 15:00
- Uses current load_power as average consumption proxy for 15-22h (7h)
- Grid charging current = exactly what's missing (not always 100A)
- program_4_soc = calculated target SOC (not always 100%)
- Co-15min optimization uses prognoza_na_biezaca_godzine + remaining window time
Result: charges battery to precisely what's needed for the day, not always 100%.
On sunny days: Battery First (no grid import). On cloudy days: minimal grid import.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Wojciech Konieczny
committed
on 5 Mar
|
Fix: restore battery_max_charging_current=100A at 15:00 unconditionally
...
Bug: '15:00 wyłącz ładowanie' automation had condition grid_charging=ON.
When PV was sufficient (Battery First, no grid import), that condition was
never met → max_charging_current stayed at limited value indefinitely.
Next morning, battery charged slowly from PV and excess went to grid.
Fix: Remove grid_charging condition from 15:00 trigger. Always restore
battery_max_charging_current=100A at end of cheap window, regardless of
whether grid charging was used.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Wojciech Konieczny
committed
on 5 Mar
|
| 2026-03-04 |
Fix: apply 94% efficiency factor to charging current calculation
...
Inverter has ~6% conversion losses. Without this factor, battery was
charging at full PV surplus current causing ~176W grid import to cover losses.
New formula: surplus_a = ((pv * 0.94 - load) / vbat) | int
Result: grid = -107W (slight export) instead of +176W (import).
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Wojciech Konieczny
committed
on 4 Mar
|
Fix battery charging: limit max_charging_current to PV surplus
...
When PV can charge battery without grid (Battery First mode),
limit battery_max_charging_current = (PV - Load) / V_bat to prevent
battery from pulling excess power from grid.
Without this fix, battery charged at max 100A even when PV surplus
was only ~55A, resulting in ~500W grid import for battery charging.
Formula: max(5, min(100, (pv_w - load_w) / bat_voltage_v))
Applied in both g12w_wlacz_ladowanie_dzienne and g12w_pv_charging_optimization.
On grid-charge path: restore battery_max_charging_current to 100A.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Wojciech Konieczny
committed
on 4 Mar
|
| 2026-03-03 |

G12W: Smart afternoon charging - use grid only when PV can't charge battery
...
Replaces fixed-threshold logic with energy budget calculation:
- Formula: PV_surplus_W * remaining_hours >= battery_deficit_Wh
- Battery capacity: 14336 Wh (280Ah LFP at 51.2V nominal)
'Włącz ładowanie dzienne 13:00' (12:55 trigger):
- Calculates if PV surplus over full 2h window >= battery deficit
- YES → Battery First, no grid charging needed
- NO → Load First + Grid at 100A (use cheap G12W tariff)
'Optymalizacja PV ładowania dziennego' (every 15min, 13:00-15:00):
- Recalculates with actual remaining time in window
- Dynamically switches between Battery First / Grid as cloud cover changes
- Only triggers grid charging when SOC < 95% and PV genuinely can't finish the job
Example: PV=3358W, Load=1188W, SOC=99%, remaining=1.38h
Surplus=2988 Wh >> Deficit=143 Wh → Battery First, grid import drops 3100W→324W
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Wojciech Konieczny
committed
on 3 Mar
|
| 2026-02-11 |
G12W: Ładowanie 13:00-15:00 zawsze w dni robocze
...
Usunięty warunek prognozy < 5 kWh dla dziennego ładowania.
Teraz automatyzacja uruchamia się zawsze Pn-Pt gdy SOC < 95%.
Wojciech Konieczny
committed
on 11 Feb
|
| 2026-02-10 |
Add G12W battery automation, IBSystem MQTT integration, HA configs
...
Zmiany:
- ha-configs/151/: Kopia konfiguracji HA TEST
- automations.yaml: Automatyzacje G12W ładowania baterii
- configuration.yaml: Główna konfiguracja z dashboardami
- dashboards/: Deye, Ogrzewanie, IBSystem, ID35
- ibsystem/: Integracja IBSystem z MQTT
- ibsystem2mqtt_v5.py: Bridge IBSystem → MQTT
- config.yaml: Konfiguracja połączeń
- ibsystem2mqtt_watchdog.sh: Health check i auto-restart
- docs/: Dokumentacja
- G12W_BATTERY_AUTOMATION.md: Opis taryfy i automatyzacji
- IBSYSTEM_MQTT_INTEGRATION.md: Opis integracji MQTT
Kluczowe naprawy:
- Program 6 Deye: zmiana z 21:00 Disabled na 22:00 Grid
- IBSystem: setting.light.X zamiast output.do.X dla sterowania
- Dashboard ID35: prawidłowe entity IDs (ibsystem_rs0_id35_*)
- Watchdog dla ibsystem2mqtt (cron co minutę)
Wojciech Konieczny
committed
on 10 Feb
|