Skip to content

Config Editor

Jeroen Simonetti edited this page May 2, 2026 · 3 revisions

Config Editor

The mimirheim config editor is an optional in-container web service that provides a browser-based UI for creating and editing mimirheim.yaml. It removes the need to hand-edit YAML files: fields are rendered as labelled form inputs, valid values are enforced before anything is written, and the file is updated atomically.

Prerequisites

The /config volume mount must not be read-only. The config editor writes mimirheim.yaml back to the mounted directory. If you start your container with -v /path/to/configs:/config:ro, change :ro to :rw (or omit it entirely, as read-write is the Docker default).

Enabling the editor

Create config-editor.yaml in your /config directory. An empty file is sufficient:

touch /path/to/your/configs/config-editor.yaml

Then restart the container. The editor service starts automatically when the file is present.

Accessing the UI

Open http://<container-host>:8099 in a browser.

If you use Docker host networking, the editor is accessible on port 8099 of the host machine. If you use bridge networking, map the port explicitly:

docker run -d \
  -v /path/to/your/configs:/config \
  -p 8099:8099 \
  mimirheim

Configuration

The example config file is at /app/examples/config-editor.yaml inside the container. All fields are optional.

Field Default Description
port 8099 TCP port the editor listens on. Change this if the default conflicts with another service.
config_dir /config Path to the directory containing mimirheim YAML config files. Must match the container volume mount point.
log_level INFO Logging level. One of DEBUG, INFO, WARNING.

Changing the port

In host networking mode, change the port if 8099 is already in use:

# config-editor.yaml
port: 8321

Remember to also update the -p flag in your docker run command if using bridge networking.

Available tabs

The editor opens to the General tab, which covers the top-level MQTT and grid settings from mimirheim.yaml. All tabs edit mimirheim.yaml unless marked as "helper tab" in the table below.

Device tabs (edit mimirheim.yaml)

Tab Purpose
General MQTT broker connection, grid import/export limits, and solve-cycle settings.
Batteries Add, remove, and configure battery instances (batteries map).
PV Arrays Add, remove, and configure PV array instances (pv_arrays map).
EV Chargers Add, remove, and configure EV charger instances (ev_chargers map).
Hybrid Inverters Add, remove, and configure hybrid inverter instances (hybrid_inverters map).
Deferrable Loads Add, remove, and configure deferrable load instances (deferrable_loads map).
Static Loads Add, remove, and configure static load instances (static_loads map).
Heating Three sub-tabs for thermal boilers, space heating, and combi heat pumps.

Helper tabs (edit per-helper YAML files)

Each helper tab has an Enable toggle at the top. When enabled, a form appears for the helper's configuration. Clicking Save writes the helper's YAML file to the config directory (e.g. nordpool.yaml). Disabling removes the file, which stops the helper service from starting on the next container restart.

Tab Config file Notes
Nordpool nordpool.yaml Day-ahead electricity prices from the Nordpool API.
PV Forecast pv-fetcher.yaml PV generation forecast from forecast.solar.
PV ML pv-ml-learner.yaml Machine-learning-based PV forecast trained on historical data.
Baseload baseload-static.yaml / baseload-ha.yaml / baseload-ha-db.yaml See below.
Reporter reporter.yaml Publishes formatted solve results to Home Assistant.
Scheduler scheduler.yaml Time-of-use schedule override helper.

Note: a container restart is required for service-level changes (enabling or disabling a helper) to take effect. The s6-overlay service supervisor reads the presence of the config file at startup to decide whether to start the helper. Config-only changes to an already-running helper do not require a restart.

Baseload variant selector

The Baseload tab shows a Variant drop-down with three options. Selecting a variant and clicking Save writes the corresponding file and removes any other baseload variant file that may already exist in the config directory. Only one baseload variant may be active at a time.

Variant File Description
Static profile baseload-static.yaml Fixed hourly profile entered manually. No external dependencies.
Home Assistant REST API baseload-ha.yaml Historical energy consumption fetched from the HA REST API.
Home Assistant database baseload-ha-db.yaml Historical energy consumption read directly from the HA database file.

Each tab renders the fields defined in the mimirheim schema. Basic fields are shown immediately; advanced fields are visible via a "Show advanced settings" toggle.

Validation

The editor validates the entire config via Pydantic before writing any file. If validation fails, field-level error messages are displayed and mimirheim.yaml is not modified. This prevents saving a config that would cause the mimirheim solver to fail on startup.

Atomic writes

When you click Save, the editor writes the new config to a temporary file in the same directory, then renames it over mimirheim.yaml. This ensures the solver never sees a half-written file even if the container is restarted mid-save.

After saving, restart the add-on (or the mimirheim container) for the new configuration to take effect. mimirheim reads its config once at startup and does not reload it at runtime.

Comment preservation

The editor preserves YAML comments in your config files when saving. You can document your configuration with inline comments and they will survive GUI edits.

Example: this config with inline comments:

batteries:
  home_battery:
    capacity_kwh: 10.0  # Tesla Powerwall 2
    # Charge efficiency degrades above 0.8 SOC
    charge_segments:
      - power_max_kw: 5.0
        efficiency: 0.95

After editing capacity_kwh to 12.0 in the GUI, the file becomes:

batteries:
  home_battery:
    capacity_kwh: 12.0  # Tesla Powerwall 2
    # Charge efficiency degrades above 0.8 SOC
    charge_segments:
      - power_max_kw: 5.0
        efficiency: 0.95

All comments are preserved; only the edited value changes.

Limitations:

  • New devices added via the GUI start with no comments. Add them manually after saving.
  • Comments attached to a deleted device are removed with it.

Security note

The config editor has no authentication. It is designed for use on a trusted private network (e.g. a home LAN or a local Docker network). Do not expose port 8099 to the internet or to untrusted networks.

Clone this wiki locally