Files
EOS/tests/testdata/docs/_generated/configload.md
Bobby Noelte eb9e966de9 fix: move data management to async (#1015)
FAstAPI is an async framework. Data may be imported and exported, load and save, set and get
asynchronously. Prevent interleaving data operations to corrupt the data. In the previous design
sync and async data access was intermixed leading to data corruption.

The basic data classes DataSequence and DataContainer and the derived classes like Provider and
Measurement now are async. Data access is protected by several async locks.

To support the async design of the data classes the database interface became async.

The energy management is also adapted to the new async design. Optimization is still off-loaded
to another thread, but the prepration for the optimization and the post optimization actions now
follow the async design.

Adapter operations are now also protected by async locks.

Tests were adapted to the async design and new tests were created.

Besides this major fix several other improvements and fixes are included in this PR.

* fix: key_to_dict/list/array only regard data records with key value set.

  Before the exclusion of no value data records was only done if the dropna flag was set.

* fix: test for visual result pdf generation

  Due to updates in the library the generated charts text was a little bit different.
  Adapt the test to create the comaprison pdf in the test data durectory and
  update the reference pdf.

* chore: Remove MutableMapping from DataSequence and DataContainer.

  Mutable Mapping does not fit to the now async design.

* chore: Add NoDB database backend

  This backend implements the full database backend interface but performs
  no actual persistence. It is intended for configurations where database
  persistence is disabled (`provider=None`).

* chore: Improve measurement data import testing with real world scenarios.

  Added two new endpoints to support testing.

* chore: Add mermaid to supported documentation tools

* chore: Add documentation about async design

* chore: Add documentation about generic data handling

  Covers the basics of measurement and prediction time series data handling.

* chore: Add empty lines around markdown lists.

* chore: sync pre-commit config to updated package versions

Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
2026-07-15 16:38:53 +02:00

4.6 KiB

Load Prediction Configuration

:::{table} load :widths: 10 20 10 5 5 30 :align: left

Name Environment Variable Type Read-Only Default Description
loadakkudoktor EOS_LOAD__LOADAKKUDOKTOR LoadAkkudoktorCommonSettings rw required LoadAkkudoktor provider settings.
loadimport EOS_LOAD__LOADIMPORT LoadImportCommonSettings rw required LoadImport provider settings.
loadvrm EOS_LOAD__LOADVRM LoadVrmCommonSettings rw required LoadVrm provider settings.
provider EOS_LOAD__PROVIDER Optional[str] rw None Load provider id of provider to be used.
providers list[str] ro N/A Available load provider ids.
:::

Example Input

   {
       "load": {
           "provider": "LoadAkkudoktor",
           "loadakkudoktor": {
               "loadakkudoktor_year_energy_kwh": null
           },
           "loadvrm": {
               "load_vrm_token": "your-token",
               "load_vrm_idsite": 12345
           },
           "loadimport": {
               "import_file_path": null,
               "import_json": null
           }
       }
   }

Example Output

   {
       "load": {
           "provider": "LoadAkkudoktor",
           "loadakkudoktor": {
               "loadakkudoktor_year_energy_kwh": null
           },
           "loadvrm": {
               "load_vrm_token": "your-token",
               "load_vrm_idsite": 12345
           },
           "loadimport": {
               "import_file_path": null,
               "import_json": null
           },
           "providers": [
               "LoadAkkudoktor",
               "LoadAkkudoktorAdjusted",
               "LoadVrm",
               "LoadImport"
           ]
       }
   }

Common settings for load forecast VRM API

:::{table} load::loadvrm :widths: 10 10 5 5 30 :align: left

Name Type Read-Only Default Description
load_vrm_idsite int rw 12345 VRM-Installation-ID
load_vrm_token str rw your-token Token for Connecting VRM API
:::

Example Input/Output

   {
       "load": {
           "loadvrm": {
               "load_vrm_token": "your-token",
               "load_vrm_idsite": 12345
           }
       }
   }

Common settings for load data import from file or JSON string

:::{table} load::loadimport :widths: 10 10 5 5 30 :align: left

Name Type Read-Only Default Description
import_file_path Union[str, pathlib.Path, NoneType] rw None Path to the file to import load data from.
import_json Optional[str] rw None JSON string, dictionary of load forecast value lists.
:::

Example Input/Output

   {
       "load": {
           "loadimport": {
               "import_file_path": null,
               "import_json": "{\"loadforecast_power_w\": [676.71, 876.19, 527.13]}"
           }
       }
   }

Common settings for load data import from file

:::{table} load::loadakkudoktor :widths: 10 10 5 5 30 :align: left

Name Type Read-Only Default Description
loadakkudoktor_year_energy_kwh Optional[float] rw None Yearly energy consumption (kWh).
:::

Example Input/Output

   {
       "load": {
           "loadakkudoktor": {
               "loadakkudoktor_year_energy_kwh": 40421.0
           }
       }
   }