Standalone Python tool for downloading hourly energy consumption data from Enea customer portal (ebok.enea.pl)
Project description
Enea Client
A standalone Python script for downloading hourly energy consumption data from the Enea customer portal (ebok.enea.pl). This tool automates the process of logging into the Enea portal, retrieving hourly energy consumption data for a given month in CSV format, and optionally running post-processing scripts (which can be used later, for example, to import data into Home Assistant or other systems).
Requirements
- Python 3.9 or higher, no external packages needed - only standard library modules are used.
- Valid Enea ebok customer account credentials and an energy meter that supports real-time data reporting (check if you have data available at https://ebok.enea.pl/meter/summaryBalancingChart).
Usage
Basic Usage
Download specific months in CSV format. Files are sanitized and saved to the specified output directory. Optionally, a post-processing script can be specified.
python -m enea_client \
--enea-login your-email@example.com \
--enea-password your-password \
--enea-pod-guid your-pod-guid \
--output-dir ./energy_data \
--dates 12.2025,01.2026 \
--post-process-script ./process_data.sh \
--verbose
Where command line arguments are:
--enea-login: Your Enea portal email--enea-password: Your Enea portal password--enea-pod-guid: Your Point of Delivery GUID (found in your Enea account). See "Finding Your POD GUID" section below--output-dir: Directory to save downloaded CSV files--dates: Comma-separated list of months to download (format: MM.YYYY)--post-process-script: (Optional) Path to a script that will be executed after download completes, receiving paths to all generated CSV files as arguments--verbose: (Optional) Enable verbose logging for debugging purposes
Finding Your POD GUID
This example uses the Chrome browser:
- Log into your Enea customer portal and navigate to https://ebok.enea.pl/meter/summaryBalancingChart.
- Open browser developer tools and go to the Network tab.
- Choose a day with available data and click to download CSV data.
- Find request named
csvin the Network tab. - The
pointOfDeliveryIdparameter in the request URL is your POD GUID (see screenshot below).
Output Format
The script saves data for each specified month in a separate CSV file in the output directory. An example output file for January 2026 would look like this:
Data;"Wolumen energii elektrycznej pobranej z sieci przed bilansowaniem godzinowym";"Wolumen energii elektrycznej oddanej do sieci przed bilansowaniem godzinowym";"Wolumen energii elektrycznej pobranej z sieci po bilansowaniu godzinowym";"Wolumen energii elektrycznej oddanej do sieci po bilansowaniu godzinowym"
"2026-01-01 00:59";"0.123";"0";"0.123";"0"
"2026-01-01 01:59";"0.124";"0";"0.124";"0"
Post-processing Scripts
If you specify a --post-process-script, it will be executed after all data has been downloaded. The script receives the paths of all generated CSV files as command-line arguments.
See example post-processing script post_process_script.sh in the scripts/ directory for reference.
Security Considerations
Consider using environment variables instead of command-line arguments for sensitive data. See .env.example for reference and advanced usage tab below.
Advanced Usage
Download data automatically every day, then process the data with custom scripts and import it into your Home Assistant energy tab.
-
Configure custom Home Assistant sensors for export and import energy data. Since data is available with a few days delay, a custom integration is needed to import data. See Home Assistant Statistics Integration for details. Example:
a. Create template sensors in your
configuration.yaml:template: - sensor: - name: Grid import energy unique_id: grid_import_energy state: 0 unit_of_measurement: "kWh" device_class: energy state_class: total_increasing - name: Grid export energy unique_id: grid_export_energy state: 0 unit_of_measurement: "kWh" device_class: energy state_class: total_increasing
b. Import one point with value 0 for each sensor to initialize it. The date should be the start of the statistics period. All future data will append to this initial value.
-
Create a post-processing script that processes the downloaded CSV files and imports them into your home assistant installation. See
scripts/post_process_script.shfor an example. -
Create a systemd service and timer to run the script monthly. See
scripts/enea_client.serviceandscripts/enea_client.timerfor examples.
Development
Install with test dependencies:
pip install -e .[test]
Run tests with coverage:
coverage run -m pytest -v
Caveats
The purpose of this tool is to provide a simple way to download energy consumption data from the Enea portal and integrate it into other systems. It is not an official Enea product and is not affiliated with Enea in any way. Use at your own risk.
Contributing
This is a standalone tool with no external dependencies. Contributions are welcome!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file enea_client-0.1.0.tar.gz.
File metadata
- Download URL: enea_client-0.1.0.tar.gz
- Upload date:
- Size: 6.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
12f6910aa223b344df0f8bf9f4bd4cdc835f3f91eba2ce47e304eff397fd3c7a
|
|
| MD5 |
5427f3c1bb71d8e87bf008bace207947
|
|
| BLAKE2b-256 |
0d4a7af2f4989b28e09ac68e2c2700c558489684a64a789bb5bbf534bf0b859f
|
Provenance
The following attestation bundles were made for enea_client-0.1.0.tar.gz:
Publisher:
publish.yml on zpieslak/enea-client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
enea_client-0.1.0.tar.gz -
Subject digest:
12f6910aa223b344df0f8bf9f4bd4cdc835f3f91eba2ce47e304eff397fd3c7a - Sigstore transparency entry: 906199658
- Sigstore integration time:
-
Permalink:
zpieslak/enea-client@77853eba46a487e5e5849a1638de9f8485cbe6b4 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/zpieslak
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@77853eba46a487e5e5849a1638de9f8485cbe6b4 -
Trigger Event:
push
-
Statement type:
File details
Details for the file enea_client-0.1.0-py3-none-any.whl.
File metadata
- Download URL: enea_client-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c9c4b6e1df72a51f07d3f35407f12529a92dcd71444495fc586d20adc7d7ca9b
|
|
| MD5 |
24c36841b7d862b7b8a932bc094c4435
|
|
| BLAKE2b-256 |
24850719b932d97504dbb593b39b2428ba83c061461cfe907070b38669ce4b3b
|
Provenance
The following attestation bundles were made for enea_client-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on zpieslak/enea-client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
enea_client-0.1.0-py3-none-any.whl -
Subject digest:
c9c4b6e1df72a51f07d3f35407f12529a92dcd71444495fc586d20adc7d7ca9b - Sigstore transparency entry: 906199696
- Sigstore integration time:
-
Permalink:
zpieslak/enea-client@77853eba46a487e5e5849a1638de9f8485cbe6b4 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/zpieslak
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@77853eba46a487e5e5849a1638de9f8485cbe6b4 -
Trigger Event:
push
-
Statement type: