-
Notifications
You must be signed in to change notification settings - Fork 1
Home
mimirheim (Home Energy Optimiser) is an open-source Python service that computes an optimal energy dispatch schedule for a residential home. It reads electricity prices, PV forecasts, and device state from MQTT, solves a Mixed-Integer Linear Programme, and publishes the optimal schedule back to MQTT.
mimirheim is a pure strategist. It never controls hardware. Home Assistant, Node-RED, or any other automation platform is responsible for executing the schedule on actual devices.
| Page | Purpose |
|---|---|
| Quick Start | Step-by-step setup: PV array and home battery, from zero to first schedule |
| Configuration | mimirheim's own config.yaml explained with annotated examples |
| Config-Mimirheim | Full auto-generated field reference for mimirheim/config/schema.py
|
Helpers are separate Docker-composable daemons that feed data into mimirheim via MQTT. Each helper subscribes to a trigger topic, fetches or computes the relevant data, and publishes it in mimirheim's expected payload format.
| Helper | What it provides | Guide |
|---|---|---|
| Nordpool | Day-ahead electricity prices from the Nordpool market | Nordpool |
| PV Fetcher | PV generation forecast via the free forecast.solar API | PV-Fetcher |
| PV ML Learner | Locally trained XGBoost model for site-specific PV prediction | PV-ML-Learner |
| Baseload (Static) | Fixed repeating household load profile from config | Baseload-Static |
| Baseload (HA) | Historical load averages fetched from the Home Assistant API | Baseload-HA |
| Baseload (HA DB) | Historical load averages fetched directly from the HA recorder database | Baseload-HA-DB |
| Reporter | HTML report generator from mimirheim debug dumps | Reporter |
| Scheduler | Cron-style scheduler that publishes MQTT trigger messages | Scheduler |
| Page | Purpose |
|---|---|
| Helper-API | MQTT contract that all helpers must satisfy; how to write your own helper |
| Architecture | Internal design: solver model, concurrency, test layers, data flow |
These pages are regenerated by scripts/extract_config_docs.py from the Pydantic source schemas. Do not edit them manually.
| Page | Source |
|---|---|
| Config-Mimirheim | mimirheim/config/schema.py |
| Config-Common | helper_common/config.py |
| Config-Nordpool | nordpool/config.py |
| Config-PV-Fetcher | pv_fetcher/config.py |
| Config-PV-ML-Learner | pv_ml_learner/config.py |
| Config-Baseload-Static | baseload_static/config.py |
| Config-Baseload-HA | baseload_ha/config.py |
| Config-Baseload-HA-DB | baseload_ha_db/config.py |
| Config-Reporter | reporter/config.py |
| Config-Scheduler | scheduler/config.py |
To regenerate all reference pages after editing a schema:
python3 scripts/extract_config_docs.py
# or regenerate a single target:
python3 scripts/extract_config_docs.py --only nordpoolmimirheim uses a single topic prefix (default mimirheim) for all topics. The prefix is set by mqtt.topic_prefix in config.yaml.
| Topic | Content | Retained |
|---|---|---|
{prefix}/input/prices |
Timestamped price array (EUR/kWh + confidence) | Yes |
{prefix}/input/trigger |
Any payload fires a solve cycle | No |
{prefix}/input/strategy |
Strategy name: minimize_cost / minimize_consumption / balanced
|
Yes |
| Per-device SOC topics | Plain numeric string (kWh or %) | Yes |
| Per-device forecast topics | Timestamped kW array | Yes |
| Topic | Content |
|---|---|
{prefix}/strategy/schedule |
Full dispatch schedule — up to 288 steps / 72 h (JSON) |
{prefix}/strategy/current |
Current-step summary (JSON) |
{prefix}/device/{name}/setpoint |
Per-device kW setpoint for t=0 |
{prefix}/status/last_solve |
Solve status and timestamp |
{prefix}/status/availability |
online / offline
|
See MQTT-Topics for complete topic listings.
Getting started
Helpers
- Common
- Nordpool
- Zonneplan
- PV Fetcher
- PV ML Learner
- Baseload (Static)
- Baseload (HA)
- Baseload (HA DB)
- Reporter
- Scheduler
- Config Editor
Developer
Reference