feat: add pvlib pv forecast provider (#1214)

Add a PV forecast provider that calculates the forecast using a PVLib system model
and weather forecast from the EOS weather forecast provider.

Additional module and inverter models can be easily added as the database
is build from PVLib and SAM databases and a bundled csv file.

The module model and inververt model names are provided by new endpoints
to be used in configuration.

The provider is based on the fantastic work of EMHASS. See
https://github.com/davidusb-geek/emhass/blob/master/src/emhass/forecast.py

A short description of the provider is added to the documentation.

Besides the new features there are the fixes and improvements:

* feat: improve EOSdash config page

* fix: kex_to_series for start_datetime

  Make key_to_series always start the series at start_datetime.

* fix: default provider for GENETIC and GENETIC0 optimization

  To make the default less dependent on internet servers (with API changes and
  availability issues) the default for PVForecast is set to PVForecastPVLib
  and for ElecPrice to ElecPriceFixed. The default weather provider is changed
  to OpenMeteo.

* fix: EOSdash display resampled prediction values

  Make EOSdash display resampled prediction values where  resampling fits to
  the prediction value type. Use bar width that fits to 15 minutes value samples.

* chore: add a UI hints system to EOSdash

  The UI hints system eases the definition of forms for configuration items.
  There are also forms for items in maps and lists. These forms allow to add and delete
  items to/ from  maps and lists. The forms ensure that all required fields of newly
  added items are filled.

* chore: Create an enum for valid optimization algorithms

* chore. Make config also provide the available energy management modes.

  Used for configuration hints.

* chore: Randomize default device id in configuration

Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
This commit is contained in:
Bobby Noelte
2026-08-07 13:13:17 +02:00
committed by GitHub
parent 9189fc890e
commit 894790f577
49 changed files with 29242 additions and 667 deletions
+24
View File
@@ -693,6 +693,30 @@ The PV forecast data must be provided in one of the formats described in
The data may additionally or solely be provided by the
**PUT** `/v1/prediction/import/PVForecastImport` endpoint.
### PVForecastPVLib Provider
The `PVForecastPVLib` provider calculates PV power forecasts locally using the
[PVLib](https://pvlib-python.readthedocs.io/) simulation library. Unlike the
API-based providers, no external forecast service is required. The provider
uses the configured PV system geometry together with the weather prediction
(`weather_ghi`, `weather_dni`, `weather_dhi`, `weather_temp_air`, etc.) to
simulate the expected DC module power and AC inverter output.
The provider supports multiple PV planes and automatically sums their power.
Module and inverter models are selected from the CEC database by name or by
their nominal power rating. AkkudoktorEOS automatically generates and caches
the required CEC databases on first use by combining the current SAM database,
legacy PVLib entries, and the additional EMHASS models.
The following prediction keys are provided:
- `pvforecast_ac_power`: Total AC power (W).
- `pvforecast_dc_power`: Total DC power (W).
Currently, the configuration options `userhorizon`, `optimalangles`, and
tracking systems (`trackingtype != 0`) are ignored. If no `albedo` is
configured, a default value of `0.2` is used.
### PVForecastPVNode Provider
The `PVForecastPVNode` provider retrieves native 15-minute PV power forecasts from the