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>
The `FeedInTariffTibber` provider requests `priceInfo` and `priceInfoRange` with
`resolution: QUARTER_HOURLY` and preserves the native 15-minute timestamps. It uses Tibber's
`energy` spot-price component without the `tax` part or EOS electricity-price charges. The
end-customer `total` component is deliberately ignored.
The provider deliberately rejects hourly API responses instead of silently repeating them. It
reuses `elecprice.tibber.access_token` and `elecprice.tibber.home_id`, so no duplicate credentials
are needed.
Signed-off-by: Andreas Schmitz <akkudoktor.net>
Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
Configuration for some providers was given in the sub-field `provider_settings`
combining the settings of several providers. Pydantic does not understand
this very well and the configuration became cumbersome, especially in EOSdash.
All provider settings from the `provider-settings` sub-field are now lifted
to the top level field of the configuration.
The changes are automatically migrated in the configuration.
Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
Fix documentation for the loadforecast_power_w key.
Fix documentation to explain the usage of import file/ JSON string to
primarily initialise prediction data.
Fix code scanning alert no. 6: URL redirection from remote source
Enable to automatically save the configuration to the configuration file
by default, which is a widespread user expectation.
Make the genetic parameters non optional for better pydantic compliance.
Update:
- bump pytest to 9.0.3
- bump pillow to 12.2.0
- bump platformdirs to 4.9.6
- bump typespyyaml to 6.0.12.20260408
- bump tzfpy to 1.2.0
- bump pydantic to 2.13.0
- bump types-requests to 2.33.0.20260408
Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
Co-authored-by: Normann <github@koldrack.com>
Adapt uvicorn log level to allowed levels.
Ensure that EOSdash is started after EOS configuration is available.
Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
* fix: improve error handling for provider updates
Distinguishes failures of active providers from inactive ones.
Propagates errors only for enabled providers, allowing execution
to continue if a non-active provider fails, which avoids unnecessary
interruptions and improves robustness.
* fix: add provider settings validation for forecast requests
Prevents potential runtime errors by checking if provider settings are configured
before accessing forecast credentials.
Raises a clear error when settings are missing to help with debugging misconfigurations.
* refactor(load): move provider settings to top-level fields
Transitions load provider settings from a nested "provider_settings" object with provider-specific keys to dedicated top-level fields.\n\nRemoves the legacy "provider_settings" mapping and updates migration logic to ensure backward compatibility with existing configurations.
* docs: update version numbers and documantation
---------
Co-authored-by: Normann <github@koldrack.com>
Adapters for Home Assistant and NodeRED integration are added.
Akkudoktor-EOS can now be run as Home Assistant add-on and standalone.
As Home Assistant add-on EOS uses ingress to fully integrate the EOSdash dashboard
in Home Assistant.
The fix includes several bug fixes that are not directly related to the adapter
implementation but are necessary to keep EOS running properly and to test and
document the changes.
* fix: development version scheme
The development versioning scheme is adaptet to fit to docker and
home assistant expectations. The new scheme is x.y.z and x.y.z.dev<hash>.
Hash is only digits as expected by home assistant. Development version
is appended by .dev as expected by docker.
* fix: use mean value in interval on resampling for array
When downsampling data use the mean value of all values within the new
sampling interval.
* fix: default battery ev soc and appliance wh
Make the genetic simulation return default values for the
battery SoC, electric vehicle SoC and appliance load if these
assets are not used.
* fix: import json string
Strip outer quotes from JSON strings on import to be compliant to json.loads()
expectation.
* fix: default interval definition for import data
Default interval must be defined in lowercase human definition to
be accepted by pendulum.
* fix: clearoutside schema change
* feat: add adapters for integrations
Adapters for Home Assistant and NodeRED integration are added.
Akkudoktor-EOS can now be run as Home Assistant add-on and standalone.
As Home Assistant add-on EOS uses ingress to fully integrate the EOSdash dashboard
in Home Assistant.
* feat: allow eos to be started with root permissions and drop priviledges
Home assistant starts all add-ons with root permissions. Eos now drops
root permissions if an applicable user is defined by paramter --run_as_user.
The docker image defines the user eos to be used.
* feat: make eos supervise and monitor EOSdash
Eos now not only starts EOSdash but also monitors EOSdash during runtime
and restarts EOSdash on fault. EOSdash logging is captured by EOS
and forwarded to the EOS log to provide better visibility.
* feat: add duration to string conversion
Make to_duration to also return the duration as string on request.
* chore: Use info logging to report missing optimization parameters
In parameter preparation for automatic optimization an error was logged for missing paramters.
Log is now down using the info level.
* chore: make EOSdash use the EOS data directory for file import/ export
EOSdash use the EOS data directory for file import/ export by default.
This allows to use the configuration import/ export function also
within docker images.
* chore: improve EOSdash config tab display
Improve display of JSON code and add more forms for config value update.
* chore: make docker image file system layout similar to home assistant
Only use /data directory for persistent data. This is handled as a
docker volume. The /data volume is mapped to ~/.local/share/net.akkudoktor.eos
if using docker compose.
* chore: add home assistant add-on development environment
Add VSCode devcontainer and task definition for home assistant add-on
development.
* chore: improve documentation
Improve documentation generation and add tests for documentation.
Extend sphinx by todo directive.
The configuration table is now split into several tables. The test
is adapted accordingly.
There is a new test that checks the docstrings to be compliant to the
RST format as used by sphinx to create the documentation. We can not
use Markdown in docstrings. The docstrings are adapted accordingly.
An additional test checks that the documentation can be build with sphinx.
This test takes very long is only enabled in full run (aka. ci) mode.
Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>