This repository contains a Python script that can scrape raw data from the E.ON W1000 portal and convert it to a raw YAML file. This YAML file can then be copied to the recorder.import_statistics
service if you have the frenck/Spook integration installed. I recommend using this with the hass-w1000-portal from ZsBT.
To run the script, you need to have the following dependencies installed:
- Python 3.12.0 (optional)
- Access to the E.ON W1000 portal
- Spook installed
- please refer to the integration's documentation for the installation
- log in to your W1000 portal, here.
- Create a new workarea if you haven't created one
- inside a workarea, create a new report with the "+" icon and add the following curves:
- +A
- -A
- DP_1-1:1.8.0*0
- DP_1-1:2.8.0*0
- after clicking "ok" you should be able to see the data on the report
- on the report pager click on the "day" and select "custom"
- type in your report interval. it shouls be in
dd/mm/yyyy
format. - after you defined your date interval press the checkmark icon.
- click on the "export" link in the report or choose the export option in the the ≡ menu.
- in the export window choose the
Profile Table
then chooseComma separated values (.csv)
. Make sure thatInclude status
is unchecked! - click on export and wait for the file to be downloaded.
- Clone this repository to your local machine.
- Install the required dependencies by running the following command:
pip install -r requirements.txt
- Modify the script according to your needs, if necessary.
- Run the script using the following command:
- using the GUI file selector:
python EON_SPOOKER.py
- using arguments:
python EON_SPOOKER.py -p "path\to\your\file.csv"
- The script will generate an
import.yaml
and anexport.yaml
next to the script's location.
Alternatively, you can use the compiled executable EON_SPOOKER.exe
from releases. Simply double-click on the executable to run the script.
- go to development tools>services
- search for
recorder.import_statistics
- choose your utility meter sensor
- set the source to
recorder
- use
kWh
measurement - set
has a sum
toon
- under statistics paste the contents of your corresponding yaml file.
- click on
call_service
- done! You now have all your stuff in the corresponding sensor.
service: recorder.import_statistics
data:
has_mean: false
has_sum: true
statistic_id: sensor.w1000_import
source: recorder
unit_of_measurement: kWh
stats:
- start: "2021-01-02 00:00:00+02:00"
sum: 123
state: 123
- start: "2021-01-02 01:00:00+02:00"
sum: 456
sum: 456
- ...
!!WARNING!! I Highly recommend making a backup before making any modifications in your sensor's history stats as it can not be undone!
If you find any issues or have suggestions for improvements, feel free to open an issue or submit a pull request.