Skip to content

Reporter

Jeroen Simonetti edited this page Jun 6, 2026 · 3 revisions

Reporter

The reporter helper watches mimirheim's debug dump directory and generates an HTML report for each new dump pair. Reports are compiled into a static HTML index page with interactive Plotly charts.

Full auto-generated field reference: Config-Reporter

You can configure and enable this helper from the browser UI instead of editing YAML directly — see Helpers/Config-Editor for setup instructions.


What it does

  1. Subscribes to reporting.notify_topic (default: {mimir_topic_prefix}/status/dump_available).
  2. On notification: reads the most recently available input_*.json + output_*.json dump pair from reporting.dump_dir.
  3. Renders an HTML report with:
    • A Plotly time-series chart of the full horizon schedule (grid, battery, PV, loads)
    • An economic summary table (projected cost, savings vs. no-battery baseline)
    • Solve metadata (strategy, objective value, horizon length, solve time)
  4. Writes the report to reporting.output_dir/{ts}_report.html.
  5. Updates the static index.html and inventory.js inventory file.
  6. Removes old reports when max_reports is exceeded.

Prerequisites

Debug dumps must be enabled in mimirheim's config.yaml:

debug:
  dump_dir: /data/dumps    # must be accessible to the reporter container
  max_dumps: 100

The reporter reads from this directory. In a Docker Compose setup, share it as a named volume:

# docker-compose.yaml
volumes:
  mimirheim_dumps:

services:
  mimirheim:
    volumes:
      - mimirheim_dumps:/data/dumps

  reporter:
    volumes:
      - mimirheim_dumps:/data/dumps:ro

Configuration example

mqtt:
  host: localhost
  port: 1883
  client_id: mimir-reporter

mimir_topic_prefix: mimir

reporting:
  dump_dir: /data/dumps          # shared with mimirheim (read-only)
  output_dir: /data/reports      # where HTML files are written
  max_reports: 100               # keep the 100 most recent; 0 = unlimited
  # notify_topic defaults to: mimir/status/dump_available

Accessing the reports

The reporter writes standard HTML files to output_dir. Serve them with any static file server. Options:

Home Assistant: use the built-in homeassistant.local:8123 web UI with a custom local_resources entry, or serve from a mapped volume using the NGINX Proxy add-on.

Nginx in Docker Compose:

services:
  nginx:
    image: nginx:alpine
    ports:
      - "8080:80"
    volumes:
      - /data/reports:/usr/share/nginx/html:ro

Browse to http://homeassistant.local:8080 to see the report index.


Migration note: reporter MQTT sections removed

chart_publishing and ha_discovery were removed from reporter.yaml. If either section is still present, reporter startup will fail because the config models use extra="forbid".

The economic summary fields are now published by mimirheim core on outputs.last_solve (mimir/status/last_solve by default), so reporter no longer publishes any MQTT topics.

chart_topic was removed previously. If your reporter.yaml still contains a chart_publishing.chart_topic entry, remove it.

The time-series data previously published to chart_topic is now available as HA MQTT sensor attributes set by the mimirheim core (plan 61). Use those attributes in apexcharts-card instead. Key differences:

  • PV and baseload: chart_topic published aggregated totals; the replacement sensors are per-source. Sum them in data_generator if you need a combined series.
  • Battery charge_kw sign: chart_topic published max(0, -kw) (positive charge, zero discharge). The replacement forecast.kw is signed (negative = charging). Apply Math.max(0, -s.kw) in your apexcharts-card transform.
  • Battery SOC starting point: chart_topic included the pre-step-0 initial SOC. The replacement starts from step 0's end-SOC. Source the initial SOC from the battery input sensor if needed.

Report inventory and restart resilience

On startup the reporter reconciles its in-memory inventory against the files on disk:

  1. Reports whose HTML file no longer exists are dropped from the inventory.
  2. Reports whose HTML exists and whose dump file also exists are rebuilt from the dump (full metrics).
  3. Reports whose HTML exists but whose dump was deleted (mimirheim rotates old dumps when max_dumps is exceeded) retain a stub entry — the report remains accessible in the index without metrics.

This means the index is always consistent with what is on disk, even after a reporter restart following mimirheim dump rotation.


Derived topics

With mimir_topic_prefix: mimir:

Config field Derived topic
reporting.notify_topic mimir/status/dump_available

Clone this wiki locally