Importing data which can be relevant for energy flexibility services via ENTSO-E's API into FlexMeasures.
We start with data about the upcoming day.
Importing tomorrow's prices:
flexmeasures entsoe import-day-ahead-prices
Importing tomorrow's generation (incl. CO2 estimated content):
flexmeasures entsoe import-day-ahead-generation
Use --help
to learn more usage details.
First of all, this is a FlexMeasures plugin. Consult the FlexMeasures documentation for setup.
Add the path to this directory to your FlexMeasures (>v0.4.0) config file,
using the FLEXMEASURES_PLUGINS
setting.
Add ENTSOE_AUTH_TOKEN
to your FlexMeasures config (e.g. ~/.flexmeasures.cfg).
You can generate this token after you made an account at ENTSO-E, read more here.
Optionally, override other settings (defaults shown here):
ENTSOE_COUNTRY_CODE = "NL" ENTSOE_COUNTRY_TIMEZONE = "Europe/Amsterdam" ENTSOE_DERIVED_DATA_SOURCE = "FlexMeasures ENTSO-E"
The ENTSOE_DERIVED_DATA_SOURCE
option is used to name the source of data that this plugin derives from ENTSO-E data, like a CO₂ signal.
Original ENTSO-E data is reported as being sourced by "ENTSO-E"
.
pip install entsoe-py
ENTSO-E provides a test server (iop) for development. It's good practice not to overwhelm their production server.
Set ENTSOE_USE_TEST_SERVER=True
to enable this.
In that case, this plugin will look for the auth token in the config setting ENTSOE_AUTH_TOKEN_TEST_SERVER
.
Note, however, that ENTSO-E usually does not seem to make the latest data available there. Asking for the next day can often get an empty response.
To keep our code quality high, we use pre-commit:
pip install pre-commit black flake8 mypy
pre-commit install
pre-commit run --all-files --show-diff-on-failure