Official batcontrol images
519
Optimize your electricity costs by charging your PV battery when grid electricity is cheap and there is not enough solar power available.
batcontrol makes your battery inverter price-aware: it combines a dynamic electricity tariff (Tibber, aWATTar, evcc), a solar forecast and a consumption profile to decide every few minutes whether the battery should discharge, hold, or charge from the grid.
Replace
<registry>/batcontrolbelow with your actual image reference everywhere it appears.
| Tag | Meaning |
|---|---|
latest | Latest stable release |
x.y.z (e.g. 0.8.0) | Pinned release version (recommended for production) |
Pin a version in production so an unattended update can't change battery behaviour unexpectedly:
<registry>/batcontrol:0.8.0
mkdir -p ./config ./logs
Download the sample config, then edit it (tariff, PV system, battery limits):
curl -fsSL \
https://raw.githubusercontent.com/MaStr/batcontrol/refs/heads/main/config/batcontrol_config_dummy.yaml \
-o ./config/batcontrol_config.yaml
A default load profile is used automatically; supply your own ./config/load_profile.csv only if you want to.
docker run -d \
--name batcontrol \
-v "$(pwd)/config:/app/config" \
-v "$(pwd)/logs:/app/logs" \
-e TZ=Europe/Berlin \
--restart unless-stopped \
<registry>/batcontrol:latest
docker-compose.yml:
services:
batcontrol:
image: <registry>/batcontrol:latest
container_name: batcontrol
volumes:
- ./config:/app/config
- ./logs:/app/logs
environment:
- TZ=Europe/Berlin
restart: unless-stopped
Start it:
docker compose up -d
Follow the logs:
docker compose logs -f
If you run Home Assistant OS / Supervised, you do not need this image directly — use the dedicated add-on instead, which wraps batcontrol and integrates it into the HA add-on store:
Add the repository URL under Settings → Add-ons → Add-on Store → ⋮ → Repositories, then install batcontrol from the list. Configuration is done through the add-on options / the mounted config share, so the volume and timezone notes below also apply there.
batcontrol also publishes its state over MQTT with Home Assistant auto-discovery, so a battery-SoC sensor, current price and mode entities appear automatically once MQTT is enabled in your config. See the MQTT API wiki page.
| Container path | Required | Purpose |
|---|---|---|
/app/config | Yes | Holds batcontrol_config.yaml (main config), an optional load_profile.csv, and an optional grafana-overview.json dashboard. |
/app/logs | Recommended | Persists log files outside the container so they survive restarts/updates. |
The container is configured entirely through the YAML file in /app/config — there are no functional settings exposed as environment variables (see below). Keep a backup of a known-good batcontrol_config.yaml.
| Variable | Default | Description |
|---|---|---|
TZ | container default (UTC) | Timezone for logging and all time-based decisions. Set this to your local zone (e.g. Europe/Berlin), otherwise price/forecast windows can be shifted against your actual local time. |
All other configuration (inverter type, tariff provider, solar forecast, battery limits, MQTT, etc.) lives in batcontrol_config.yaml, not in environment variables.
docker compose pull
docker compose up -d
On shutdown batcontrol restores the inverter settings it saved on startup. When pinning a version tag, bump it deliberately and re-pull; review the release notes at https://github.com/MaStr/batcontrol/releases before updating in production.
Full documentation and configuration reference: - https://mastr.github.io/batcontrol
Content type
Image
Digest
sha256:0bbb7c32d…
Size
69.6 MB
Last updated
4 days ago
docker pull mastr950/batcontrol:main