BOLP (Battery Optimizer Light Plus) – Zero-Config Day-Ahead Battery & EV Scheduling

Hi everyone,

I’d like to share a project I’ve been building to solve a common headache for home battery and solar owners: BOLP (Battery Optimizer Light Plus).

Like many with residential battery storage and dynamic hourly tariffs (such as Nord Pool or Tibber), I found native inverter logic too basic to capture real arbitrage, while advanced solutions like EMHASS require dedicated local Docker containers, complex solvers, and extensive YAML configuration.

BOLP was built as an easy, zero-config bridge: you install a lightweight custom integration in Home Assistant, and let an optimized cloud solver handle the heavy 36-hour Linear Programming (LP) and consumption forecasting.

:sweden: Regional Availability / Swedish Market:
Currently, BOLP is tailored for the Swedish market (bidding zones SE1–SE4, local effekttariffer/capacity charges, and tax deductions). However, the solver backend is designed to be modular. If you are located in another country or pricing zone (Nordics, Germany, etc.) and would like to use BOLP, please reach out or drop a comment below—we can easily add support for other regions upon request!


:high_voltage: What Makes BOLP Different?

  • Rolling Horizon Optimization (MPC): Instead of calculating a static schedule once a day, the solver re-runs every 5 minutes with fresh live SoC, solar production, and consumption data.
  • PeakGuard (Capacity Tariff & Fuse Protection): Proactively manages discharge and charge limits to prevent expensive hourly power tariff peaks (effekttariffer) and protect your main fuse.
  • Integrated Smart EV Charging: Co-optimizes home battery cycles with EV charging. Just set your target departure time and required kWh—BOLP finds the cheapest hours without overloading the main fuse.
  • Negative Price & Solar Curtailment Guard: Automatically clamps solar export (dynamic_export_limit_kw) when spot prices turn negative, ensuring you never pay to export power.
  • Self-Calibrating Efficiency & Degradation: Auto-tunes battery round-trip efficiency, inverter standby loss, and household baseline load via nightly learning models.
  • Fail-Safe Operation: If internet connectivity drops, your system safely defaults to standard local self-consumption (IDLE)—no forced commands or blackouts.

:building_construction: Architecture: Why a Hybrid Approach?

  1. Local Home Assistant: Runs a lightweight HACS integration that collects your sensor entities (SoC, power, production) and dispatches commands (CHARGE, DISCHARGE, IDLE, HOLD) to your inverter.
  2. Cloud Solver Backend: High-performance mathematical solvers (CBC / PuLP) solve the multi-variable optimization matrix in milliseconds without taxing your Home Assistant host (e.g. Raspberry Pi).

:electric_plug: Hardware Compatibility

BOLP works with any inverter that exposes writable registers or entities in Home Assistant:

  • Huawei SUN2000 & Luna2000 (via huawei_solar integration)
  • Solis, Sigenergy & Solinteg (via local Modbus integrations)
  • Kostal Plenticore (via direct Modbus TCP)
  • Sonnen & Homevolt (via local REST API / homevolt_local integration)
  • Generic setups with writable charge/discharge power and mode entities (Modbus TCP, MQTT, REST, etc.)

:rocket: Getting Started

  1. Install via HACS:
    • Open HACS > Integrations.
    • Add https://github.com/awestin67/battery-optimizer-light-plus as a custom repository (Integration).
    • Download and restart Home Assistant.
  2. Configure Integration:
    • Go to Settings > Devices & Services > Add Integration.
    • Search for Battery Optimizer Light Plus.
    • Follow the step-by-step UI config flow to map your sensors (Inverter power, Battery SoC, Grid import/export).
  3. Connect Account:

:link: Links & Community Feedback

I would love to get feedback from the community—especially from users running different inverter brands, micro-inverters, or unique home energy tariffs. If you have questions about the solver constraints, feel free to ask below!