MattJeanes / TeslaMateAgile

Integration to automatically fill in prices for charge data captured by TeslaMate for smart energy providers
MIT License
76 stars 9 forks source link

Entsoe transparency API provider support #28

Closed oivindoh closed 2 years ago

oivindoh commented 2 years ago

Many people (in the Nordpool spot areas in particular) have spot price contracts that follow the spot price per hour for their area - similar to what's fetched in the Tibber integration ( #12 ). Usually these contracts have some kind of fixed addition (can be negative, 0 or positive - included already in Tibber data) to the spot price, so this addition could be configurable.

There is a more generic pricing API delivered by entsoe called the "transparency API" where interested parties can download future (day-head) and historical spot prices for each price area (e.g. I'd personally fetch prices for the NO3 price area (link is to price data for jan 8th 2020).

They have an API user guide, and API access is requested after registering an account by sending an email with the subject "Restful API access" to transparency@entsoe.eu, with your registered email address in the message body. Token for access is created manually after logging in and having API access granted.

I think the ability of fetching price data from this API based on a selectable (or even dynamic based on positution) price area would be a very valuable addition to TMA. I'll be experimenting a bit with fetching data from entsoe in a small python project and might try my luck at C# if I manage to finish that project.

MattJeanes commented 2 years ago

Hey this sounds great, have you seen the work being done in #27? I wonder if this largely covers the use cases you're interested in here

oivindoh commented 2 years ago

Ah! No I had not - that would at least cover my specific use case I believe, though AFAIK Nordpool have terms that prohibit scraping / "automated extraction", and a somewhat expensive API license if one decides to play by their rules, whereas Entsoe does not, while also providing price data for areas outside the Nordpool area.

marval commented 2 years ago

Hi @oivindoh

This uses the same endpoints as the HomeAssistant integration. Although they are ALWAYS a subject to change I would believe they are going to be available for a while. Was a bit sceptical before 14th of February where they mentioned closing their endpoints fro free access. This seemed to live thorugh that.

Another thing - you would typically send one request by charging session. Maybe two ...

oivindoh commented 2 years ago

Closing this since https://github.com/MattJeanes/TeslaMateAgile/pull/27 is more than sufficient in my Nordpool case, at least until they break their APIs.