Files
EOS/docs/_generated/openapi.md
T
Bobby NoelteandClaude Opus 5.5 b3d5334d3e refactor(genetic): refactor GENETIC to the consolidated optimizer architecture
Pin result, conversion, plan and visualization of golden runs.
Drive GENETIC through the optimizer interface and registry.
Move GENETIC into one directory with role-named modules.
Prepare every run input once, run from the parameters.
Fall back instead of cancelling the optimization run.
Simulate battery, EV and inverter from frozen dataclasses.
Simulate the home appliance from frozen dataclasses.
Convert and visualize from the parameters and result only.
Serve GENETIC from its own router.
Return a frozen result, build responses in the API.
Echo the request as sent, not with an invented time window.

Additional changes
- Pin that the result does not depend on the number of evaluation workers.
- Run the golden module in UTC: until the request date-times are held in UTC they render in the host time zone.
- Add Optimizer.run_clock(), so the EMS gets slot length and time zone without GENETIC settings.
- Rename ConfigOptimizationRequest, RuntimeForecasts and GeneticCommonSettings as ADR 0010 asks.
- Correct the request example in ADR 0010.
- Record the renamed OpenAPI schemas in CHANGELOG.md and the upgrade guide.
- Add replay files that reproduce each golden result from its parameters.
- Drop OptimizationBase from the algorithm.
- Give the replay and worker tests own review files against xdist races.
- Handle a failing preparation in the EMS like a failing run, no separate cancel path.
- Record the fallbacks in CHANGELOG.md and the upgrade guide.
- Without an inverter, buy the whole load from the grid instead of planning it at no cost.
- Do not charge from the grid without any known price.
- Treat an infinite value after the control horizon as a gap.
- Correct the documentation that said missing forecasts cancel the run.
- Copy the efficiency helpers and the self-consumption table evaluation into GENETIC.
- Add CycleTimeWindowSequence, ConsumerScheduleMode and ConsumerDeadlinePolicy as contract names.
- Hold the date-times of battery, EV and home appliance requests in UTC, so they render the same on every host.
- Drop the UTC pin of the GENETIC golden module; the request date-times no longer depend on the host.
- Copy the time window logic GENETIC needs into genetictimewindow.py.
- Add ValueTimeWindow as a contract name.
- Move the settings' to_genetic_*() converters into the preparation.
- Drop the conversion's prediction reads and configuration fallbacks, which runs never reached.
- Make the moved docstrings valid reST.
- Remove the generic optimization solution route; each optimizer serves its own path.
- Import the GENETIC settings from the package.
- Record the removed route in CHANGELOG.md and the upgrade guide.
- Make the terminal and tail value models frozen dataclasses.
- Move the response models into geneticapi; remove geneticsolution and geneticabc.
- Remove the legacy appliance start arrays and API, which read the wall clock.
- Remove the time window helpers only they used.
- Echo a start_solution without start_solution_datetime as sent.
- Carry the previous solution's start in the run parameters.
- Plan the home appliance cycles that fit, or leave the appliance out, instead of failing.
- Move the appliance layout rules into geneticappliancelayout for the preparation.
- Leave out a DAILY home appliance whose open windows leave no room for a run, with an error log, instead of silently.
- Name the reason of the SoC fallback instead of Python's exception text.
- Answer a solution request for an unknown algorithm with a 404 problem response.
- Record the fixes in CHANGELOG.md and the upgrade guide.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Assisted-by: Claude Code (claude-opus-5-5)
2026-11-27 13:55:41 +01:00

72 KiB

Akkudoktor-EOS

Version: v0.3.0.dev2611261279306014

Description: This project provides a comprehensive solution for simulating and optimizing an energy system based on renewable energy sources. With a focus on photovoltaic (PV) systems, battery storage (batteries), load management (consumer requirements), heat pumps, electric vehicles, and consideration of electricity price data, this system enables forecasting and optimization of energy flow and costs over a specified period.

Currency Information

All monetary values in this API are expressed in the locally configured currency of the EOS installation. The system is designed to work with any currency (e.g., EUR, SEK, CHF, USD, GBP, etc.). Each installation uses a single, consistent currency throughout all endpoints and responses.

Values are given in whole currency units, not in hundredth subunits: a value of 0.0003 in an installation configured for Euro means 0.0003 EUR/Wh (i.e. 0.30 EUR/kWh), never cents. The same applies to all totals (e.g. total_costs of 1.5 = 1.50 EUR).

Field names containing cost, price, revenue, tariff, or similar monetary terms (e.g., total_costs, electricity_price_per_wh, revenue_per_hour) represent amounts in the configured currency, without explicit currency designation in the field name to maintain currency-neutrality.

Deprecated Field Names

The genetic optimization API fields were renamed from German to English. For backward compatibility the old German field names (e.g. gesamtlast, pv_prognose_wh, Gesamtbilanz_Euro) are still accepted on input and are emitted in responses alongside the English names, marked as deprecated in the schema. They will be removed in a future release — new clients should use the English field names only.

Base URL: No base URL provided.

Endpoints:

POST /gesamtlast

Links: local, eos

Fastapi Gesamtlast

"""
Deprecated: Total Load Prediction with adjustment.

Endpoint to handle total load prediction adjusted by latest measured data.

Total load prediction starts at 00.00.00 today and is provided for 48 hours
in 1-hour intervals. If no prediction values are available the missing ones
at the start of the series are filled with the first available prediction value.

Note:
    Use '/v1/prediction/list?key=loadforecast_power_w' instead.
    Load energy meter readings to be added to EOS measurement by:
    '/v1/measurement/value' or
    '/v1/measurement/series' or
    '/v1/measurement/dataframe' or
    '/v1/measurement/data'
"""

Request Body:

  • application/json: { "$ref": "#/components/schemas/GesamtlastRequest" }

Responses:

  • 200: Successful Response

  • 422: Validation Error


GET /gesamtlast_simple

Links: local, eos

Fastapi Gesamtlast Simple

"""
Deprecated: Total Load Prediction.

Endpoint to handle total load prediction.

Total load prediction starts at 00.00.00 today and is provided for 48 hours
in 1-hour intervals. If no prediction values are available the missing ones
at the start of the series are filled with the first available prediction value.

Args:
    year_energy (float): Yearly energy consumption in Wh.

Note:
    Set LoadAkkudoktor as provider, then update data with
    '/v1/prediction/update'
    and then request data with
    '/v1/prediction/list?key=loadforecast_power_w' instead.
"""

Parameters:

  • year_energy (query, required): No description provided.

Responses:

  • 200: Successful Response

  • 422: Validation Error


POST /optimize

Links: local, eos

Fastapi Optimize

"""
Deprecated: Optimize.

Endpoint to handle optimization.

Uses the `classic` GENETIC0 optimisation algorithm (__NO__ 15-minutes slots).

Note:
    Use automatic optimization instead.
    "v1/energy-management/optimization/solution/GENETIC0"
"""

Parameters:

  • start_hour (query, optional): Defaults to current hour of the day.

  • ngen (query, optional): Number of indivuals to generate for genetic algorithm.

Request Body:

  • application/json: { "$ref": "#/components/schemas/Genetic0Request-Input" }

Responses:

  • 200: Successful Response

  • 422: Validation Error


GET /pvforecast

Links: local, eos

Fastapi Pvforecast

"""
Deprecated: PV Forecast Prediction.

Endpoint to handle PV forecast prediction.

PVForecast starts at 00.00.00 today and is provided for 48 hours
in 1-hour intervals. If no forecast values are available the missing ones
at the start of the series are filled with the first available forecast value.

Note:
    Set PVForecastAkkudoktor as provider, then update data with
    '/v1/prediction/update'
    and then request data with
    '/v1/prediction/list?key=pvforecast_ac_power' and
    '/v1/prediction/list?key=pvforecastakkudoktor_temp_air' instead.
"""

Responses:

  • 200: Successful Response

GET /strompreis

Links: local, eos

Fastapi Strompreis

"""
Deprecated: Electricity Market Price Prediction per Wh [amount/Wh].

Electricity prices start at 00.00.00 today and are provided for 48 hours
in 1-hour intervals. If no prices are available the missing ones at the
start of the series are filled with the first available price.

Note:
    Electricity price charges are added.

Note:
    Set ElecPriceAkkudoktor as provider, then update data with
    '/v1/prediction/update'
    and then request data with
    '/v1/prediction/list?key=elecprice_marketprice_wh' or
    '/v1/prediction/list?key=elecprice_marketprice_kwh' instead.
"""

Responses:

  • 200: Successful Response

GET /v1/admin/cache

Links: local, eos

Fastapi Admin Cache Get

"""
Current cache management data.

Returns:
    data (dict): The management data.
"""

Responses:

  • 200: Successful Response

POST /v1/admin/cache/clear

Links: local, eos

Fastapi Admin Cache Clear Post

"""
Clear the cache.

Deletes all cache files.

Returns:
    data (dict): The management data after cleanup.
"""

Responses:

  • 200: Successful Response

POST /v1/admin/cache/clear-expired

Links: local, eos

Fastapi Admin Cache Clear Expired Post

"""
Clear the cache from expired data.

Deletes expired cache files.

Returns:
    data (dict): The management data after cleanup.
"""

Responses:

  • 200: Successful Response

POST /v1/admin/cache/load

Links: local, eos

Fastapi Admin Cache Load Post

"""
Load cache management data.

Returns:
    data (dict): The management data that was loaded.
"""

Responses:

  • 200: Successful Response

POST /v1/admin/cache/save

Links: local, eos

Fastapi Admin Cache Save Post

"""
Save the current cache management data.

Returns:
    data (dict): The management data that was saved.
"""

Responses:

  • 200: Successful Response

POST /v1/admin/database/save

Links: local, eos

Fastapi Admin Database Save Post

"""
Save in memory data to database.

Returns:
    data (dict): The database stats after saving the records.
"""

Responses:

  • 200: Successful Response

GET /v1/admin/database/stats

Links: local, eos

Fastapi Admin Database Stats Get

"""
Get statistics from database.

Returns:
    data (dict): The database statistics
"""

Responses:

  • 200: Successful Response

POST /v1/admin/database/vacuum

Links: local, eos

Fastapi Admin Database Vacuum Post

"""
Remove old records from database.

Returns:
    data (dict): The database stats after removal of old records.
"""

Responses:

  • 200: Successful Response

POST /v1/admin/server/restart

Links: local, eos

Fastapi Admin Server Restart Post

"""
Restart the server.

Restart EOS properly by starting a new instance before exiting the old one.
"""

Responses:

  • 200: Successful Response

POST /v1/admin/server/shutdown

Links: local, eos

Fastapi Admin Server Shutdown Post

"""
Shutdown the server.
"""

Responses:

  • 200: Successful Response

GET /v1/config

Links: local, eos

Fastapi Config Get

"""
Get the current configuration.

Returns:
    configuration (ConfigEOS): The current configuration.
"""

Responses:

  • 200: Successful Response

PUT /v1/config

Links: local, eos

Fastapi Config Put

"""
Update the current config with the provided settings.

Note that for any setting value that is None or unset, the configuration will fall back to
values from other sources such as environment variables, the EOS configuration file, or default
values.

Args:
    settings (SettingsEOS): The settings to write into the current settings.

Returns:
    configuration (ConfigEOS): The current configuration after the write.
"""

Request Body:

  • application/json: { "$ref": "#/components/schemas/SettingsEOS" }

Responses:

  • 200: Successful Response

  • 422: Validation Error


GET /v1/config/backup

Links: local, eos

Fastapi Config Backup Get

"""
Get the EOS configuration backup identifiers and backup metadata.

Returns:
    dict[str, dict[str, Any]]: Mapping of backup identifiers to metadata.
"""

Responses:

  • 200: Successful Response

PUT /v1/config/file

Links: local, eos

Fastapi Config File Put

"""
Save the current configuration to the EOS configuration file.

Returns:
    configuration (ConfigEOS): The current configuration that was saved.
"""

Responses:

  • 200: Successful Response

POST /v1/config/reset

Links: local, eos

Fastapi Config Reset Post

"""
Reset the configuration to the EOS configuration file.

Returns:
    configuration (ConfigEOS): The current configuration after update.
"""

Responses:

  • 200: Successful Response

PUT /v1/config/revert

Links: local, eos

Fastapi Config Revert Put

"""
Revert the configuration to a EOS configuration backup.

Returns:
    configuration (ConfigEOS): The current configuration after revert.
"""

Parameters:

  • backup_id (query, required): EOS configuration backup ID.

Responses:

  • 200: Successful Response

  • 422: Validation Error


GET /v1/config/{path}

Links: local, eos

Fastapi Config Get Key

"""
Get the value of a nested key or index in the config model.

Args:
    path (str): The nested path to the key (e.g., "general/latitude" or "optimize/nested_list/0").

Returns:
    value (Any): The value of the selected nested key.
"""

Parameters:

  • path (path, required): The nested path to the configuration key (e.g., general/latitude).

Responses:

  • 200: Successful Response

  • 422: Validation Error


PUT /v1/config/{path}

Links: local, eos

Fastapi Config Put Key

"""
Update a nested key or index in the config model.

Args:
    path (str): The nested path to the key (e.g., "general/latitude" or "optimize/nested_list/0").
    value (Any): The new value to assign to the key or index at path.

Returns:
    configuration (ConfigEOS): The current configuration after the update.
"""

Parameters:

  • path (path, required): The nested path to the configuration key (e.g., general/latitude).

Request Body:

  • application/json: { "anyOf": [ {}, { "type": "null" } ], "description": "The value to assign to the specified configuration path (can be None).", "title": "Value" }

Responses:

  • 200: Successful Response

  • 422: Validation Error


GET /v1/energy-management/optimization/solution

Links: local, eos

Fastapi Energy Management Optimization Solution Get

"""
Get the latest solution of the optimization.
"""

Responses:

  • 200: Successful Response

GET /v1/energy-management/optimization/solution/GENETIC

Links: local, eos

Fastapi Energy Management Optimization Solution Genetic Get

"""
Get the latest GENETIC specific solution of the optimization.
"""

Responses:

  • 200: Successful Response

GET /v1/energy-management/optimization/solution/GENETIC/pdf

Links: local, eos

Fastapi Energy Management Optimization Solution Genetic Pdf Get

"""
Render the retained GENETIC result without rerunning optimization.

Rendering runs outside the event loop. Copy the result before offloading;
its recorded timestamp, interval and inputs own the report's time grid.
The legacy /visualization_results.pdf route continues to serve GENETIC0.
"""

Responses:

  • 200: Successful Response

GET /v1/energy-management/optimization/solution/GENETIC0

Links: local, eos

Fastapi Energy Management Optimization Solution Genetic0 Get

"""
Get the latest GENETIC0 specific solution of the optimization.
"""

Responses:

  • 200: Successful Response

GET /v1/energy-management/plan

Links: local, eos

Fastapi Energy Management Plan Get

"""
Get the latest energy management plan.
"""

Responses:

  • 200: Successful Response

GET /v1/health

Links: local, eos

Fastapi Health Get

"""
Health check endpoint to verify that the EOS server is alive.
"""

Responses:

  • 200: Successful Response

GET /v1/logging/log

Links: local, eos

Fastapi Logging Get Log

"""
Get structured log entries from the EOS log file.

Filters and returns log entries based on the specified query parameters. The log
file is expected to contain newline-delimited JSON entries.

Args:
    limit (int): Maximum number of entries to return.
    level (Optional[str]): Filter logs by severity level (e.g., DEBUG, INFO).
    contains (Optional[str]): Return only logs that include this string in the message.
    regex (Optional[str]): Return logs that match this regular expression in the message.
    from_time (Optional[str]): ISO 8601 timestamp to filter logs not older than this.
    to_time (Optional[str]): ISO 8601 timestamp to filter logs not newer than this.
    tail (bool): If True, fetch the most recent log entries (like `tail`).

Returns:
    JSONResponse: A JSON list of log entries.
"""

Parameters:

  • limit (query, optional): Maximum number of log entries to return.

  • level (query, optional): Filter by log level (e.g., INFO, ERROR).

  • contains (query, optional): Filter logs containing this substring.

  • regex (query, optional): Filter logs by matching regex in message.

  • from_time (query, optional): Start time (ISO format) for filtering logs.

  • to_time (query, optional): End time (ISO format) for filtering logs.

  • tail (query, optional): If True, returns the most recent lines (tail mode).

Responses:

  • 200: Successful Response

  • 422: Validation Error


POST /v1/measurement/battery-capacity/{battery_id}

Links: local, eos

Post Battery Capacity

"""
Estimate capacity from independent SoC anchors and configured DC power.

store_estimate writes the separate capacity_estimate config field in memory.
Persistence follows the regular EOS configuration save mechanism.
The active capacity_wh and raw measurements are never changed here.
"""

Parameters:

  • battery_id (path, required): No description provided.

Request Body:

  • application/json: { "$ref": "#/components/schemas/BatteryCapacityRequest" }

Responses:

  • 200: Successful Response

  • 422: Validation Error


PUT /v1/measurement/data

Links: local, eos

Fastapi Measurement Data Put

"""
Merge the measurement data given as datetime data into EOS measurements.
"""

Request Body:

  • application/json: { "$ref": "#/components/schemas/PydanticDateTimeData" }

Responses:

  • 200: Successful Response

  • 422: Validation Error


PUT /v1/measurement/dataframe

Links: local, eos

Fastapi Measurement Dataframe Put

"""
Merge the measurement data given as dataframe into EOS measurements.
"""

Request Body:

  • application/json: { "$ref": "#/components/schemas/PydanticDateTimeDataFrame" }

Responses:

  • 200: Successful Response

  • 422: Validation Error


GET /v1/measurement/energy

Links: local, eos

Get Energy

"""
Energy in Wh, with temporal coverage and quality; no missing-to-zero filling.
"""

Parameters:

  • key (query, required): No description provided.

  • start (query, required): No description provided.

  • end (query, required): No description provided.

  • interval_seconds (query, optional): No description provided.

Responses:

  • 200: Successful Response

  • 422: Validation Error


GET /v1/measurement/household

Links: local, eos

Get Household

"""
Site, household without EV, and base without separately measured devices.
"""

Parameters:

  • start (query, required): No description provided.

  • end (query, required): No description provided.

  • interval_seconds (query, optional): No description provided.

Responses:

  • 200: Successful Response

  • 422: Validation Error


GET /v1/measurement/keys

Links: local, eos

Fastapi Measurement Keys Get

"""
Get a list of available measurement keys.
"""

Responses:

  • 200: Successful Response

DELETE /v1/measurement/range

Links: local, eos

Fastapi Measurement Range Delete

"""
Delete measurement values for a key within a datetime range.
"""

Parameters:

  • key (query, required): Measurement key.

  • start_datetime (query, optional): Start datetime.

  • end_datetime (query, optional): End datetime.

Responses:

  • 200: Successful Response

  • 422: Validation Error


GET /v1/measurement/samples

Links: local, eos

Get Samples

"""
Read raw samples including quality, in a bounded half-open range.
"""

Parameters:

  • key (query, required): No description provided.

  • start (query, required): No description provided.

  • end (query, required): No description provided.

Responses:

  • 200: Successful Response

  • 422: Validation Error


PUT /v1/measurement/samples

Links: local, eos

Put Samples

"""
Upsert raw values and their quality; legacy value/series payloads remain valid.
"""

Request Body:

  • application/json: { "type": "array", "items": { "$ref": "#/components/schemas/MeasurementSample" }, "maxItems": 10000, "title": "Samples" }

Responses:

  • 200: Successful Response

  • 422: Validation Error


GET /v1/measurement/series

Links: local, eos

Fastapi Measurement Series Get

"""
Get measurements for given key within given date range as series.

Args:
    key (str): Measurement key
    start_datetime (Optional[str]): Starting datetime (inclusive).
        Defaults to datetime of first measurement.
    end_datetime (Optional[str]: Ending datetime (exclusive).
        Defaults to datetime after latest measurement.
    interval (Optional[str]): Time duration for each interval.
        Defaults to 1 hour.
    fill_method (str): Method to handle missing values during resampling.

        - 'linear': Linearly interpolate missing values (for numeric data only).
        - 'time': Interpolate missing values (for numeric data only).
        - 'ffill': Forward fill missing values.
        - 'bfill': Backward fill missing values.
        - Defaults to 'linear' for numeric values, otherwise 'ffill'.

    resample_method (str):
        Method used to aggregate values within a resampling interval.

        - "first": Use the first value in each interval.
        - "mean": Compute the arithmetic mean of all samples in each interval.
        - "interval_mean": Compute the time-weighted mean assuming each
            value remains valid until the next timestamp (piecewise-constant
            signal).

    dropna: (bool): Whether to drop NAN/ None values before processing.
        Defaults to True.
    boundary (Literal["strict", "context"]): resampling boundary
        "strict"  → only values inside [start, end)
        "context" → include one value before and after for proper resampling
    align_to_interval (bool): When True, snap the resample origin to the nearest
        UTC epoch-aligned boundary of ``interval`` before resampling.  This ensures
        that bucket timestamps always fall on wall-clock-round times regardless of
        when ``start_datetime`` falls:

        - 15-minute interval → buckets on :00, :15, :30, :45
        - 1-hour interval    → buckets on the hour

        When False (default), the origin is ``query_start`` (or ``"start_day"`` when
        no start is given), preserving the existing behaviour where buckets are
        aligned to the query window rather than the clock.

        Set to True when storing compacted records back to the database so that the
        resulting timestamps are predictable and human-readable.  Leave False for
        forecast or reporting queries where alignment to the exact query window is
        more important than clock-round boundaries.
    processing (SeriesProcessing):
        Processing mode for the returned series.

        - ``SeriesProcessing.RESAMPLED``: Return a processed series.
            Measurements are first filtered by ``start_datetime``,
            ``end_datetime``, and ``dropna``, then resampled according to
            ``interval`` and ``resample_method``, and finally missing values
            are filled using ``fill_method``.
        - ``SeriesProcessing.RAW``: Return the original measurement series.
            Measurements are filtered by ``start_datetime``,
            ``end_datetime``, and ``dropna`` only. No resampling or filling is
            performed, and ``interval``, ``fill_method``,
            ``resample_method``, ``boundary``, and
            ``align_to_interval`` are ignored.

        Defaults to ``SeriesProcessing.RAW``.

Returns:
    Series
"""

Parameters:

  • key (query, required): Measurement key.

  • start_datetime (query, optional): Starting datetime (inclusive).

  • end_datetime (query, optional): Ending datetime (exclusive).

  • interval (query, optional): Time duration for each interval. Defaults to 1 hour.

  • fill_method (query, optional): Method to handle missing values during resampling.

  • resample_method (query, optional): Method used to aggregate values within a resampling interval.

  • dropna (query, optional): Drop NAN/ None values before processing.

  • boundary (query, optional): Resampling boundary mode.

  • align_to_interval (query, optional): Snap resample origin to the nearest UTC epoch-aligned boundary of interval.

  • processing (query, optional): Processing mode. 'raw' returns original measurement data without resampling or filling.

Responses:

  • 200: Successful Response

  • 422: Validation Error


PUT /v1/measurement/series

Links: local, eos

Fastapi Measurement Series Put

"""
Merge measurement given as series into given key.
"""

Parameters:

  • key (query, required): Measurement key.

Request Body:

  • application/json: { "$ref": "#/components/schemas/PydanticDateTimeSeries" }

Responses:

  • 200: Successful Response

  • 422: Validation Error


PUT /v1/measurement/value

Links: local, eos

Fastapi Measurement Value Put

"""
Merge the measurement of given key and value into EOS measurements at given datetime.
"""

Parameters:

  • datetime (query, required): Datetime.

  • key (query, required): Measurement key.

  • value (query, required): No description provided.

Responses:

  • 200: Successful Response

  • 422: Validation Error


POST /v1/optimize

Links: local, eos

Fastapi Optimize Config

"""
Optimize GENETIC using configured devices and optional fresh runtime inputs.

Static settings belong in configuration; query overrides are rejected.
Forecast arrays start at local
midnight and contain Wh per configured GENETIC slot; prices are currency/Wh.
An empty body uses configured providers. Explicit SoC values take precedence over
fresh measured states of charge; missing usable measurements default to an assumed
initial SoC of 0% without blocking a plan.
The deprecated /optimize endpoint continues to run hourly GENETIC0.
"""

Request Body:

  • application/json: { "$ref": "#/components/schemas/GeneticRequest" }

Responses:

  • 200: Successful Response

  • 422: Validation Error


GET /v1/prediction/dataframe

Links: local, eos

Fastapi Prediction Dataframe Get

"""
Get prediction for given keys within given date range as dataframe.

Args:
    key (list[str]): Prediction keys
    start_datetime (Optional[str]): Starting datetime (inclusive).
        Defaults to start datetime of latest prediction.
    end_datetime (Optional[str]: Ending datetime (exclusive).
        Defaults to end datetime of latest prediction.
    interval (Optional[str]): Time duration for each interval.
        Defaults to 1 hour.
    fill_method (str): Method to handle missing values during resampling.

        - 'linear': Linearly interpolate missing values (for numeric data only).
        - 'time': Interpolate missing values (for numeric data only).
        - 'ffill': Forward fill missing values.
        - 'bfill': Backward fill missing values.
        - Defaults to 'linear' for numeric values, otherwise 'ffill'.

    resample_method (str):
        Method used to aggregate values within a resampling interval.

        - "first": Use the first value in each interval.
        - "mean": Compute the arithmetic mean of all samples in each interval.
        - "interval_mean": Compute the time-weighted mean assuming each
            value remains valid until the next timestamp (piecewise-constant
            signal).

    dropna: (bool): Whether to drop NAN/ None values before processing.
        Defaults to True.
    boundary (Literal["strict", "context"]): resampling boundary
        "strict"  → only values inside [start, end)
        "context" → include one value before and after for proper resampling
    align_to_interval (bool): When True, snap the resample origin to the nearest
        UTC epoch-aligned boundary of ``interval`` before resampling.  This ensures
        that bucket timestamps always fall on wall-clock-round times regardless of
        when ``start_datetime`` falls:

        - 15-minute interval → buckets on :00, :15, :30, :45
        - 1-hour interval    → buckets on the hour

        When False (default), the origin is ``query_start`` (or ``"start_day"`` when
        no start is given), preserving the existing behaviour where buckets are
        aligned to the query window rather than the clock.

        Set to True when storing compacted records back to the database so that the
        resulting timestamps are predictable and human-readable.  Leave False for
        forecast or reporting queries where alignment to the exact query window is
        more important than clock-round boundaries.
"""

Parameters:

  • keys (query, required): Prediction keys.

  • start_datetime (query, optional): Starting datetime (inclusive).

  • end_datetime (query, optional): Ending datetime (exclusive).

  • interval (query, optional): Time duration for each interval. Defaults to 1 hour.

  • fill_method (query, optional): Method to handle missing values during resampling.

  • resample_method (query, optional): Method used to aggregate values within a resampling interval.

  • dropna (query, optional): Drop NAN/ None values before processing.

  • boundary (query, optional): Resampling boundary mode.

  • align_to_interval (query, optional): Snap resample origin to the nearest UTC epoch-aligned boundary of interval.

Responses:

  • 200: Successful Response

  • 422: Validation Error


PUT /v1/prediction/import/{provider_id}

Links: local, eos

Fastapi Prediction Import Provider

"""
Import prediction for given provider ID.

Args:
    provider_id: ID of provider to update.
    data: Prediction data.
    force_enable: Update data even if provider is disabled.
        Defaults to False.
"""

Parameters:

  • provider_id (path, required): Provider ID.

  • force_enable (query, optional): No description provided.

Request Body:

  • application/json: { "anyOf": [ { "$ref": "#/components/schemas/PydanticDateTimeDataFrame" }, { "$ref": "#/components/schemas/PydanticDateTimeData" }, { "type": "object", "additionalProperties": true }, { "type": "null" } ], "title": "Data" }

Responses:

  • 200: Successful Response

  • 422: Validation Error


GET /v1/prediction/keys

Links: local, eos

Fastapi Prediction Keys Get

"""
Get a list of available prediction keys.
"""

Responses:

  • 200: Successful Response

GET /v1/prediction/list

Links: local, eos

Fastapi Prediction List Get

"""
Get prediction for given key within given date range as value list.

Args:
    key (str): Prediction key
    start_datetime (Optional[str]): Starting datetime (inclusive).
        Defaults to start datetime of latest prediction.
    end_datetime (Optional[str]: Ending datetime (exclusive).
        Defaults to end datetime of latest prediction.
    interval (Optional[str]): Time duration for each interval.
        Defaults to 1 hour.
    fill_method (str): Method to handle missing values during resampling.

        - 'linear': Linearly interpolate missing values (for numeric data only).
        - 'time': Interpolate missing values (for numeric data only).
        - 'ffill': Forward fill missing values.
        - 'bfill': Backward fill missing values.
        - Defaults to 'linear' for numeric values, otherwise 'ffill'.

    resample_method (str):
        Method used to aggregate values within a resampling interval.

        - "first": Use the first value in each interval.
        - "mean": Compute the arithmetic mean of all samples in each interval.
        - "interval_mean": Compute the time-weighted mean assuming each
            value remains valid until the next timestamp (piecewise-constant
            signal).

    dropna: (bool): Whether to drop NAN/ None values before processing.
        Defaults to True.
    boundary (Literal["strict", "context"]): resampling boundary
        "strict"  → only values inside [start, end)
        "context" → include one value before and after for proper resampling
    align_to_interval (bool): When True, snap the resample origin to the nearest
        UTC epoch-aligned boundary of ``interval`` before resampling.  This ensures
        that bucket timestamps always fall on wall-clock-round times regardless of
        when ``start_datetime`` falls:

        - 15-minute interval → buckets on :00, :15, :30, :45
        - 1-hour interval    → buckets on the hour

        When False (default), the origin is ``query_start`` (or ``"start_day"`` when
        no start is given), preserving the existing behaviour where buckets are
        aligned to the query window rather than the clock.

        Set to True when storing compacted records back to the database so that the
        resulting timestamps are predictable and human-readable.  Leave False for
        forecast or reporting queries where alignment to the exact query window is
        more important than clock-round boundaries.
"""

Parameters:

  • key (query, required): Prediction key.

  • start_datetime (query, optional): Starting datetime (inclusive).

  • end_datetime (query, optional): Ending datetime (exclusive).

  • interval (query, optional): Time duration for each interval. Defaults to 1 hour.

  • fill_method (query, optional): Method to handle missing values during resampling.

  • resample_method (query, optional): Method used to aggregate values within a resampling interval.

  • dropna (query, optional): Drop NAN/ None values before processing.

  • boundary (query, optional): Resampling boundary mode.

  • align_to_interval (query, optional): Snap resample origin to the nearest UTC epoch-aligned boundary of interval.

Responses:

  • 200: Successful Response

  • 422: Validation Error


GET /v1/prediction/providers

Links: local, eos

Fastapi Prediction Providers Get

"""
Get a list of available prediction providers.

Args:
    enabled (bool): Return enabled/disabled providers. If unset, return all providers.
"""

Parameters:

  • enabled (query, optional): No description provided.

Responses:

  • 200: Successful Response

  • 422: Validation Error


GET /v1/prediction/pv-adaptive/comparisons

Links: local, eos

Comparisons

"""
Export genuinely issued forecasts with later measured truth, issuance and lead.
"""

Parameters:

  • days (query, optional): No description provided.

  • limit (query, optional): No description provided.

  • since_ms (query, optional): No description provided.

Responses:

  • 200: Successful Response

  • 422: Validation Error


GET /v1/prediction/pv-adaptive/latest

Links: local, eos

Latest

"""
Latest complete output curve; validation uses the separate immutable archive.
"""

Responses:

  • 200: Successful Response

PUT /v1/prediction/pv-adaptive/samples

Links: local, eos

Samples

"""
Store original power readings in the bounded adaptive archive, without zero filling.
"""

Request Body:

  • application/json: { "items": { "$ref": "#/components/schemas/MeasurementSample" }, "type": "array", "maxItems": 10000, "title": "Values" }

Responses:

  • 200: Successful Response

  • 422: Validation Error


GET /v1/prediction/pv-adaptive/status

Links: local, eos

Status

"""
Status contains honest cold-start counts and matched per-lead error metrics.
"""

Responses:

  • 200: Successful Response

GET /v1/prediction/pvforecast/pvlib/inverters

Links: local, eos

Fastapi Prediction Pvforecast Inverters Get

"""
Get inverter names supported by PVForecast PVLib provider.
"""

Responses:

  • 200: Successful Response

GET /v1/prediction/pvforecast/pvlib/modules

Links: local, eos

Fastapi Prediction Pvforecast Modules Get

"""
Get module names supported by PVForecast PVLib provider.
"""

Responses:

  • 200: Successful Response

DELETE /v1/prediction/range

Links: local, eos

Fastapi Prediction Range Delete

"""
Delete prediction values for a key within a datetime range.
"""

Parameters:

  • key (query, required): Prediction key.

  • start_datetime (query, optional): Start datetime.

  • end_datetime (query, optional): End datetime.

Responses:

  • 200: Successful Response

  • 422: Validation Error


GET /v1/prediction/series

Links: local, eos

Fastapi Prediction Series Get

"""
Get prediction for given key within given date range as series.

Args:
    key (str): Prediction key
    start_datetime (Optional[str]): Starting datetime (inclusive).
        Defaults to start datetime of latest prediction.
    end_datetime (Optional[str]: Ending datetime (exclusive).
        Defaults to end datetime of latest prediction.
    interval (Optional[str]): Time duration for each interval.
        Defaults to 1 hour.
    fill_method (str): Method to handle missing values during resampling.

        - 'linear': Linearly interpolate missing values (for numeric data only).
        - 'time': Interpolate missing values (for numeric data only).
        - 'ffill': Forward fill missing values.
        - 'bfill': Backward fill missing values.
        - Defaults to 'linear' for numeric values, otherwise 'ffill'.

    resample_method (str):
        Method used to aggregate values within a resampling interval.

        - "first": Use the first value in each interval.
        - "mean": Compute the arithmetic mean of all samples in each interval.
        - "interval_mean": Compute the time-weighted mean assuming each
            value remains valid until the next timestamp (piecewise-constant
            signal).

    dropna: (bool): Whether to drop NAN/ None values before processing.
        Defaults to True.
    boundary (Literal["strict", "context"]): resampling boundary
        "strict"  → only values inside [start, end)
        "context" → include one value before and after for proper resampling
    align_to_interval (bool): When True, snap the resample origin to the nearest
        UTC epoch-aligned boundary of ``interval`` before resampling.  This ensures
        that bucket timestamps always fall on wall-clock-round times regardless of
        when ``start_datetime`` falls:

        - 15-minute interval → buckets on :00, :15, :30, :45
        - 1-hour interval    → buckets on the hour

        When False (default), the origin is ``query_start`` (or ``"start_day"`` when
        no start is given), preserving the existing behaviour where buckets are
        aligned to the query window rather than the clock.

        Set to True when storing compacted records back to the database so that the
        resulting timestamps are predictable and human-readable.  Leave False for
        forecast or reporting queries where alignment to the exact query window is
        more important than clock-round boundaries.
    processing (SeriesProcessing):
        Processing mode for the returned series.

        - ``SeriesProcessing.RESAMPLED``: Return a processed series.
            Measurements are first filtered by ``start_datetime``,
            ``end_datetime``, and ``dropna``, then resampled according to
            ``interval`` and ``resample_method``, and finally missing values
            are filled using ``fill_method``.
        - ``SeriesProcessing.RAW``: Return the original measurement series.
            Measurements are filtered by ``start_datetime``,
            ``end_datetime``, and ``dropna`` only. No resampling or filling is
            performed, and ``interval``, ``fill_method``,
            ``resample_method``, ``boundary``, and
            ``align_to_interval`` are ignored.

        Defaults to ``SeriesProcessing.RAW``.

Returns:
    Array
"""

Parameters:

  • key (query, required): Prediction key.

  • start_datetime (query, optional): Starting datetime (inclusive).

  • end_datetime (query, optional): Ending datetime (exclusive).

  • interval (query, optional): Time duration for each interval. Defaults to 1 hour.

  • fill_method (query, optional): Method to handle missing values during resampling.

  • resample_method (query, optional): Method used to aggregate values within a resampling interval.

  • dropna (query, optional): Drop NAN/ None values before processing.

  • boundary (query, optional): Resampling boundary mode.

  • align_to_interval (query, optional): Snap resample origin to the nearest UTC epoch-aligned boundary of interval.

  • processing (query, optional): Processing mode. 'raw' returns original measurement data without resampling or filling.

Responses:

  • 200: Successful Response

  • 422: Validation Error


POST /v1/prediction/update

Links: local, eos

Fastapi Prediction Update

"""
Update predictions for all providers.

Args:
    force_update: Update data even if it is already cached.
        Defaults to False.
    force_enable: Update data even if provider is disabled.
        Defaults to False.
"""

Parameters:

  • force_update (query, optional): No description provided.

  • force_enable (query, optional): No description provided.

Responses:

  • 200: Successful Response

  • 422: Validation Error


POST /v1/prediction/update/{provider_id}

Links: local, eos

Fastapi Prediction Update Provider

"""
Update predictions for given provider ID.

Args:
    provider_id: ID of provider to update.
    force_update: Update data even if it is already cached.
        Defaults to False.
    force_enable: Update data even if provider is disabled.
        Defaults to False.
"""

Parameters:

  • provider_id (path, required): No description provided.

  • force_update (query, optional): No description provided.

  • force_enable (query, optional): No description provided.

Responses:

  • 200: Successful Response

  • 422: Validation Error


GET /v1/profile

Links: local, eos

Get Profile Kinds

"""
Return the registered profile kinds.
"""

Responses:

  • 200: Successful Response

GET /v1/profile/{kind}

Links: local, eos

Get Profiles

"""
Return the profiles of a kind, from the user and the packaged data directory.
"""

Parameters:

  • kind (path, required): Profile kind, e.g. 'battery'.

Responses:

  • 200: Successful Response

  • 422: Validation Error


GET /v1/profile/{kind}/schema

Links: local, eos

Get Profile Schema

"""
Return the JSON schema of the profile documents of a kind.
"""

Parameters:

  • kind (path, required): Profile kind, e.g. 'battery'.

Responses:

  • 200: Successful Response

  • 422: Validation Error


DELETE /v1/profile/{kind}/{name}

Links: local, eos

Delete Profile

"""
Delete a user profile.

Returns the profile that applies now (the packaged one of the same name),
or null if there is none. A profile that a configured device uses can only
be deleted if a packaged profile of the same name applies afterwards.
"""

Parameters:

  • kind (path, required): Profile kind, e.g. 'battery'.

  • name (path, required): Profile name without '.json', e.g. 'generic-lfp' (letters, digits, '.', '_', '-').

Responses:

  • 200: Successful Response

  • 422: Validation Error


GET /v1/profile/{kind}/{name}

Links: local, eos

Get Profile

"""
Return the document of a profile (user profile first, then packaged).
"""

Parameters:

  • kind (path, required): Profile kind, e.g. 'battery'.

  • name (path, required): Profile name without '.json', e.g. 'generic-lfp' (letters, digits, '.', '_', '-').

Responses:

  • 200: Successful Response

  • 422: Validation Error


PUT /v1/profile/{kind}/{name}

Links: local, eos

Put Profile

"""
Validate a profile document and save it to the user data directory.

Returns the saved (validated, defaults filled in) document.
"""

Parameters:

  • kind (path, required): Profile kind, e.g. 'battery'.

  • name (path, required): Profile name without '.json', e.g. 'generic-lfp' (letters, digits, '.', '_', '-').

Request Body:

  • application/json: { "type": "object", "additionalProperties": true, "description": "The profile document.", "title": "Document" }

Responses:

  • 200: Successful Response

  • 422: Validation Error


GET /v1/resource/status

Links: local, eos

Fastapi Devices Status Get

"""
Get the latest status of a resource/ device.

Return:
    latest_status: The latest status of a resource/ device.
"""

Parameters:

  • resource_id (query, required): Resource ID.

  • actuator_id (query, optional): Actuator ID.

Responses:

  • 200: Successful Response

  • 422: Validation Error


PUT /v1/resource/status

Links: local, eos

Fastapi Devices Status Put

"""
Update the status of a resource/ device.

Return:
    latest_status: The latest status of a resource/ device.
"""

Parameters:

  • resource_id (query, required): Resource ID.

  • actuator_id (query, optional): Actuator ID.

Request Body:

  • application/json: { "oneOf": [ { "$ref": "#/components/schemas/PowerMeasurement" }, { "$ref": "#/components/schemas/EnergyMeasurement" }, { "$ref": "#/components/schemas/PPBCPowerProfileStatus" }, { "$ref": "#/components/schemas/OMBCStatus" }, { "$ref": "#/components/schemas/FRBCActuatorStatus" }, { "$ref": "#/components/schemas/FRBCEnergyStatus" }, { "$ref": "#/components/schemas/FRBCStorageStatus" }, { "$ref": "#/components/schemas/FRBCTimerStatus" }, { "$ref": "#/components/schemas/DDBCActuatorStatus" } ], "discriminator": { "propertyName": "type", "mapping": { "PowerMeasurement": "#/components/schemas/PowerMeasurement", "EnergyMeasurement": "#/components/schemas/EnergyMeasurement", "PPBCPowerProfileStatus": "#/components/schemas/PPBCPowerProfileStatus", "OMBCStatus": "#/components/schemas/OMBCStatus", "FRBCActuatorStatus": "#/components/schemas/FRBCActuatorStatus", "FRBCEnergyStatus": "#/components/schemas/FRBCEnergyStatus", "FRBCStorageStatus": "#/components/schemas/FRBCStorageStatus", "FRBCTimerStatus": "#/components/schemas/FRBCTimerStatus", "DDBCActuatorStatus": "#/components/schemas/DDBCActuatorStatus" } }, "description": "Resource Status.", "title": "Status" }

Responses:

  • 200: Successful Response

  • 422: Validation Error


GET /visualization_results.pdf

Links: local, eos

Get Pdf

"""
PDF report of the latest GENETIC0 run.
"""

Responses:

  • 200: Successful Response

Auto generated from openapi.json.