diff --git a/.gitignore b/.gitignore index 849981f9..795b01a6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,6 @@ cache/ output/ EOS.config.json -docs/develop/CONTRIBUTING.md -docs/develop/getting_started.md # Default ignore folders and files for VS Code, Python @@ -258,5 +256,6 @@ visualize_output_*.pdf *_pdf.png # Test files -openapi-new.json tests/testdata/new_optimize_result* +tests/testdata/openapi-new.json +tests/testdata/openapi-new.md diff --git a/Makefile b/Makefile index d8f17edb..9bde50cc 100644 --- a/Makefile +++ b/Makefile @@ -17,6 +17,7 @@ help: @echo " docker-build - Rebuild docker image" @echo " docs - Generate HTML documentation (in build/docs/html/)." @echo " read-docs - Read HTML documentation in your browser." + @echo " clean-docs - Remove generated documentation."" @echo " run - Run FastAPI production server in the virtual environment." @echo " run-dev - Run FastAPI development server in the virtual environment (automatically reloads)." @echo " dist - Create distribution (in dist/)." @@ -52,13 +53,6 @@ dist: pip # Target to generate HTML documentation docs: pip-dev - mkdir -p docs/develop - cp README.md docs/develop/getting_started.md - # remove top level header and coresponding description - sed -i '/^##[^#]/,$$!d' docs/develop/getting_started.md - sed -i "1i\# Getting Started\n" docs/develop/getting_started.md - cp CONTRIBUTING.md docs/develop - sed -i "s/README.md/getting_started.md/g" docs/develop/CONTRIBUTING.md .venv/bin/sphinx-build -M html docs build/docs @echo "Documentation generated to build/docs/html/." @@ -67,12 +61,17 @@ read-docs: docs @echo "Read the documentation in your browser" .venv/bin/python -m webbrowser build/docs/html/index.html -# Clean target to remove generated documentation, distribution and virtual environment -clean: - @echo "Cleaning virtual env, distribution and build directories" - rm -rf dist build .venv +# Clean target to remove generated documentation and documentation artefacts +clean-docs: @echo "Searching and deleting all '_autosum' directories in docs..." @find docs -type d -name '_autosummary' -exec rm -rf {} +; + @echo "Cleaning docs build directories" + rm -rf build/docs + +# Clean target to remove generated documentation, distribution and virtual environment +clean: clean-docs + @echo "Cleaning virtual env, distribution and build directories" + rm -rf build .venv @echo "Deletion complete." run: diff --git a/docs/akkudoktoreos/measurement.md b/docs/akkudoktoreos/measurement.md new file mode 100644 index 00000000..067650ac --- /dev/null +++ b/docs/akkudoktoreos/measurement.md @@ -0,0 +1,93 @@ +% SPDX-License-Identifier: Apache-2.0 + +# Measurements + +Measurements are utilized to refine predictions using real data from your system, thereby enhancing +accuracy. + +- **Household Load Measurement** +- **Grid Export Measurement** +- **Grid Import Measurement** + +## Storing Measurements + +EOS stores measurements in a **key-value store**, where the term `measurement key` refers to the +unique identifier used to store and retrieve specific measurement data. Note that the key-value +store is memory-based, meaning that all stored data will be lost upon restarting the EOS REST +server. + +:::{admonition} Todo +:class: note +Ensure that measurement data persists across server restarts. +::: + +Several endpoints of the EOS REST server allow for the management and retrieval of these +measurements. + +The measurement data must be or is provided in one of the following formats: + +### 1. DateTimeData + +A dictionary with the following structure: + +```JSON + { + "start_datetime": "2024-01-01 00:00:00", + "interval": "1 Hour", + "": [value, value, ...], + "": [value, value, ...], + ... + } +``` + +### 2. DateTimeDataFrame + +A JSON string created from a [pandas](https://pandas.pydata.org/docs/index.html) dataframe with a +`DatetimeIndex`. Use [pandas.DataFrame.to_json(orient="index")](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.to_json.html#pandas.DataFrame.to_json). +The column name of the data must be the same as the names of the `measurement key`s. + +### 3. DateTimeSeries + +A JSON string created from a [pandas](https://pandas.pydata.org/docs/index.html) series with a +`DatetimeIndex`. Use [pandas.Series.to_json(orient="index")](https://pandas.pydata.org/docs/reference/api/pandas.Series.to_json.html#pandas.Series.to_json). + +## Load Measurement + +The EOS measurement store provides for storing meter readings of loads. There are currently five loads +foreseen. The associated `measurement key`s are: + +- `measurement_load0_mr`: Load0 meter reading [kWh] +- `measurement_load1_mr`: Load1 meter reading [kWh] +- `measurement_load2_mr`: Load2 meter reading [kWh] +- `measurement_load3_mr`: Load3 meter reading [kWh] +- `measurement_load4_mr`: Load4 meter reading [kWh] + +For ease of use, you can assign descriptive names to the `measurement key`s to represent your +system's load sources. Use the following `configuration options` to set these names +(e.g., 'Dish Washer', 'Heat Pump'): + +- `measurement_load0_name`: Name of the load0 source +- `measurement_load1_name`: Name of the load1 source +- `measurement_load2_name`: Name of the load2 source +- `measurement_load3_name`: Name of the load3 source +- `measurement_load4_name`: Name of the load4 source + +Load measurements can be stored for any datetime. The values between different meter readings are +linearly approximated. Since optimization occurs on the hour, storing values between hours is +generally not useful. + +The EOS measurement store automatically sums all given loads to create a total load value series +for specified intervals, usually one hour. This aggregated data can be used for load predictions. + +## Grid Export/ Import Measurement + +The EOS measurement store also allows for the storage of meter readings for grid import and export. +The associated `measurement key`s are: + +- `measurement_grid_export_mr`: Export to grid meter reading [kWh] +- `measurement_grid_import_mr`: Import from grid meter reading [kWh] + +:::{admonition} Todo +:class: note +Currently not used. Integrate grid meter readings into the respective predictions. +::: diff --git a/docs/akkudoktoreos/openapi.json b/docs/akkudoktoreos/openapi.json deleted file mode 100644 index d434ba15..00000000 --- a/docs/akkudoktoreos/openapi.json +++ /dev/null @@ -1,6021 +0,0 @@ -{ - "openapi": "3.1.0", - "info": { - "title": "Akkudoktor-EOS", - "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.", - "version": "0.0.1" - }, - "paths": { - "/v1/config": { - "get": { - "summary": "Fastapi Config Get", - "description": "Get the current configuration.", - "operationId": "fastapi_config_get_v1_config_get", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ConfigEOS" - } - } - } - } - } - }, - "put": { - "summary": "Fastapi Config Put", - "description": "Merge settings into current configuration.\n\nArgs:\n settings (SettingsEOS): The settings to merge into the current configuration.\n save (Optional[bool]): Save the resulting configuration to the configuration file.\n Defaults to False.", - "operationId": "fastapi_config_put_v1_config_put", - "parameters": [ - { - "name": "save", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Save" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SettingsEOS" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ConfigEOS" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/v1/measurement/keys": { - "get": { - "summary": "Fastapi Measurement Keys Get", - "description": "Get a list of available measurement keys.", - "operationId": "fastapi_measurement_keys_get_v1_measurement_keys_get", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "items": { - "type": "string" - }, - "type": "array", - "title": "Response Fastapi Measurement Keys Get V1 Measurement Keys Get" - } - } - } - } - } - } - }, - "/v1/measurement/load-mr/series/by-name": { - "get": { - "summary": "Fastapi Measurement Load Mr Series By Name Get", - "description": "Get the meter reading of given load name as series.", - "operationId": "fastapi_measurement_load_mr_series_by_name_get_v1_measurement_load_mr_series_by_name_get", - "parameters": [ - { - "name": "name", - "in": "query", - "required": true, - "schema": { - "type": "string", - "title": "Name" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PydanticDateTimeSeries" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "put": { - "summary": "Fastapi Measurement Load Mr Series By Name Put", - "description": "Merge the meter readings series of given load name into EOS measurements at given datetime.", - "operationId": "fastapi_measurement_load_mr_series_by_name_put_v1_measurement_load_mr_series_by_name_put", - "parameters": [ - { - "name": "name", - "in": "query", - "required": true, - "schema": { - "type": "string", - "title": "Name" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PydanticDateTimeSeries" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PydanticDateTimeSeries" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/v1/measurement/load-mr/value/by-name": { - "put": { - "summary": "Fastapi Measurement Load Mr Value By Name Put", - "description": "Merge the meter reading of given load name and value into EOS measurements at given datetime.", - "operationId": "fastapi_measurement_load_mr_value_by_name_put_v1_measurement_load_mr_value_by_name_put", - "parameters": [ - { - "name": "datetime", - "in": "query", - "required": true, - "schema": { - "title": "Datetime" - } - }, - { - "name": "name", - "in": "query", - "required": true, - "schema": { - "type": "string", - "title": "Name" - } - }, - { - "name": "value", - "in": "query", - "required": true, - "schema": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "string" - } - ], - "title": "Value" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PydanticDateTimeSeries" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/v1/measurement/series": { - "get": { - "summary": "Fastapi Measurement Series Get", - "description": "Get the measurements of given key as series.", - "operationId": "fastapi_measurement_series_get_v1_measurement_series_get", - "parameters": [ - { - "name": "key", - "in": "query", - "required": true, - "schema": { - "type": "string", - "title": "Key" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PydanticDateTimeSeries" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "put": { - "summary": "Fastapi Measurement Series Put", - "description": "Merge measurement given as series into given key.", - "operationId": "fastapi_measurement_series_put_v1_measurement_series_put", - "parameters": [ - { - "name": "key", - "in": "query", - "required": true, - "schema": { - "type": "string", - "title": "Key" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PydanticDateTimeSeries" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PydanticDateTimeSeries" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/v1/measurement/value": { - "put": { - "summary": "Fastapi Measurement Value Put", - "description": "Merge the measurement of given key and value into EOS measurements at given datetime.", - "operationId": "fastapi_measurement_value_put_v1_measurement_value_put", - "parameters": [ - { - "name": "datetime", - "in": "query", - "required": true, - "schema": { - "title": "Datetime" - } - }, - { - "name": "key", - "in": "query", - "required": true, - "schema": { - "type": "string", - "title": "Key" - } - }, - { - "name": "value", - "in": "query", - "required": true, - "schema": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "string" - } - ], - "title": "Value" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PydanticDateTimeSeries" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/v1/measurement/dataframe": { - "put": { - "summary": "Fastapi Measurement Dataframe Put", - "description": "Merge the measurement data given as dataframe into EOS measurements.", - "operationId": "fastapi_measurement_dataframe_put_v1_measurement_dataframe_put", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PydanticDateTimeDataFrame" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/v1/measurement/data": { - "put": { - "summary": "Fastapi Measurement Data Put", - "description": "Merge the measurement data given as datetime data into EOS measurements.", - "operationId": "fastapi_measurement_data_put_v1_measurement_data_put", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PydanticDateTimeData" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/v1/prediction/keys": { - "get": { - "summary": "Fastapi Prediction Keys Get", - "description": "Get a list of available prediction keys.", - "operationId": "fastapi_prediction_keys_get_v1_prediction_keys_get", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "items": { - "type": "string" - }, - "type": "array", - "title": "Response Fastapi Prediction Keys Get V1 Prediction Keys Get" - } - } - } - } - } - } - }, - "/v1/prediction/series": { - "get": { - "summary": "Fastapi Prediction Series Get", - "description": "Get prediction for given key within given date range as series.\n\nArgs:\n start_datetime: Starting datetime (inclusive).\n Defaults to start datetime of latest prediction.\n end_datetime: Ending datetime (exclusive).\n Defaults to end datetime of latest prediction.", - "operationId": "fastapi_prediction_series_get_v1_prediction_series_get", - "parameters": [ - { - "name": "key", - "in": "query", - "required": true, - "schema": { - "type": "string", - "title": "Key" - } - }, - { - "name": "start_datetime", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Start Datetime" - } - }, - { - "name": "end_datetime", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "End Datetime" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PydanticDateTimeSeries" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/v1/prediction/list": { - "get": { - "summary": "Fastapi Prediction List Get", - "description": "Get prediction for given key within given date range as value list.\n\nArgs:\n start_datetime: Starting datetime (inclusive).\n Defaults to start datetime of latest prediction.\n end_datetime: Ending datetime (exclusive).\n Defaults to end datetime of latest prediction.\n interval: Time duration for each interval\n Defaults to 1 hour.", - "operationId": "fastapi_prediction_list_get_v1_prediction_list_get", - "parameters": [ - { - "name": "key", - "in": "query", - "required": true, - "schema": { - "type": "string", - "title": "Key" - } - }, - { - "name": "start_datetime", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Start Datetime" - } - }, - { - "name": "end_datetime", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "End Datetime" - } - }, - { - "name": "interval", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Interval" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": {}, - "title": "Response Fastapi Prediction List Get V1 Prediction List Get" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/v1/prediction/update": { - "post": { - "summary": "Fastapi Prediction Update", - "description": "Update predictions for all providers.\n\nArgs:\n force_update: Update data even if it is already cached.\n Defaults to False.\n force_enable: Update data even if provider is disabled.\n Defaults to False.", - "operationId": "fastapi_prediction_update_v1_prediction_update_post", - "parameters": [ - { - "name": "force_update", - "in": "query", - "required": false, - "schema": { - "type": "boolean", - "default": false, - "title": "Force Update" - } - }, - { - "name": "force_enable", - "in": "query", - "required": false, - "schema": { - "type": "boolean", - "default": false, - "title": "Force Enable" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/v1/prediction/update/{provider_id}": { - "post": { - "summary": "Fastapi Prediction Update Provider", - "description": "Update predictions for given provider ID.\n\nArgs:\n provider_id: ID of provider to update.\n force_update: Update data even if it is already cached.\n Defaults to False.\n force_enable: Update data even if provider is disabled.\n Defaults to False.", - "operationId": "fastapi_prediction_update_provider_v1_prediction_update__provider_id__post", - "parameters": [ - { - "name": "provider_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Provider Id" - } - }, - { - "name": "force_update", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "default": false, - "title": "Force Update" - } - }, - { - "name": "force_enable", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "default": false, - "title": "Force Enable" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/strompreis": { - "get": { - "summary": "Fastapi Strompreis", - "description": "Deprecated: Electricity Market Price Prediction per Wh (\u20ac/Wh).\n\nNote:\n Set ElecPriceAkkudoktor as elecprice_provider, then update data with\n '/v1/prediction/update'\n and then request data with\n '/v1/prediction/list?key=elecprice_marketprice_wh' or\n '/v1/prediction/list?key=elecprice_marketprice_kwh' instead.", - "operationId": "fastapi_strompreis_strompreis_get", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "items": { - "type": "number" - }, - "type": "array", - "title": "Response Fastapi Strompreis Strompreis Get" - } - } - } - } - } - } - }, - "/gesamtlast": { - "post": { - "summary": "Fastapi Gesamtlast", - "description": "Deprecated: Total Load Prediction with adjustment.\n\nEndpoint to handle total load prediction adjusted by latest measured data.\n\nNote:\n Use '/v1/prediction/list?key=load_mean_adjusted' instead.\n Load energy meter readings to be added to EOS measurement by:\n '/v1/measurement/load-mr/value/by-name' or\n '/v1/measurement/value'", - "operationId": "fastapi_gesamtlast_gesamtlast_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GesamtlastRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "items": { - "type": "number" - }, - "type": "array", - "title": "Response Fastapi Gesamtlast Gesamtlast Post" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/gesamtlast_simple": { - "get": { - "summary": "Fastapi Gesamtlast Simple", - "description": "Deprecated: Total Load Prediction.\n\nEndpoint to handle total load prediction.\n\nNote:\n Set LoadAkkudoktor as load_provider, then update data with\n '/v1/prediction/update'\n and then request data with\n '/v1/prediction/list?key=load_mean' instead.", - "operationId": "fastapi_gesamtlast_simple_gesamtlast_simple_get", - "parameters": [ - { - "name": "year_energy", - "in": "query", - "required": true, - "schema": { - "type": "number", - "title": "Year Energy" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "number" - }, - "title": "Response Fastapi Gesamtlast Simple Gesamtlast Simple Get" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/pvforecast": { - "get": { - "summary": "Fastapi Pvforecast", - "description": "Deprecated: PV Forecast Prediction.\n\nEndpoint to handle PV forecast prediction.\n\nNote:\n Set PVForecastAkkudoktor as pvforecast_provider, then update data with\n '/v1/prediction/update'\n and then request data with\n '/v1/prediction/list?key=pvforecast_ac_power' and\n '/v1/prediction/list?key=pvforecastakkudoktor_temp_air' instead.", - "operationId": "fastapi_pvforecast_pvforecast_get", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ForecastResponse" - } - } - } - } - } - } - }, - "/optimize": { - "post": { - "summary": "Fastapi Optimize", - "operationId": "fastapi_optimize_optimize_post", - "parameters": [ - { - "name": "start_hour", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "description": "Defaults to current hour of the day.", - "title": "Start Hour" - }, - "description": "Defaults to current hour of the day." - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OptimizationParameters" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OptimizeResponse" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/visualization_results.pdf": { - "get": { - "summary": "Get Pdf", - "operationId": "get_pdf_visualization_results_pdf_get", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/pdf": { - "schema": { - "type": "string" - } - } - } - } - } - } - }, - "/{path}": { - "delete": { - "summary": "Proxy Delete", - "operationId": "proxy_delete__path__delete", - "parameters": [ - { - "name": "path", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Path" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "get": { - "summary": "Proxy Get", - "operationId": "proxy_get__path__get", - "parameters": [ - { - "name": "path", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Path" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "post": { - "summary": "Proxy Post", - "operationId": "proxy_post__path__post", - "parameters": [ - { - "name": "path", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Path" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "put": { - "summary": "Proxy Put", - "operationId": "proxy_put__path__put", - "parameters": [ - { - "name": "path", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Path" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - } - }, - "components": { - "schemas": { - "ConfigEOS": { - "properties": { - "server_fastapi_host": { - "anyOf": [ - { - "type": "string", - "format": "ipvanyaddress" - }, - { - "type": "null" - } - ], - "title": "Server Fastapi Host", - "description": "FastAPI server IP address.", - "default": "0.0.0.0" - }, - "server_fastapi_port": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Server Fastapi Port", - "description": "FastAPI server IP port number.", - "default": 8503 - }, - "server_fastapi_verbose": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Server Fastapi Verbose", - "description": "Enable debug output", - "default": false - }, - "server_fastapi_startup_server_fasthtml": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Server Fastapi Startup Server Fasthtml", - "description": "FastAPI server to startup application FastHTML server.", - "default": true - }, - "server_fasthtml_host": { - "anyOf": [ - { - "type": "string", - "format": "ipvanyaddress" - }, - { - "type": "null" - } - ], - "title": "Server Fasthtml Host", - "description": "FastHTML server IP address.", - "default": "0.0.0.0" - }, - "server_fasthtml_port": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Server Fasthtml Port", - "description": "FastHTML server IP port number.", - "default": 8504 - }, - "weatherimport_file_path": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "format": "path" - }, - { - "type": "null" - } - ], - "title": "Weatherimport File Path", - "description": "Path to the file to import weather data from." - }, - "weatherimport_json": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Weatherimport Json", - "description": "JSON string, dictionary of weather forecast value lists." - }, - "weather_provider": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Weather Provider", - "description": "Weather provider id of provider to be used." - }, - "pvforecastimport_file_path": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "format": "path" - }, - { - "type": "null" - } - ], - "title": "Pvforecastimport File Path", - "description": "Path to the file to import pvforecast data from." - }, - "pvforecastimport_json": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Pvforecastimport Json", - "description": "JSON string, dictionary of PV forecast float value lists.Keys are 'pvforecast_dc_power', 'pvforecast_ac_power'." - }, - "pvforecast_provider": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Pvforecast Provider", - "description": "PVForecast provider id of provider to be used." - }, - "pvforecast0_surface_tilt": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Pvforecast0 Surface Tilt", - "description": "Tilt angle from horizontal plane. Ignored for two-axis tracking." - }, - "pvforecast0_surface_azimuth": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Pvforecast0 Surface Azimuth", - "description": "Orientation (azimuth angle) of the (fixed) plane. Clockwise from north (north=0, east=90, south=180, west=270)." - }, - "pvforecast0_userhorizon": { - "anyOf": [ - { - "items": { - "type": "number" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Pvforecast0 Userhorizon", - "description": "Elevation of horizon in degrees, at equally spaced azimuth clockwise from north." - }, - "pvforecast0_peakpower": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Pvforecast0 Peakpower", - "description": "Nominal power of PV system in kW." - }, - "pvforecast0_pvtechchoice": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Pvforecast0 Pvtechchoice", - "description": "PV technology. One of 'crystSi', 'CIS', 'CdTe', 'Unknown'.", - "default": "crystSi" - }, - "pvforecast0_mountingplace": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Pvforecast0 Mountingplace", - "description": "Type of mounting for PV system. Options are 'free' for free-standing and 'building' for building-integrated.", - "default": "free" - }, - "pvforecast0_loss": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Pvforecast0 Loss", - "description": "Sum of PV system losses in percent" - }, - "pvforecast0_trackingtype": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Pvforecast0 Trackingtype", - "description": "Type of suntracking. 0=fixed, 1=single horizontal axis aligned north-south, 2=two-axis tracking, 3=vertical axis tracking, 4=single horizontal axis aligned east-west, 5=single inclined axis aligned north-south." - }, - "pvforecast0_optimal_surface_tilt": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Pvforecast0 Optimal Surface Tilt", - "description": "Calculate the optimum tilt angle. Ignored for two-axis tracking.", - "default": false - }, - "pvforecast0_optimalangles": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Pvforecast0 Optimalangles", - "description": "Calculate the optimum tilt and azimuth angles. Ignored for two-axis tracking.", - "default": false - }, - "pvforecast0_albedo": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Pvforecast0 Albedo", - "description": "Proportion of the light hitting the ground that it reflects back." - }, - "pvforecast0_module_model": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Pvforecast0 Module Model", - "description": "Model of the PV modules of this plane." - }, - "pvforecast0_inverter_model": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Pvforecast0 Inverter Model", - "description": "Model of the inverter of this plane." - }, - "pvforecast0_inverter_paco": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Pvforecast0 Inverter Paco", - "description": "AC power rating of the inverter. [W]" - }, - "pvforecast0_modules_per_string": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Pvforecast0 Modules Per String", - "description": "Number of the PV modules of the strings of this plane." - }, - "pvforecast0_strings_per_inverter": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Pvforecast0 Strings Per Inverter", - "description": "Number of the strings of the inverter of this plane." - }, - "pvforecast1_surface_tilt": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Pvforecast1 Surface Tilt", - "description": "Tilt angle from horizontal plane. Ignored for two-axis tracking." - }, - "pvforecast1_surface_azimuth": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Pvforecast1 Surface Azimuth", - "description": "Orientation (azimuth angle) of the (fixed) plane. Clockwise from north (north=0, east=90, south=180, west=270)." - }, - "pvforecast1_userhorizon": { - "anyOf": [ - { - "items": { - "type": "number" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Pvforecast1 Userhorizon", - "description": "Elevation of horizon in degrees, at equally spaced azimuth clockwise from north." - }, - "pvforecast1_peakpower": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Pvforecast1 Peakpower", - "description": "Nominal power of PV system in kW." - }, - "pvforecast1_pvtechchoice": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Pvforecast1 Pvtechchoice", - "description": "PV technology. One of 'crystSi', 'CIS', 'CdTe', 'Unknown'.", - "default": "crystSi" - }, - "pvforecast1_mountingplace": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Pvforecast1 Mountingplace", - "description": "Type of mounting for PV system. Options are 'free' for free-standing and 'building' for building-integrated.", - "default": "free" - }, - "pvforecast1_loss": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Pvforecast1 Loss", - "description": "Sum of PV system losses in percent", - "default": 0 - }, - "pvforecast1_trackingtype": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Pvforecast1 Trackingtype", - "description": "Type of suntracking. 0=fixed, 1=single horizontal axis aligned north-south, 2=two-axis tracking, 3=vertical axis tracking, 4=single horizontal axis aligned east-west, 5=single inclined axis aligned north-south." - }, - "pvforecast1_optimal_surface_tilt": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Pvforecast1 Optimal Surface Tilt", - "description": "Calculate the optimum tilt angle. Ignored for two-axis tracking.", - "default": false - }, - "pvforecast1_optimalangles": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Pvforecast1 Optimalangles", - "description": "Calculate the optimum tilt and azimuth angles. Ignored for two-axis tracking.", - "default": false - }, - "pvforecast1_albedo": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Pvforecast1 Albedo", - "description": "Proportion of the light hitting the ground that it reflects back." - }, - "pvforecast1_module_model": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Pvforecast1 Module Model", - "description": "Model of the PV modules of this plane." - }, - "pvforecast1_inverter_model": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Pvforecast1 Inverter Model", - "description": "Model of the inverter of this plane." - }, - "pvforecast1_inverter_paco": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Pvforecast1 Inverter Paco", - "description": "AC power rating of the inverter. [W]" - }, - "pvforecast1_modules_per_string": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Pvforecast1 Modules Per String", - "description": "Number of the PV modules of the strings of this plane." - }, - "pvforecast1_strings_per_inverter": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Pvforecast1 Strings Per Inverter", - "description": "Number of the strings of the inverter of this plane." - }, - "pvforecast2_surface_tilt": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Pvforecast2 Surface Tilt", - "description": "Tilt angle from horizontal plane. Ignored for two-axis tracking." - }, - "pvforecast2_surface_azimuth": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Pvforecast2 Surface Azimuth", - "description": "Orientation (azimuth angle) of the (fixed) plane. Clockwise from north (north=0, east=90, south=180, west=270)." - }, - "pvforecast2_userhorizon": { - "anyOf": [ - { - "items": { - "type": "number" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Pvforecast2 Userhorizon", - "description": "Elevation of horizon in degrees, at equally spaced azimuth clockwise from north." - }, - "pvforecast2_peakpower": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Pvforecast2 Peakpower", - "description": "Nominal power of PV system in kW." - }, - "pvforecast2_pvtechchoice": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Pvforecast2 Pvtechchoice", - "description": "PV technology. One of 'crystSi', 'CIS', 'CdTe', 'Unknown'.", - "default": "crystSi" - }, - "pvforecast2_mountingplace": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Pvforecast2 Mountingplace", - "description": "Type of mounting for PV system. Options are 'free' for free-standing and 'building' for building-integrated.", - "default": "free" - }, - "pvforecast2_loss": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Pvforecast2 Loss", - "description": "Sum of PV system losses in percent", - "default": 0 - }, - "pvforecast2_trackingtype": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Pvforecast2 Trackingtype", - "description": "Type of suntracking. 0=fixed, 1=single horizontal axis aligned north-south, 2=two-axis tracking, 3=vertical axis tracking, 4=single horizontal axis aligned east-west, 5=single inclined axis aligned north-south." - }, - "pvforecast2_optimal_surface_tilt": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Pvforecast2 Optimal Surface Tilt", - "description": "Calculate the optimum tilt angle. Ignored for two-axis tracking.", - "default": false - }, - "pvforecast2_optimalangles": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Pvforecast2 Optimalangles", - "description": "Calculate the optimum tilt and azimuth angles. Ignored for two-axis tracking.", - "default": false - }, - "pvforecast2_albedo": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Pvforecast2 Albedo", - "description": "Proportion of the light hitting the ground that it reflects back." - }, - "pvforecast2_module_model": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Pvforecast2 Module Model", - "description": "Model of the PV modules of this plane." - }, - "pvforecast2_inverter_model": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Pvforecast2 Inverter Model", - "description": "Model of the inverter of this plane." - }, - "pvforecast2_inverter_paco": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Pvforecast2 Inverter Paco", - "description": "AC power rating of the inverter. [W]" - }, - "pvforecast2_modules_per_string": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Pvforecast2 Modules Per String", - "description": "Number of the PV modules of the strings of this plane." - }, - "pvforecast2_strings_per_inverter": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Pvforecast2 Strings Per Inverter", - "description": "Number of the strings of the inverter of this plane." - }, - "pvforecast3_surface_tilt": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Pvforecast3 Surface Tilt", - "description": "Tilt angle from horizontal plane. Ignored for two-axis tracking." - }, - "pvforecast3_surface_azimuth": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Pvforecast3 Surface Azimuth", - "description": "Orientation (azimuth angle) of the (fixed) plane. Clockwise from north (north=0, east=90, south=180, west=270)." - }, - "pvforecast3_userhorizon": { - "anyOf": [ - { - "items": { - "type": "number" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Pvforecast3 Userhorizon", - "description": "Elevation of horizon in degrees, at equally spaced azimuth clockwise from north." - }, - "pvforecast3_peakpower": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Pvforecast3 Peakpower", - "description": "Nominal power of PV system in kW." - }, - "pvforecast3_pvtechchoice": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Pvforecast3 Pvtechchoice", - "description": "PV technology. One of 'crystSi', 'CIS', 'CdTe', 'Unknown'.", - "default": "crystSi" - }, - "pvforecast3_mountingplace": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Pvforecast3 Mountingplace", - "description": "Type of mounting for PV system. Options are 'free' for free-standing and 'building' for building-integrated.", - "default": "free" - }, - "pvforecast3_loss": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Pvforecast3 Loss", - "description": "Sum of PV system losses in percent", - "default": 0 - }, - "pvforecast3_trackingtype": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Pvforecast3 Trackingtype", - "description": "Type of suntracking. 0=fixed, 1=single horizontal axis aligned north-south, 2=two-axis tracking, 3=vertical axis tracking, 4=single horizontal axis aligned east-west, 5=single inclined axis aligned north-south." - }, - "pvforecast3_optimal_surface_tilt": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Pvforecast3 Optimal Surface Tilt", - "description": "Calculate the optimum tilt angle. Ignored for two-axis tracking.", - "default": false - }, - "pvforecast3_optimalangles": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Pvforecast3 Optimalangles", - "description": "Calculate the optimum tilt and azimuth angles. Ignored for two-axis tracking.", - "default": false - }, - "pvforecast3_albedo": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Pvforecast3 Albedo", - "description": "Proportion of the light hitting the ground that it reflects back." - }, - "pvforecast3_module_model": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Pvforecast3 Module Model", - "description": "Model of the PV modules of this plane." - }, - "pvforecast3_inverter_model": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Pvforecast3 Inverter Model", - "description": "Model of the inverter of this plane." - }, - "pvforecast3_inverter_paco": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Pvforecast3 Inverter Paco", - "description": "AC power rating of the inverter. [W]" - }, - "pvforecast3_modules_per_string": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Pvforecast3 Modules Per String", - "description": "Number of the PV modules of the strings of this plane." - }, - "pvforecast3_strings_per_inverter": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Pvforecast3 Strings Per Inverter", - "description": "Number of the strings of the inverter of this plane." - }, - "pvforecast4_surface_tilt": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Pvforecast4 Surface Tilt", - "description": "Tilt angle from horizontal plane. Ignored for two-axis tracking." - }, - "pvforecast4_surface_azimuth": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Pvforecast4 Surface Azimuth", - "description": "Orientation (azimuth angle) of the (fixed) plane. Clockwise from north (north=0, east=90, south=180, west=270)." - }, - "pvforecast4_userhorizon": { - "anyOf": [ - { - "items": { - "type": "number" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Pvforecast4 Userhorizon", - "description": "Elevation of horizon in degrees, at equally spaced azimuth clockwise from north." - }, - "pvforecast4_peakpower": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Pvforecast4 Peakpower", - "description": "Nominal power of PV system in kW." - }, - "pvforecast4_pvtechchoice": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Pvforecast4 Pvtechchoice", - "description": "PV technology. One of 'crystSi', 'CIS', 'CdTe', 'Unknown'.", - "default": "crystSi" - }, - "pvforecast4_mountingplace": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Pvforecast4 Mountingplace", - "description": "Type of mounting for PV system. Options are 'free' for free-standing and 'building' for building-integrated.", - "default": "free" - }, - "pvforecast4_loss": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Pvforecast4 Loss", - "description": "Sum of PV system losses in percent", - "default": 0 - }, - "pvforecast4_trackingtype": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Pvforecast4 Trackingtype", - "description": "Type of suntracking. 0=fixed, 1=single horizontal axis aligned north-south, 2=two-axis tracking, 3=vertical axis tracking, 4=single horizontal axis aligned east-west, 5=single inclined axis aligned north-south." - }, - "pvforecast4_optimal_surface_tilt": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Pvforecast4 Optimal Surface Tilt", - "description": "Calculate the optimum tilt angle. Ignored for two-axis tracking.", - "default": false - }, - "pvforecast4_optimalangles": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Pvforecast4 Optimalangles", - "description": "Calculate the optimum tilt and azimuth angles. Ignored for two-axis tracking.", - "default": false - }, - "pvforecast4_albedo": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Pvforecast4 Albedo", - "description": "Proportion of the light hitting the ground that it reflects back." - }, - "pvforecast4_module_model": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Pvforecast4 Module Model", - "description": "Model of the PV modules of this plane." - }, - "pvforecast4_inverter_model": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Pvforecast4 Inverter Model", - "description": "Model of the inverter of this plane." - }, - "pvforecast4_inverter_paco": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Pvforecast4 Inverter Paco", - "description": "AC power rating of the inverter. [W]" - }, - "pvforecast4_modules_per_string": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Pvforecast4 Modules Per String", - "description": "Number of the PV modules of the strings of this plane." - }, - "pvforecast4_strings_per_inverter": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Pvforecast4 Strings Per Inverter", - "description": "Number of the strings of the inverter of this plane." - }, - "pvforecast5_surface_tilt": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Pvforecast5 Surface Tilt", - "description": "Tilt angle from horizontal plane. Ignored for two-axis tracking." - }, - "pvforecast5_surface_azimuth": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Pvforecast5 Surface Azimuth", - "description": "Orientation (azimuth angle) of the (fixed) plane. Clockwise from north (north=0, east=90, south=180, west=270)." - }, - "pvforecast5_userhorizon": { - "anyOf": [ - { - "items": { - "type": "number" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Pvforecast5 Userhorizon", - "description": "Elevation of horizon in degrees, at equally spaced azimuth clockwise from north." - }, - "pvforecast5_peakpower": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Pvforecast5 Peakpower", - "description": "Nominal power of PV system in kW." - }, - "pvforecast5_pvtechchoice": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Pvforecast5 Pvtechchoice", - "description": "PV technology. One of 'crystSi', 'CIS', 'CdTe', 'Unknown'.", - "default": "crystSi" - }, - "pvforecast5_mountingplace": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Pvforecast5 Mountingplace", - "description": "Type of mounting for PV system. Options are 'free' for free-standing and 'building' for building-integrated.", - "default": "free" - }, - "pvforecast5_loss": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Pvforecast5 Loss", - "description": "Sum of PV system losses in percent", - "default": 0 - }, - "pvforecast5_trackingtype": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Pvforecast5 Trackingtype", - "description": "Type of suntracking. 0=fixed, 1=single horizontal axis aligned north-south, 2=two-axis tracking, 3=vertical axis tracking, 4=single horizontal axis aligned east-west, 5=single inclined axis aligned north-south." - }, - "pvforecast5_optimal_surface_tilt": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Pvforecast5 Optimal Surface Tilt", - "description": "Calculate the optimum tilt angle. Ignored for two-axis tracking.", - "default": false - }, - "pvforecast5_optimalangles": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Pvforecast5 Optimalangles", - "description": "Calculate the optimum tilt and azimuth angles. Ignored for two-axis tracking.", - "default": false - }, - "pvforecast5_albedo": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Pvforecast5 Albedo", - "description": "Proportion of the light hitting the ground that it reflects back." - }, - "pvforecast5_module_model": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Pvforecast5 Module Model", - "description": "Model of the PV modules of this plane." - }, - "pvforecast5_inverter_model": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Pvforecast5 Inverter Model", - "description": "Model of the inverter of this plane." - }, - "pvforecast5_inverter_paco": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Pvforecast5 Inverter Paco", - "description": "AC power rating of the inverter. [W]" - }, - "pvforecast5_modules_per_string": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Pvforecast5 Modules Per String", - "description": "Number of the PV modules of the strings of this plane." - }, - "pvforecast5_strings_per_inverter": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Pvforecast5 Strings Per Inverter", - "description": "Number of the strings of the inverter of this plane." - }, - "load_import_file_path": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "format": "path" - }, - { - "type": "null" - } - ], - "title": "Load Import File Path", - "description": "Path to the file to import load data from." - }, - "load_import_json": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Load Import Json", - "description": "JSON string, dictionary of load forecast value lists." - }, - "loadakkudoktor_year_energy": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Loadakkudoktor Year Energy", - "description": "Yearly energy consumption (kWh)." - }, - "load_provider": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Load Provider", - "description": "Load provider id of provider to be used." - }, - "load_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Load Name", - "description": "Name of the load source." - }, - "elecpriceimport_file_path": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "format": "path" - }, - { - "type": "null" - } - ], - "title": "Elecpriceimport File Path", - "description": "Path to the file to import elecprice data from." - }, - "elecpriceimport_json": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Elecpriceimport Json", - "description": "JSON string, dictionary of electricity price forecast value lists." - }, - "elecprice_provider": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Elecprice Provider", - "description": "Electricity price provider id of provider to be used." - }, - "elecprice_charges_kwh": { - "anyOf": [ - { - "type": "number", - "minimum": 0.0 - }, - { - "type": "null" - } - ], - "title": "Elecprice Charges Kwh", - "description": "Electricity price charges (\u20ac/kWh)." - }, - "prediction_hours": { - "anyOf": [ - { - "type": "integer", - "minimum": 0.0 - }, - { - "type": "null" - } - ], - "title": "Prediction Hours", - "description": "Number of hours into the future for predictions", - "default": 48 - }, - "prediction_historic_hours": { - "anyOf": [ - { - "type": "integer", - "minimum": 0.0 - }, - { - "type": "null" - } - ], - "title": "Prediction Historic Hours", - "description": "Number of hours into the past for historical predictions data", - "default": 48 - }, - "latitude": { - "anyOf": [ - { - "type": "number", - "maximum": 90.0, - "minimum": -90.0 - }, - { - "type": "null" - } - ], - "title": "Latitude", - "description": "Latitude in decimal degrees, between -90 and 90, north is positive (ISO 19115) (\u00b0)" - }, - "longitude": { - "anyOf": [ - { - "type": "number", - "maximum": 180.0, - "minimum": -180.0 - }, - { - "type": "null" - } - ], - "title": "Longitude", - "description": "Longitude in decimal degrees, within -180 to 180 (\u00b0)" - }, - "optimization_hours": { - "anyOf": [ - { - "type": "integer", - "minimum": 0.0 - }, - { - "type": "null" - } - ], - "title": "Optimization Hours", - "description": "Number of hours into the future for optimizations.", - "default": 24 - }, - "optimization_penalty": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Optimization Penalty", - "description": "Penalty factor used in optimization.", - "default": 10 - }, - "optimization_ev_available_charge_rates_percent": { - "anyOf": [ - { - "items": { - "type": "number" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Optimization Ev Available Charge Rates Percent", - "description": "Charge rates available for the EV in percent of maximum charge.", - "default": [ - 0.0, - 0.375, - 0.5, - 0.625, - 0.75, - 0.875, - 1.0 - ] - }, - "measurement_load0_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Measurement Load0 Name", - "description": "Name of the load0 source (e.g. 'Household', 'Heat Pump')" - }, - "measurement_load1_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Measurement Load1 Name", - "description": "Name of the load1 source (e.g. 'Household', 'Heat Pump')" - }, - "measurement_load2_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Measurement Load2 Name", - "description": "Name of the load2 source (e.g. 'Household', 'Heat Pump')" - }, - "measurement_load3_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Measurement Load3 Name", - "description": "Name of the load3 source (e.g. 'Household', 'Heat Pump')" - }, - "measurement_load4_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Measurement Load4 Name", - "description": "Name of the load4 source (e.g. 'Household', 'Heat Pump')" - }, - "battery_provider": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Battery Provider", - "description": "Id of Battery simulation provider." - }, - "battery_capacity": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Battery Capacity", - "description": "Battery capacity [Wh]." - }, - "battery_initial_soc": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Battery Initial Soc", - "description": "Battery initial state of charge [%]." - }, - "battery_soc_min": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Battery Soc Min", - "description": "Battery minimum state of charge [%]." - }, - "battery_soc_max": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Battery Soc Max", - "description": "Battery maximum state of charge [%]." - }, - "battery_charging_efficiency": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Battery Charging Efficiency", - "description": "Battery charging efficiency [%]." - }, - "battery_discharging_efficiency": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Battery Discharging Efficiency", - "description": "Battery discharging efficiency [%]." - }, - "battery_max_charging_power": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Battery Max Charging Power", - "description": "Battery maximum charge power [W]." - }, - "bev_provider": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Bev Provider", - "description": "Id of Battery Electric Vehicle simulation provider." - }, - "bev_capacity": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Bev Capacity", - "description": "Battery Electric Vehicle capacity [Wh]." - }, - "bev_initial_soc": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Bev Initial Soc", - "description": "Battery Electric Vehicle initial state of charge [%]." - }, - "bev_soc_max": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Bev Soc Max", - "description": "Battery Electric Vehicle maximum state of charge [%]." - }, - "bev_charging_efficiency": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Bev Charging Efficiency", - "description": "Battery Electric Vehicle charging efficiency [%]." - }, - "bev_discharging_efficiency": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Bev Discharging Efficiency", - "description": "Battery Electric Vehicle discharging efficiency [%]." - }, - "bev_max_charging_power": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Bev Max Charging Power", - "description": "Battery Electric Vehicle maximum charge power [W]." - }, - "dishwasher_provider": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Dishwasher Provider", - "description": "Id of Dish Washer simulation provider." - }, - "dishwasher_consumption": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Dishwasher Consumption", - "description": "Dish Washer energy consumption [Wh]." - }, - "dishwasher_duration": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Dishwasher Duration", - "description": "Dish Washer usage duration [h]." - }, - "inverter_provider": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Inverter Provider", - "description": "Id of PV Inverter simulation provider." - }, - "inverter_power_max": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Inverter Power Max", - "description": "Inverter maximum power [W]." - }, - "data_folder_path": { - "anyOf": [ - { - "type": "string", - "format": "path" - }, - { - "type": "null" - } - ], - "title": "Data Folder Path", - "description": "Path to EOS data directory." - }, - "data_output_subpath": { - "anyOf": [ - { - "type": "string", - "format": "path" - }, - { - "type": "null" - } - ], - "title": "Data Output Subpath", - "description": "Sub-path for the EOS output data directory.", - "default": "output" - }, - "data_cache_subpath": { - "anyOf": [ - { - "type": "string", - "format": "path" - }, - { - "type": "null" - } - ], - "title": "Data Cache Subpath", - "description": "Sub-path for the EOS cache data directory.", - "default": "cache" - }, - "pvforecast_planes": { - "items": { - "type": "string" - }, - "type": "array", - "title": "Pvforecast Planes", - "description": "Compute a list of active planes.", - "readOnly": true - }, - "pvforecast_planes_peakpower": { - "items": { - "type": "number" - }, - "type": "array", - "title": "Pvforecast Planes Peakpower", - "description": "Compute a list of the peak power per active planes.", - "readOnly": true - }, - "pvforecast_planes_azimuth": { - "items": { - "type": "number" - }, - "type": "array", - "title": "Pvforecast Planes Azimuth", - "description": "Compute a list of the azimuths per active planes.", - "readOnly": true - }, - "pvforecast_planes_tilt": { - "items": { - "type": "number" - }, - "type": "array", - "title": "Pvforecast Planes Tilt", - "description": "Compute a list of the tilts per active planes.", - "readOnly": true - }, - "pvforecast_planes_userhorizon": { - "title": "Pvforecast Planes Userhorizon", - "description": "Compute a list of the user horizon per active planes.", - "readOnly": true - }, - "pvforecast_planes_inverter_paco": { - "title": "Pvforecast Planes Inverter Paco", - "description": "Compute a list of the maximum power rating of the inverter per active planes.", - "readOnly": true - }, - "timezone": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Timezone", - "description": "Compute timezone based on latitude and longitude.", - "readOnly": true - }, - "data_output_path": { - "anyOf": [ - { - "type": "string", - "format": "path" - }, - { - "type": "null" - } - ], - "title": "Data Output Path", - "description": "Compute data_output_path based on data_folder_path.", - "readOnly": true - }, - "data_cache_path": { - "anyOf": [ - { - "type": "string", - "format": "path" - }, - { - "type": "null" - } - ], - "title": "Data Cache Path", - "description": "Compute data_cache_path based on data_folder_path.", - "readOnly": true - }, - "config_folder_path": { - "anyOf": [ - { - "type": "string", - "format": "path" - }, - { - "type": "null" - } - ], - "title": "Config Folder Path", - "description": "Path to EOS configuration directory.", - "readOnly": true - }, - "config_file_path": { - "anyOf": [ - { - "type": "string", - "format": "path" - }, - { - "type": "null" - } - ], - "title": "Config File Path", - "description": "Path to EOS configuration file.", - "readOnly": true - }, - "config_default_file_path": { - "type": "string", - "format": "path", - "title": "Config Default File Path", - "description": "Compute the default config file path.", - "readOnly": true - }, - "config_keys": { - "items": { - "type": "string" - }, - "type": "array", - "title": "Config Keys", - "description": "Returns the keys of all fields in the configuration.", - "readOnly": true - } - }, - "type": "object", - "required": [ - "pvforecast_planes", - "pvforecast_planes_peakpower", - "pvforecast_planes_azimuth", - "pvforecast_planes_tilt", - "pvforecast_planes_userhorizon", - "pvforecast_planes_inverter_paco", - "timezone", - "data_output_path", - "data_cache_path", - "config_folder_path", - "config_file_path", - "config_default_file_path", - "config_keys" - ], - "title": "ConfigEOS", - "description": "Singleton configuration handler for the EOS application.\n\nConfigEOS extends `SettingsEOS` with support for default configuration paths and automatic\ninitialization.\n\n`ConfigEOS` ensures that only one instance of the class is created throughout the application,\nallowing consistent access to EOS configuration settings. This singleton instance loads\nconfiguration data from a predefined set of directories or creates a default configuration if\nnone is found.\n\nInitialization Process:\n - Upon instantiation, the singleton instance attempts to load a configuration file in this order:\n 1. The directory specified by the `EOS_CONFIG_DIR` environment variable\n 2. The directory specified by the `EOS_DIR` environment variable.\n 3. A platform specific default directory for EOS.\n 4. The current working directory.\n - The first available configuration file found in these directories is loaded.\n - If no configuration file is found, a default configuration file is created in the platform\n specific default directory, and default settings are loaded into it.\n\nAttributes from the loaded configuration are accessible directly as instance attributes of\n`ConfigEOS`, providing a centralized, shared configuration object for EOS.\n\nSingleton Behavior:\n - This class uses the `SingletonMixin` to ensure that all requests for `ConfigEOS` return\n the same instance, which contains the most up-to-date configuration. Modifying the configuration\n in one part of the application reflects across all references to this class.\n\nAttributes:\n _settings (ClassVar[SettingsEOS]): Holds application-wide settings.\n _file_settings (ClassVar[SettingsEOS]): Stores configuration loaded from file.\n config_folder_path (Optional[Path]): Path to the configuration directory.\n config_file_path (Optional[Path]): Path to the configuration file.\n\nRaises:\n FileNotFoundError: If no configuration file is found, and creating a default configuration fails.\n\nExample:\n To initialize and access configuration attributes (only one instance is created):\n ```python\n config_eos = ConfigEOS() # Always returns the same instance\n print(config_eos.prediction_hours) # Access a setting from the loaded configuration\n ```" - }, - "ElectricVehicleParameters": { - "properties": { - "capacity_wh": { - "type": "integer", - "exclusiveMinimum": 0.0, - "title": "Capacity Wh", - "description": "An integer representing the capacity of the battery in watt-hours." - }, - "charging_efficiency": { - "type": "number", - "maximum": 1.0, - "exclusiveMinimum": 0.0, - "title": "Charging Efficiency", - "description": "A float representing the charging efficiency of the battery.", - "default": 0.88 - }, - "discharging_efficiency": { - "type": "number", - "title": "Discharging Efficiency", - "default": 1.0 - }, - "max_charge_power_w": { - "anyOf": [ - { - "type": "number", - "exclusiveMinimum": 0.0 - }, - { - "type": "null" - } - ], - "title": "Max Charge Power W", - "description": "Maximum charging power in watts.", - "default": 5000 - }, - "initial_soc_percentage": { - "type": "integer", - "maximum": 100.0, - "minimum": 0.0, - "title": "Initial Soc Percentage", - "description": "An integer representing the current state of charge (SOC) of the battery in percentage.", - "default": 0 - }, - "min_soc_percentage": { - "type": "integer", - "maximum": 100.0, - "minimum": 0.0, - "title": "Min Soc Percentage", - "description": "An integer representing the minimum state of charge (SOC) of the battery in percentage.", - "default": 0 - }, - "max_soc_percentage": { - "type": "integer", - "maximum": 100.0, - "minimum": 0.0, - "title": "Max Soc Percentage", - "description": "An integer representing the maximum state of charge (SOC) of the battery in percentage.", - "default": 100 - } - }, - "type": "object", - "required": [ - "capacity_wh" - ], - "title": "ElectricVehicleParameters", - "description": "Parameters specific to an electric vehicle (EV)." - }, - "ElectricVehicleResult": { - "properties": { - "charge_array": { - "items": { - "type": "number" - }, - "type": "array", - "title": "Charge Array", - "description": "Hourly charging status (0 for no charging, 1 for charging)." - }, - "discharge_array": { - "items": { - "type": "integer" - }, - "type": "array", - "title": "Discharge Array", - "description": "Hourly discharging status (0 for no discharging, 1 for discharging)." - }, - "discharging_efficiency": { - "type": "number", - "title": "Discharging Efficiency", - "description": "The discharge efficiency as a float.." - }, - "hours": { - "type": "integer", - "title": "Hours", - "description": "Number of hours in the simulation." - }, - "capacity_wh": { - "type": "integer", - "title": "Capacity Wh", - "description": "Capacity of the EV\u2019s battery in watt-hours." - }, - "charging_efficiency": { - "type": "number", - "title": "Charging Efficiency", - "description": "Charging efficiency as a float.." - }, - "max_charge_power_w": { - "type": "integer", - "title": "Max Charge Power W", - "description": "Maximum charging power in watts." - }, - "soc_wh": { - "type": "number", - "title": "Soc Wh", - "description": "State of charge of the battery in watt-hours at the start of the simulation." - }, - "initial_soc_percentage": { - "type": "integer", - "title": "Initial Soc Percentage", - "description": "State of charge at the start of the simulation in percentage." - } - }, - "type": "object", - "required": [ - "charge_array", - "discharge_array", - "discharging_efficiency", - "hours", - "capacity_wh", - "charging_efficiency", - "max_charge_power_w", - "soc_wh", - "initial_soc_percentage" - ], - "title": "ElectricVehicleResult", - "description": "Result class containing information related to the electric vehicle's charging and discharging behavior." - }, - "EnergieManagementSystemParameters": { - "properties": { - "pv_prognose_wh": { - "items": { - "type": "number" - }, - "type": "array", - "title": "Pv Prognose Wh", - "description": "An array of floats representing the forecasted photovoltaic output in watts for different time intervals." - }, - "strompreis_euro_pro_wh": { - "items": { - "type": "number" - }, - "type": "array", - "title": "Strompreis Euro Pro Wh", - "description": "An array of floats representing the electricity price in euros per watt-hour for different time intervals." - }, - "einspeiseverguetung_euro_pro_wh": { - "anyOf": [ - { - "items": { - "type": "number" - }, - "type": "array" - }, - { - "type": "number" - } - ], - "title": "Einspeiseverguetung Euro Pro Wh", - "description": "A float or array of floats representing the feed-in compensation in euros per watt-hour." - }, - "preis_euro_pro_wh_akku": { - "type": "number", - "title": "Preis Euro Pro Wh Akku", - "description": "A float representing the cost of battery energy per watt-hour." - }, - "gesamtlast": { - "items": { - "type": "number" - }, - "type": "array", - "title": "Gesamtlast", - "description": "An array of floats representing the total load (consumption) in watts for different time intervals." - } - }, - "type": "object", - "required": [ - "pv_prognose_wh", - "strompreis_euro_pro_wh", - "einspeiseverguetung_euro_pro_wh", - "preis_euro_pro_wh_akku", - "gesamtlast" - ], - "title": "EnergieManagementSystemParameters" - }, - "ForecastResponse": { - "properties": { - "temperature": { - "items": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ] - }, - "type": "array", - "title": "Temperature" - }, - "pvpower": { - "items": { - "type": "number" - }, - "type": "array", - "title": "Pvpower" - } - }, - "type": "object", - "required": [ - "temperature", - "pvpower" - ], - "title": "ForecastResponse" - }, - "GesamtlastRequest": { - "properties": { - "year_energy": { - "type": "number", - "title": "Year Energy" - }, - "measured_data": { - "items": { - "type": "object" - }, - "type": "array", - "title": "Measured Data" - }, - "hours": { - "type": "integer", - "title": "Hours" - } - }, - "type": "object", - "required": [ - "year_energy", - "measured_data", - "hours" - ], - "title": "GesamtlastRequest" - }, - "HTTPValidationError": { - "properties": { - "detail": { - "items": { - "$ref": "#/components/schemas/ValidationError" - }, - "type": "array", - "title": "Detail" - } - }, - "type": "object", - "title": "HTTPValidationError" - }, - "HomeApplianceParameters": { - "properties": { - "consumption_wh": { - "type": "integer", - "exclusiveMinimum": 0.0, - "title": "Consumption Wh", - "description": "An integer representing the energy consumption of a household device in watt-hours." - }, - "duration_h": { - "type": "integer", - "exclusiveMinimum": 0.0, - "title": "Duration H", - "description": "An integer representing the usage duration of a household device in hours." - } - }, - "type": "object", - "required": [ - "consumption_wh", - "duration_h" - ], - "title": "HomeApplianceParameters" - }, - "InverterParameters": { - "properties": { - "max_power_wh": { - "type": "number", - "exclusiveMinimum": 0.0, - "title": "Max Power Wh", - "default": 10000 - } - }, - "type": "object", - "title": "InverterParameters" - }, - "OptimizationParameters": { - "properties": { - "ems": { - "$ref": "#/components/schemas/EnergieManagementSystemParameters" - }, - "pv_akku": { - "$ref": "#/components/schemas/SolarPanelBatteryParameters" - }, - "inverter": { - "$ref": "#/components/schemas/InverterParameters", - "default": { - "max_power_wh": 10000.0 - } - }, - "eauto": { - "anyOf": [ - { - "$ref": "#/components/schemas/ElectricVehicleParameters" - }, - { - "type": "null" - } - ] - }, - "dishwasher": { - "anyOf": [ - { - "$ref": "#/components/schemas/HomeApplianceParameters" - }, - { - "type": "null" - } - ] - }, - "temperature_forecast": { - "anyOf": [ - { - "items": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Temperature Forecast", - "description": "An array of floats representing the temperature forecast in degrees Celsius for different time intervals." - }, - "start_solution": { - "anyOf": [ - { - "items": { - "type": "number" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Start Solution", - "description": "Can be `null` or contain a previous solution (if available)." - } - }, - "type": "object", - "required": [ - "ems", - "pv_akku", - "eauto" - ], - "title": "OptimizationParameters" - }, - "OptimizeResponse": { - "properties": { - "ac_charge": { - "items": { - "type": "number" - }, - "type": "array", - "title": "Ac Charge", - "description": "Array with AC charging values as relative power (0-1), other values set to 0." - }, - "dc_charge": { - "items": { - "type": "number" - }, - "type": "array", - "title": "Dc Charge", - "description": "Array with DC charging values as relative power (0-1), other values set to 0." - }, - "discharge_allowed": { - "items": { - "type": "integer" - }, - "type": "array", - "title": "Discharge Allowed", - "description": "Array with discharge values (1 for discharge, 0 otherwise)." - }, - "eautocharge_hours_float": { - "anyOf": [ - { - "items": { - "type": "number" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Eautocharge Hours Float", - "description": "TBD" - }, - "result": { - "$ref": "#/components/schemas/SimulationResult" - }, - "eauto_obj": { - "anyOf": [ - { - "$ref": "#/components/schemas/ElectricVehicleResult" - }, - { - "type": "null" - } - ] - }, - "start_solution": { - "anyOf": [ - { - "items": { - "type": "number" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Start Solution", - "description": "An array of binary values (0 or 1) representing a possible starting solution for the simulation." - }, - "washingstart": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Washingstart", - "description": "Can be `null` or contain an object representing the start of washing (if applicable)." - } - }, - "type": "object", - "required": [ - "ac_charge", - "dc_charge", - "discharge_allowed", - "eautocharge_hours_float", - "result", - "eauto_obj" - ], - "title": "OptimizeResponse", - "description": "**Note**: The first value of \"Last_Wh_per_hour\", \"Netzeinspeisung_Wh_per_hour\", and \"Netzbezug_Wh_per_hour\", will be set to null in the JSON output and represented as NaN or None in the corresponding classes' data returns. This approach is adopted to ensure that the current hour's processing remains unchanged." - }, - "PydanticDateTimeData": { - "additionalProperties": { - "anyOf": [ - { - "type": "string" - }, - { - "items": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "integer" - }, - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "type": "array" - } - ] - }, - "type": "object", - "title": "PydanticDateTimeData", - "description": "Pydantic model for time series data with consistent value lengths.\n\nThis model validates a dictionary where:\n- Keys are strings representing data series names\n- Values are lists of numeric or string values\n- Special keys 'start_datetime' and 'interval' can contain string values\nfor time series indexing\n- All value lists must have the same length\n\nExample:\n {\n \"start_datetime\": \"2024-01-01 00:00:00\", # optional\n \"interval\": \"1 Hour\", # optional\n \"load_mean\": [20.5, 21.0, 22.1],\n \"load_min\": [18.5, 19.0, 20.1]\n }" - }, - "PydanticDateTimeDataFrame": { - "properties": { - "data": { - "additionalProperties": { - "type": "object" - }, - "type": "object", - "title": "Data" - }, - "dtypes": { - "additionalProperties": { - "type": "string" - }, - "type": "object", - "title": "Dtypes" - }, - "tz": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Tz", - "description": "Timezone for datetime values" - }, - "datetime_columns": { - "items": { - "type": "string" - }, - "type": "array", - "title": "Datetime Columns", - "description": "Columns to be treated as datetime" - } - }, - "type": "object", - "required": [ - "data" - ], - "title": "PydanticDateTimeDataFrame", - "description": "Pydantic model for validating pandas DataFrame data with datetime index." - }, - "PydanticDateTimeSeries": { - "properties": { - "data": { - "type": "object", - "title": "Data" - }, - "dtype": { - "type": "string", - "title": "Dtype", - "default": "float64" - }, - "tz": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Tz" - } - }, - "type": "object", - "required": [ - "data" - ], - "title": "PydanticDateTimeSeries", - "description": "Pydantic model for validating pandas Series with datetime index in JSON format.\n\nThis model handles Series data serialized with orient='index', where the keys are\ndatetime strings and values are the series values. Provides validation and\nconversion between JSON and pandas Series with datetime index.\n\nAttributes:\n data (Dict[str, Any]): Dictionary mapping datetime strings to values.\n dtype (str): The data type of the series values.\n tz (str | None): Timezone name if the datetime index is timezone-aware." - }, - "SettingsEOS": { - "properties": { - "server_fastapi_host": { - "anyOf": [ - { - "type": "string", - "format": "ipvanyaddress" - }, - { - "type": "null" - } - ], - "title": "Server Fastapi Host", - "description": "FastAPI server IP address.", - "default": "0.0.0.0" - }, - "server_fastapi_port": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Server Fastapi Port", - "description": "FastAPI server IP port number.", - "default": 8503 - }, - "server_fastapi_verbose": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Server Fastapi Verbose", - "description": "Enable debug output", - "default": false - }, - "server_fastapi_startup_server_fasthtml": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Server Fastapi Startup Server Fasthtml", - "description": "FastAPI server to startup application FastHTML server.", - "default": true - }, - "server_fasthtml_host": { - "anyOf": [ - { - "type": "string", - "format": "ipvanyaddress" - }, - { - "type": "null" - } - ], - "title": "Server Fasthtml Host", - "description": "FastHTML server IP address.", - "default": "0.0.0.0" - }, - "server_fasthtml_port": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Server Fasthtml Port", - "description": "FastHTML server IP port number.", - "default": 8504 - }, - "weatherimport_file_path": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "format": "path" - }, - { - "type": "null" - } - ], - "title": "Weatherimport File Path", - "description": "Path to the file to import weather data from." - }, - "weatherimport_json": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Weatherimport Json", - "description": "JSON string, dictionary of weather forecast value lists." - }, - "weather_provider": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Weather Provider", - "description": "Weather provider id of provider to be used." - }, - "pvforecastimport_file_path": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "format": "path" - }, - { - "type": "null" - } - ], - "title": "Pvforecastimport File Path", - "description": "Path to the file to import pvforecast data from." - }, - "pvforecastimport_json": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Pvforecastimport Json", - "description": "JSON string, dictionary of PV forecast float value lists.Keys are 'pvforecast_dc_power', 'pvforecast_ac_power'." - }, - "pvforecast_provider": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Pvforecast Provider", - "description": "PVForecast provider id of provider to be used." - }, - "pvforecast0_surface_tilt": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Pvforecast0 Surface Tilt", - "description": "Tilt angle from horizontal plane. Ignored for two-axis tracking." - }, - "pvforecast0_surface_azimuth": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Pvforecast0 Surface Azimuth", - "description": "Orientation (azimuth angle) of the (fixed) plane. Clockwise from north (north=0, east=90, south=180, west=270)." - }, - "pvforecast0_userhorizon": { - "anyOf": [ - { - "items": { - "type": "number" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Pvforecast0 Userhorizon", - "description": "Elevation of horizon in degrees, at equally spaced azimuth clockwise from north." - }, - "pvforecast0_peakpower": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Pvforecast0 Peakpower", - "description": "Nominal power of PV system in kW." - }, - "pvforecast0_pvtechchoice": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Pvforecast0 Pvtechchoice", - "description": "PV technology. One of 'crystSi', 'CIS', 'CdTe', 'Unknown'.", - "default": "crystSi" - }, - "pvforecast0_mountingplace": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Pvforecast0 Mountingplace", - "description": "Type of mounting for PV system. Options are 'free' for free-standing and 'building' for building-integrated.", - "default": "free" - }, - "pvforecast0_loss": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Pvforecast0 Loss", - "description": "Sum of PV system losses in percent" - }, - "pvforecast0_trackingtype": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Pvforecast0 Trackingtype", - "description": "Type of suntracking. 0=fixed, 1=single horizontal axis aligned north-south, 2=two-axis tracking, 3=vertical axis tracking, 4=single horizontal axis aligned east-west, 5=single inclined axis aligned north-south." - }, - "pvforecast0_optimal_surface_tilt": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Pvforecast0 Optimal Surface Tilt", - "description": "Calculate the optimum tilt angle. Ignored for two-axis tracking.", - "default": false - }, - "pvforecast0_optimalangles": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Pvforecast0 Optimalangles", - "description": "Calculate the optimum tilt and azimuth angles. Ignored for two-axis tracking.", - "default": false - }, - "pvforecast0_albedo": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Pvforecast0 Albedo", - "description": "Proportion of the light hitting the ground that it reflects back." - }, - "pvforecast0_module_model": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Pvforecast0 Module Model", - "description": "Model of the PV modules of this plane." - }, - "pvforecast0_inverter_model": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Pvforecast0 Inverter Model", - "description": "Model of the inverter of this plane." - }, - "pvforecast0_inverter_paco": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Pvforecast0 Inverter Paco", - "description": "AC power rating of the inverter. [W]" - }, - "pvforecast0_modules_per_string": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Pvforecast0 Modules Per String", - "description": "Number of the PV modules of the strings of this plane." - }, - "pvforecast0_strings_per_inverter": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Pvforecast0 Strings Per Inverter", - "description": "Number of the strings of the inverter of this plane." - }, - "pvforecast1_surface_tilt": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Pvforecast1 Surface Tilt", - "description": "Tilt angle from horizontal plane. Ignored for two-axis tracking." - }, - "pvforecast1_surface_azimuth": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Pvforecast1 Surface Azimuth", - "description": "Orientation (azimuth angle) of the (fixed) plane. Clockwise from north (north=0, east=90, south=180, west=270)." - }, - "pvforecast1_userhorizon": { - "anyOf": [ - { - "items": { - "type": "number" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Pvforecast1 Userhorizon", - "description": "Elevation of horizon in degrees, at equally spaced azimuth clockwise from north." - }, - "pvforecast1_peakpower": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Pvforecast1 Peakpower", - "description": "Nominal power of PV system in kW." - }, - "pvforecast1_pvtechchoice": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Pvforecast1 Pvtechchoice", - "description": "PV technology. One of 'crystSi', 'CIS', 'CdTe', 'Unknown'.", - "default": "crystSi" - }, - "pvforecast1_mountingplace": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Pvforecast1 Mountingplace", - "description": "Type of mounting for PV system. Options are 'free' for free-standing and 'building' for building-integrated.", - "default": "free" - }, - "pvforecast1_loss": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Pvforecast1 Loss", - "description": "Sum of PV system losses in percent", - "default": 0 - }, - "pvforecast1_trackingtype": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Pvforecast1 Trackingtype", - "description": "Type of suntracking. 0=fixed, 1=single horizontal axis aligned north-south, 2=two-axis tracking, 3=vertical axis tracking, 4=single horizontal axis aligned east-west, 5=single inclined axis aligned north-south." - }, - "pvforecast1_optimal_surface_tilt": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Pvforecast1 Optimal Surface Tilt", - "description": "Calculate the optimum tilt angle. Ignored for two-axis tracking.", - "default": false - }, - "pvforecast1_optimalangles": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Pvforecast1 Optimalangles", - "description": "Calculate the optimum tilt and azimuth angles. Ignored for two-axis tracking.", - "default": false - }, - "pvforecast1_albedo": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Pvforecast1 Albedo", - "description": "Proportion of the light hitting the ground that it reflects back." - }, - "pvforecast1_module_model": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Pvforecast1 Module Model", - "description": "Model of the PV modules of this plane." - }, - "pvforecast1_inverter_model": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Pvforecast1 Inverter Model", - "description": "Model of the inverter of this plane." - }, - "pvforecast1_inverter_paco": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Pvforecast1 Inverter Paco", - "description": "AC power rating of the inverter. [W]" - }, - "pvforecast1_modules_per_string": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Pvforecast1 Modules Per String", - "description": "Number of the PV modules of the strings of this plane." - }, - "pvforecast1_strings_per_inverter": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Pvforecast1 Strings Per Inverter", - "description": "Number of the strings of the inverter of this plane." - }, - "pvforecast2_surface_tilt": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Pvforecast2 Surface Tilt", - "description": "Tilt angle from horizontal plane. Ignored for two-axis tracking." - }, - "pvforecast2_surface_azimuth": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Pvforecast2 Surface Azimuth", - "description": "Orientation (azimuth angle) of the (fixed) plane. Clockwise from north (north=0, east=90, south=180, west=270)." - }, - "pvforecast2_userhorizon": { - "anyOf": [ - { - "items": { - "type": "number" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Pvforecast2 Userhorizon", - "description": "Elevation of horizon in degrees, at equally spaced azimuth clockwise from north." - }, - "pvforecast2_peakpower": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Pvforecast2 Peakpower", - "description": "Nominal power of PV system in kW." - }, - "pvforecast2_pvtechchoice": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Pvforecast2 Pvtechchoice", - "description": "PV technology. One of 'crystSi', 'CIS', 'CdTe', 'Unknown'.", - "default": "crystSi" - }, - "pvforecast2_mountingplace": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Pvforecast2 Mountingplace", - "description": "Type of mounting for PV system. Options are 'free' for free-standing and 'building' for building-integrated.", - "default": "free" - }, - "pvforecast2_loss": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Pvforecast2 Loss", - "description": "Sum of PV system losses in percent", - "default": 0 - }, - "pvforecast2_trackingtype": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Pvforecast2 Trackingtype", - "description": "Type of suntracking. 0=fixed, 1=single horizontal axis aligned north-south, 2=two-axis tracking, 3=vertical axis tracking, 4=single horizontal axis aligned east-west, 5=single inclined axis aligned north-south." - }, - "pvforecast2_optimal_surface_tilt": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Pvforecast2 Optimal Surface Tilt", - "description": "Calculate the optimum tilt angle. Ignored for two-axis tracking.", - "default": false - }, - "pvforecast2_optimalangles": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Pvforecast2 Optimalangles", - "description": "Calculate the optimum tilt and azimuth angles. Ignored for two-axis tracking.", - "default": false - }, - "pvforecast2_albedo": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Pvforecast2 Albedo", - "description": "Proportion of the light hitting the ground that it reflects back." - }, - "pvforecast2_module_model": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Pvforecast2 Module Model", - "description": "Model of the PV modules of this plane." - }, - "pvforecast2_inverter_model": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Pvforecast2 Inverter Model", - "description": "Model of the inverter of this plane." - }, - "pvforecast2_inverter_paco": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Pvforecast2 Inverter Paco", - "description": "AC power rating of the inverter. [W]" - }, - "pvforecast2_modules_per_string": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Pvforecast2 Modules Per String", - "description": "Number of the PV modules of the strings of this plane." - }, - "pvforecast2_strings_per_inverter": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Pvforecast2 Strings Per Inverter", - "description": "Number of the strings of the inverter of this plane." - }, - "pvforecast3_surface_tilt": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Pvforecast3 Surface Tilt", - "description": "Tilt angle from horizontal plane. Ignored for two-axis tracking." - }, - "pvforecast3_surface_azimuth": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Pvforecast3 Surface Azimuth", - "description": "Orientation (azimuth angle) of the (fixed) plane. Clockwise from north (north=0, east=90, south=180, west=270)." - }, - "pvforecast3_userhorizon": { - "anyOf": [ - { - "items": { - "type": "number" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Pvforecast3 Userhorizon", - "description": "Elevation of horizon in degrees, at equally spaced azimuth clockwise from north." - }, - "pvforecast3_peakpower": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Pvforecast3 Peakpower", - "description": "Nominal power of PV system in kW." - }, - "pvforecast3_pvtechchoice": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Pvforecast3 Pvtechchoice", - "description": "PV technology. One of 'crystSi', 'CIS', 'CdTe', 'Unknown'.", - "default": "crystSi" - }, - "pvforecast3_mountingplace": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Pvforecast3 Mountingplace", - "description": "Type of mounting for PV system. Options are 'free' for free-standing and 'building' for building-integrated.", - "default": "free" - }, - "pvforecast3_loss": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Pvforecast3 Loss", - "description": "Sum of PV system losses in percent", - "default": 0 - }, - "pvforecast3_trackingtype": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Pvforecast3 Trackingtype", - "description": "Type of suntracking. 0=fixed, 1=single horizontal axis aligned north-south, 2=two-axis tracking, 3=vertical axis tracking, 4=single horizontal axis aligned east-west, 5=single inclined axis aligned north-south." - }, - "pvforecast3_optimal_surface_tilt": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Pvforecast3 Optimal Surface Tilt", - "description": "Calculate the optimum tilt angle. Ignored for two-axis tracking.", - "default": false - }, - "pvforecast3_optimalangles": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Pvforecast3 Optimalangles", - "description": "Calculate the optimum tilt and azimuth angles. Ignored for two-axis tracking.", - "default": false - }, - "pvforecast3_albedo": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Pvforecast3 Albedo", - "description": "Proportion of the light hitting the ground that it reflects back." - }, - "pvforecast3_module_model": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Pvforecast3 Module Model", - "description": "Model of the PV modules of this plane." - }, - "pvforecast3_inverter_model": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Pvforecast3 Inverter Model", - "description": "Model of the inverter of this plane." - }, - "pvforecast3_inverter_paco": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Pvforecast3 Inverter Paco", - "description": "AC power rating of the inverter. [W]" - }, - "pvforecast3_modules_per_string": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Pvforecast3 Modules Per String", - "description": "Number of the PV modules of the strings of this plane." - }, - "pvforecast3_strings_per_inverter": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Pvforecast3 Strings Per Inverter", - "description": "Number of the strings of the inverter of this plane." - }, - "pvforecast4_surface_tilt": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Pvforecast4 Surface Tilt", - "description": "Tilt angle from horizontal plane. Ignored for two-axis tracking." - }, - "pvforecast4_surface_azimuth": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Pvforecast4 Surface Azimuth", - "description": "Orientation (azimuth angle) of the (fixed) plane. Clockwise from north (north=0, east=90, south=180, west=270)." - }, - "pvforecast4_userhorizon": { - "anyOf": [ - { - "items": { - "type": "number" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Pvforecast4 Userhorizon", - "description": "Elevation of horizon in degrees, at equally spaced azimuth clockwise from north." - }, - "pvforecast4_peakpower": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Pvforecast4 Peakpower", - "description": "Nominal power of PV system in kW." - }, - "pvforecast4_pvtechchoice": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Pvforecast4 Pvtechchoice", - "description": "PV technology. One of 'crystSi', 'CIS', 'CdTe', 'Unknown'.", - "default": "crystSi" - }, - "pvforecast4_mountingplace": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Pvforecast4 Mountingplace", - "description": "Type of mounting for PV system. Options are 'free' for free-standing and 'building' for building-integrated.", - "default": "free" - }, - "pvforecast4_loss": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Pvforecast4 Loss", - "description": "Sum of PV system losses in percent", - "default": 0 - }, - "pvforecast4_trackingtype": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Pvforecast4 Trackingtype", - "description": "Type of suntracking. 0=fixed, 1=single horizontal axis aligned north-south, 2=two-axis tracking, 3=vertical axis tracking, 4=single horizontal axis aligned east-west, 5=single inclined axis aligned north-south." - }, - "pvforecast4_optimal_surface_tilt": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Pvforecast4 Optimal Surface Tilt", - "description": "Calculate the optimum tilt angle. Ignored for two-axis tracking.", - "default": false - }, - "pvforecast4_optimalangles": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Pvforecast4 Optimalangles", - "description": "Calculate the optimum tilt and azimuth angles. Ignored for two-axis tracking.", - "default": false - }, - "pvforecast4_albedo": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Pvforecast4 Albedo", - "description": "Proportion of the light hitting the ground that it reflects back." - }, - "pvforecast4_module_model": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Pvforecast4 Module Model", - "description": "Model of the PV modules of this plane." - }, - "pvforecast4_inverter_model": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Pvforecast4 Inverter Model", - "description": "Model of the inverter of this plane." - }, - "pvforecast4_inverter_paco": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Pvforecast4 Inverter Paco", - "description": "AC power rating of the inverter. [W]" - }, - "pvforecast4_modules_per_string": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Pvforecast4 Modules Per String", - "description": "Number of the PV modules of the strings of this plane." - }, - "pvforecast4_strings_per_inverter": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Pvforecast4 Strings Per Inverter", - "description": "Number of the strings of the inverter of this plane." - }, - "pvforecast5_surface_tilt": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Pvforecast5 Surface Tilt", - "description": "Tilt angle from horizontal plane. Ignored for two-axis tracking." - }, - "pvforecast5_surface_azimuth": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Pvforecast5 Surface Azimuth", - "description": "Orientation (azimuth angle) of the (fixed) plane. Clockwise from north (north=0, east=90, south=180, west=270)." - }, - "pvforecast5_userhorizon": { - "anyOf": [ - { - "items": { - "type": "number" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Pvforecast5 Userhorizon", - "description": "Elevation of horizon in degrees, at equally spaced azimuth clockwise from north." - }, - "pvforecast5_peakpower": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Pvforecast5 Peakpower", - "description": "Nominal power of PV system in kW." - }, - "pvforecast5_pvtechchoice": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Pvforecast5 Pvtechchoice", - "description": "PV technology. One of 'crystSi', 'CIS', 'CdTe', 'Unknown'.", - "default": "crystSi" - }, - "pvforecast5_mountingplace": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Pvforecast5 Mountingplace", - "description": "Type of mounting for PV system. Options are 'free' for free-standing and 'building' for building-integrated.", - "default": "free" - }, - "pvforecast5_loss": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Pvforecast5 Loss", - "description": "Sum of PV system losses in percent", - "default": 0 - }, - "pvforecast5_trackingtype": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Pvforecast5 Trackingtype", - "description": "Type of suntracking. 0=fixed, 1=single horizontal axis aligned north-south, 2=two-axis tracking, 3=vertical axis tracking, 4=single horizontal axis aligned east-west, 5=single inclined axis aligned north-south." - }, - "pvforecast5_optimal_surface_tilt": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Pvforecast5 Optimal Surface Tilt", - "description": "Calculate the optimum tilt angle. Ignored for two-axis tracking.", - "default": false - }, - "pvforecast5_optimalangles": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Pvforecast5 Optimalangles", - "description": "Calculate the optimum tilt and azimuth angles. Ignored for two-axis tracking.", - "default": false - }, - "pvforecast5_albedo": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Pvforecast5 Albedo", - "description": "Proportion of the light hitting the ground that it reflects back." - }, - "pvforecast5_module_model": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Pvforecast5 Module Model", - "description": "Model of the PV modules of this plane." - }, - "pvforecast5_inverter_model": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Pvforecast5 Inverter Model", - "description": "Model of the inverter of this plane." - }, - "pvforecast5_inverter_paco": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Pvforecast5 Inverter Paco", - "description": "AC power rating of the inverter. [W]" - }, - "pvforecast5_modules_per_string": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Pvforecast5 Modules Per String", - "description": "Number of the PV modules of the strings of this plane." - }, - "pvforecast5_strings_per_inverter": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Pvforecast5 Strings Per Inverter", - "description": "Number of the strings of the inverter of this plane." - }, - "load_import_file_path": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "format": "path" - }, - { - "type": "null" - } - ], - "title": "Load Import File Path", - "description": "Path to the file to import load data from." - }, - "load_import_json": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Load Import Json", - "description": "JSON string, dictionary of load forecast value lists." - }, - "loadakkudoktor_year_energy": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Loadakkudoktor Year Energy", - "description": "Yearly energy consumption (kWh)." - }, - "load_provider": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Load Provider", - "description": "Load provider id of provider to be used." - }, - "load_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Load Name", - "description": "Name of the load source." - }, - "elecpriceimport_file_path": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "format": "path" - }, - { - "type": "null" - } - ], - "title": "Elecpriceimport File Path", - "description": "Path to the file to import elecprice data from." - }, - "elecpriceimport_json": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Elecpriceimport Json", - "description": "JSON string, dictionary of electricity price forecast value lists." - }, - "elecprice_provider": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Elecprice Provider", - "description": "Electricity price provider id of provider to be used." - }, - "elecprice_charges_kwh": { - "anyOf": [ - { - "type": "number", - "minimum": 0.0 - }, - { - "type": "null" - } - ], - "title": "Elecprice Charges Kwh", - "description": "Electricity price charges (\u20ac/kWh)." - }, - "prediction_hours": { - "anyOf": [ - { - "type": "integer", - "minimum": 0.0 - }, - { - "type": "null" - } - ], - "title": "Prediction Hours", - "description": "Number of hours into the future for predictions", - "default": 48 - }, - "prediction_historic_hours": { - "anyOf": [ - { - "type": "integer", - "minimum": 0.0 - }, - { - "type": "null" - } - ], - "title": "Prediction Historic Hours", - "description": "Number of hours into the past for historical predictions data", - "default": 48 - }, - "latitude": { - "anyOf": [ - { - "type": "number", - "maximum": 90.0, - "minimum": -90.0 - }, - { - "type": "null" - } - ], - "title": "Latitude", - "description": "Latitude in decimal degrees, between -90 and 90, north is positive (ISO 19115) (\u00b0)" - }, - "longitude": { - "anyOf": [ - { - "type": "number", - "maximum": 180.0, - "minimum": -180.0 - }, - { - "type": "null" - } - ], - "title": "Longitude", - "description": "Longitude in decimal degrees, within -180 to 180 (\u00b0)" - }, - "optimization_hours": { - "anyOf": [ - { - "type": "integer", - "minimum": 0.0 - }, - { - "type": "null" - } - ], - "title": "Optimization Hours", - "description": "Number of hours into the future for optimizations.", - "default": 24 - }, - "optimization_penalty": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Optimization Penalty", - "description": "Penalty factor used in optimization.", - "default": 10 - }, - "optimization_ev_available_charge_rates_percent": { - "anyOf": [ - { - "items": { - "type": "number" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Optimization Ev Available Charge Rates Percent", - "description": "Charge rates available for the EV in percent of maximum charge.", - "default": [ - 0.0, - 0.375, - 0.5, - 0.625, - 0.75, - 0.875, - 1.0 - ] - }, - "measurement_load0_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Measurement Load0 Name", - "description": "Name of the load0 source (e.g. 'Household', 'Heat Pump')" - }, - "measurement_load1_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Measurement Load1 Name", - "description": "Name of the load1 source (e.g. 'Household', 'Heat Pump')" - }, - "measurement_load2_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Measurement Load2 Name", - "description": "Name of the load2 source (e.g. 'Household', 'Heat Pump')" - }, - "measurement_load3_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Measurement Load3 Name", - "description": "Name of the load3 source (e.g. 'Household', 'Heat Pump')" - }, - "measurement_load4_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Measurement Load4 Name", - "description": "Name of the load4 source (e.g. 'Household', 'Heat Pump')" - }, - "battery_provider": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Battery Provider", - "description": "Id of Battery simulation provider." - }, - "battery_capacity": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Battery Capacity", - "description": "Battery capacity [Wh]." - }, - "battery_initial_soc": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Battery Initial Soc", - "description": "Battery initial state of charge [%]." - }, - "battery_soc_min": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Battery Soc Min", - "description": "Battery minimum state of charge [%]." - }, - "battery_soc_max": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Battery Soc Max", - "description": "Battery maximum state of charge [%]." - }, - "battery_charging_efficiency": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Battery Charging Efficiency", - "description": "Battery charging efficiency [%]." - }, - "battery_discharging_efficiency": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Battery Discharging Efficiency", - "description": "Battery discharging efficiency [%]." - }, - "battery_max_charging_power": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Battery Max Charging Power", - "description": "Battery maximum charge power [W]." - }, - "bev_provider": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Bev Provider", - "description": "Id of Battery Electric Vehicle simulation provider." - }, - "bev_capacity": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Bev Capacity", - "description": "Battery Electric Vehicle capacity [Wh]." - }, - "bev_initial_soc": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Bev Initial Soc", - "description": "Battery Electric Vehicle initial state of charge [%]." - }, - "bev_soc_max": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Bev Soc Max", - "description": "Battery Electric Vehicle maximum state of charge [%]." - }, - "bev_charging_efficiency": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Bev Charging Efficiency", - "description": "Battery Electric Vehicle charging efficiency [%]." - }, - "bev_discharging_efficiency": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Bev Discharging Efficiency", - "description": "Battery Electric Vehicle discharging efficiency [%]." - }, - "bev_max_charging_power": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Bev Max Charging Power", - "description": "Battery Electric Vehicle maximum charge power [W]." - }, - "dishwasher_provider": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Dishwasher Provider", - "description": "Id of Dish Washer simulation provider." - }, - "dishwasher_consumption": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Dishwasher Consumption", - "description": "Dish Washer energy consumption [Wh]." - }, - "dishwasher_duration": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Dishwasher Duration", - "description": "Dish Washer usage duration [h]." - }, - "inverter_provider": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Inverter Provider", - "description": "Id of PV Inverter simulation provider." - }, - "inverter_power_max": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Inverter Power Max", - "description": "Inverter maximum power [W]." - }, - "data_folder_path": { - "anyOf": [ - { - "type": "string", - "format": "path" - }, - { - "type": "null" - } - ], - "title": "Data Folder Path", - "description": "Path to EOS data directory." - }, - "data_output_subpath": { - "anyOf": [ - { - "type": "string", - "format": "path" - }, - { - "type": "null" - } - ], - "title": "Data Output Subpath", - "description": "Sub-path for the EOS output data directory.", - "default": "output" - }, - "data_cache_subpath": { - "anyOf": [ - { - "type": "string", - "format": "path" - }, - { - "type": "null" - } - ], - "title": "Data Cache Subpath", - "description": "Sub-path for the EOS cache data directory.", - "default": "cache" - } - }, - "type": "object", - "title": "SettingsEOS", - "description": "Settings for all EOS." - }, - "SimulationResult": { - "properties": { - "Last_Wh_pro_Stunde": { - "items": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ] - }, - "type": "array", - "title": "Last Wh Pro Stunde", - "description": "TBD" - }, - "EAuto_SoC_pro_Stunde": { - "items": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ] - }, - "type": "array", - "title": "Eauto Soc Pro Stunde", - "description": "The state of charge of the EV for each hour." - }, - "Einnahmen_Euro_pro_Stunde": { - "items": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ] - }, - "type": "array", - "title": "Einnahmen Euro Pro Stunde", - "description": "The revenue from grid feed-in or other sources in euros per hour." - }, - "Gesamt_Verluste": { - "type": "number", - "title": "Gesamt Verluste", - "description": "The total losses in watt-hours over the entire period." - }, - "Gesamtbilanz_Euro": { - "type": "number", - "title": "Gesamtbilanz Euro", - "description": "The total balance of revenues minus costs in euros." - }, - "Gesamteinnahmen_Euro": { - "type": "number", - "title": "Gesamteinnahmen Euro", - "description": "The total revenues in euros." - }, - "Gesamtkosten_Euro": { - "type": "number", - "title": "Gesamtkosten Euro", - "description": "The total costs in euros." - }, - "Home_appliance_wh_per_hour": { - "items": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ] - }, - "type": "array", - "title": "Home Appliance Wh Per Hour", - "description": "The energy consumption of a household appliance in watt-hours per hour." - }, - "Kosten_Euro_pro_Stunde": { - "items": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ] - }, - "type": "array", - "title": "Kosten Euro Pro Stunde", - "description": "The costs in euros per hour." - }, - "Netzbezug_Wh_pro_Stunde": { - "items": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ] - }, - "type": "array", - "title": "Netzbezug Wh Pro Stunde", - "description": "The grid energy drawn in watt-hours per hour." - }, - "Netzeinspeisung_Wh_pro_Stunde": { - "items": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ] - }, - "type": "array", - "title": "Netzeinspeisung Wh Pro Stunde", - "description": "The energy fed into the grid in watt-hours per hour." - }, - "Verluste_Pro_Stunde": { - "items": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ] - }, - "type": "array", - "title": "Verluste Pro Stunde", - "description": "The losses in watt-hours per hour." - }, - "akku_soc_pro_stunde": { - "items": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ] - }, - "type": "array", - "title": "Akku Soc Pro Stunde", - "description": "The state of charge of the battery (not the EV) in percentage per hour." - }, - "Electricity_price": { - "items": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ] - }, - "type": "array", - "title": "Electricity Price", - "description": "Used Electricity Price, including predictions" - } - }, - "type": "object", - "required": [ - "Last_Wh_pro_Stunde", - "EAuto_SoC_pro_Stunde", - "Einnahmen_Euro_pro_Stunde", - "Gesamt_Verluste", - "Gesamtbilanz_Euro", - "Gesamteinnahmen_Euro", - "Gesamtkosten_Euro", - "Home_appliance_wh_per_hour", - "Kosten_Euro_pro_Stunde", - "Netzbezug_Wh_pro_Stunde", - "Netzeinspeisung_Wh_pro_Stunde", - "Verluste_Pro_Stunde", - "akku_soc_pro_stunde", - "Electricity_price" - ], - "title": "SimulationResult", - "description": "This object contains the results of the simulation and provides insights into various parameters over the entire forecast period." - }, - "SolarPanelBatteryParameters": { - "properties": { - "capacity_wh": { - "type": "integer", - "exclusiveMinimum": 0.0, - "title": "Capacity Wh", - "description": "An integer representing the capacity of the battery in watt-hours." - }, - "charging_efficiency": { - "type": "number", - "maximum": 1.0, - "exclusiveMinimum": 0.0, - "title": "Charging Efficiency", - "description": "A float representing the charging efficiency of the battery.", - "default": 0.88 - }, - "discharging_efficiency": { - "type": "number", - "maximum": 1.0, - "exclusiveMinimum": 0.0, - "title": "Discharging Efficiency", - "description": "A float representing the discharge efficiency of the battery.", - "default": 0.88 - }, - "max_charge_power_w": { - "anyOf": [ - { - "type": "number", - "exclusiveMinimum": 0.0 - }, - { - "type": "null" - } - ], - "title": "Max Charge Power W", - "description": "Maximum charging power in watts.", - "default": 5000 - }, - "initial_soc_percentage": { - "type": "integer", - "maximum": 100.0, - "minimum": 0.0, - "title": "Initial Soc Percentage", - "description": "An integer representing the state of charge of the battery at the **start** of the current hour (not the current state).", - "default": 0 - }, - "min_soc_percentage": { - "type": "integer", - "maximum": 100.0, - "minimum": 0.0, - "title": "Min Soc Percentage", - "description": "An integer representing the minimum state of charge (SOC) of the battery in percentage.", - "default": 0 - }, - "max_soc_percentage": { - "type": "integer", - "maximum": 100.0, - "minimum": 0.0, - "title": "Max Soc Percentage", - "description": "An integer representing the maximum state of charge (SOC) of the battery in percentage.", - "default": 100 - } - }, - "type": "object", - "required": [ - "capacity_wh" - ], - "title": "SolarPanelBatteryParameters" - }, - "ValidationError": { - "properties": { - "loc": { - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - } - ] - }, - "type": "array", - "title": "Location" - }, - "msg": { - "type": "string", - "title": "Message" - }, - "type": { - "type": "string", - "title": "Error Type" - } - }, - "type": "object", - "required": [ - "loc", - "msg", - "type" - ], - "title": "ValidationError" - } - } - } -} \ No newline at end of file diff --git a/docs/akkudoktoreos/prediction.md b/docs/akkudoktoreos/prediction.md new file mode 100644 index 00000000..53c18898 --- /dev/null +++ b/docs/akkudoktoreos/prediction.md @@ -0,0 +1,401 @@ +% SPDX-License-Identifier: Apache-2.0 + +# Predictions + +Predictions, along with simulations and measurements, form the foundation upon which energy +optimization is executed. In EOS, a standard set of predictions is managed, including: + +- **Household Load Prediction** +- **Electricity Price Prediction** +- **PV Power Prediction** +- **Weather Prediction** + +## Storing Predictions + +EOS stores predictions in a **key-value store**, where the term `prediction key` refers to the +unique key used to retrieve specific prediction data. The key-value store is in memory. Stored +data is lost on re-start of the EOS REST server. + +## Prediction Providers + +Most predictions can be sourced from various providers. The specific provider to use is configured +in the EOS configuration. For example: + +```plaintext +weather_provider = "ClearOutside" +``` + +Some providers offer multiple prediction keys. For instance, a weather provider might provide data +to prediction keys like: + +- `weather_temp_air` (air temperature) +- `weather_wind_speed` (wind speed) + +### Prediction Import Providers + +The prediction import providers are designed to import prediction data from a file or a JSON +string. An external entity should update the file or JSON string whenever new prediction data +becomes available. + +The prediction data must be provided in one of the following formats: + +#### 1. DateTimeData + +A dictionary with the following structure: + +```JSON + { + "start_datetime": "2024-01-01 00:00:00", + "interval": "1 Hour", + "": [value, value, ...], + "": [value, value, ...], + ... + } +``` + +#### 2. DateTimeDataFrame + +A JSON string created from a [pandas](https://pandas.pydata.org/docs/index.html) dataframe with a +`DatetimeIndex`. Use [pandas.DataFrame.to_json(orient="index")](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.to_json.html#pandas.DataFrame.to_json). +The column name of the data must be the same as the names of the `prediction key`s. + +#### 3. DateTimeSeries + +A JSON string created from a [pandas](https://pandas.pydata.org/docs/index.html) series with a +`DatetimeIndex`. Use [pandas.Series.to_json(orient="index")](https://pandas.pydata.org/docs/reference/api/pandas.Series.to_json.html#pandas.Series.to_json). + +## Adjusted Predictions + +Certain prediction keys include an `_adjusted` suffix, such as `load_total_adjusted`. These +predictions are adjusted by real data from your system's measurements if given to enhance accuracy. + +For example, the load prediction provider `LoadAkkudoktor` takes generic load data assembled by +Akkudoktor.net, maps that to the yearly energy consumption given in the configuration option +`loadakkudoktor_year_energy`, and finally adjusts the predicted load by the `measurement_loads` +of your system. + +## Prediction Updates + +Predictions are updated at the start of each energy management run, i.e., when EOS performs +optimization. Key considerations for updates include: + +- Predictions sourced from online providers are usually rate-limited to one retrieval per hour. +- Only predictions with a configured provider are updated. +- Some providers may not support all generic prediction keys, leading to potential gaps + in updated predictions even after update. + +## Accessing Predictions + +Prediction data can be accessed using the EOS **REST API** via the `/v1/prediction/<...>` endpoints. + +In a standard configuration, the [**REST API**](http://0.0.0.0:8503/docs) of a running EOS instance +is available at [http://0.0.0.0:8503/docs](http://0.0.0.0:8503/docs). This link provides access to +the API documentation and allows you to explore available endpoints interactively. + +To view all available prediction keys, use the **GET** `/v1/prediction/keys` endpoint. + +If no keys are displayed, or if the ones you need are missing, it indicates that your configuration +lacks the necessary prediction provider settings. You can configure prediction providers by using +the **PUT** `/v1/config` endpoint. You may save your configuration to the EOS configuration file. + +## Electricity Price Prediction + +Prediction keys: + +- `elecprice_marketprice_wh`: Electricity market price per Wh (€/Wh). +- `elecprice_marketprice_kwh`: Electricity market price per kWh (€/kWh). + +Configuration options: + +- `elecprice_provider`: Electricity price provider id of provider to be used. + + - `ElecPriceAkkudoktor`: Retrieves from Akkudoktor.net. + - `ElecPriceImport`: Imports from a file or JSON string. + +- `elecprice_charges_kwh`: Electricity price charges (€/kWh). +- `elecpriceimport_file_path`: Path to the file to import electricity price forecast data from. +- `elecpriceimport_json`: JSON string, dictionary of electricity price forecast value lists. + +### ElecPriceAkkudoktor Provider + +The `ElecPriceAkkudoktor` provider retrieves electricity prices directly from **Akkudoktor.net**, +which supplies price data for the next 24 hours. For periods beyond 24 hours, the provider generates +prices by extrapolating historical price data combined with the most recent actual prices obtained +from Akkudoktor.net. Electricity price charges given in the `elecprice_charges_kwh` configuration +option are added. + +### ElecPriceImport Provider + +The `ElecPriceImport` provider is designed to import electricity prices from a file or a JSON +string. An external entity should update the file or JSON string whenever new prediction data +becomes available. + +The prediction key for the electricity price forecast data is: + +- `elecprice_marketprice_wh`: Electricity market price per Wh (€/Wh). + +The electricity proce forecast data must be provided in one of the formats described in +. The data source must be given in the +`elecpriceimport_file_path` or `elecpriceimport_json` configuration option. + +## Load Prediction + +Prediction keys: + +- `load_mean`: Predicted load mean value (W). +- `load_std`: Predicted load standard deviation (W). +- `load_mean_adjusted`: Predicted load mean value adjusted by load measurement (W). + +Configuration options: + +- `load_provider`: Load provider id of provider to be used. + + - `LoadAkkudoktor`: Retrieves from local database. + - `LoadImport`: Imports from a file or JSON string. + +- `loadakkudoktor_year_energy`: Yearly energy consumption (kWh). +- `loadimport_file_path`: Path to the file to import load forecast data from. +- `loadimport_json`: JSON string, dictionary of load forecast value lists. + +### LoadAkkudoktor Provider + +The `LoadAkkudoktor` provider retrieves generic load data from a local database and tailors it to +align with the annual energy consumption specified in the `loadakkudoktor_year_energy` configuration +option. + +### LoadImport Provider + +The `LoadImport` provider is designed to import load forecast data from a file or a JSON +string. An external entity should update the file or JSON string whenever new prediction data +becomes available. + +The prediction keys for the load forecast data are: + +- `load_mean`: Predicted load mean value (W). +- `load_std`: Predicted load standard deviation (W). +- `load_mean_adjusted`: Predicted load mean value adjusted by load measurement (W). + +The load forecast data must be provided in one of the formats described in +. The data source must be given in the `loadimport_file_path` +or `loadimport_json` configuration option. + +## PV Power Prediction + +Prediction keys: + +- `pvforecast_ac_power`: Total DC power (W). +- `pvforecast_dc_power`: Total AC power (W). + +Configuration options: + +- `pvforecast_provider`: PVForecast provider id of provider to be used. + + - `PVForecastAkkudoktor`: Retrieves from Akkudoktor.net. + - `PVForecastImport`: Imports from a file or JSON string. + +- `latitude`: Latitude in decimal degrees, between -90 and 90, north is positive (ISO 19115) (°)" +- `longitude`: Longitude in decimal degrees, within -180 to 180 (°) +- `pvforecast<0..5>_surface_tilt`: Tilt angle from horizontal plane. Ignored for two-axis tracking. +- `pvforecast<0..5>_surface_azimuth`: Orientation (azimuth angle) of the (fixed) plane. Clockwise from north (north=0, east=90, south=180, west=270). +- `pvforecast<0..5>_userhorizon`: Elevation of horizon in degrees, at equally spaced azimuth clockwise from north. +- `pvforecast<0..5>_peakpower`: Nominal power of PV system in kW. +- `pvforecast<0..5>_pvtechchoice`: PV technology. One of 'crystSi', 'CIS', 'CdTe', 'Unknown'. +- `pvforecast<0..5>_mountingplace`: Type of mounting for PV system. Options are 'free' for free-standing and 'building' for building-integrated. +- `pvforecast<0..5>_loss`: Sum of PV system losses in percent +- `pvforecast<0..5>_trackingtype`: Type of suntracking. 0=fixed, 1=single horizontal axis aligned north-south, 2=two-axis tracking, 3=vertical axis tracking, 4=single horizontal axis aligned east-west, 5=single inclined axis aligned north-south. +- `pvforecast<0..5>_optimal_surface_tilt`: Calculate the optimum tilt angle. Ignored for two-axis tracking. +- `pvforecast<0..5>_optimalangles`: Calculate the optimum tilt and azimuth angles. Ignored for two-axis tracking. +- `pvforecast<0..5>_albedo`: Proportion of the light hitting the ground that it reflects back. +- `pvforecast<0..5>_module_model`: Model of the PV modules of this plane. +- `pvforecast<0..5>_inverter_model`: Model of the inverter of this plane. +- `pvforecast<0..5>_inverter_paco`: AC power rating of the inverter. [W] +- `pvforecast<0..5>_modules_per_string`: Number of the PV modules of the strings of this plane. +- `pvforecast<0..5>_strings_per_inverter`: Number of the strings of the inverter of this plane. +- `pvforecastimport_file_path`: Path to the file to import PV forecast data from. +- `pvforecastimport_json`: JSON string, dictionary of PV forecast value lists. + +### PVForecastAkkudoktor Provider + +The `PVForecastAkkudoktor` provider retrieves the PV power forecast data directly from +**Akkudoktor.net**. + +The following general configuration options of the PV system must be set: + +- `latitude`: Latitude in decimal degrees, between -90 and 90, north is positive (ISO 19115) (°)" +- `longitude`: Longitude in decimal degrees, within -180 to 180 (°) + +For each plane `<0..5>` of the PV system the following configuration options must be set: + +- `pvforecast<0..5>_surface_tilt`: Tilt angle from horizontal plane. Ignored for two-axis tracking. +- `pvforecast<0..5>_surface_azimuth`: Orientation (azimuth angle) of the (fixed) plane. Clockwise from north (north=0, east=90, south=180, west=270). +- `pvforecast<0..5>_userhorizon`: Elevation of horizon in degrees, at equally spaced azimuth clockwise from north. +- `pvforecast<0..5>_inverter_paco`: AC power rating of the inverter. [W] +- `pvforecast<0..5>_peakpower`: Nominal power of PV system in kW. + +Example: + +```Python +{ + "latitude": 50.1234, + "longitude": 9.7654, + "pvforecast_provider": "PVForecastAkkudoktor", + "pvforecast0_peakpower": 5.0, + "pvforecast0_surface_azimuth": -10, + "pvforecast0_surface_tilt": 7, + "pvforecast0_userhorizon": [20, 27, 22, 20], + "pvforecast0_inverter_paco": 10000, + "pvforecast1_peakpower": 4.8, + "pvforecast1_surface_azimuth": -90, + "pvforecast1_surface_tilt": 7, + "pvforecast1_userhorizon": [30, 30, 30, 50], + "pvforecast1_inverter_paco": 10000, + "pvforecast2_peakpower": 1.4, + "pvforecast2_surface_azimuth": -40, + "pvforecast2_surface_tilt": 60, + "pvforecast2_userhorizon": [60, 30, 0, 30], + "pvforecast2_inverter_paco": 2000, + "pvforecast3_peakpower": 1.6, + "pvforecast3_surface_azimuth": 5, + "pvforecast3_surface_tilt": 45, + "pvforecast3_userhorizon": [45, 25, 30, 60], + "pvforecast3_inverter_paco": 1400, + "pvforecast4_peakpower": None, +} +``` + +### PVForecastImport Provider + +The `PVForecastImport` provider is designed to import PV forecast data from a file or a JSON +string. An external entity should update the file or JSON string whenever new prediction data +becomes available. + +The prediction keys for the PV forecast data are: + +- `pvforecast_ac_power`: Total DC power (W). +- `pvforecast_dc_power`: Total AC power (W). + +The PV forecast data must be provided in one of the formats described in +. The data source must be given in the +`pvforecastimport_file_path` or `pvforecastimport_json` configuration option. + +## Weather Prediction + +Prediction keys: + +- `weather_dew_point`: Dew Point (°C) +- `weather_dhi`: Diffuse Horizontal Irradiance (W/m2) +- `weather_dni`: Direct Normal Irradiance (W/m2) +- `weather_feels_like`: Feels Like (°C) +- `weather_fog`: Fog (%) +- `weather_frost_chance`: Chance of Frost +- `weather_ghi`: Global Horizontal Irradiance (W/m2) +- `weather_high_clouds`: High Clouds (% Sky Obscured) +- `weather_low_clouds`: Low Clouds (% Sky Obscured) +- `weather_medium_clouds`: Medium Clouds (% Sky Obscured) +- `weather_ozone`: Ozone (du) +- `weather_precip_amt`: Precipitation Amount (mm) +- `weather_precip_prob`: Precipitation Probability (%) +- `weather_preciptable_water`: Precipitable Water (cm) +- `weather_precip_type`: Precipitation Type +- `weather_pressure`: Pressure (mb) +- `weather_relative_humidity`: Relative Humidity (%) +- `weather_temp_air`: Temperature (°C) +- `weather_total_clouds`: Total Clouds (% Sky Obscured) +- `weather_visibility`: Visibility (m) +- `weather_wind_direction`: "Wind Direction (°) +- `weather_wind_speed`: Wind Speed (kmph) + +Configuration options: + +- `weather_provider`: Load provider id of provider to be used. + + - `BrightSky`: Retrieves from https://api.brightsky.dev. + - `ClearOutside`: Retrieves from https://clearoutside.com/forecast. + - `LoadImport`: Imports from a file or JSON string. + +- `weatherimport_file_path`: Path to the file to import weatherforecast data from. +- `weatherimport_json`: JSON string, dictionary of weather forecast value lists. + +### BrightSky Provider + +The `BrightSky` provider retrieves the PV power forecast data directly from +[**BrightSky**](https://api.brightsky.dev). + +The provider provides forecast data for the following prediction keys: + +- `weather_dew_point`: Dew Point (°C) +- `weather_ghi`: Global Horizontal Irradiance (W/m2) +- `weather_precip_amt`: Precipitation Amount (mm) +- `weather_precip_prob`: Precipitation Probability (%) +- `weather_pressure`: Pressure (mb) +- `weather_relative_humidity`: Relative Humidity (%) +- `weather_temp_air`: Temperature (°C) +- `weather_total_clouds`: Total Clouds (% Sky Obscured) +- `weather_visibility`: Visibility (m) +- `weather_wind_direction`: "Wind Direction (°) +- `weather_wind_speed`: Wind Speed (kmph) + +### ClearOutside Provider + +The `ClearOutside` provider retrieves the PV power forecast data directly from +[**ClearOutside**](https://clearoutside.com/forecast). + +The provider provides forecast data for the following prediction keys: + +- `weather_dew_point`: Dew Point (°C) +- `weather_dhi`: Diffuse Horizontal Irradiance (W/m2) +- `weather_dni`: Direct Normal Irradiance (W/m2) +- `weather_feels_like`: Feels Like (°C) +- `weather_fog`: Fog (%) +- `weather_frost_chance`: Chance of Frost +- `weather_ghi`: Global Horizontal Irradiance (W/m2) +- `weather_high_clouds`: High Clouds (% Sky Obscured) +- `weather_low_clouds`: Low Clouds (% Sky Obscured) +- `weather_medium_clouds`: Medium Clouds (% Sky Obscured) +- `weather_ozone`: Ozone (du) +- `weather_precip_amt`: Precipitation Amount (mm) +- `weather_precip_prob`: Precipitation Probability (%) +- `weather_preciptable_water`: Precipitable Water (cm) +- `weather_precip_type`: Precipitation Type +- `weather_pressure`: Pressure (mb) +- `weather_relative_humidity`: Relative Humidity (%) +- `weather_temp_air`: Temperature (°C) +- `weather_total_clouds`: Total Clouds (% Sky Obscured) +- `weather_visibility`: Visibility (m) +- `weather_wind_direction`: "Wind Direction (°) +- `weather_wind_speed`: Wind Speed (kmph) + +### WeatherImport Provider + +The `WeatherImport` provider is designed to import weather forecast data from a file or a JSON +string. An external entity should update the file or JSON string whenever new prediction data +becomes available. + +The prediction keys for the PV forecast data are: + +- `weather_dew_point`: Dew Point (°C) +- `weather_dhi`: Diffuse Horizontal Irradiance (W/m2) +- `weather_dni`: Direct Normal Irradiance (W/m2) +- `weather_feels_like`: Feels Like (°C) +- `weather_fog`: Fog (%) +- `weather_frost_chance`: Chance of Frost +- `weather_ghi`: Global Horizontal Irradiance (W/m2) +- `weather_high_clouds`: High Clouds (% Sky Obscured) +- `weather_low_clouds`: Low Clouds (% Sky Obscured) +- `weather_medium_clouds`: Medium Clouds (% Sky Obscured) +- `weather_ozone`: Ozone (du) +- `weather_precip_amt`: Precipitation Amount (mm) +- `weather_precip_prob`: Precipitation Probability (%) +- `weather_preciptable_water`: Precipitable Water (cm) +- `weather_precip_type`: Precipitation Type +- `weather_pressure`: Pressure (mb) +- `weather_relative_humidity`: Relative Humidity (%) +- `weather_temp_air`: Temperature (°C) +- `weather_total_clouds`: Total Clouds (% Sky Obscured) +- `weather_visibility`: Visibility (m) +- `weather_wind_direction`: "Wind Direction (°) +- `weather_wind_speed`: Wind Speed (kmph) + +The PV forecast data must be provided in one of the formats described in +. The data source must be given in the +`weatherimport_file_path` or `pvforecastimport_json` configuration option. diff --git a/docs/akkudoktoreos/serverapi.md b/docs/akkudoktoreos/serverapi.md new file mode 100644 index 00000000..39011eb4 --- /dev/null +++ b/docs/akkudoktoreos/serverapi.md @@ -0,0 +1,7 @@ +% SPDX-License-Identifier: Apache-2.0 + +# Server API + +```{eval-sh} +./scripts/generate_openapi_md.py | ./scripts/extract_markdown.py --input-stdin --start-line "**Version**:" +``` diff --git a/docs/akkudoktoreos/serverapi.rst b/docs/akkudoktoreos/serverapi.rst deleted file mode 100644 index 58516440..00000000 --- a/docs/akkudoktoreos/serverapi.rst +++ /dev/null @@ -1,17 +0,0 @@ -.. - SPDX-License-Identifier: Apache-2.0 - File has to be of RST format to make openapi directive work correctly - -.. _akkudoktoreos_server_api: - -Server API -########## - -For a more detailed documentation see the Swagger interface: `EOS OpenAPI Spec `_ - -.. openapi:: openapi.json - :examples: - -.. - Due to bugs in sphinxcontrib-openapi referenced request/response objects fail to render and anyOf is broken too. - :request: diff --git a/docs/conf.py b/docs/conf.py index 52178553..3551deae 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -23,8 +23,8 @@ "sphinx.ext.autosummary", "sphinx.ext.napoleon", "sphinx_rtd_theme", - # "sphinxcontrib.openapi", buggy "myst_parser", + "sphinxcontrib.eval", ] templates_path = ["_templates"] @@ -80,7 +80,7 @@ }, } myst_number_code_blocks = ["typescript"] -myst_heading_anchors = 2 +myst_heading_anchors = 3 myst_footnote_transition = True myst_dmath_double_inline = True myst_enable_checkboxes = True @@ -117,9 +117,6 @@ # -- Options for autosummary ------------------------------------------------- autosummary_generate = True -# -- Options for openapi ----------------------------------------------------- -# openapi_default_renderer = "httpdomain:old" buggy - # -- Options for napoleon ------------------------------------------------- napoleon_google_docstring = True napoleon_numpy_docstring = False diff --git a/docs/develop/CONTRIBUTING.md b/docs/develop/CONTRIBUTING.md new file mode 100644 index 00000000..3c75cc3b --- /dev/null +++ b/docs/develop/CONTRIBUTING.md @@ -0,0 +1,3 @@ +```{eval-sh} +./scripts/extract_markdown.py --input-file CONTRIBUTING.md +``` diff --git a/docs/develop/getting_started.md b/docs/develop/getting_started.md new file mode 100644 index 00000000..6e55472d --- /dev/null +++ b/docs/develop/getting_started.md @@ -0,0 +1,5 @@ +# Getting Started + +```{eval-sh} +./scripts/extract_markdown.py --input-file README.md --start-line "## Getting Involved" +``` diff --git a/docs/index.md b/docs/index.md index fa36f4dc..1672d71e 100644 --- a/docs/index.md +++ b/docs/index.md @@ -14,7 +14,9 @@ welcome.md akkudoktoreos/about.md develop/getting_started.md develop/CONTRIBUTING.md -akkudoktoreos/serverapi.rst +akkudoktoreos/prediction.md +akkudoktoreos/measurement.md +akkudoktoreos/serverapi.md akkudoktoreos/api.rst ``` diff --git a/openapi.json b/openapi.json new file mode 100644 index 00000000..99e15da3 --- /dev/null +++ b/openapi.json @@ -0,0 +1,5887 @@ +{ + "components": { + "schemas": { + "ConfigEOS": { + "description": "Singleton configuration handler for the EOS application.\n\nConfigEOS extends `SettingsEOS` with support for default configuration paths and automatic\ninitialization.\n\n`ConfigEOS` ensures that only one instance of the class is created throughout the application,\nallowing consistent access to EOS configuration settings. This singleton instance loads\nconfiguration data from a predefined set of directories or creates a default configuration if\nnone is found.\n\nInitialization Process:\n - Upon instantiation, the singleton instance attempts to load a configuration file in this order:\n 1. The directory specified by the `EOS_CONFIG_DIR` environment variable\n 2. The directory specified by the `EOS_DIR` environment variable.\n 3. A platform specific default directory for EOS.\n 4. The current working directory.\n - The first available configuration file found in these directories is loaded.\n - If no configuration file is found, a default configuration file is created in the platform\n specific default directory, and default settings are loaded into it.\n\nAttributes from the loaded configuration are accessible directly as instance attributes of\n`ConfigEOS`, providing a centralized, shared configuration object for EOS.\n\nSingleton Behavior:\n - This class uses the `SingletonMixin` to ensure that all requests for `ConfigEOS` return\n the same instance, which contains the most up-to-date configuration. Modifying the configuration\n in one part of the application reflects across all references to this class.\n\nAttributes:\n _settings (ClassVar[SettingsEOS]): Holds application-wide settings.\n _file_settings (ClassVar[SettingsEOS]): Stores configuration loaded from file.\n config_folder_path (Optional[Path]): Path to the configuration directory.\n config_file_path (Optional[Path]): Path to the configuration file.\n\nRaises:\n FileNotFoundError: If no configuration file is found, and creating a default configuration fails.\n\nExample:\n To initialize and access configuration attributes (only one instance is created):\n ```python\n config_eos = ConfigEOS() # Always returns the same instance\n print(config_eos.prediction_hours) # Access a setting from the loaded configuration\n ```", + "properties": { + "battery_capacity": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Battery capacity [Wh].", + "title": "Battery Capacity" + }, + "battery_charging_efficiency": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Battery charging efficiency [%].", + "title": "Battery Charging Efficiency" + }, + "battery_discharging_efficiency": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Battery discharging efficiency [%].", + "title": "Battery Discharging Efficiency" + }, + "battery_initial_soc": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Battery initial state of charge [%].", + "title": "Battery Initial Soc" + }, + "battery_max_charging_power": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Battery maximum charge power [W].", + "title": "Battery Max Charging Power" + }, + "battery_provider": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Id of Battery simulation provider.", + "title": "Battery Provider" + }, + "battery_soc_max": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Battery maximum state of charge [%].", + "title": "Battery Soc Max" + }, + "battery_soc_min": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Battery minimum state of charge [%].", + "title": "Battery Soc Min" + }, + "bev_capacity": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Battery Electric Vehicle capacity [Wh].", + "title": "Bev Capacity" + }, + "bev_charging_efficiency": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Battery Electric Vehicle charging efficiency [%].", + "title": "Bev Charging Efficiency" + }, + "bev_discharging_efficiency": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Battery Electric Vehicle discharging efficiency [%].", + "title": "Bev Discharging Efficiency" + }, + "bev_initial_soc": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Battery Electric Vehicle initial state of charge [%].", + "title": "Bev Initial Soc" + }, + "bev_max_charging_power": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Battery Electric Vehicle maximum charge power [W].", + "title": "Bev Max Charging Power" + }, + "bev_provider": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Id of Battery Electric Vehicle simulation provider.", + "title": "Bev Provider" + }, + "bev_soc_max": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Battery Electric Vehicle maximum state of charge [%].", + "title": "Bev Soc Max" + }, + "config_default_file_path": { + "description": "Compute the default config file path.", + "format": "path", + "readOnly": true, + "title": "Config Default File Path", + "type": "string" + }, + "config_file_path": { + "anyOf": [ + { + "format": "path", + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Path to EOS configuration file.", + "readOnly": true, + "title": "Config File Path" + }, + "config_folder_path": { + "anyOf": [ + { + "format": "path", + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Path to EOS configuration directory.", + "readOnly": true, + "title": "Config Folder Path" + }, + "config_keys": { + "description": "Returns the keys of all fields in the configuration.", + "items": { + "type": "string" + }, + "readOnly": true, + "title": "Config Keys", + "type": "array" + }, + "data_cache_path": { + "anyOf": [ + { + "format": "path", + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Compute data_cache_path based on data_folder_path.", + "readOnly": true, + "title": "Data Cache Path" + }, + "data_cache_subpath": { + "anyOf": [ + { + "format": "path", + "type": "string" + }, + { + "type": "null" + } + ], + "default": "cache", + "description": "Sub-path for the EOS cache data directory.", + "title": "Data Cache Subpath" + }, + "data_folder_path": { + "anyOf": [ + { + "format": "path", + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Path to EOS data directory.", + "title": "Data Folder Path" + }, + "data_output_path": { + "anyOf": [ + { + "format": "path", + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Compute data_output_path based on data_folder_path.", + "readOnly": true, + "title": "Data Output Path" + }, + "data_output_subpath": { + "anyOf": [ + { + "format": "path", + "type": "string" + }, + { + "type": "null" + } + ], + "default": "output", + "description": "Sub-path for the EOS output data directory.", + "title": "Data Output Subpath" + }, + "dishwasher_consumption": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Dish Washer energy consumption [Wh].", + "title": "Dishwasher Consumption" + }, + "dishwasher_duration": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Dish Washer usage duration [h].", + "title": "Dishwasher Duration" + }, + "dishwasher_provider": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Id of Dish Washer simulation provider.", + "title": "Dishwasher Provider" + }, + "elecprice_charges_kwh": { + "anyOf": [ + { + "minimum": 0.0, + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Electricity price charges (\u20ac/kWh).", + "title": "Elecprice Charges Kwh" + }, + "elecprice_provider": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Electricity price provider id of provider to be used.", + "title": "Elecprice Provider" + }, + "elecpriceimport_file_path": { + "anyOf": [ + { + "type": "string" + }, + { + "format": "path", + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Path to the file to import elecprice data from.", + "title": "Elecpriceimport File Path" + }, + "elecpriceimport_json": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "JSON string, dictionary of electricity price forecast value lists.", + "title": "Elecpriceimport Json" + }, + "inverter_power_max": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Inverter maximum power [W].", + "title": "Inverter Power Max" + }, + "inverter_provider": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Id of PV Inverter simulation provider.", + "title": "Inverter Provider" + }, + "latitude": { + "anyOf": [ + { + "maximum": 90.0, + "minimum": -90.0, + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Latitude in decimal degrees, between -90 and 90, north is positive (ISO 19115) (\u00b0)", + "title": "Latitude" + }, + "load_import_file_path": { + "anyOf": [ + { + "type": "string" + }, + { + "format": "path", + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Path to the file to import load data from.", + "title": "Load Import File Path" + }, + "load_import_json": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "JSON string, dictionary of load forecast value lists.", + "title": "Load Import Json" + }, + "load_provider": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Load provider id of provider to be used.", + "title": "Load Provider" + }, + "loadakkudoktor_year_energy": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Yearly energy consumption (kWh).", + "title": "Loadakkudoktor Year Energy" + }, + "longitude": { + "anyOf": [ + { + "maximum": 180.0, + "minimum": -180.0, + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Longitude in decimal degrees, within -180 to 180 (\u00b0)", + "title": "Longitude" + }, + "measurement_load0_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Name of the load0 source (e.g. 'Household', 'Heat Pump')", + "title": "Measurement Load0 Name" + }, + "measurement_load1_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Name of the load1 source (e.g. 'Household', 'Heat Pump')", + "title": "Measurement Load1 Name" + }, + "measurement_load2_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Name of the load2 source (e.g. 'Household', 'Heat Pump')", + "title": "Measurement Load2 Name" + }, + "measurement_load3_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Name of the load3 source (e.g. 'Household', 'Heat Pump')", + "title": "Measurement Load3 Name" + }, + "measurement_load4_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Name of the load4 source (e.g. 'Household', 'Heat Pump')", + "title": "Measurement Load4 Name" + }, + "optimization_ev_available_charge_rates_percent": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": [ + 0.0, + 0.375, + 0.5, + 0.625, + 0.75, + 0.875, + 1.0 + ], + "description": "Charge rates available for the EV in percent of maximum charge.", + "title": "Optimization Ev Available Charge Rates Percent" + }, + "optimization_hours": { + "anyOf": [ + { + "minimum": 0.0, + "type": "integer" + }, + { + "type": "null" + } + ], + "default": 24, + "description": "Number of hours into the future for optimizations.", + "title": "Optimization Hours" + }, + "optimization_penalty": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": 10, + "description": "Penalty factor used in optimization.", + "title": "Optimization Penalty" + }, + "prediction_historic_hours": { + "anyOf": [ + { + "minimum": 0.0, + "type": "integer" + }, + { + "type": "null" + } + ], + "default": 48, + "description": "Number of hours into the past for historical predictions data", + "title": "Prediction Historic Hours" + }, + "prediction_hours": { + "anyOf": [ + { + "minimum": 0.0, + "type": "integer" + }, + { + "type": "null" + } + ], + "default": 48, + "description": "Number of hours into the future for predictions", + "title": "Prediction Hours" + }, + "pvforecast0_albedo": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Proportion of the light hitting the ground that it reflects back.", + "title": "Pvforecast0 Albedo" + }, + "pvforecast0_inverter_model": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Model of the inverter of this plane.", + "title": "Pvforecast0 Inverter Model" + }, + "pvforecast0_inverter_paco": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "AC power rating of the inverter. [W]", + "title": "Pvforecast0 Inverter Paco" + }, + "pvforecast0_loss": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Sum of PV system losses in percent", + "title": "Pvforecast0 Loss" + }, + "pvforecast0_module_model": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Model of the PV modules of this plane.", + "title": "Pvforecast0 Module Model" + }, + "pvforecast0_modules_per_string": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Number of the PV modules of the strings of this plane.", + "title": "Pvforecast0 Modules Per String" + }, + "pvforecast0_mountingplace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": "free", + "description": "Type of mounting for PV system. Options are 'free' for free-standing and 'building' for building-integrated.", + "title": "Pvforecast0 Mountingplace" + }, + "pvforecast0_optimal_surface_tilt": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": false, + "description": "Calculate the optimum tilt angle. Ignored for two-axis tracking.", + "title": "Pvforecast0 Optimal Surface Tilt" + }, + "pvforecast0_optimalangles": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": false, + "description": "Calculate the optimum tilt and azimuth angles. Ignored for two-axis tracking.", + "title": "Pvforecast0 Optimalangles" + }, + "pvforecast0_peakpower": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Nominal power of PV system in kW.", + "title": "Pvforecast0 Peakpower" + }, + "pvforecast0_pvtechchoice": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": "crystSi", + "description": "PV technology. One of 'crystSi', 'CIS', 'CdTe', 'Unknown'.", + "title": "Pvforecast0 Pvtechchoice" + }, + "pvforecast0_strings_per_inverter": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Number of the strings of the inverter of this plane.", + "title": "Pvforecast0 Strings Per Inverter" + }, + "pvforecast0_surface_azimuth": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Orientation (azimuth angle) of the (fixed) plane. Clockwise from north (north=0, east=90, south=180, west=270).", + "title": "Pvforecast0 Surface Azimuth" + }, + "pvforecast0_surface_tilt": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Tilt angle from horizontal plane. Ignored for two-axis tracking.", + "title": "Pvforecast0 Surface Tilt" + }, + "pvforecast0_trackingtype": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Type of suntracking. 0=fixed, 1=single horizontal axis aligned north-south, 2=two-axis tracking, 3=vertical axis tracking, 4=single horizontal axis aligned east-west, 5=single inclined axis aligned north-south.", + "title": "Pvforecast0 Trackingtype" + }, + "pvforecast0_userhorizon": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "description": "Elevation of horizon in degrees, at equally spaced azimuth clockwise from north.", + "title": "Pvforecast0 Userhorizon" + }, + "pvforecast1_albedo": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Proportion of the light hitting the ground that it reflects back.", + "title": "Pvforecast1 Albedo" + }, + "pvforecast1_inverter_model": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Model of the inverter of this plane.", + "title": "Pvforecast1 Inverter Model" + }, + "pvforecast1_inverter_paco": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "AC power rating of the inverter. [W]", + "title": "Pvforecast1 Inverter Paco" + }, + "pvforecast1_loss": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": 0, + "description": "Sum of PV system losses in percent", + "title": "Pvforecast1 Loss" + }, + "pvforecast1_module_model": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Model of the PV modules of this plane.", + "title": "Pvforecast1 Module Model" + }, + "pvforecast1_modules_per_string": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Number of the PV modules of the strings of this plane.", + "title": "Pvforecast1 Modules Per String" + }, + "pvforecast1_mountingplace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": "free", + "description": "Type of mounting for PV system. Options are 'free' for free-standing and 'building' for building-integrated.", + "title": "Pvforecast1 Mountingplace" + }, + "pvforecast1_optimal_surface_tilt": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": false, + "description": "Calculate the optimum tilt angle. Ignored for two-axis tracking.", + "title": "Pvforecast1 Optimal Surface Tilt" + }, + "pvforecast1_optimalangles": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": false, + "description": "Calculate the optimum tilt and azimuth angles. Ignored for two-axis tracking.", + "title": "Pvforecast1 Optimalangles" + }, + "pvforecast1_peakpower": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Nominal power of PV system in kW.", + "title": "Pvforecast1 Peakpower" + }, + "pvforecast1_pvtechchoice": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": "crystSi", + "description": "PV technology. One of 'crystSi', 'CIS', 'CdTe', 'Unknown'.", + "title": "Pvforecast1 Pvtechchoice" + }, + "pvforecast1_strings_per_inverter": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Number of the strings of the inverter of this plane.", + "title": "Pvforecast1 Strings Per Inverter" + }, + "pvforecast1_surface_azimuth": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Orientation (azimuth angle) of the (fixed) plane. Clockwise from north (north=0, east=90, south=180, west=270).", + "title": "Pvforecast1 Surface Azimuth" + }, + "pvforecast1_surface_tilt": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Tilt angle from horizontal plane. Ignored for two-axis tracking.", + "title": "Pvforecast1 Surface Tilt" + }, + "pvforecast1_trackingtype": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Type of suntracking. 0=fixed, 1=single horizontal axis aligned north-south, 2=two-axis tracking, 3=vertical axis tracking, 4=single horizontal axis aligned east-west, 5=single inclined axis aligned north-south.", + "title": "Pvforecast1 Trackingtype" + }, + "pvforecast1_userhorizon": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "description": "Elevation of horizon in degrees, at equally spaced azimuth clockwise from north.", + "title": "Pvforecast1 Userhorizon" + }, + "pvforecast2_albedo": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Proportion of the light hitting the ground that it reflects back.", + "title": "Pvforecast2 Albedo" + }, + "pvforecast2_inverter_model": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Model of the inverter of this plane.", + "title": "Pvforecast2 Inverter Model" + }, + "pvforecast2_inverter_paco": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "AC power rating of the inverter. [W]", + "title": "Pvforecast2 Inverter Paco" + }, + "pvforecast2_loss": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": 0, + "description": "Sum of PV system losses in percent", + "title": "Pvforecast2 Loss" + }, + "pvforecast2_module_model": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Model of the PV modules of this plane.", + "title": "Pvforecast2 Module Model" + }, + "pvforecast2_modules_per_string": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Number of the PV modules of the strings of this plane.", + "title": "Pvforecast2 Modules Per String" + }, + "pvforecast2_mountingplace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": "free", + "description": "Type of mounting for PV system. Options are 'free' for free-standing and 'building' for building-integrated.", + "title": "Pvforecast2 Mountingplace" + }, + "pvforecast2_optimal_surface_tilt": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": false, + "description": "Calculate the optimum tilt angle. Ignored for two-axis tracking.", + "title": "Pvforecast2 Optimal Surface Tilt" + }, + "pvforecast2_optimalangles": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": false, + "description": "Calculate the optimum tilt and azimuth angles. Ignored for two-axis tracking.", + "title": "Pvforecast2 Optimalangles" + }, + "pvforecast2_peakpower": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Nominal power of PV system in kW.", + "title": "Pvforecast2 Peakpower" + }, + "pvforecast2_pvtechchoice": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": "crystSi", + "description": "PV technology. One of 'crystSi', 'CIS', 'CdTe', 'Unknown'.", + "title": "Pvforecast2 Pvtechchoice" + }, + "pvforecast2_strings_per_inverter": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Number of the strings of the inverter of this plane.", + "title": "Pvforecast2 Strings Per Inverter" + }, + "pvforecast2_surface_azimuth": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Orientation (azimuth angle) of the (fixed) plane. Clockwise from north (north=0, east=90, south=180, west=270).", + "title": "Pvforecast2 Surface Azimuth" + }, + "pvforecast2_surface_tilt": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Tilt angle from horizontal plane. Ignored for two-axis tracking.", + "title": "Pvforecast2 Surface Tilt" + }, + "pvforecast2_trackingtype": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Type of suntracking. 0=fixed, 1=single horizontal axis aligned north-south, 2=two-axis tracking, 3=vertical axis tracking, 4=single horizontal axis aligned east-west, 5=single inclined axis aligned north-south.", + "title": "Pvforecast2 Trackingtype" + }, + "pvforecast2_userhorizon": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "description": "Elevation of horizon in degrees, at equally spaced azimuth clockwise from north.", + "title": "Pvforecast2 Userhorizon" + }, + "pvforecast3_albedo": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Proportion of the light hitting the ground that it reflects back.", + "title": "Pvforecast3 Albedo" + }, + "pvforecast3_inverter_model": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Model of the inverter of this plane.", + "title": "Pvforecast3 Inverter Model" + }, + "pvforecast3_inverter_paco": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "AC power rating of the inverter. [W]", + "title": "Pvforecast3 Inverter Paco" + }, + "pvforecast3_loss": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": 0, + "description": "Sum of PV system losses in percent", + "title": "Pvforecast3 Loss" + }, + "pvforecast3_module_model": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Model of the PV modules of this plane.", + "title": "Pvforecast3 Module Model" + }, + "pvforecast3_modules_per_string": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Number of the PV modules of the strings of this plane.", + "title": "Pvforecast3 Modules Per String" + }, + "pvforecast3_mountingplace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": "free", + "description": "Type of mounting for PV system. Options are 'free' for free-standing and 'building' for building-integrated.", + "title": "Pvforecast3 Mountingplace" + }, + "pvforecast3_optimal_surface_tilt": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": false, + "description": "Calculate the optimum tilt angle. Ignored for two-axis tracking.", + "title": "Pvforecast3 Optimal Surface Tilt" + }, + "pvforecast3_optimalangles": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": false, + "description": "Calculate the optimum tilt and azimuth angles. Ignored for two-axis tracking.", + "title": "Pvforecast3 Optimalangles" + }, + "pvforecast3_peakpower": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Nominal power of PV system in kW.", + "title": "Pvforecast3 Peakpower" + }, + "pvforecast3_pvtechchoice": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": "crystSi", + "description": "PV technology. One of 'crystSi', 'CIS', 'CdTe', 'Unknown'.", + "title": "Pvforecast3 Pvtechchoice" + }, + "pvforecast3_strings_per_inverter": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Number of the strings of the inverter of this plane.", + "title": "Pvforecast3 Strings Per Inverter" + }, + "pvforecast3_surface_azimuth": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Orientation (azimuth angle) of the (fixed) plane. Clockwise from north (north=0, east=90, south=180, west=270).", + "title": "Pvforecast3 Surface Azimuth" + }, + "pvforecast3_surface_tilt": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Tilt angle from horizontal plane. Ignored for two-axis tracking.", + "title": "Pvforecast3 Surface Tilt" + }, + "pvforecast3_trackingtype": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Type of suntracking. 0=fixed, 1=single horizontal axis aligned north-south, 2=two-axis tracking, 3=vertical axis tracking, 4=single horizontal axis aligned east-west, 5=single inclined axis aligned north-south.", + "title": "Pvforecast3 Trackingtype" + }, + "pvforecast3_userhorizon": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "description": "Elevation of horizon in degrees, at equally spaced azimuth clockwise from north.", + "title": "Pvforecast3 Userhorizon" + }, + "pvforecast4_albedo": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Proportion of the light hitting the ground that it reflects back.", + "title": "Pvforecast4 Albedo" + }, + "pvforecast4_inverter_model": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Model of the inverter of this plane.", + "title": "Pvforecast4 Inverter Model" + }, + "pvforecast4_inverter_paco": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "AC power rating of the inverter. [W]", + "title": "Pvforecast4 Inverter Paco" + }, + "pvforecast4_loss": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": 0, + "description": "Sum of PV system losses in percent", + "title": "Pvforecast4 Loss" + }, + "pvforecast4_module_model": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Model of the PV modules of this plane.", + "title": "Pvforecast4 Module Model" + }, + "pvforecast4_modules_per_string": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Number of the PV modules of the strings of this plane.", + "title": "Pvforecast4 Modules Per String" + }, + "pvforecast4_mountingplace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": "free", + "description": "Type of mounting for PV system. Options are 'free' for free-standing and 'building' for building-integrated.", + "title": "Pvforecast4 Mountingplace" + }, + "pvforecast4_optimal_surface_tilt": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": false, + "description": "Calculate the optimum tilt angle. Ignored for two-axis tracking.", + "title": "Pvforecast4 Optimal Surface Tilt" + }, + "pvforecast4_optimalangles": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": false, + "description": "Calculate the optimum tilt and azimuth angles. Ignored for two-axis tracking.", + "title": "Pvforecast4 Optimalangles" + }, + "pvforecast4_peakpower": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Nominal power of PV system in kW.", + "title": "Pvforecast4 Peakpower" + }, + "pvforecast4_pvtechchoice": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": "crystSi", + "description": "PV technology. One of 'crystSi', 'CIS', 'CdTe', 'Unknown'.", + "title": "Pvforecast4 Pvtechchoice" + }, + "pvforecast4_strings_per_inverter": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Number of the strings of the inverter of this plane.", + "title": "Pvforecast4 Strings Per Inverter" + }, + "pvforecast4_surface_azimuth": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Orientation (azimuth angle) of the (fixed) plane. Clockwise from north (north=0, east=90, south=180, west=270).", + "title": "Pvforecast4 Surface Azimuth" + }, + "pvforecast4_surface_tilt": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Tilt angle from horizontal plane. Ignored for two-axis tracking.", + "title": "Pvforecast4 Surface Tilt" + }, + "pvforecast4_trackingtype": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Type of suntracking. 0=fixed, 1=single horizontal axis aligned north-south, 2=two-axis tracking, 3=vertical axis tracking, 4=single horizontal axis aligned east-west, 5=single inclined axis aligned north-south.", + "title": "Pvforecast4 Trackingtype" + }, + "pvforecast4_userhorizon": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "description": "Elevation of horizon in degrees, at equally spaced azimuth clockwise from north.", + "title": "Pvforecast4 Userhorizon" + }, + "pvforecast5_albedo": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Proportion of the light hitting the ground that it reflects back.", + "title": "Pvforecast5 Albedo" + }, + "pvforecast5_inverter_model": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Model of the inverter of this plane.", + "title": "Pvforecast5 Inverter Model" + }, + "pvforecast5_inverter_paco": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "AC power rating of the inverter. [W]", + "title": "Pvforecast5 Inverter Paco" + }, + "pvforecast5_loss": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": 0, + "description": "Sum of PV system losses in percent", + "title": "Pvforecast5 Loss" + }, + "pvforecast5_module_model": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Model of the PV modules of this plane.", + "title": "Pvforecast5 Module Model" + }, + "pvforecast5_modules_per_string": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Number of the PV modules of the strings of this plane.", + "title": "Pvforecast5 Modules Per String" + }, + "pvforecast5_mountingplace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": "free", + "description": "Type of mounting for PV system. Options are 'free' for free-standing and 'building' for building-integrated.", + "title": "Pvforecast5 Mountingplace" + }, + "pvforecast5_optimal_surface_tilt": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": false, + "description": "Calculate the optimum tilt angle. Ignored for two-axis tracking.", + "title": "Pvforecast5 Optimal Surface Tilt" + }, + "pvforecast5_optimalangles": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": false, + "description": "Calculate the optimum tilt and azimuth angles. Ignored for two-axis tracking.", + "title": "Pvforecast5 Optimalangles" + }, + "pvforecast5_peakpower": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Nominal power of PV system in kW.", + "title": "Pvforecast5 Peakpower" + }, + "pvforecast5_pvtechchoice": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": "crystSi", + "description": "PV technology. One of 'crystSi', 'CIS', 'CdTe', 'Unknown'.", + "title": "Pvforecast5 Pvtechchoice" + }, + "pvforecast5_strings_per_inverter": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Number of the strings of the inverter of this plane.", + "title": "Pvforecast5 Strings Per Inverter" + }, + "pvforecast5_surface_azimuth": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Orientation (azimuth angle) of the (fixed) plane. Clockwise from north (north=0, east=90, south=180, west=270).", + "title": "Pvforecast5 Surface Azimuth" + }, + "pvforecast5_surface_tilt": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Tilt angle from horizontal plane. Ignored for two-axis tracking.", + "title": "Pvforecast5 Surface Tilt" + }, + "pvforecast5_trackingtype": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Type of suntracking. 0=fixed, 1=single horizontal axis aligned north-south, 2=two-axis tracking, 3=vertical axis tracking, 4=single horizontal axis aligned east-west, 5=single inclined axis aligned north-south.", + "title": "Pvforecast5 Trackingtype" + }, + "pvforecast5_userhorizon": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "description": "Elevation of horizon in degrees, at equally spaced azimuth clockwise from north.", + "title": "Pvforecast5 Userhorizon" + }, + "pvforecast_planes": { + "description": "Compute a list of active planes.", + "items": { + "type": "string" + }, + "readOnly": true, + "title": "Pvforecast Planes", + "type": "array" + }, + "pvforecast_planes_azimuth": { + "description": "Compute a list of the azimuths per active planes.", + "items": { + "type": "number" + }, + "readOnly": true, + "title": "Pvforecast Planes Azimuth", + "type": "array" + }, + "pvforecast_planes_inverter_paco": { + "description": "Compute a list of the maximum power rating of the inverter per active planes.", + "readOnly": true, + "title": "Pvforecast Planes Inverter Paco" + }, + "pvforecast_planes_peakpower": { + "description": "Compute a list of the peak power per active planes.", + "items": { + "type": "number" + }, + "readOnly": true, + "title": "Pvforecast Planes Peakpower", + "type": "array" + }, + "pvforecast_planes_tilt": { + "description": "Compute a list of the tilts per active planes.", + "items": { + "type": "number" + }, + "readOnly": true, + "title": "Pvforecast Planes Tilt", + "type": "array" + }, + "pvforecast_planes_userhorizon": { + "description": "Compute a list of the user horizon per active planes.", + "readOnly": true, + "title": "Pvforecast Planes Userhorizon" + }, + "pvforecast_provider": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "PVForecast provider id of provider to be used.", + "title": "Pvforecast Provider" + }, + "pvforecastimport_file_path": { + "anyOf": [ + { + "type": "string" + }, + { + "format": "path", + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Path to the file to import PV forecast data from.", + "title": "Pvforecastimport File Path" + }, + "pvforecastimport_json": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "JSON string, dictionary of PV forecast value lists.", + "title": "Pvforecastimport Json" + }, + "server_fastapi_host": { + "anyOf": [ + { + "format": "ipvanyaddress", + "type": "string" + }, + { + "type": "null" + } + ], + "default": "0.0.0.0", + "description": "FastAPI server IP address.", + "title": "Server Fastapi Host" + }, + "server_fastapi_port": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": 8503, + "description": "FastAPI server IP port number.", + "title": "Server Fastapi Port" + }, + "server_fastapi_startup_server_fasthtml": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": true, + "description": "FastAPI server to startup application FastHTML server.", + "title": "Server Fastapi Startup Server Fasthtml" + }, + "server_fastapi_verbose": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": false, + "description": "Enable debug output", + "title": "Server Fastapi Verbose" + }, + "server_fasthtml_host": { + "anyOf": [ + { + "format": "ipvanyaddress", + "type": "string" + }, + { + "type": "null" + } + ], + "default": "0.0.0.0", + "description": "FastHTML server IP address.", + "title": "Server Fasthtml Host" + }, + "server_fasthtml_port": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": 8504, + "description": "FastHTML server IP port number.", + "title": "Server Fasthtml Port" + }, + "timezone": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Compute timezone based on latitude and longitude.", + "readOnly": true, + "title": "Timezone" + }, + "weather_provider": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Weather provider id of provider to be used.", + "title": "Weather Provider" + }, + "weatherimport_file_path": { + "anyOf": [ + { + "type": "string" + }, + { + "format": "path", + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Path to the file to import weather data from.", + "title": "Weatherimport File Path" + }, + "weatherimport_json": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "JSON string, dictionary of weather forecast value lists.", + "title": "Weatherimport Json" + } + }, + "required": [ + "pvforecast_planes", + "pvforecast_planes_peakpower", + "pvforecast_planes_azimuth", + "pvforecast_planes_tilt", + "pvforecast_planes_userhorizon", + "pvforecast_planes_inverter_paco", + "timezone", + "data_output_path", + "data_cache_path", + "config_folder_path", + "config_file_path", + "config_default_file_path", + "config_keys" + ], + "title": "ConfigEOS", + "type": "object" + }, + "ElectricVehicleParameters": { + "description": "Parameters specific to an electric vehicle (EV).", + "properties": { + "capacity_wh": { + "description": "An integer representing the capacity of the battery in watt-hours.", + "exclusiveMinimum": 0.0, + "title": "Capacity Wh", + "type": "integer" + }, + "charging_efficiency": { + "default": 0.88, + "description": "A float representing the charging efficiency of the battery.", + "exclusiveMinimum": 0.0, + "maximum": 1.0, + "title": "Charging Efficiency", + "type": "number" + }, + "discharging_efficiency": { + "default": 1.0, + "title": "Discharging Efficiency", + "type": "number" + }, + "initial_soc_percentage": { + "default": 0, + "description": "An integer representing the current state of charge (SOC) of the battery in percentage.", + "maximum": 100.0, + "minimum": 0.0, + "title": "Initial Soc Percentage", + "type": "integer" + }, + "max_charge_power_w": { + "anyOf": [ + { + "exclusiveMinimum": 0.0, + "type": "number" + }, + { + "type": "null" + } + ], + "default": 5000, + "description": "Maximum charging power in watts.", + "title": "Max Charge Power W" + }, + "max_soc_percentage": { + "default": 100, + "description": "An integer representing the maximum state of charge (SOC) of the battery in percentage.", + "maximum": 100.0, + "minimum": 0.0, + "title": "Max Soc Percentage", + "type": "integer" + }, + "min_soc_percentage": { + "default": 0, + "description": "An integer representing the minimum state of charge (SOC) of the battery in percentage.", + "maximum": 100.0, + "minimum": 0.0, + "title": "Min Soc Percentage", + "type": "integer" + } + }, + "required": [ + "capacity_wh" + ], + "title": "ElectricVehicleParameters", + "type": "object" + }, + "ElectricVehicleResult": { + "description": "Result class containing information related to the electric vehicle's charging and discharging behavior.", + "properties": { + "capacity_wh": { + "description": "Capacity of the EV\u2019s battery in watt-hours.", + "title": "Capacity Wh", + "type": "integer" + }, + "charge_array": { + "description": "Hourly charging status (0 for no charging, 1 for charging).", + "items": { + "type": "number" + }, + "title": "Charge Array", + "type": "array" + }, + "charging_efficiency": { + "description": "Charging efficiency as a float..", + "title": "Charging Efficiency", + "type": "number" + }, + "discharge_array": { + "description": "Hourly discharging status (0 for no discharging, 1 for discharging).", + "items": { + "type": "integer" + }, + "title": "Discharge Array", + "type": "array" + }, + "discharging_efficiency": { + "description": "The discharge efficiency as a float..", + "title": "Discharging Efficiency", + "type": "number" + }, + "hours": { + "description": "Number of hours in the simulation.", + "title": "Hours", + "type": "integer" + }, + "initial_soc_percentage": { + "description": "State of charge at the start of the simulation in percentage.", + "title": "Initial Soc Percentage", + "type": "integer" + }, + "max_charge_power_w": { + "description": "Maximum charging power in watts.", + "title": "Max Charge Power W", + "type": "integer" + }, + "soc_wh": { + "description": "State of charge of the battery in watt-hours at the start of the simulation.", + "title": "Soc Wh", + "type": "number" + } + }, + "required": [ + "charge_array", + "discharge_array", + "discharging_efficiency", + "hours", + "capacity_wh", + "charging_efficiency", + "max_charge_power_w", + "soc_wh", + "initial_soc_percentage" + ], + "title": "ElectricVehicleResult", + "type": "object" + }, + "EnergieManagementSystemParameters": { + "properties": { + "einspeiseverguetung_euro_pro_wh": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "number" + } + ], + "description": "A float or array of floats representing the feed-in compensation in euros per watt-hour.", + "title": "Einspeiseverguetung Euro Pro Wh" + }, + "gesamtlast": { + "description": "An array of floats representing the total load (consumption) in watts for different time intervals.", + "items": { + "type": "number" + }, + "title": "Gesamtlast", + "type": "array" + }, + "preis_euro_pro_wh_akku": { + "description": "A float representing the cost of battery energy per watt-hour.", + "title": "Preis Euro Pro Wh Akku", + "type": "number" + }, + "pv_prognose_wh": { + "description": "An array of floats representing the forecasted photovoltaic output in watts for different time intervals.", + "items": { + "type": "number" + }, + "title": "Pv Prognose Wh", + "type": "array" + }, + "strompreis_euro_pro_wh": { + "description": "An array of floats representing the electricity price in euros per watt-hour for different time intervals.", + "items": { + "type": "number" + }, + "title": "Strompreis Euro Pro Wh", + "type": "array" + } + }, + "required": [ + "pv_prognose_wh", + "strompreis_euro_pro_wh", + "einspeiseverguetung_euro_pro_wh", + "preis_euro_pro_wh_akku", + "gesamtlast" + ], + "title": "EnergieManagementSystemParameters", + "type": "object" + }, + "ForecastResponse": { + "properties": { + "pvpower": { + "items": { + "type": "number" + }, + "title": "Pvpower", + "type": "array" + }, + "temperature": { + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ] + }, + "title": "Temperature", + "type": "array" + } + }, + "required": [ + "temperature", + "pvpower" + ], + "title": "ForecastResponse", + "type": "object" + }, + "GesamtlastRequest": { + "properties": { + "hours": { + "title": "Hours", + "type": "integer" + }, + "measured_data": { + "items": { + "type": "object" + }, + "title": "Measured Data", + "type": "array" + }, + "year_energy": { + "title": "Year Energy", + "type": "number" + } + }, + "required": [ + "year_energy", + "measured_data", + "hours" + ], + "title": "GesamtlastRequest", + "type": "object" + }, + "HTTPValidationError": { + "properties": { + "detail": { + "items": { + "$ref": "#/components/schemas/ValidationError" + }, + "title": "Detail", + "type": "array" + } + }, + "title": "HTTPValidationError", + "type": "object" + }, + "HomeApplianceParameters": { + "properties": { + "consumption_wh": { + "description": "An integer representing the energy consumption of a household device in watt-hours.", + "exclusiveMinimum": 0.0, + "title": "Consumption Wh", + "type": "integer" + }, + "duration_h": { + "description": "An integer representing the usage duration of a household device in hours.", + "exclusiveMinimum": 0.0, + "title": "Duration H", + "type": "integer" + } + }, + "required": [ + "consumption_wh", + "duration_h" + ], + "title": "HomeApplianceParameters", + "type": "object" + }, + "InverterParameters": { + "properties": { + "max_power_wh": { + "default": 10000, + "exclusiveMinimum": 0.0, + "title": "Max Power Wh", + "type": "number" + } + }, + "title": "InverterParameters", + "type": "object" + }, + "OptimizationParameters": { + "properties": { + "dishwasher": { + "anyOf": [ + { + "$ref": "#/components/schemas/HomeApplianceParameters" + }, + { + "type": "null" + } + ] + }, + "eauto": { + "anyOf": [ + { + "$ref": "#/components/schemas/ElectricVehicleParameters" + }, + { + "type": "null" + } + ] + }, + "ems": { + "$ref": "#/components/schemas/EnergieManagementSystemParameters" + }, + "inverter": { + "$ref": "#/components/schemas/InverterParameters", + "default": { + "max_power_wh": 10000.0 + } + }, + "pv_akku": { + "$ref": "#/components/schemas/SolarPanelBatteryParameters" + }, + "start_solution": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "description": "Can be `null` or contain a previous solution (if available).", + "title": "Start Solution" + }, + "temperature_forecast": { + "anyOf": [ + { + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ] + }, + "type": "array" + }, + { + "type": "null" + } + ], + "description": "An array of floats representing the temperature forecast in degrees Celsius for different time intervals.", + "title": "Temperature Forecast" + } + }, + "required": [ + "ems", + "pv_akku", + "eauto" + ], + "title": "OptimizationParameters", + "type": "object" + }, + "OptimizeResponse": { + "description": "**Note**: The first value of \"Last_Wh_per_hour\", \"Netzeinspeisung_Wh_per_hour\", and \"Netzbezug_Wh_per_hour\", will be set to null in the JSON output and represented as NaN or None in the corresponding classes' data returns. This approach is adopted to ensure that the current hour's processing remains unchanged.", + "properties": { + "ac_charge": { + "description": "Array with AC charging values as relative power (0-1), other values set to 0.", + "items": { + "type": "number" + }, + "title": "Ac Charge", + "type": "array" + }, + "dc_charge": { + "description": "Array with DC charging values as relative power (0-1), other values set to 0.", + "items": { + "type": "number" + }, + "title": "Dc Charge", + "type": "array" + }, + "discharge_allowed": { + "description": "Array with discharge values (1 for discharge, 0 otherwise).", + "items": { + "type": "integer" + }, + "title": "Discharge Allowed", + "type": "array" + }, + "eauto_obj": { + "anyOf": [ + { + "$ref": "#/components/schemas/ElectricVehicleResult" + }, + { + "type": "null" + } + ] + }, + "eautocharge_hours_float": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "description": "TBD", + "title": "Eautocharge Hours Float" + }, + "result": { + "$ref": "#/components/schemas/SimulationResult" + }, + "start_solution": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "description": "An array of binary values (0 or 1) representing a possible starting solution for the simulation.", + "title": "Start Solution" + }, + "washingstart": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Can be `null` or contain an object representing the start of washing (if applicable).", + "title": "Washingstart" + } + }, + "required": [ + "ac_charge", + "dc_charge", + "discharge_allowed", + "eautocharge_hours_float", + "result", + "eauto_obj" + ], + "title": "OptimizeResponse", + "type": "object" + }, + "PydanticDateTimeData": { + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "integer" + }, + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "type": "array" + } + ] + }, + "description": "Pydantic model for time series data with consistent value lengths.\n\nThis model validates a dictionary where:\n- Keys are strings representing data series names\n- Values are lists of numeric or string values\n- Special keys 'start_datetime' and 'interval' can contain string values\nfor time series indexing\n- All value lists must have the same length\n\nExample:\n {\n \"start_datetime\": \"2024-01-01 00:00:00\", # optional\n \"interval\": \"1 Hour\", # optional\n \"load_mean\": [20.5, 21.0, 22.1],\n \"load_min\": [18.5, 19.0, 20.1]\n }", + "title": "PydanticDateTimeData", + "type": "object" + }, + "PydanticDateTimeDataFrame": { + "description": "Pydantic model for validating pandas DataFrame data with datetime index.", + "properties": { + "data": { + "additionalProperties": { + "type": "object" + }, + "title": "Data", + "type": "object" + }, + "datetime_columns": { + "description": "Columns to be treated as datetime", + "items": { + "type": "string" + }, + "title": "Datetime Columns", + "type": "array" + }, + "dtypes": { + "additionalProperties": { + "type": "string" + }, + "title": "Dtypes", + "type": "object" + }, + "tz": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Timezone for datetime values", + "title": "Tz" + } + }, + "required": [ + "data" + ], + "title": "PydanticDateTimeDataFrame", + "type": "object" + }, + "PydanticDateTimeSeries": { + "description": "Pydantic model for validating pandas Series with datetime index in JSON format.\n\nThis model handles Series data serialized with orient='index', where the keys are\ndatetime strings and values are the series values. Provides validation and\nconversion between JSON and pandas Series with datetime index.\n\nAttributes:\n data (Dict[str, Any]): Dictionary mapping datetime strings to values.\n dtype (str): The data type of the series values.\n tz (str | None): Timezone name if the datetime index is timezone-aware.", + "properties": { + "data": { + "title": "Data", + "type": "object" + }, + "dtype": { + "default": "float64", + "title": "Dtype", + "type": "string" + }, + "tz": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Tz" + } + }, + "required": [ + "data" + ], + "title": "PydanticDateTimeSeries", + "type": "object" + }, + "SettingsEOS": { + "description": "Settings for all EOS.", + "properties": { + "battery_capacity": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Battery capacity [Wh].", + "title": "Battery Capacity" + }, + "battery_charging_efficiency": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Battery charging efficiency [%].", + "title": "Battery Charging Efficiency" + }, + "battery_discharging_efficiency": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Battery discharging efficiency [%].", + "title": "Battery Discharging Efficiency" + }, + "battery_initial_soc": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Battery initial state of charge [%].", + "title": "Battery Initial Soc" + }, + "battery_max_charging_power": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Battery maximum charge power [W].", + "title": "Battery Max Charging Power" + }, + "battery_provider": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Id of Battery simulation provider.", + "title": "Battery Provider" + }, + "battery_soc_max": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Battery maximum state of charge [%].", + "title": "Battery Soc Max" + }, + "battery_soc_min": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Battery minimum state of charge [%].", + "title": "Battery Soc Min" + }, + "bev_capacity": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Battery Electric Vehicle capacity [Wh].", + "title": "Bev Capacity" + }, + "bev_charging_efficiency": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Battery Electric Vehicle charging efficiency [%].", + "title": "Bev Charging Efficiency" + }, + "bev_discharging_efficiency": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Battery Electric Vehicle discharging efficiency [%].", + "title": "Bev Discharging Efficiency" + }, + "bev_initial_soc": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Battery Electric Vehicle initial state of charge [%].", + "title": "Bev Initial Soc" + }, + "bev_max_charging_power": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Battery Electric Vehicle maximum charge power [W].", + "title": "Bev Max Charging Power" + }, + "bev_provider": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Id of Battery Electric Vehicle simulation provider.", + "title": "Bev Provider" + }, + "bev_soc_max": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Battery Electric Vehicle maximum state of charge [%].", + "title": "Bev Soc Max" + }, + "data_cache_subpath": { + "anyOf": [ + { + "format": "path", + "type": "string" + }, + { + "type": "null" + } + ], + "default": "cache", + "description": "Sub-path for the EOS cache data directory.", + "title": "Data Cache Subpath" + }, + "data_folder_path": { + "anyOf": [ + { + "format": "path", + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Path to EOS data directory.", + "title": "Data Folder Path" + }, + "data_output_subpath": { + "anyOf": [ + { + "format": "path", + "type": "string" + }, + { + "type": "null" + } + ], + "default": "output", + "description": "Sub-path for the EOS output data directory.", + "title": "Data Output Subpath" + }, + "dishwasher_consumption": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Dish Washer energy consumption [Wh].", + "title": "Dishwasher Consumption" + }, + "dishwasher_duration": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Dish Washer usage duration [h].", + "title": "Dishwasher Duration" + }, + "dishwasher_provider": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Id of Dish Washer simulation provider.", + "title": "Dishwasher Provider" + }, + "elecprice_charges_kwh": { + "anyOf": [ + { + "minimum": 0.0, + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Electricity price charges (\u20ac/kWh).", + "title": "Elecprice Charges Kwh" + }, + "elecprice_provider": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Electricity price provider id of provider to be used.", + "title": "Elecprice Provider" + }, + "elecpriceimport_file_path": { + "anyOf": [ + { + "type": "string" + }, + { + "format": "path", + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Path to the file to import elecprice data from.", + "title": "Elecpriceimport File Path" + }, + "elecpriceimport_json": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "JSON string, dictionary of electricity price forecast value lists.", + "title": "Elecpriceimport Json" + }, + "inverter_power_max": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Inverter maximum power [W].", + "title": "Inverter Power Max" + }, + "inverter_provider": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Id of PV Inverter simulation provider.", + "title": "Inverter Provider" + }, + "latitude": { + "anyOf": [ + { + "maximum": 90.0, + "minimum": -90.0, + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Latitude in decimal degrees, between -90 and 90, north is positive (ISO 19115) (\u00b0)", + "title": "Latitude" + }, + "load_import_file_path": { + "anyOf": [ + { + "type": "string" + }, + { + "format": "path", + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Path to the file to import load data from.", + "title": "Load Import File Path" + }, + "load_import_json": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "JSON string, dictionary of load forecast value lists.", + "title": "Load Import Json" + }, + "load_provider": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Load provider id of provider to be used.", + "title": "Load Provider" + }, + "loadakkudoktor_year_energy": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Yearly energy consumption (kWh).", + "title": "Loadakkudoktor Year Energy" + }, + "longitude": { + "anyOf": [ + { + "maximum": 180.0, + "minimum": -180.0, + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Longitude in decimal degrees, within -180 to 180 (\u00b0)", + "title": "Longitude" + }, + "measurement_load0_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Name of the load0 source (e.g. 'Household', 'Heat Pump')", + "title": "Measurement Load0 Name" + }, + "measurement_load1_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Name of the load1 source (e.g. 'Household', 'Heat Pump')", + "title": "Measurement Load1 Name" + }, + "measurement_load2_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Name of the load2 source (e.g. 'Household', 'Heat Pump')", + "title": "Measurement Load2 Name" + }, + "measurement_load3_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Name of the load3 source (e.g. 'Household', 'Heat Pump')", + "title": "Measurement Load3 Name" + }, + "measurement_load4_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Name of the load4 source (e.g. 'Household', 'Heat Pump')", + "title": "Measurement Load4 Name" + }, + "optimization_ev_available_charge_rates_percent": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": [ + 0.0, + 0.375, + 0.5, + 0.625, + 0.75, + 0.875, + 1.0 + ], + "description": "Charge rates available for the EV in percent of maximum charge.", + "title": "Optimization Ev Available Charge Rates Percent" + }, + "optimization_hours": { + "anyOf": [ + { + "minimum": 0.0, + "type": "integer" + }, + { + "type": "null" + } + ], + "default": 24, + "description": "Number of hours into the future for optimizations.", + "title": "Optimization Hours" + }, + "optimization_penalty": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": 10, + "description": "Penalty factor used in optimization.", + "title": "Optimization Penalty" + }, + "prediction_historic_hours": { + "anyOf": [ + { + "minimum": 0.0, + "type": "integer" + }, + { + "type": "null" + } + ], + "default": 48, + "description": "Number of hours into the past for historical predictions data", + "title": "Prediction Historic Hours" + }, + "prediction_hours": { + "anyOf": [ + { + "minimum": 0.0, + "type": "integer" + }, + { + "type": "null" + } + ], + "default": 48, + "description": "Number of hours into the future for predictions", + "title": "Prediction Hours" + }, + "pvforecast0_albedo": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Proportion of the light hitting the ground that it reflects back.", + "title": "Pvforecast0 Albedo" + }, + "pvforecast0_inverter_model": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Model of the inverter of this plane.", + "title": "Pvforecast0 Inverter Model" + }, + "pvforecast0_inverter_paco": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "AC power rating of the inverter. [W]", + "title": "Pvforecast0 Inverter Paco" + }, + "pvforecast0_loss": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Sum of PV system losses in percent", + "title": "Pvforecast0 Loss" + }, + "pvforecast0_module_model": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Model of the PV modules of this plane.", + "title": "Pvforecast0 Module Model" + }, + "pvforecast0_modules_per_string": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Number of the PV modules of the strings of this plane.", + "title": "Pvforecast0 Modules Per String" + }, + "pvforecast0_mountingplace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": "free", + "description": "Type of mounting for PV system. Options are 'free' for free-standing and 'building' for building-integrated.", + "title": "Pvforecast0 Mountingplace" + }, + "pvforecast0_optimal_surface_tilt": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": false, + "description": "Calculate the optimum tilt angle. Ignored for two-axis tracking.", + "title": "Pvforecast0 Optimal Surface Tilt" + }, + "pvforecast0_optimalangles": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": false, + "description": "Calculate the optimum tilt and azimuth angles. Ignored for two-axis tracking.", + "title": "Pvforecast0 Optimalangles" + }, + "pvforecast0_peakpower": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Nominal power of PV system in kW.", + "title": "Pvforecast0 Peakpower" + }, + "pvforecast0_pvtechchoice": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": "crystSi", + "description": "PV technology. One of 'crystSi', 'CIS', 'CdTe', 'Unknown'.", + "title": "Pvforecast0 Pvtechchoice" + }, + "pvforecast0_strings_per_inverter": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Number of the strings of the inverter of this plane.", + "title": "Pvforecast0 Strings Per Inverter" + }, + "pvforecast0_surface_azimuth": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Orientation (azimuth angle) of the (fixed) plane. Clockwise from north (north=0, east=90, south=180, west=270).", + "title": "Pvforecast0 Surface Azimuth" + }, + "pvforecast0_surface_tilt": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Tilt angle from horizontal plane. Ignored for two-axis tracking.", + "title": "Pvforecast0 Surface Tilt" + }, + "pvforecast0_trackingtype": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Type of suntracking. 0=fixed, 1=single horizontal axis aligned north-south, 2=two-axis tracking, 3=vertical axis tracking, 4=single horizontal axis aligned east-west, 5=single inclined axis aligned north-south.", + "title": "Pvforecast0 Trackingtype" + }, + "pvforecast0_userhorizon": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "description": "Elevation of horizon in degrees, at equally spaced azimuth clockwise from north.", + "title": "Pvforecast0 Userhorizon" + }, + "pvforecast1_albedo": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Proportion of the light hitting the ground that it reflects back.", + "title": "Pvforecast1 Albedo" + }, + "pvforecast1_inverter_model": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Model of the inverter of this plane.", + "title": "Pvforecast1 Inverter Model" + }, + "pvforecast1_inverter_paco": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "AC power rating of the inverter. [W]", + "title": "Pvforecast1 Inverter Paco" + }, + "pvforecast1_loss": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": 0, + "description": "Sum of PV system losses in percent", + "title": "Pvforecast1 Loss" + }, + "pvforecast1_module_model": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Model of the PV modules of this plane.", + "title": "Pvforecast1 Module Model" + }, + "pvforecast1_modules_per_string": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Number of the PV modules of the strings of this plane.", + "title": "Pvforecast1 Modules Per String" + }, + "pvforecast1_mountingplace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": "free", + "description": "Type of mounting for PV system. Options are 'free' for free-standing and 'building' for building-integrated.", + "title": "Pvforecast1 Mountingplace" + }, + "pvforecast1_optimal_surface_tilt": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": false, + "description": "Calculate the optimum tilt angle. Ignored for two-axis tracking.", + "title": "Pvforecast1 Optimal Surface Tilt" + }, + "pvforecast1_optimalangles": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": false, + "description": "Calculate the optimum tilt and azimuth angles. Ignored for two-axis tracking.", + "title": "Pvforecast1 Optimalangles" + }, + "pvforecast1_peakpower": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Nominal power of PV system in kW.", + "title": "Pvforecast1 Peakpower" + }, + "pvforecast1_pvtechchoice": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": "crystSi", + "description": "PV technology. One of 'crystSi', 'CIS', 'CdTe', 'Unknown'.", + "title": "Pvforecast1 Pvtechchoice" + }, + "pvforecast1_strings_per_inverter": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Number of the strings of the inverter of this plane.", + "title": "Pvforecast1 Strings Per Inverter" + }, + "pvforecast1_surface_azimuth": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Orientation (azimuth angle) of the (fixed) plane. Clockwise from north (north=0, east=90, south=180, west=270).", + "title": "Pvforecast1 Surface Azimuth" + }, + "pvforecast1_surface_tilt": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Tilt angle from horizontal plane. Ignored for two-axis tracking.", + "title": "Pvforecast1 Surface Tilt" + }, + "pvforecast1_trackingtype": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Type of suntracking. 0=fixed, 1=single horizontal axis aligned north-south, 2=two-axis tracking, 3=vertical axis tracking, 4=single horizontal axis aligned east-west, 5=single inclined axis aligned north-south.", + "title": "Pvforecast1 Trackingtype" + }, + "pvforecast1_userhorizon": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "description": "Elevation of horizon in degrees, at equally spaced azimuth clockwise from north.", + "title": "Pvforecast1 Userhorizon" + }, + "pvforecast2_albedo": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Proportion of the light hitting the ground that it reflects back.", + "title": "Pvforecast2 Albedo" + }, + "pvforecast2_inverter_model": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Model of the inverter of this plane.", + "title": "Pvforecast2 Inverter Model" + }, + "pvforecast2_inverter_paco": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "AC power rating of the inverter. [W]", + "title": "Pvforecast2 Inverter Paco" + }, + "pvforecast2_loss": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": 0, + "description": "Sum of PV system losses in percent", + "title": "Pvforecast2 Loss" + }, + "pvforecast2_module_model": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Model of the PV modules of this plane.", + "title": "Pvforecast2 Module Model" + }, + "pvforecast2_modules_per_string": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Number of the PV modules of the strings of this plane.", + "title": "Pvforecast2 Modules Per String" + }, + "pvforecast2_mountingplace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": "free", + "description": "Type of mounting for PV system. Options are 'free' for free-standing and 'building' for building-integrated.", + "title": "Pvforecast2 Mountingplace" + }, + "pvforecast2_optimal_surface_tilt": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": false, + "description": "Calculate the optimum tilt angle. Ignored for two-axis tracking.", + "title": "Pvforecast2 Optimal Surface Tilt" + }, + "pvforecast2_optimalangles": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": false, + "description": "Calculate the optimum tilt and azimuth angles. Ignored for two-axis tracking.", + "title": "Pvforecast2 Optimalangles" + }, + "pvforecast2_peakpower": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Nominal power of PV system in kW.", + "title": "Pvforecast2 Peakpower" + }, + "pvforecast2_pvtechchoice": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": "crystSi", + "description": "PV technology. One of 'crystSi', 'CIS', 'CdTe', 'Unknown'.", + "title": "Pvforecast2 Pvtechchoice" + }, + "pvforecast2_strings_per_inverter": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Number of the strings of the inverter of this plane.", + "title": "Pvforecast2 Strings Per Inverter" + }, + "pvforecast2_surface_azimuth": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Orientation (azimuth angle) of the (fixed) plane. Clockwise from north (north=0, east=90, south=180, west=270).", + "title": "Pvforecast2 Surface Azimuth" + }, + "pvforecast2_surface_tilt": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Tilt angle from horizontal plane. Ignored for two-axis tracking.", + "title": "Pvforecast2 Surface Tilt" + }, + "pvforecast2_trackingtype": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Type of suntracking. 0=fixed, 1=single horizontal axis aligned north-south, 2=two-axis tracking, 3=vertical axis tracking, 4=single horizontal axis aligned east-west, 5=single inclined axis aligned north-south.", + "title": "Pvforecast2 Trackingtype" + }, + "pvforecast2_userhorizon": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "description": "Elevation of horizon in degrees, at equally spaced azimuth clockwise from north.", + "title": "Pvforecast2 Userhorizon" + }, + "pvforecast3_albedo": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Proportion of the light hitting the ground that it reflects back.", + "title": "Pvforecast3 Albedo" + }, + "pvforecast3_inverter_model": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Model of the inverter of this plane.", + "title": "Pvforecast3 Inverter Model" + }, + "pvforecast3_inverter_paco": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "AC power rating of the inverter. [W]", + "title": "Pvforecast3 Inverter Paco" + }, + "pvforecast3_loss": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": 0, + "description": "Sum of PV system losses in percent", + "title": "Pvforecast3 Loss" + }, + "pvforecast3_module_model": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Model of the PV modules of this plane.", + "title": "Pvforecast3 Module Model" + }, + "pvforecast3_modules_per_string": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Number of the PV modules of the strings of this plane.", + "title": "Pvforecast3 Modules Per String" + }, + "pvforecast3_mountingplace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": "free", + "description": "Type of mounting for PV system. Options are 'free' for free-standing and 'building' for building-integrated.", + "title": "Pvforecast3 Mountingplace" + }, + "pvforecast3_optimal_surface_tilt": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": false, + "description": "Calculate the optimum tilt angle. Ignored for two-axis tracking.", + "title": "Pvforecast3 Optimal Surface Tilt" + }, + "pvforecast3_optimalangles": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": false, + "description": "Calculate the optimum tilt and azimuth angles. Ignored for two-axis tracking.", + "title": "Pvforecast3 Optimalangles" + }, + "pvforecast3_peakpower": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Nominal power of PV system in kW.", + "title": "Pvforecast3 Peakpower" + }, + "pvforecast3_pvtechchoice": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": "crystSi", + "description": "PV technology. One of 'crystSi', 'CIS', 'CdTe', 'Unknown'.", + "title": "Pvforecast3 Pvtechchoice" + }, + "pvforecast3_strings_per_inverter": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Number of the strings of the inverter of this plane.", + "title": "Pvforecast3 Strings Per Inverter" + }, + "pvforecast3_surface_azimuth": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Orientation (azimuth angle) of the (fixed) plane. Clockwise from north (north=0, east=90, south=180, west=270).", + "title": "Pvforecast3 Surface Azimuth" + }, + "pvforecast3_surface_tilt": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Tilt angle from horizontal plane. Ignored for two-axis tracking.", + "title": "Pvforecast3 Surface Tilt" + }, + "pvforecast3_trackingtype": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Type of suntracking. 0=fixed, 1=single horizontal axis aligned north-south, 2=two-axis tracking, 3=vertical axis tracking, 4=single horizontal axis aligned east-west, 5=single inclined axis aligned north-south.", + "title": "Pvforecast3 Trackingtype" + }, + "pvforecast3_userhorizon": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "description": "Elevation of horizon in degrees, at equally spaced azimuth clockwise from north.", + "title": "Pvforecast3 Userhorizon" + }, + "pvforecast4_albedo": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Proportion of the light hitting the ground that it reflects back.", + "title": "Pvforecast4 Albedo" + }, + "pvforecast4_inverter_model": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Model of the inverter of this plane.", + "title": "Pvforecast4 Inverter Model" + }, + "pvforecast4_inverter_paco": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "AC power rating of the inverter. [W]", + "title": "Pvforecast4 Inverter Paco" + }, + "pvforecast4_loss": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": 0, + "description": "Sum of PV system losses in percent", + "title": "Pvforecast4 Loss" + }, + "pvforecast4_module_model": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Model of the PV modules of this plane.", + "title": "Pvforecast4 Module Model" + }, + "pvforecast4_modules_per_string": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Number of the PV modules of the strings of this plane.", + "title": "Pvforecast4 Modules Per String" + }, + "pvforecast4_mountingplace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": "free", + "description": "Type of mounting for PV system. Options are 'free' for free-standing and 'building' for building-integrated.", + "title": "Pvforecast4 Mountingplace" + }, + "pvforecast4_optimal_surface_tilt": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": false, + "description": "Calculate the optimum tilt angle. Ignored for two-axis tracking.", + "title": "Pvforecast4 Optimal Surface Tilt" + }, + "pvforecast4_optimalangles": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": false, + "description": "Calculate the optimum tilt and azimuth angles. Ignored for two-axis tracking.", + "title": "Pvforecast4 Optimalangles" + }, + "pvforecast4_peakpower": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Nominal power of PV system in kW.", + "title": "Pvforecast4 Peakpower" + }, + "pvforecast4_pvtechchoice": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": "crystSi", + "description": "PV technology. One of 'crystSi', 'CIS', 'CdTe', 'Unknown'.", + "title": "Pvforecast4 Pvtechchoice" + }, + "pvforecast4_strings_per_inverter": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Number of the strings of the inverter of this plane.", + "title": "Pvforecast4 Strings Per Inverter" + }, + "pvforecast4_surface_azimuth": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Orientation (azimuth angle) of the (fixed) plane. Clockwise from north (north=0, east=90, south=180, west=270).", + "title": "Pvforecast4 Surface Azimuth" + }, + "pvforecast4_surface_tilt": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Tilt angle from horizontal plane. Ignored for two-axis tracking.", + "title": "Pvforecast4 Surface Tilt" + }, + "pvforecast4_trackingtype": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Type of suntracking. 0=fixed, 1=single horizontal axis aligned north-south, 2=two-axis tracking, 3=vertical axis tracking, 4=single horizontal axis aligned east-west, 5=single inclined axis aligned north-south.", + "title": "Pvforecast4 Trackingtype" + }, + "pvforecast4_userhorizon": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "description": "Elevation of horizon in degrees, at equally spaced azimuth clockwise from north.", + "title": "Pvforecast4 Userhorizon" + }, + "pvforecast5_albedo": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Proportion of the light hitting the ground that it reflects back.", + "title": "Pvforecast5 Albedo" + }, + "pvforecast5_inverter_model": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Model of the inverter of this plane.", + "title": "Pvforecast5 Inverter Model" + }, + "pvforecast5_inverter_paco": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "AC power rating of the inverter. [W]", + "title": "Pvforecast5 Inverter Paco" + }, + "pvforecast5_loss": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": 0, + "description": "Sum of PV system losses in percent", + "title": "Pvforecast5 Loss" + }, + "pvforecast5_module_model": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Model of the PV modules of this plane.", + "title": "Pvforecast5 Module Model" + }, + "pvforecast5_modules_per_string": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Number of the PV modules of the strings of this plane.", + "title": "Pvforecast5 Modules Per String" + }, + "pvforecast5_mountingplace": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": "free", + "description": "Type of mounting for PV system. Options are 'free' for free-standing and 'building' for building-integrated.", + "title": "Pvforecast5 Mountingplace" + }, + "pvforecast5_optimal_surface_tilt": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": false, + "description": "Calculate the optimum tilt angle. Ignored for two-axis tracking.", + "title": "Pvforecast5 Optimal Surface Tilt" + }, + "pvforecast5_optimalangles": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": false, + "description": "Calculate the optimum tilt and azimuth angles. Ignored for two-axis tracking.", + "title": "Pvforecast5 Optimalangles" + }, + "pvforecast5_peakpower": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Nominal power of PV system in kW.", + "title": "Pvforecast5 Peakpower" + }, + "pvforecast5_pvtechchoice": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": "crystSi", + "description": "PV technology. One of 'crystSi', 'CIS', 'CdTe', 'Unknown'.", + "title": "Pvforecast5 Pvtechchoice" + }, + "pvforecast5_strings_per_inverter": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Number of the strings of the inverter of this plane.", + "title": "Pvforecast5 Strings Per Inverter" + }, + "pvforecast5_surface_azimuth": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Orientation (azimuth angle) of the (fixed) plane. Clockwise from north (north=0, east=90, south=180, west=270).", + "title": "Pvforecast5 Surface Azimuth" + }, + "pvforecast5_surface_tilt": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Tilt angle from horizontal plane. Ignored for two-axis tracking.", + "title": "Pvforecast5 Surface Tilt" + }, + "pvforecast5_trackingtype": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Type of suntracking. 0=fixed, 1=single horizontal axis aligned north-south, 2=two-axis tracking, 3=vertical axis tracking, 4=single horizontal axis aligned east-west, 5=single inclined axis aligned north-south.", + "title": "Pvforecast5 Trackingtype" + }, + "pvforecast5_userhorizon": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "description": "Elevation of horizon in degrees, at equally spaced azimuth clockwise from north.", + "title": "Pvforecast5 Userhorizon" + }, + "pvforecast_provider": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "PVForecast provider id of provider to be used.", + "title": "Pvforecast Provider" + }, + "pvforecastimport_file_path": { + "anyOf": [ + { + "type": "string" + }, + { + "format": "path", + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Path to the file to import PV forecast data from.", + "title": "Pvforecastimport File Path" + }, + "pvforecastimport_json": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "JSON string, dictionary of PV forecast value lists.", + "title": "Pvforecastimport Json" + }, + "server_fastapi_host": { + "anyOf": [ + { + "format": "ipvanyaddress", + "type": "string" + }, + { + "type": "null" + } + ], + "default": "0.0.0.0", + "description": "FastAPI server IP address.", + "title": "Server Fastapi Host" + }, + "server_fastapi_port": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": 8503, + "description": "FastAPI server IP port number.", + "title": "Server Fastapi Port" + }, + "server_fastapi_startup_server_fasthtml": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": true, + "description": "FastAPI server to startup application FastHTML server.", + "title": "Server Fastapi Startup Server Fasthtml" + }, + "server_fastapi_verbose": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": false, + "description": "Enable debug output", + "title": "Server Fastapi Verbose" + }, + "server_fasthtml_host": { + "anyOf": [ + { + "format": "ipvanyaddress", + "type": "string" + }, + { + "type": "null" + } + ], + "default": "0.0.0.0", + "description": "FastHTML server IP address.", + "title": "Server Fasthtml Host" + }, + "server_fasthtml_port": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": 8504, + "description": "FastHTML server IP port number.", + "title": "Server Fasthtml Port" + }, + "weather_provider": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Weather provider id of provider to be used.", + "title": "Weather Provider" + }, + "weatherimport_file_path": { + "anyOf": [ + { + "type": "string" + }, + { + "format": "path", + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Path to the file to import weather data from.", + "title": "Weatherimport File Path" + }, + "weatherimport_json": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "JSON string, dictionary of weather forecast value lists.", + "title": "Weatherimport Json" + } + }, + "title": "SettingsEOS", + "type": "object" + }, + "SimulationResult": { + "description": "This object contains the results of the simulation and provides insights into various parameters over the entire forecast period.", + "properties": { + "EAuto_SoC_pro_Stunde": { + "description": "The state of charge of the EV for each hour.", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ] + }, + "title": "Eauto Soc Pro Stunde", + "type": "array" + }, + "Einnahmen_Euro_pro_Stunde": { + "description": "The revenue from grid feed-in or other sources in euros per hour.", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ] + }, + "title": "Einnahmen Euro Pro Stunde", + "type": "array" + }, + "Electricity_price": { + "description": "Used Electricity Price, including predictions", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ] + }, + "title": "Electricity Price", + "type": "array" + }, + "Gesamt_Verluste": { + "description": "The total losses in watt-hours over the entire period.", + "title": "Gesamt Verluste", + "type": "number" + }, + "Gesamtbilanz_Euro": { + "description": "The total balance of revenues minus costs in euros.", + "title": "Gesamtbilanz Euro", + "type": "number" + }, + "Gesamteinnahmen_Euro": { + "description": "The total revenues in euros.", + "title": "Gesamteinnahmen Euro", + "type": "number" + }, + "Gesamtkosten_Euro": { + "description": "The total costs in euros.", + "title": "Gesamtkosten Euro", + "type": "number" + }, + "Home_appliance_wh_per_hour": { + "description": "The energy consumption of a household appliance in watt-hours per hour.", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ] + }, + "title": "Home Appliance Wh Per Hour", + "type": "array" + }, + "Kosten_Euro_pro_Stunde": { + "description": "The costs in euros per hour.", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ] + }, + "title": "Kosten Euro Pro Stunde", + "type": "array" + }, + "Last_Wh_pro_Stunde": { + "description": "TBD", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ] + }, + "title": "Last Wh Pro Stunde", + "type": "array" + }, + "Netzbezug_Wh_pro_Stunde": { + "description": "The grid energy drawn in watt-hours per hour.", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ] + }, + "title": "Netzbezug Wh Pro Stunde", + "type": "array" + }, + "Netzeinspeisung_Wh_pro_Stunde": { + "description": "The energy fed into the grid in watt-hours per hour.", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ] + }, + "title": "Netzeinspeisung Wh Pro Stunde", + "type": "array" + }, + "Verluste_Pro_Stunde": { + "description": "The losses in watt-hours per hour.", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ] + }, + "title": "Verluste Pro Stunde", + "type": "array" + }, + "akku_soc_pro_stunde": { + "description": "The state of charge of the battery (not the EV) in percentage per hour.", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ] + }, + "title": "Akku Soc Pro Stunde", + "type": "array" + } + }, + "required": [ + "Last_Wh_pro_Stunde", + "EAuto_SoC_pro_Stunde", + "Einnahmen_Euro_pro_Stunde", + "Gesamt_Verluste", + "Gesamtbilanz_Euro", + "Gesamteinnahmen_Euro", + "Gesamtkosten_Euro", + "Home_appliance_wh_per_hour", + "Kosten_Euro_pro_Stunde", + "Netzbezug_Wh_pro_Stunde", + "Netzeinspeisung_Wh_pro_Stunde", + "Verluste_Pro_Stunde", + "akku_soc_pro_stunde", + "Electricity_price" + ], + "title": "SimulationResult", + "type": "object" + }, + "SolarPanelBatteryParameters": { + "properties": { + "capacity_wh": { + "description": "An integer representing the capacity of the battery in watt-hours.", + "exclusiveMinimum": 0.0, + "title": "Capacity Wh", + "type": "integer" + }, + "charging_efficiency": { + "default": 0.88, + "description": "A float representing the charging efficiency of the battery.", + "exclusiveMinimum": 0.0, + "maximum": 1.0, + "title": "Charging Efficiency", + "type": "number" + }, + "discharging_efficiency": { + "default": 0.88, + "description": "A float representing the discharge efficiency of the battery.", + "exclusiveMinimum": 0.0, + "maximum": 1.0, + "title": "Discharging Efficiency", + "type": "number" + }, + "initial_soc_percentage": { + "default": 0, + "description": "An integer representing the state of charge of the battery at the **start** of the current hour (not the current state).", + "maximum": 100.0, + "minimum": 0.0, + "title": "Initial Soc Percentage", + "type": "integer" + }, + "max_charge_power_w": { + "anyOf": [ + { + "exclusiveMinimum": 0.0, + "type": "number" + }, + { + "type": "null" + } + ], + "default": 5000, + "description": "Maximum charging power in watts.", + "title": "Max Charge Power W" + }, + "max_soc_percentage": { + "default": 100, + "description": "An integer representing the maximum state of charge (SOC) of the battery in percentage.", + "maximum": 100.0, + "minimum": 0.0, + "title": "Max Soc Percentage", + "type": "integer" + }, + "min_soc_percentage": { + "default": 0, + "description": "An integer representing the minimum state of charge (SOC) of the battery in percentage.", + "maximum": 100.0, + "minimum": 0.0, + "title": "Min Soc Percentage", + "type": "integer" + } + }, + "required": [ + "capacity_wh" + ], + "title": "SolarPanelBatteryParameters", + "type": "object" + }, + "ValidationError": { + "properties": { + "loc": { + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "title": "Location", + "type": "array" + }, + "msg": { + "title": "Message", + "type": "string" + }, + "type": { + "title": "Error Type", + "type": "string" + } + }, + "required": [ + "loc", + "msg", + "type" + ], + "title": "ValidationError", + "type": "object" + } + } + }, + "info": { + "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.", + "title": "Akkudoktor-EOS", + "version": "0.0.1" + }, + "openapi": "3.1.0", + "paths": { + "/gesamtlast": { + "post": { + "description": "Deprecated: Total Load Prediction with adjustment.\n\nEndpoint to handle total load prediction adjusted by latest measured data.\n\nNote:\n Use '/v1/prediction/list?key=load_mean_adjusted' instead.\n Load energy meter readings to be added to EOS measurement by:\n '/v1/measurement/load-mr/value/by-name' or\n '/v1/measurement/value'", + "operationId": "fastapi_gesamtlast_gesamtlast_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GesamtlastRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "type": "number" + }, + "title": "Response Fastapi Gesamtlast Gesamtlast Post", + "type": "array" + } + } + }, + "description": "Successful Response" + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + }, + "description": "Validation Error" + } + }, + "summary": "Fastapi Gesamtlast" + } + }, + "/gesamtlast_simple": { + "get": { + "description": "Deprecated: Total Load Prediction.\n\nEndpoint to handle total load prediction.\n\nNote:\n Set LoadAkkudoktor as load_provider, then update data with\n '/v1/prediction/update'\n and then request data with\n '/v1/prediction/list?key=load_mean' instead.", + "operationId": "fastapi_gesamtlast_simple_gesamtlast_simple_get", + "parameters": [ + { + "in": "query", + "name": "year_energy", + "required": true, + "schema": { + "title": "Year Energy", + "type": "number" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "type": "number" + }, + "title": "Response Fastapi Gesamtlast Simple Gesamtlast Simple Get", + "type": "array" + } + } + }, + "description": "Successful Response" + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + }, + "description": "Validation Error" + } + }, + "summary": "Fastapi Gesamtlast Simple" + } + }, + "/optimize": { + "post": { + "operationId": "fastapi_optimize_optimize_post", + "parameters": [ + { + "description": "Defaults to current hour of the day.", + "in": "query", + "name": "start_hour", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Defaults to current hour of the day.", + "title": "Start Hour" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OptimizationParameters" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OptimizeResponse" + } + } + }, + "description": "Successful Response" + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + }, + "description": "Validation Error" + } + }, + "summary": "Fastapi Optimize" + } + }, + "/pvforecast": { + "get": { + "description": "Deprecated: PV Forecast Prediction.\n\nEndpoint to handle PV forecast prediction.\n\nNote:\n Set PVForecastAkkudoktor as pvforecast_provider, then update data with\n '/v1/prediction/update'\n and then request data with\n '/v1/prediction/list?key=pvforecast_ac_power' and\n '/v1/prediction/list?key=pvforecastakkudoktor_temp_air' instead.", + "operationId": "fastapi_pvforecast_pvforecast_get", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForecastResponse" + } + } + }, + "description": "Successful Response" + } + }, + "summary": "Fastapi Pvforecast" + } + }, + "/strompreis": { + "get": { + "description": "Deprecated: Electricity Market Price Prediction per Wh (\u20ac/Wh).\n\nNote:\n Set ElecPriceAkkudoktor as elecprice_provider, then update data with\n '/v1/prediction/update'\n and then request data with\n '/v1/prediction/list?key=elecprice_marketprice_wh' or\n '/v1/prediction/list?key=elecprice_marketprice_kwh' instead.", + "operationId": "fastapi_strompreis_strompreis_get", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "type": "number" + }, + "title": "Response Fastapi Strompreis Strompreis Get", + "type": "array" + } + } + }, + "description": "Successful Response" + } + }, + "summary": "Fastapi Strompreis" + } + }, + "/v1/config": { + "get": { + "description": "Get the current configuration.", + "operationId": "fastapi_config_get_v1_config_get", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConfigEOS" + } + } + }, + "description": "Successful Response" + } + }, + "summary": "Fastapi Config Get" + }, + "put": { + "description": "Merge settings into current configuration.\n\nArgs:\n settings (SettingsEOS): The settings to merge into the current configuration.\n save (Optional[bool]): Save the resulting configuration to the configuration file.\n Defaults to False.", + "operationId": "fastapi_config_put_v1_config_put", + "parameters": [ + { + "in": "query", + "name": "save", + "required": false, + "schema": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Save" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SettingsEOS" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConfigEOS" + } + } + }, + "description": "Successful Response" + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + }, + "description": "Validation Error" + } + }, + "summary": "Fastapi Config Put" + } + }, + "/v1/measurement/data": { + "put": { + "description": "Merge the measurement data given as datetime data into EOS measurements.", + "operationId": "fastapi_measurement_data_put_v1_measurement_data_put", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PydanticDateTimeData" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": {} + } + }, + "description": "Successful Response" + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + }, + "description": "Validation Error" + } + }, + "summary": "Fastapi Measurement Data Put" + } + }, + "/v1/measurement/dataframe": { + "put": { + "description": "Merge the measurement data given as dataframe into EOS measurements.", + "operationId": "fastapi_measurement_dataframe_put_v1_measurement_dataframe_put", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PydanticDateTimeDataFrame" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": {} + } + }, + "description": "Successful Response" + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + }, + "description": "Validation Error" + } + }, + "summary": "Fastapi Measurement Dataframe Put" + } + }, + "/v1/measurement/keys": { + "get": { + "description": "Get a list of available measurement keys.", + "operationId": "fastapi_measurement_keys_get_v1_measurement_keys_get", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "type": "string" + }, + "title": "Response Fastapi Measurement Keys Get V1 Measurement Keys Get", + "type": "array" + } + } + }, + "description": "Successful Response" + } + }, + "summary": "Fastapi Measurement Keys Get" + } + }, + "/v1/measurement/load-mr/series/by-name": { + "get": { + "description": "Get the meter reading of given load name as series.", + "operationId": "fastapi_measurement_load_mr_series_by_name_get_v1_measurement_load_mr_series_by_name_get", + "parameters": [ + { + "description": "Load name.", + "in": "query", + "name": "name", + "required": true, + "schema": { + "description": "Load name.", + "title": "Name", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PydanticDateTimeSeries" + } + } + }, + "description": "Successful Response" + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + }, + "description": "Validation Error" + } + }, + "summary": "Fastapi Measurement Load Mr Series By Name Get" + }, + "put": { + "description": "Merge the meter readings series of given load name into EOS measurements at given datetime.", + "operationId": "fastapi_measurement_load_mr_series_by_name_put_v1_measurement_load_mr_series_by_name_put", + "parameters": [ + { + "description": "Load name.", + "in": "query", + "name": "name", + "required": true, + "schema": { + "description": "Load name.", + "title": "Name", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PydanticDateTimeSeries" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PydanticDateTimeSeries" + } + } + }, + "description": "Successful Response" + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + }, + "description": "Validation Error" + } + }, + "summary": "Fastapi Measurement Load Mr Series By Name Put" + } + }, + "/v1/measurement/load-mr/value/by-name": { + "put": { + "description": "Merge the meter reading of given load name and value into EOS measurements at given datetime.", + "operationId": "fastapi_measurement_load_mr_value_by_name_put_v1_measurement_load_mr_value_by_name_put", + "parameters": [ + { + "description": "Datetime.", + "in": "query", + "name": "datetime", + "required": true, + "schema": { + "description": "Datetime.", + "title": "Datetime", + "type": "string" + } + }, + { + "description": "Load name.", + "in": "query", + "name": "name", + "required": true, + "schema": { + "description": "Load name.", + "title": "Name", + "type": "string" + } + }, + { + "in": "query", + "name": "value", + "required": true, + "schema": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ], + "title": "Value" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PydanticDateTimeSeries" + } + } + }, + "description": "Successful Response" + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + }, + "description": "Validation Error" + } + }, + "summary": "Fastapi Measurement Load Mr Value By Name Put" + } + }, + "/v1/measurement/series": { + "get": { + "description": "Get the measurements of given key as series.", + "operationId": "fastapi_measurement_series_get_v1_measurement_series_get", + "parameters": [ + { + "description": "Prediction key.", + "in": "query", + "name": "key", + "required": true, + "schema": { + "description": "Prediction key.", + "title": "Key", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PydanticDateTimeSeries" + } + } + }, + "description": "Successful Response" + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + }, + "description": "Validation Error" + } + }, + "summary": "Fastapi Measurement Series Get" + }, + "put": { + "description": "Merge measurement given as series into given key.", + "operationId": "fastapi_measurement_series_put_v1_measurement_series_put", + "parameters": [ + { + "description": "Prediction key.", + "in": "query", + "name": "key", + "required": true, + "schema": { + "description": "Prediction key.", + "title": "Key", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PydanticDateTimeSeries" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PydanticDateTimeSeries" + } + } + }, + "description": "Successful Response" + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + }, + "description": "Validation Error" + } + }, + "summary": "Fastapi Measurement Series Put" + } + }, + "/v1/measurement/value": { + "put": { + "description": "Merge the measurement of given key and value into EOS measurements at given datetime.", + "operationId": "fastapi_measurement_value_put_v1_measurement_value_put", + "parameters": [ + { + "description": "Datetime.", + "in": "query", + "name": "datetime", + "required": true, + "schema": { + "description": "Datetime.", + "title": "Datetime", + "type": "string" + } + }, + { + "description": "Prediction key.", + "in": "query", + "name": "key", + "required": true, + "schema": { + "description": "Prediction key.", + "title": "Key", + "type": "string" + } + }, + { + "in": "query", + "name": "value", + "required": true, + "schema": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ], + "title": "Value" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PydanticDateTimeSeries" + } + } + }, + "description": "Successful Response" + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + }, + "description": "Validation Error" + } + }, + "summary": "Fastapi Measurement Value Put" + } + }, + "/v1/prediction/keys": { + "get": { + "description": "Get a list of available prediction keys.", + "operationId": "fastapi_prediction_keys_get_v1_prediction_keys_get", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "type": "string" + }, + "title": "Response Fastapi Prediction Keys Get V1 Prediction Keys Get", + "type": "array" + } + } + }, + "description": "Successful Response" + } + }, + "summary": "Fastapi Prediction Keys Get" + } + }, + "/v1/prediction/list": { + "get": { + "description": "Get prediction for given key within given date range as value list.\n\nArgs:\n key (str): Prediction key\n start_datetime (Optional[str]): Starting datetime (inclusive).\n Defaults to start datetime of latest prediction.\n end_datetime (Optional[str]: Ending datetime (exclusive).\n Defaults to end datetime of latest prediction.\n interval (Optional[str]): Time duration for each interval.\n Defaults to 1 hour.", + "operationId": "fastapi_prediction_list_get_v1_prediction_list_get", + "parameters": [ + { + "description": "Prediction key.", + "in": "query", + "name": "key", + "required": true, + "schema": { + "description": "Prediction key.", + "title": "Key", + "type": "string" + } + }, + { + "description": "Starting datetime (inclusive).", + "in": "query", + "name": "start_datetime", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Starting datetime (inclusive).", + "title": "Start Datetime" + } + }, + { + "description": "Ending datetime (exclusive).", + "in": "query", + "name": "end_datetime", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Ending datetime (exclusive).", + "title": "End Datetime" + } + }, + { + "description": "Time duration for each interval.", + "in": "query", + "name": "interval", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Time duration for each interval.", + "title": "Interval" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": {}, + "title": "Response Fastapi Prediction List Get V1 Prediction List Get", + "type": "array" + } + } + }, + "description": "Successful Response" + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + }, + "description": "Validation Error" + } + }, + "summary": "Fastapi Prediction List Get" + } + }, + "/v1/prediction/series": { + "get": { + "description": "Get prediction for given key within given date range as series.\n\nArgs:\n key (str): Prediction key\n start_datetime (Optional[str]): Starting datetime (inclusive).\n Defaults to start datetime of latest prediction.\n end_datetime (Optional[str]: Ending datetime (exclusive).\n Defaults to end datetime of latest prediction.", + "operationId": "fastapi_prediction_series_get_v1_prediction_series_get", + "parameters": [ + { + "description": "Prediction key.", + "in": "query", + "name": "key", + "required": true, + "schema": { + "description": "Prediction key.", + "title": "Key", + "type": "string" + } + }, + { + "description": "Starting datetime (inclusive).", + "in": "query", + "name": "start_datetime", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Starting datetime (inclusive).", + "title": "Start Datetime" + } + }, + { + "description": "Ending datetime (exclusive).", + "in": "query", + "name": "end_datetime", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Ending datetime (exclusive).", + "title": "End Datetime" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PydanticDateTimeSeries" + } + } + }, + "description": "Successful Response" + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + }, + "description": "Validation Error" + } + }, + "summary": "Fastapi Prediction Series Get" + } + }, + "/v1/prediction/update": { + "post": { + "description": "Update predictions for all providers.\n\nArgs:\n force_update: Update data even if it is already cached.\n Defaults to False.\n force_enable: Update data even if provider is disabled.\n Defaults to False.", + "operationId": "fastapi_prediction_update_v1_prediction_update_post", + "parameters": [ + { + "in": "query", + "name": "force_update", + "required": false, + "schema": { + "default": false, + "title": "Force Update", + "type": "boolean" + } + }, + { + "in": "query", + "name": "force_enable", + "required": false, + "schema": { + "default": false, + "title": "Force Enable", + "type": "boolean" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": {} + } + }, + "description": "Successful Response" + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + }, + "description": "Validation Error" + } + }, + "summary": "Fastapi Prediction Update" + } + }, + "/v1/prediction/update/{provider_id}": { + "post": { + "description": "Update predictions for given provider ID.\n\nArgs:\n provider_id: ID of provider to update.\n force_update: Update data even if it is already cached.\n Defaults to False.\n force_enable: Update data even if provider is disabled.\n Defaults to False.", + "operationId": "fastapi_prediction_update_provider_v1_prediction_update__provider_id__post", + "parameters": [ + { + "in": "path", + "name": "provider_id", + "required": true, + "schema": { + "title": "Provider Id", + "type": "string" + } + }, + { + "in": "query", + "name": "force_update", + "required": false, + "schema": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": false, + "title": "Force Update" + } + }, + { + "in": "query", + "name": "force_enable", + "required": false, + "schema": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": false, + "title": "Force Enable" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": {} + } + }, + "description": "Successful Response" + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + }, + "description": "Validation Error" + } + }, + "summary": "Fastapi Prediction Update Provider" + } + }, + "/visualization_results.pdf": { + "get": { + "operationId": "get_pdf_visualization_results_pdf_get", + "responses": { + "200": { + "content": { + "application/pdf": { + "schema": { + "type": "string" + } + } + }, + "description": "Successful Response" + } + }, + "summary": "Get Pdf" + } + } + } +} \ No newline at end of file diff --git a/requirements-dev.txt b/requirements-dev.txt index 4a98ca24..ee222c2a 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -3,7 +3,7 @@ linkify-it-py==2.0.3 myst-parser==4.0.0 sphinx==8.1.3 sphinx_rtd_theme==3.0.2 -sphinxcontrib-openapi==0.8.4 +sphinxcontrib-eval==0.0.3 pytest==8.3.4 pytest-cov==6.0.0 pytest-xprocess==1.0.2 diff --git a/scripts/__init__.py b/scripts/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/scripts/extract_markdown.py b/scripts/extract_markdown.py new file mode 100755 index 00000000..10646a51 --- /dev/null +++ b/scripts/extract_markdown.py @@ -0,0 +1,179 @@ +#!.venv/bin/python +r"""This module extracts a part of a markdown string from an input file or a given input string. + +The extraction starts at a line that contains the content specified by the `--start-line` parameter +and ends at a line that contains the content specified by the `--end-line` parameter. +If `--start-line` is not specified, extraction starts from the beginning of the file or string. +If `--end-line` is not specified, extraction goes to the end of the file or string. + +The extracted markdown string is written either to stdout or to the specified output file. +Additionally, the heading levels can be adjusted by specifying the `--heading-level` parameter. + +Usage: + scripts/extract_markdown.py [--input-file INPUT_FILE | --input INPUT_STRING] [--start-line START_LINE] [--end-line END_LINE] [--output-file OUTPUT_FILE] [--heading-level HEADING_LEVEL] + +Arguments: + --input-file : The file path to read the markdown content from. + --input : The markdown content as a string. + --start-line : Optional. The string content of the start line from where extraction begins. + --end-line : Optional. The string content of the end line where extraction ends. + --output-file : Optional. The file path to write the extracted markdown content to. + --heading-level: Optional. The number of additional `#` to add to markdown headings or to remove + from markdown headings if negative. + +Example: + scripts/extract_markdown.py --input-file input.md --start-line "# Start" --end-line "# End" --output-file output.md --heading-level 1 + scripts/extract_markdown.py --input "# Start\n\nSome content here\n\n# End" --start-line "# Start" --end-line "# End" --output-file output.md --heading-level 1 +""" + +""" +This module extracts a part of a markdown string from an input file or a given input string. + +The extraction starts at a line that contains the content specified by the `--start-line` parameter +and ends at a line that contains the content specified by the `--end-line` parameter. +If `--start-line` is not specified, extraction starts from the beginning of the file or string. +If `--end-line` is not specified, extraction goes to the end of the file or string. + +The extracted markdown string is written either to stdout or to the specified output file. +Additionally, the heading levels can be adjusted by specifying the `--heading-level` parameter. + +Usage: + python extract_markdown.py [--input-file INPUT_FILE | --input INPUT_STRING | --input-stdin] [--start-line START_LINE] [--end-line END_LINE] [--output-file OUTPUT_FILE] [--heading-level HEADING_LEVEL] + +Arguments: + --input-file : The file path to read the markdown content from. + --input : The markdown content as a string. + --input-stdin : Read markdown content from stdin. + --start-line : Optional. The string content of the start line from where extraction begins. + --end-line : Optional. The string content of the end line where extraction ends. + --output-file : Optional. The file path to write the extracted markdown content to. + --heading-level: Optional. The number of additional `#` to add to markdown headings or to remove from markdown headings if negative. + +Example: + python extract_markdown.py --input-file input.md --start-line "# Start" --end-line "# End" --output-file output.md --heading-level 1 + python extract_markdown.py --input "# Start\n\nSome content here\n\n# End" --start-line "# Start" --end-line "# End" --output-file output.md --heading-level 1 +""" + +import argparse +import re +import sys + + +def adjust_heading_levels(line: str, heading_level: int) -> str: + """Adjust the heading levels in a markdown line. + + Args: + line (str): The markdown line. + heading_level (int): The number of levels to adjust the headings by. + + Returns: + adjusted_line (str): The line with adjusted heading levels. + """ + heading_pattern = re.compile(r"^(#+)\s") + match = heading_pattern.match(line) + if match: + current_level = len(match.group(1)) + new_level = current_level + heading_level + if new_level > 0: + adjusted_line = "#" * new_level + line[current_level:] + else: + adjusted_line = line[current_level:] + else: + adjusted_line = line + return adjusted_line + + +def extract_markdown(content: str, start_line: str, end_line: str, heading_level: int) -> str: + """Extract a part of a markdown string from given content. + + Args: + content (str): The markdown content. + start_line (str): The string content of the start line from where extraction begins. + end_line (str): The string content of the end line where extraction ends. + heading_level (int): The number of levels to adjust the headings by. + + Returns: + extracted_content (str): Extracted markdown content as a string. + """ + extracted_content = [] + lines = content.splitlines(True) + extracting = start_line is None + for line in lines: + if not extracting and start_line and start_line in line: + extracting = True + extracted_content.append( + adjust_heading_levels(line, heading_level) + ) # Include start line in output + continue + if extracting and end_line and end_line in line: + extracting = False + break + if extracting: + extracted_content.append(adjust_heading_levels(line, heading_level)) + return "".join(extracted_content) + + +def main(): + """Main function to run the extraction of the markdown content.""" + parser = argparse.ArgumentParser( + description="Extract a part of a markdown string from an input file" + ) + group = parser.add_mutually_exclusive_group(required=True) + group.add_argument("--input-file", type=str, help="File to read the markdown content from") + group.add_argument("--input", type=str, help="Markdown content as a string") + group.add_argument( + "--input-stdin", action="store_true", help="Read markdown content from stdin" + ) + parser.add_argument( + "--start-line", + type=str, + default=None, + help="Optional. The string content of the start line", + ) + parser.add_argument( + "--end-line", type=str, default=None, help="Optional. The string content of the end line" + ) + parser.add_argument( + "--output-file", + type=str, + default=None, + help="File to write the extracted markdown content to", + ) + parser.add_argument( + "--heading-level", + type=int, + default=0, + help="The number of additional `#` to add to markdown headings or to remove from markdown headings if negative", + ) + + args = parser.parse_args() + + try: + if args.input_file: + with open(args.input_file, "r") as f: + content = f.read() + elif args.input: + content = args.input + elif args.input_stdin: + content = sys.stdin.read() + else: + raise ValueError("No valid input source provided.") + + extracted_content = extract_markdown( + content, args.start_line, args.end_line, args.heading_level + ) + if args.output_file: + # Write to file + with open(args.output_file, "w") as f: + f.write(extracted_content) + else: + # Write to std output + print(extracted_content) + + except Exception as e: + print(f"Error during markdown extraction: {e}", file=sys.stderr) + sys.exit(1) + + +if __name__ == "__main__": + main() diff --git a/scripts/generate_openapi.py b/scripts/generate_openapi.py new file mode 100755 index 00000000..8c9e108e --- /dev/null +++ b/scripts/generate_openapi.py @@ -0,0 +1,69 @@ +#!.venv/bin/python +"""This module generates the OpenAPI specification for the FastAPI application defined in `akkudoktoreos.server.fastapi_server`. + +The script can be executed directly to generate the OpenAPI specification +either to the standard output or to a specified file. + +Usage: + scripts/generate_openapi.py [--output-file OUTPUT_FILE] + +Arguments: + --output-file : Optional. The file path to write the OpenAPI specification to. + +Example: + scripts/generate_openapi.py --output-file openapi.json +""" + +import argparse +import json +import sys + +from fastapi.openapi.utils import get_openapi + +from akkudoktoreos.server.fastapi_server import app + + +def generate_openapi() -> dict: + """Generate the OpenAPI specification. + + Returns: + openapi_spec (dict): OpenAPI specification. + """ + openapi_spec = get_openapi( + title=app.title, + version=app.version, + openapi_version=app.openapi_version, + description=app.description, + routes=app.routes, + ) + + return openapi_spec + + +def main(): + """Main function to run the generation of the OpenAPI specification.""" + parser = argparse.ArgumentParser(description="Generate OpenAPI Specification") + parser.add_argument( + "--output-file", type=str, default=None, help="File to write the OpenAPI Specification to" + ) + + args = parser.parse_args() + + try: + openapi_spec = generate_openapi() + openapi_spec_str = json.dumps(openapi_spec, indent=2) + if args.output_file: + # Write to file + with open(args.output_file, "w") as f: + f.write(openapi_spec_str) + else: + # Write to std output + print(openapi_spec_str) + + except Exception as e: + print(f"Error during OpenAPI specification generation: {e}", file=sys.stderr) + sys.exit(1) + + +if __name__ == "__main__": + main() diff --git a/scripts/generate_openapi_md.py b/scripts/generate_openapi_md.py new file mode 100755 index 00000000..7617eb28 --- /dev/null +++ b/scripts/generate_openapi_md.py @@ -0,0 +1,239 @@ +#!.venv/bin/python +"""Utility functions for OpenAPI specification conversion tasks.""" + +import argparse +import json +import sys + +if __package__ is None or __package__ == "": + # uses current directory visibility + import generate_openapi +else: + # uses current package visibility + from . import generate_openapi + + +def extract_info(openapi_json: dict) -> dict: + """Extract basic information from OpenAPI JSON. + + Args: + openapi_json (dict): The OpenAPI specification as a Python dictionary. + + Returns: + dict: A dictionary containing the title, version, description, and base_url. + """ + info = openapi_json.get("info", {}) + servers = openapi_json.get("servers", [{}]) + + return { + "title": info.get("title", "API Documentation"), + "version": info.get("version", "1.0.0"), + "description": info.get("description", "No description provided."), + "base_url": servers[0].get("url", "No base URL provided."), + } + + +def format_authentication(security_schemes: dict) -> str: + """Format the authentication section for the Markdown. + + Args: + security_schemes (dict): The security schemes from the OpenAPI spec. + + Returns: + str: The formatted authentication section in Markdown. + """ + if not security_schemes: + return "" + + markdown = "## Authentication\n\n" + for scheme, details in security_schemes.items(): + auth_type = details.get("type", "unknown") + markdown += f"- **{scheme}**: {auth_type}\n\n" + return markdown + + +def format_parameters(parameters: list) -> str: + """Format the parameters section for the Markdown. + + Args: + parameters (list): The list of parameters from an endpoint. + + Returns: + str: The formatted parameters section in Markdown. + """ + if not parameters: + return "" + + markdown = "**Parameters**:\n\n" + for param in parameters: + name = param.get("name", "unknown") + location = param.get("in", "unknown") + required = param.get("required", False) + description = param.get("description", "No description provided.") + markdown += ( + f"- `{name}` ({location}, {'required' if required else 'optional'}): {description}\n\n" + ) + return markdown + + +def format_request_body(request_body: dict) -> str: + """Format the request body section for the Markdown. + + Args: + request_body (dict): The request body content from an endpoint. + + Returns: + str: The formatted request body section in Markdown. + """ + if not request_body: + return "" + + markdown = "**Request Body**:\n\n" + for content_type, schema in request_body.items(): + markdown += f"- `{content_type}`: {json.dumps(schema.get('schema', {}), indent=2)}\n\n" + return markdown + + +def format_responses(responses: dict) -> str: + """Format the responses section for the Markdown. + + Args: + responses (dict): The responses from an endpoint. + + Returns: + str: The formatted responses section in Markdown. + """ + if not responses: + return "" + + markdown = "**Responses**:\n\n" + for status, response in responses.items(): + desc = response.get("description", "No description provided.") + markdown += f"- **{status}**: {desc}\n\n" + return markdown + + +def format_endpoint(path: str, method: str, details: dict) -> str: + """Format a single endpoint's details for the Markdown. + + Args: + path (str): The endpoint path. + method (str): The HTTP method. + details (dict): The details of the endpoint. + + Returns: + str: The formatted endpoint section in Markdown. + """ + # [local](http://localhost:8503/docs#/default/fastapi_config_get_v1_config_get) + local_path = ( + "[local](http://localhost:8503/docs#/default/" + + details.get("summary", "") + .lower() + .strip() + .replace(" ", "_") + .replace("-", "_") + + path.lower().strip().replace("/", "_").replace(".", "_") + + f"_{method.lower()})" + ) + # [swagger](https://petstore3.swagger.io/?url=https://raw.githubusercontent.com/Akkudoktor-EOS/EOS/refs/heads/main/docs/akkudoktoreos/openapi.json#/default/fastapi_strompreis_strompreis_get) + swagger_path = ( + "[swagger](https://petstore3.swagger.io/?url=https://raw.githubusercontent.com/Akkudoktor-EOS/EOS/refs/heads/main/docs/akkudoktoreos/openapi.json#/default/" + + details.get("summary", "") + .lower() + .strip() + .replace(" ", "_") + .replace("-", "_") + + path.lower().strip().replace("/", "_").replace(".", "_") + + f"_{method.lower()})" + ) + + markdown = f"## {method.upper()} {path}\n\n" + + markdown += f"**Links**: {local_path}, {swagger_path}\n\n" + + summary = details.get("summary", None) + if summary: + markdown += f"{summary}\n\n" + + description = details.get("description", None) + if description: + markdown += "```\n" + markdown += f"{description}" + markdown += "\n```\n\n" + + markdown += format_parameters(details.get("parameters", [])) + markdown += format_request_body(details.get("requestBody", {}).get("content", {})) + markdown += format_responses(details.get("responses", {})) + markdown += "---\n\n" + + return markdown + + +def openapi_to_markdown(openapi_json: dict) -> str: + """Convert OpenAPI JSON specification to a Markdown representation. + + Args: + openapi_json (dict): The OpenAPI specification as a Python dictionary. + + Returns: + str: The Markdown representation of the OpenAPI spec. + """ + info = extract_info(openapi_json) + markdown = f"# {info['title']}\n\n" + markdown += f"**Version**: `{info['version']}`\n\n" + markdown += f"**Description**: {info['description']}\n\n" + markdown += f"**Base URL**: `{info['base_url']}`\n\n" + + security_schemes = openapi_json.get("components", {}).get("securitySchemes", {}) + markdown += format_authentication(security_schemes) + + markdown += "**Endpoints**:\n\n" + paths = openapi_json.get("paths", {}) + for path, methods in paths.items(): + for method, details in methods.items(): + markdown += format_endpoint(path, method, details) + + # Assure the is no double \n at end of file + markdown = markdown.rstrip("\n") + markdown += "\n" + + return markdown + + +def generate_openapi_md() -> str: + """Generate OpenAPI specification in Markdown. + + Returns: + str: The Markdown representation of the OpenAPI spec. + """ + openapi_spec = generate_openapi.generate_openapi() + openapi_md = openapi_to_markdown(openapi_spec) + return openapi_md + + +def main(): + """Main function to run the generation of the OpenAPI specification as Markdown.""" + parser = argparse.ArgumentParser(description="Generate OpenAPI Specification as Markdown") + parser.add_argument( + "--output-file", type=str, default=None, help="File to write the OpenAPI Specification to" + ) + + args = parser.parse_args() + + try: + openapi_md = generate_openapi_md() + if args.output_file: + # Write to file + with open(args.output_file, "w") as f: + f.write(openapi_md) + else: + # Write to std output + print(openapi_md) + + except Exception as e: + print(f"Error during OpenAPI specification generation: {e}", file=sys.stderr) + sys.exit(1) + + +if __name__ == "__main__": + main() diff --git a/src/akkudoktoreos/prediction/load.py b/src/akkudoktoreos/prediction/load.py index d9fd46aa..48e9bf72 100644 --- a/src/akkudoktoreos/prediction/load.py +++ b/src/akkudoktoreos/prediction/load.py @@ -11,8 +11,6 @@ class LoadCommonSettings(SettingsBaseModel): - # Load 0 load_provider: Optional[str] = Field( default=None, description="Load provider id of provider to be used." ) - load_name: Optional[str] = Field(default=None, description="Name of the load source.") diff --git a/src/akkudoktoreos/prediction/loadabc.py b/src/akkudoktoreos/prediction/loadabc.py index 0813ee23..06a6b1dd 100644 --- a/src/akkudoktoreos/prediction/loadabc.py +++ b/src/akkudoktoreos/prediction/loadabc.py @@ -18,13 +18,12 @@ class LoadDataRecord(PredictionRecord): """Represents a load data record containing various load attributes at a specific datetime.""" - load_mean: Optional[float] = Field(default=None, description="Predicted load mean value (W)") + load_mean: Optional[float] = Field(default=None, description="Predicted load mean value (W).") load_std: Optional[float] = Field( - default=None, description="Predicted load standard deviation (W)" + default=None, description="Predicted load standard deviation (W)." ) - load_mean_adjusted: Optional[float] = Field( - default=None, description="Predicted load mean value adjusted by load measurement (W)" + default=None, description="Predicted load mean value adjusted by load measurement (W)." ) diff --git a/src/akkudoktoreos/prediction/pvforecastabc.py b/src/akkudoktoreos/prediction/pvforecastabc.py index 11ab76d4..98f31dbf 100644 --- a/src/akkudoktoreos/prediction/pvforecastabc.py +++ b/src/akkudoktoreos/prediction/pvforecastabc.py @@ -18,8 +18,8 @@ class PVForecastDataRecord(PredictionRecord): """Represents a pvforecast data record containing various pvforecast attributes at a specific datetime.""" - pvforecast_dc_power: Optional[float] = Field(default=None, description="Total DC power (W)") - pvforecast_ac_power: Optional[float] = Field(default=None, description="Total AC power (W)") + pvforecast_dc_power: Optional[float] = Field(default=None, description="Total DC power (W).") + pvforecast_ac_power: Optional[float] = Field(default=None, description="Total AC power (W).") class PVForecastProvider(PredictionProvider): diff --git a/src/akkudoktoreos/prediction/pvforecastimport.py b/src/akkudoktoreos/prediction/pvforecastimport.py index 9a3a9a2b..a63fa27a 100644 --- a/src/akkudoktoreos/prediction/pvforecastimport.py +++ b/src/akkudoktoreos/prediction/pvforecastimport.py @@ -23,13 +23,12 @@ class PVForecastImportCommonSettings(SettingsBaseModel): """Common settings for pvforecast data import from file or JSON string.""" pvforecastimport_file_path: Optional[Union[str, Path]] = Field( - default=None, description="Path to the file to import pvforecast data from." + default=None, description="Path to the file to import PV forecast data from." ) pvforecastimport_json: Optional[str] = Field( default=None, - description="JSON string, dictionary of PV forecast float value lists." - "Keys are 'pvforecast_dc_power', 'pvforecast_ac_power'.", + description="JSON string, dictionary of PV forecast value lists.", ) # Validators diff --git a/src/akkudoktoreos/prediction/weatherabc.py b/src/akkudoktoreos/prediction/weatherabc.py index 2be3ca2b..b2468a7e 100644 --- a/src/akkudoktoreos/prediction/weatherabc.py +++ b/src/akkudoktoreos/prediction/weatherabc.py @@ -56,7 +56,7 @@ class WeatherDataRecord(PredictionRecord): default=None, description="Low Clouds (% Sky Obscured)" ) weather_medium_clouds: Optional[float] = Field( - None, description="Medium Clouds (% Sky Obscured)" + default=None, description="Medium Clouds (% Sky Obscured)" ) weather_high_clouds: Optional[float] = Field( default=None, description="High Clouds (% Sky Obscured)" diff --git a/src/akkudoktoreos/server/fastapi_server.py b/src/akkudoktoreos/server/fastapi_server.py index ba1e41f5..507bca2e 100755 --- a/src/akkudoktoreos/server/fastapi_server.py +++ b/src/akkudoktoreos/server/fastapi_server.py @@ -219,7 +219,9 @@ def fastapi_measurement_keys_get() -> list[str]: @app.get("/v1/measurement/load-mr/series/by-name") -def fastapi_measurement_load_mr_series_by_name_get(name: str) -> PydanticDateTimeSeries: +def fastapi_measurement_load_mr_series_by_name_get( + name: Annotated[str, Query(description="Load name.")], +) -> PydanticDateTimeSeries: """Get the meter reading of given load name as series.""" key = measurement_eos.name_to_key(name=name, topic="measurement_load") if key is None: @@ -234,7 +236,9 @@ def fastapi_measurement_load_mr_series_by_name_get(name: str) -> PydanticDateTim @app.put("/v1/measurement/load-mr/value/by-name") def fastapi_measurement_load_mr_value_by_name_put( - datetime: Any, name: str, value: Union[float | str] + datetime: Annotated[str, Query(description="Datetime.")], + name: Annotated[str, Query(description="Load name.")], + value: Union[float | str], ) -> PydanticDateTimeSeries: """Merge the meter reading of given load name and value into EOS measurements at given datetime.""" key = measurement_eos.name_to_key(name=name, topic="measurement_load") @@ -251,7 +255,7 @@ def fastapi_measurement_load_mr_value_by_name_put( @app.put("/v1/measurement/load-mr/series/by-name") def fastapi_measurement_load_mr_series_by_name_put( - name: str, series: PydanticDateTimeSeries + name: Annotated[str, Query(description="Load name.")], series: PydanticDateTimeSeries ) -> PydanticDateTimeSeries: """Merge the meter readings series of given load name into EOS measurements at given datetime.""" key = measurement_eos.name_to_key(name=name, topic="measurement_load") @@ -268,7 +272,9 @@ def fastapi_measurement_load_mr_series_by_name_put( @app.get("/v1/measurement/series") -def fastapi_measurement_series_get(key: str) -> PydanticDateTimeSeries: +def fastapi_measurement_series_get( + key: Annotated[str, Query(description="Prediction key.")], +) -> PydanticDateTimeSeries: """Get the measurements of given key as series.""" if key not in measurement_eos.record_keys: raise HTTPException(status_code=404, detail=f"Key '{key}' not available.") @@ -278,7 +284,9 @@ def fastapi_measurement_series_get(key: str) -> PydanticDateTimeSeries: @app.put("/v1/measurement/value") def fastapi_measurement_value_put( - datetime: Any, key: str, value: Union[float | str] + datetime: Annotated[str, Query(description="Datetime.")], + key: Annotated[str, Query(description="Prediction key.")], + value: Union[float | str], ) -> PydanticDateTimeSeries: """Merge the measurement of given key and value into EOS measurements at given datetime.""" if key not in measurement_eos.record_keys: @@ -290,7 +298,7 @@ def fastapi_measurement_value_put( @app.put("/v1/measurement/series") def fastapi_measurement_series_put( - key: str, series: PydanticDateTimeSeries + key: Annotated[str, Query(description="Prediction key.")], series: PydanticDateTimeSeries ) -> PydanticDateTimeSeries: """Merge measurement given as series into given key.""" if key not in measurement_eos.record_keys: @@ -323,16 +331,23 @@ def fastapi_prediction_keys_get() -> list[str]: @app.get("/v1/prediction/series") def fastapi_prediction_series_get( - key: str, - start_datetime: Optional[str] = None, - end_datetime: Optional[str] = None, + key: Annotated[str, Query(description="Prediction key.")], + start_datetime: Annotated[ + Optional[str], + Query(description="Starting datetime (inclusive)."), + ] = None, + end_datetime: Annotated[ + Optional[str], + Query(description="Ending datetime (exclusive)."), + ] = None, ) -> PydanticDateTimeSeries: """Get prediction for given key within given date range as series. Args: - start_datetime: Starting datetime (inclusive). + key (str): Prediction key + start_datetime (Optional[str]): Starting datetime (inclusive). Defaults to start datetime of latest prediction. - end_datetime: Ending datetime (exclusive). + end_datetime (Optional[str]: Ending datetime (exclusive). Defaults to end datetime of latest prediction. """ if key not in prediction_eos.record_keys: @@ -353,19 +368,29 @@ def fastapi_prediction_series_get( @app.get("/v1/prediction/list") def fastapi_prediction_list_get( - key: str, - start_datetime: Optional[str] = None, - end_datetime: Optional[str] = None, - interval: Optional[str] = None, + key: Annotated[str, Query(description="Prediction key.")], + start_datetime: Annotated[ + Optional[str], + Query(description="Starting datetime (inclusive)."), + ] = None, + end_datetime: Annotated[ + Optional[str], + Query(description="Ending datetime (exclusive)."), + ] = None, + interval: Annotated[ + Optional[str], + Query(description="Time duration for each interval."), + ] = None, ) -> List[Any]: """Get prediction for given key within given date range as value list. Args: - start_datetime: Starting datetime (inclusive). + key (str): Prediction key + start_datetime (Optional[str]): Starting datetime (inclusive). Defaults to start datetime of latest prediction. - end_datetime: Ending datetime (exclusive). + end_datetime (Optional[str]: Ending datetime (exclusive). Defaults to end datetime of latest prediction. - interval: Time duration for each interval + interval (Optional[str]): Time duration for each interval. Defaults to 1 hour. """ if key not in prediction_eos.record_keys: @@ -640,26 +665,24 @@ def site_map() -> RedirectResponse: # Keep the proxy last to handle all requests that are not taken by the Rest API. -# Also keep the single endpoints for delete, get, post, put to assure openapi.json is always build -# the same way for testing. -@app.delete("/{path:path}") +@app.delete("/{path:path}", include_in_schema=False) async def proxy_delete(request: Request, path: str) -> Response: return await proxy(request, path) -@app.get("/{path:path}") +@app.get("/{path:path}", include_in_schema=False) async def proxy_get(request: Request, path: str) -> Response: return await proxy(request, path) -@app.post("/{path:path}") +@app.post("/{path:path}", include_in_schema=False) async def proxy_post(request: Request, path: str) -> Response: return await proxy(request, path) -@app.put("/{path:path}") +@app.put("/{path:path}", include_in_schema=False) async def proxy_put(request: Request, path: str) -> Response: return await proxy(request, path) diff --git a/tests/generate_openapi.py b/tests/generate_openapi.py deleted file mode 100644 index 7d579d8d..00000000 --- a/tests/generate_openapi.py +++ /dev/null @@ -1,25 +0,0 @@ -import json -from pathlib import Path - -from fastapi.openapi.utils import get_openapi - -from akkudoktoreos.server.fastapi_server import app - - -def generate_openapi(filename: str | Path = "openapi.json"): - with open(filename, "w") as f: - json.dump( - get_openapi( - title=app.title, - version=app.version, - openapi_version=app.openapi_version, - description=app.description, - routes=app.routes, - ), - f, - indent=2, - ) - - -if __name__ == "__main__": - generate_openapi() diff --git a/tests/test_openapi.py b/tests/test_openapi.py index d0ad24c7..32f2669e 100644 --- a/tests/test_openapi.py +++ b/tests/test_openapi.py @@ -1,27 +1,56 @@ import json +import sys from pathlib import Path from unittest.mock import patch +import pytest + DIR_PROJECT_ROOT = Path(__file__).parent.parent DIR_TESTDATA = Path(__file__).parent / "testdata" def test_openapi_spec_current(config_eos): """Verify the openapi spec hasn´t changed.""" - old_spec_path = DIR_PROJECT_ROOT / "docs" / "akkudoktoreos" / "openapi.json" + expected_spec_path = DIR_PROJECT_ROOT / "openapi.json" new_spec_path = DIR_TESTDATA / "openapi-new.json" + expected_spec_md_path = DIR_TESTDATA / "openapi.md" + new_spec_md_path = DIR_TESTDATA / "openapi-new.md" + + with open(expected_spec_path) as f_expected: + expected_spec = json.load(f_expected) + with open(expected_spec_md_path) as f_expected: + expected_spec_md = f_expected.read() + # Patch get_config and import within guard to patch global variables within the fastapi_server module. with patch("akkudoktoreos.config.config.get_config", return_value=config_eos): - from generate_openapi import generate_openapi + # Ensure the script works correctly as part of a package + root_dir = Path(__file__).resolve().parent.parent + sys.path.insert(0, str(root_dir)) + from scripts import generate_openapi, generate_openapi_md + + spec = generate_openapi.generate_openapi() + spec_md = generate_openapi_md.generate_openapi_md() - generate_openapi(new_spec_path) - with open(new_spec_path) as f_new: - new_spec = json.load(f_new) - with open(old_spec_path) as f_old: - old_spec = json.load(f_old) + with open(new_spec_path, "w") as f_new: + json.dump(spec, f_new, indent=4, sort_keys=True) + with open(new_spec_md_path, "w") as f_new: + f_new.write(spec_md) # Serialize to ensure comparison is consistent - new_spec = json.dumps(new_spec, indent=4, sort_keys=True) - old_spec = json.dumps(old_spec, indent=4, sort_keys=True) + spec_str = json.dumps(spec, indent=4, sort_keys=True) + expected_spec_str = json.dumps(expected_spec, indent=4, sort_keys=True) - assert new_spec == old_spec + try: + assert spec_str == expected_spec_str + except AssertionError as e: + pytest.fail( + f"Expected {new_spec_path} to equal {expected_spec_path}.\n" + + f"Copy {new_spec_path} to {expected_spec_path} in case all is ok.\n" + ) + try: + assert spec_md == expected_spec_md + except AssertionError as e: + pytest.fail( + f"Expected {new_spec_md_path} to equal {expected_spec_md_path}.\n" + + f"Copy {new_spec_md_path} to {expected_spec_md_path} in case all is ok.\n" + ) diff --git a/tests/test_pvforecastakkudoktor.py b/tests/test_pvforecastakkudoktor.py index e437cef3..39b3f16f 100644 --- a/tests/test_pvforecastakkudoktor.py +++ b/tests/test_pvforecastakkudoktor.py @@ -144,7 +144,7 @@ def provider_empty_instance(): "prediction_hours": 48, "prediction_historic_hours": 24, "latitude": 52.52, - "longitude":13.405, + "longitude": 13.405, "pvforecast_provider": "PVForecastAkkudoktor", "pvforecast0_peakpower": 5.0, "pvforecast0_surface_azimuth": 180, @@ -165,7 +165,7 @@ def test_akkudoktor_forecast_horizon(): def test_akkudoktor_forecast_meta(): meta = sample_meta assert meta.lat == 52.52 - assert meta.lon ==13.405 + assert meta.lon == 13.405 assert meta.power == [5000] assert meta.tilt == [30] assert meta.timezone == "Europe/Berlin" diff --git a/tests/testdata/openapi.md b/tests/testdata/openapi.md new file mode 100644 index 00000000..9ebcaf1d --- /dev/null +++ b/tests/testdata/openapi.md @@ -0,0 +1,569 @@ +# Akkudoktor-EOS + +**Version**: `0.0.1` + +**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. + +**Base URL**: `No base URL provided.` + +**Endpoints**: + +## GET /v1/config + +**Links**: [local](http://localhost:8503/docs#/default/fastapi_config_get_v1_config_get), [swagger](https://petstore3.swagger.io/?url=https://raw.githubusercontent.com/Akkudoktor-EOS/EOS/refs/heads/main/docs/akkudoktoreos/openapi.json#/default/fastapi_config_get_v1_config_get) + +Fastapi Config Get + +``` +Get the current configuration. +``` + +**Responses**: + +- **200**: Successful Response + +--- + +## PUT /v1/config + +**Links**: [local](http://localhost:8503/docs#/default/fastapi_config_put_v1_config_put), [swagger](https://petstore3.swagger.io/?url=https://raw.githubusercontent.com/Akkudoktor-EOS/EOS/refs/heads/main/docs/akkudoktoreos/openapi.json#/default/fastapi_config_put_v1_config_put) + +Fastapi Config Put + +``` +Merge settings into current configuration. + +Args: + settings (SettingsEOS): The settings to merge into the current configuration. + save (Optional[bool]): Save the resulting configuration to the configuration file. + Defaults to False. +``` + +**Parameters**: + +- `save` (query, optional): No description provided. + +**Request Body**: + +- `application/json`: { + "$ref": "#/components/schemas/SettingsEOS" +} + +**Responses**: + +- **200**: Successful Response + +- **422**: Validation Error + +--- + +## GET /v1/measurement/keys + +**Links**: [local](http://localhost:8503/docs#/default/fastapi_measurement_keys_get_v1_measurement_keys_get), [swagger](https://petstore3.swagger.io/?url=https://raw.githubusercontent.com/Akkudoktor-EOS/EOS/refs/heads/main/docs/akkudoktoreos/openapi.json#/default/fastapi_measurement_keys_get_v1_measurement_keys_get) + +Fastapi Measurement Keys Get + +``` +Get a list of available measurement keys. +``` + +**Responses**: + +- **200**: Successful Response + +--- + +## GET /v1/measurement/load-mr/series/by-name + +**Links**: [local](http://localhost:8503/docs#/default/fastapi_measurement_load_mr_series_by_name_get_v1_measurement_load-mr_series_by-name_get), [swagger](https://petstore3.swagger.io/?url=https://raw.githubusercontent.com/Akkudoktor-EOS/EOS/refs/heads/main/docs/akkudoktoreos/openapi.json#/default/fastapi_measurement_load_mr_series_by_name_get_v1_measurement_load-mr_series_by-name_get) + +Fastapi Measurement Load Mr Series By Name Get + +``` +Get the meter reading of given load name as series. +``` + +**Parameters**: + +- `name` (query, required): Load name. + +**Responses**: + +- **200**: Successful Response + +- **422**: Validation Error + +--- + +## PUT /v1/measurement/load-mr/series/by-name + +**Links**: [local](http://localhost:8503/docs#/default/fastapi_measurement_load_mr_series_by_name_put_v1_measurement_load-mr_series_by-name_put), [swagger](https://petstore3.swagger.io/?url=https://raw.githubusercontent.com/Akkudoktor-EOS/EOS/refs/heads/main/docs/akkudoktoreos/openapi.json#/default/fastapi_measurement_load_mr_series_by_name_put_v1_measurement_load-mr_series_by-name_put) + +Fastapi Measurement Load Mr Series By Name Put + +``` +Merge the meter readings series of given load name into EOS measurements at given datetime. +``` + +**Parameters**: + +- `name` (query, required): Load name. + +**Request Body**: + +- `application/json`: { + "$ref": "#/components/schemas/PydanticDateTimeSeries" +} + +**Responses**: + +- **200**: Successful Response + +- **422**: Validation Error + +--- + +## PUT /v1/measurement/load-mr/value/by-name + +**Links**: [local](http://localhost:8503/docs#/default/fastapi_measurement_load_mr_value_by_name_put_v1_measurement_load-mr_value_by-name_put), [swagger](https://petstore3.swagger.io/?url=https://raw.githubusercontent.com/Akkudoktor-EOS/EOS/refs/heads/main/docs/akkudoktoreos/openapi.json#/default/fastapi_measurement_load_mr_value_by_name_put_v1_measurement_load-mr_value_by-name_put) + +Fastapi Measurement Load Mr Value By Name Put + +``` +Merge the meter reading of given load name and value into EOS measurements at given datetime. +``` + +**Parameters**: + +- `datetime` (query, required): Datetime. + +- `name` (query, required): Load name. + +- `value` (query, required): No description provided. + +**Responses**: + +- **200**: Successful Response + +- **422**: Validation Error + +--- + +## GET /v1/measurement/series + +**Links**: [local](http://localhost:8503/docs#/default/fastapi_measurement_series_get_v1_measurement_series_get), [swagger](https://petstore3.swagger.io/?url=https://raw.githubusercontent.com/Akkudoktor-EOS/EOS/refs/heads/main/docs/akkudoktoreos/openapi.json#/default/fastapi_measurement_series_get_v1_measurement_series_get) + +Fastapi Measurement Series Get + +``` +Get the measurements of given key as series. +``` + +**Parameters**: + +- `key` (query, required): Prediction key. + +**Responses**: + +- **200**: Successful Response + +- **422**: Validation Error + +--- + +## PUT /v1/measurement/series + +**Links**: [local](http://localhost:8503/docs#/default/fastapi_measurement_series_put_v1_measurement_series_put), [swagger](https://petstore3.swagger.io/?url=https://raw.githubusercontent.com/Akkudoktor-EOS/EOS/refs/heads/main/docs/akkudoktoreos/openapi.json#/default/fastapi_measurement_series_put_v1_measurement_series_put) + +Fastapi Measurement Series Put + +``` +Merge measurement given as series into given key. +``` + +**Parameters**: + +- `key` (query, required): Prediction key. + +**Request Body**: + +- `application/json`: { + "$ref": "#/components/schemas/PydanticDateTimeSeries" +} + +**Responses**: + +- **200**: Successful Response + +- **422**: Validation Error + +--- + +## PUT /v1/measurement/value + +**Links**: [local](http://localhost:8503/docs#/default/fastapi_measurement_value_put_v1_measurement_value_put), [swagger](https://petstore3.swagger.io/?url=https://raw.githubusercontent.com/Akkudoktor-EOS/EOS/refs/heads/main/docs/akkudoktoreos/openapi.json#/default/fastapi_measurement_value_put_v1_measurement_value_put) + +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): Prediction key. + +- `value` (query, required): No description provided. + +**Responses**: + +- **200**: Successful Response + +- **422**: Validation Error + +--- + +## PUT /v1/measurement/dataframe + +**Links**: [local](http://localhost:8503/docs#/default/fastapi_measurement_dataframe_put_v1_measurement_dataframe_put), [swagger](https://petstore3.swagger.io/?url=https://raw.githubusercontent.com/Akkudoktor-EOS/EOS/refs/heads/main/docs/akkudoktoreos/openapi.json#/default/fastapi_measurement_dataframe_put_v1_measurement_dataframe_put) + +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 + +--- + +## PUT /v1/measurement/data + +**Links**: [local](http://localhost:8503/docs#/default/fastapi_measurement_data_put_v1_measurement_data_put), [swagger](https://petstore3.swagger.io/?url=https://raw.githubusercontent.com/Akkudoktor-EOS/EOS/refs/heads/main/docs/akkudoktoreos/openapi.json#/default/fastapi_measurement_data_put_v1_measurement_data_put) + +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 + +--- + +## GET /v1/prediction/keys + +**Links**: [local](http://localhost:8503/docs#/default/fastapi_prediction_keys_get_v1_prediction_keys_get), [swagger](https://petstore3.swagger.io/?url=https://raw.githubusercontent.com/Akkudoktor-EOS/EOS/refs/heads/main/docs/akkudoktoreos/openapi.json#/default/fastapi_prediction_keys_get_v1_prediction_keys_get) + +Fastapi Prediction Keys Get + +``` +Get a list of available prediction keys. +``` + +**Responses**: + +- **200**: Successful Response + +--- + +## GET /v1/prediction/series + +**Links**: [local](http://localhost:8503/docs#/default/fastapi_prediction_series_get_v1_prediction_series_get), [swagger](https://petstore3.swagger.io/?url=https://raw.githubusercontent.com/Akkudoktor-EOS/EOS/refs/heads/main/docs/akkudoktoreos/openapi.json#/default/fastapi_prediction_series_get_v1_prediction_series_get) + +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. +``` + +**Parameters**: + +- `key` (query, required): Prediction key. + +- `start_datetime` (query, optional): Starting datetime (inclusive). + +- `end_datetime` (query, optional): Ending datetime (exclusive). + +**Responses**: + +- **200**: Successful Response + +- **422**: Validation Error + +--- + +## GET /v1/prediction/list + +**Links**: [local](http://localhost:8503/docs#/default/fastapi_prediction_list_get_v1_prediction_list_get), [swagger](https://petstore3.swagger.io/?url=https://raw.githubusercontent.com/Akkudoktor-EOS/EOS/refs/heads/main/docs/akkudoktoreos/openapi.json#/default/fastapi_prediction_list_get_v1_prediction_list_get) + +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. +``` + +**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. + +**Responses**: + +- **200**: Successful Response + +- **422**: Validation Error + +--- + +## POST /v1/prediction/update + +**Links**: [local](http://localhost:8503/docs#/default/fastapi_prediction_update_v1_prediction_update_post), [swagger](https://petstore3.swagger.io/?url=https://raw.githubusercontent.com/Akkudoktor-EOS/EOS/refs/heads/main/docs/akkudoktoreos/openapi.json#/default/fastapi_prediction_update_v1_prediction_update_post) + +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](http://localhost:8503/docs#/default/fastapi_prediction_update_provider_v1_prediction_update_{provider_id}_post), [swagger](https://petstore3.swagger.io/?url=https://raw.githubusercontent.com/Akkudoktor-EOS/EOS/refs/heads/main/docs/akkudoktoreos/openapi.json#/default/fastapi_prediction_update_provider_v1_prediction_update_{provider_id}_post) + +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 /strompreis + +**Links**: [local](http://localhost:8503/docs#/default/fastapi_strompreis_strompreis_get), [swagger](https://petstore3.swagger.io/?url=https://raw.githubusercontent.com/Akkudoktor-EOS/EOS/refs/heads/main/docs/akkudoktoreos/openapi.json#/default/fastapi_strompreis_strompreis_get) + +Fastapi Strompreis + +``` +Deprecated: Electricity Market Price Prediction per Wh (€/Wh). + +Note: + Set ElecPriceAkkudoktor as elecprice_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 + +--- + +## POST /gesamtlast + +**Links**: [local](http://localhost:8503/docs#/default/fastapi_gesamtlast_gesamtlast_post), [swagger](https://petstore3.swagger.io/?url=https://raw.githubusercontent.com/Akkudoktor-EOS/EOS/refs/heads/main/docs/akkudoktoreos/openapi.json#/default/fastapi_gesamtlast_gesamtlast_post) + +Fastapi Gesamtlast + +``` +Deprecated: Total Load Prediction with adjustment. + +Endpoint to handle total load prediction adjusted by latest measured data. + +Note: + Use '/v1/prediction/list?key=load_mean_adjusted' instead. + Load energy meter readings to be added to EOS measurement by: + '/v1/measurement/load-mr/value/by-name' or + '/v1/measurement/value' +``` + +**Request Body**: + +- `application/json`: { + "$ref": "#/components/schemas/GesamtlastRequest" +} + +**Responses**: + +- **200**: Successful Response + +- **422**: Validation Error + +--- + +## GET /gesamtlast_simple + +**Links**: [local](http://localhost:8503/docs#/default/fastapi_gesamtlast_simple_gesamtlast_simple_get), [swagger](https://petstore3.swagger.io/?url=https://raw.githubusercontent.com/Akkudoktor-EOS/EOS/refs/heads/main/docs/akkudoktoreos/openapi.json#/default/fastapi_gesamtlast_simple_gesamtlast_simple_get) + +Fastapi Gesamtlast Simple + +``` +Deprecated: Total Load Prediction. + +Endpoint to handle total load prediction. + +Note: + Set LoadAkkudoktor as load_provider, then update data with + '/v1/prediction/update' + and then request data with + '/v1/prediction/list?key=load_mean' instead. +``` + +**Parameters**: + +- `year_energy` (query, required): No description provided. + +**Responses**: + +- **200**: Successful Response + +- **422**: Validation Error + +--- + +## GET /pvforecast + +**Links**: [local](http://localhost:8503/docs#/default/fastapi_pvforecast_pvforecast_get), [swagger](https://petstore3.swagger.io/?url=https://raw.githubusercontent.com/Akkudoktor-EOS/EOS/refs/heads/main/docs/akkudoktoreos/openapi.json#/default/fastapi_pvforecast_pvforecast_get) + +Fastapi Pvforecast + +``` +Deprecated: PV Forecast Prediction. + +Endpoint to handle PV forecast prediction. + +Note: + Set PVForecastAkkudoktor as pvforecast_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 + +--- + +## POST /optimize + +**Links**: [local](http://localhost:8503/docs#/default/fastapi_optimize_optimize_post), [swagger](https://petstore3.swagger.io/?url=https://raw.githubusercontent.com/Akkudoktor-EOS/EOS/refs/heads/main/docs/akkudoktoreos/openapi.json#/default/fastapi_optimize_optimize_post) + +Fastapi Optimize + +**Parameters**: + +- `start_hour` (query, optional): Defaults to current hour of the day. + +**Request Body**: + +- `application/json`: { + "$ref": "#/components/schemas/OptimizationParameters" +} + +**Responses**: + +- **200**: Successful Response + +- **422**: Validation Error + +--- + +## GET /visualization_results.pdf + +**Links**: [local](http://localhost:8503/docs#/default/get_pdf_visualization_results_pdf_get), [swagger](https://petstore3.swagger.io/?url=https://raw.githubusercontent.com/Akkudoktor-EOS/EOS/refs/heads/main/docs/akkudoktoreos/openapi.json#/default/get_pdf_visualization_results_pdf_get) + +Get Pdf + +**Responses**: + +- **200**: Successful Response + +---