EntsoE Binding [4.0.0;5.0.0)

This binding connects to EntsoE transparency platform to retrieve day ahead prices of the pan-European electricity market. The service is free but requires you to register for api-key.

Main site https://www.entsoe.eu/
Go here for registration and api-key https://transparency.entsoe.eu/

General info

Prices shown are €/MWh. Use transformations for example to divide the price by 10 and get c/kWh.
Autodiscovery finds the country you’re in if you have location set. You can ofcourse set up the binding manually and select area where you want prices from. Rememeber to register and provide your security token in thing configuration.

There’s 24 channel groups for future hours where DateTime and Number channels holds the time and price.

I’ve noticed that not all areas provide Day-ahead prices. See thing status for explanation and try another area. Please inform here if you encounter such area. I’ve only tested Finland and Denmark.

Please see README https://github.com/gitMiguel/openhab-addons/blob/entsoe/bundles/org.openhab.binding.entsoe/README.md for channel info.

Changelog

Version 4.1.0

  • Initial release to marketplace

Resources

Github - gitMiguel - org.openhab.binding.entsoe
Github - gitMiguel - source
Github - gitMiguel - readme

5 Likes

Great contribution. Some countries are divided into several zones. To get day-ahead prices for these I believe you need to allow parameters for the areas in the spec that describes bidding zones (Marked BZN in the area table), instead of country areas.

For countries with only one BZN the code for country and its BZN seems to be the same, such as Finland. But for example Sweden is actually four price zones and does not have a national price in the api. The country EIC 10YSE-1--------K is irrelevant for day ahead prices, the Swedish prices are pulled from it’s 4 BZN codes:

10Y1001A1001A44P
10Y1001A1001A45N
10Y1001A1001A46L
10Y1001A1001A47J

I guess this does not allow for easy automatic location set up, but it should unbreak your thing. Unless OSM knows about BZN’s.

1 Like

gitMiguel Many thanks for this nice binding. I wonder what would be the best strategy to persist the price data. There are 48 separate items so are there any possibilities to group them somehow. I’m using InfluxDB so basically I could persist the data into it.

Great input, any chance for an update of the binding based on this?

i have tried doing a fork with these changes for sweden on github, but im not sure i did it correctly.

Awesome, I was looking for exactly this! Am I right that this is not compatible with OH3?
I tried installing it, which seems to work (from the UI), but I cannot add any things.
Is there any way you could make it compatible with OH3? I have read that that should be possible.
That would be awesome!

Hi, and thanks for your intrest!

@AeLeez2b Okay thanks I was not aware of this. So a writable configuration for bidding zone is needed alongside automatic discovery. I’ll see what I can do.

@jlikonen Why I’m not really familiar with persistance in openHAB and don’t know how groups should/can be persisted so I have to ask why would you like to persist this data? And have you not grouped the channels while creating them? What other grouping method are you thinking?

@blamichet Yes, this is made for OH4. I do not have any plans to make this backwards compatible with OH3. Can I ask you why are you not using OH4?

Sorry for such late replies byt I’ve been really busy at work but hoping to get this further soon.

@gitMiguel main reason I did not switch is that everything is working right now, and I am afraid something may break or not work after the update. Did you have a smooth update experience? The EntsoE binding may be enough reason for me to upgrade :slight_smile:

Actually, this has prompted me to update. Needed to fix a few minor things, but now everything seems to work and I am free to install your binding :slight_smile:

Miika, thanks a lot for your contribution.

Could you (or anyone) please provide an entsoe.things file for textual config of the Thing ?
There’s setups where interactive thing creation and autodiscovery ain’t possible.

Also, I wonder how to determine if prices (item states) are up to date … is there any documentation on how this works in operations ?

Please could you add a LastUpdate timestamp channel or some such to make this known in OH ?
A configurable refresh interval maybe, too ?

Thanks again!

1 Like

Hey could you give example of things and items files, and where you can get token and where you need to write it?

But you should read at least the available docs:
items are in the readme, and as Miika wrote you need to apply for the token. You have to search a little on the Entso-E website but will get to iknow that you need to register and email support.
To answer myself, this is a valid .things file:

entsoe:dayAheadPrices:Deutschland "EntsoE Spotmarkt Preise für Deutschland" [
    area="10Y1001A1001A83F", label="Germany (DE)", securityToken="xxx-xxx-xxx"  ]

Just the “label” parameter doesn’t seem to work, the value doesn’t show up in UI but the “area” value does. @gitMiguel please let me know the correct option name.

With items there is everything fine, i understood already get the token, but there was no info about what you should write in things file and where to put that token. Thank you for info!

With the .things definition above (but also if using interactive UI thing creation), I keep getting

Request failed with API response: Code 999, Text No matching data found for Data item Day-ahead Prices [12.1.D] (10Y1001A1001A83F, 10Y1001A1001A83F) and interval 2023-12-16T22:00:00.000Z/2023-12-19T17:00:00.000Z. 

Is there anything I can do about that ?

@gitMiguel could you please have a look what’s wrong with my attempts to retrieve prices for Germany?

I keep getting the above error even when I do the HTTP query from the command line

curl -v 'https://web-api.tp.entsoe.eu/api?securityToken=xxxx-xxxx-xxxx-xxxx-xxxx&documentType=A44&in_domain=10Y1001A1001A83F&out_domain=10Y1001A1001A83F&periodStart=202312302200&periodEnd=202312311400'

According to Entso-E user guide the problem is right that: no matching data.

EDIT
Browsing Entso-E website, I came to think that the area code, although in use elsewhere, is wrong.
If you tick the standard bidding zone for Germany (I think you get something like DE+AT+CZ then), the website does neither provide any chart output.
I tried the DE-LU bidding zone 10Y1001A1001A82H and there I did get a proper chart response.
Unfortunately, your binding does not accept using this area code. Thing config gives an error saying it’s not an allowed ParameterOption.
Can you please fix that and allow for this area code ?
(best allow for free-form codes as I’d guess there’ll be more cases to show up like this one)
Thanks.

For me this binding works as expected with things the same as yours but for different country.

But I have another question - where to configure Entso binding periodic run time? Looks like it starts upon OpenHAB is started and then automatically it runs hourly. Does that mean if I restart OpenHAB at 14:02 then Entso binding will run hourly at :02 minute? If yes, how can I schedule it to run exactly at 00 minute?

EDIT:

I configured hourly EntsoE binding restart via OS crontab. As a reference, I used this post:

What’s the point in doing this ?
AFAIK pricing day-ahead data gets fixed at ~1300 CET and does not change any more after that.
No need to re-fetch.

@gitMiguel have you seen the new 4.1 features TimeSeries and EnergyPrice ?

Worth switching over asap I guess.

Noticed in debugging that prices obtained in €/MWh are output as c/kWh.
Would either need to be divided by 10 and output as ct/kWh, or remain to be labelled €/MWh

@gitMiguel do you read ?

2024-01-17 15:23:05.803 [DEBUG] [org.openhab.binding.entsoe.internal.EntsoEHandler      ] - Hours ahead: 0 - Time: 2024-01-17 15:00 - Price: 125.46 c/kWh
2024-01-17 15:23:05.830 [DEBUG] [org.openhab.binding.entsoe.internal.EntsoEHandler      ] - Hours ahead: 1 - Time: 2024-01-17 16:00 - Price: 128.56 c/kWh
2024-01-17 15:23:05.843 [DEBUG] [org.openhab.binding.entsoe.internal.EntsoEHandler      ] - Hours ahead: 2 - Time: 2024-01-17 17:00 - Price: 140.52 c/kWh
2024-01-17 15:23:05.858 [DEBUG] [org.openhab.binding.entsoe.internal.EntsoEHandler      ] - Hours ahead: 3 - Time: 2024-01-17 18:00 - Price: 123.59 c/kWh
2024-01-17 15:23:05.872 [DEBUG] [org.openhab.binding.entsoe.internal.EntsoEHandler      ] - Hours ahead: 4 - Time: 2024-01-17 19:00 - Price: 114.28 c/kWh
2024-01-17 15:23:05.886 [DEBUG] [org.openhab.binding.entsoe.internal.EntsoEHandler      ] - Hours ahead: 5 - Time: 2024-01-17 20:00 - Price: 109.8 c/kWh

Hi @gitMiguel et al,

I originally developed the aWATTar binding, which provides similar data, but only for the German and Austrian market and from a different data source. I see your binding as a successor to mine, as it supports far more countries. I would like to add two things:

  • From the aWATTar binding: The functionalities to search for cheapest hours and use that to control devices like electric heaters or car chargers.
  • Make use of TimeSeries and EnergyPrice as suggested by @mstormi .

I don’t know when I will have time for this, maybe only in a few months.

Are you interested in some cooperation, or do you prefer completing the binding yourself?

1 Like