====== batcontrol ====== **batcontrol** controls your PV battery based on dynamic electricity prices, a solar forecast and your consumption profile. It charges the battery from the grid when electricity is cheap and saves stored energy for the expensive hours — fully automatic, and **without** an IP-based meter. {{:img_0684.jpeg?800|batcontrol}} ===== Key features ===== * **Price-aware charging** — buy cheap, use it when prices peak * **Works with any inverter** — Fronius GEN24 (Solar API), Fronius Modbus TCP, or //any// system via the generic MQTT driver * **No extra meter required** * **Solar & consumption forecasting** built in * **Home Assistant** integration via MQTT auto-discovery and a dedicated add-on * **Peak shaving** to keep battery capacity free for the midday PV peak //(since 0.8.0)// * **evcc coordination** for EV charging * **Resilient operation** — survives short inverter or network outages * **Open source** (MIT), runs as a Docker container ===== How it works ===== batcontrol runs in a short loop and combines three forecasts: - **Electricity price** from your dynamic tariff (next 24–48 h) - **Solar production** from a PV forecast service - **Consumption** from a load profile scaled to your annual usage From these it computes your expected //net consumption// and decides each cycle whether to **charge from grid** (prices are low and will rise), **hold** the battery (save it for the expensive hours), or **discharge** normally. It then sets your inverter accordingly — and restores your original settings on shutdown. ===== Supported hardware & services ===== ^ Category ^ Supported ^ | Inverters | Fronius GEN24 (Solar %%API%%), Fronius Modbus TCP, any inverter via MQTT | | Dynamic tariffs | Tibber, aWATTar, evcc, zone-based tariffs (e.g. Octopus) | | Solar forecast | [[https://forecast.solar|Forecast.Solar]], [[https://solarprognose.de|Solarprognose]], [[https://evcc.io|evcc]], Home Assistant sensor | | Consumption | CSV load profile (scaled to annual kWh) or Home Assistant sensor | | Home automation | MQTT, Home Assistant (auto-discovery + add-on) | ===== Get started ===== batcontrol runs as a Docker container and is configured through a single YAML file. * **Install & run:** see the [[https://github.com/MaStr/batcontrol#docker-usage|README]] * **Full configuration reference:** the [[https://mastr.github.io/batcontrol/|Documentation]] * **Home Assistant users:** the [[https://github.com/MaStr/batcontrol_ha_addon|batcontrol add-on]] ---- //batcontrol is experimental software that controls real hardware and is provided without warranty. Start with conservative limits and monitor the logs during initial setup.//