Table of Contents

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.

batcontrol

Key features

How it works

batcontrol runs in a short loop and combines three forecasts:

  1. Electricity price from your dynamic tariff (next 24–48 h)
  2. Solar production from a PV forecast service
  3. 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 Forecast.Solar, Solarprognose, 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.


batcontrol is experimental software that controls real hardware and is provided without warranty. Start with conservative limits and monitor the logs during initial setup.