Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate with ENTSO-E Day ahead pricing #5291

Closed
bsmout opened this issue Nov 27, 2022 · 27 comments · Fixed by #9794
Closed

Integrate with ENTSO-E Day ahead pricing #5291

bsmout opened this issue Nov 27, 2022 · 27 comments · Fixed by #9794
Labels
enhancement New feature or request stale Outdated and ready to close

Comments

@bsmout
Copy link

bsmout commented Nov 27, 2022

Lots of dynamic tarifs are based on day ahead pricing for the specific region (country). It would be great if tariffs could be based on those day ahead prices. For example ENTSO-E is an Europe funded service that provides a free API.

Clients for the API are available on Github.

More info: https://transparency.entsoe.eu/content/static_content/Static%20content/web%20api/Guide.html

@andig
Copy link
Member

andig commented Nov 28, 2022

Why would you want to do that?

@andig andig added the question Rather clarification than issue label Nov 28, 2022
@bsmout
Copy link
Author

bsmout commented Nov 28, 2022

To charge when electricity prices are the lowest ? If you have a dynamic rate tarif that changes every hour you want to charge your EV as cheap as possible.

@andig
Copy link
Member

andig commented Nov 28, 2022

Sure. But then you would integrate that tariff as we‘re already doing, not Entso.

@andig andig added wontfix This will not be worked on and removed question Rather clarification than issue labels Nov 28, 2022
@andig andig closed this as completed Nov 28, 2022
@andig
Copy link
Member

andig commented Dec 12, 2022

When #5445 is finished, we can add additional plan data for target charging. Same approach as discussed in #5445 (comment).

@RTTTC
Copy link
Contributor

RTTTC commented Dec 12, 2022

OK, after more consideration looks like ENTSO-E Day ahead pricing would be the best one to use, and pricing matches my local market pricing data exactly, using mac/safari
(For some reason it showed wrong pricing when I used iphone to browse it)
So Nordpool data api is not needed.

@RTTTC RTTTC mentioned this issue Dec 12, 2022
15 tasks
@RTTTC
Copy link
Contributor

RTTTC commented Dec 13, 2022

Could we reopen this?

@andig
Copy link
Member

andig commented Dec 27, 2022

Now that we have a planner it would be nice to add minimal-CO2 planning. I'm not so keen on ENTSO prices as that's not what the user pays anyway, but would prefer CO2 load. Would appreciate suggestions for finding the relevant ENTSO reports and example data interpretation.

@andig andig reopened this Dec 27, 2022
@andig andig added enhancement New feature or request and removed wontfix This will not be worked on labels Dec 27, 2022
@andig
Copy link
Member

andig commented Dec 27, 2022

/cc @thorstenwagner

@RTTTC
Copy link
Contributor

RTTTC commented Dec 27, 2022

"Smart rate" is supposedly most popular utility option in Scandinavia, where customers have smart meters and electricity price is different every hour, as per Nordpool (ENTSO) local area day ahead pricing (plus margin and any taxes)

@bsmout
Copy link
Author

bsmout commented Dec 27, 2022

Now that we have a planner it would be nice to add minimal-CO2 planning. I'm not so keen on ENTSO prices as that's not what the user pays anyway, but would prefer CO2 load. Would appreciate suggestions for finding the relevant ENTSO reports and example data interpretation.

Based on what are you stating that ? I'm paying ENTSO pricing (with a very small margin and taxes).

@andig
Copy link
Member

andig commented Dec 27, 2022

At least not in Germany. I‘m interested in co2 minimization.

@RTTTC
Copy link
Contributor

RTTTC commented Jan 12, 2023

More info: https://transparency.entsoe.eu/content/static_content/Static%20content/web%20api/Guide.html

4.2.10. Day Ahead Prices [12.1.D] for day-ahead pricing API

@github-actions github-actions bot added the stale Outdated and ready to close label Feb 2, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 8, 2023
@RTTTC
Copy link
Contributor

RTTTC commented Feb 11, 2023

This integration would be such a great evolution of evcc!

@Scholdan
Copy link
Contributor

There is missing a lot of tariffs providers.
Maybe look at this https://github.com/MTrab/energidataservice and convert it? or just pull the data form homeassistant?

@andig
Copy link
Member

andig commented Sep 3, 2023

@duckfullstop if you want to take a stab? Entso prices would be nice but the API is a complex.

@duckfullstop
Copy link
Contributor

duckfullstop commented Sep 3, 2023

4.2.10. Day Ahead Prices [12.1.D] for day-ahead pricing API

This looks quite achievable (even if it does mean working with XML), I can take a bit more of a look into it in the coming week hopefully?

I'm not sure about CO2 forecasting, I don't think specific data on that is provided by ENTSO-E and we'd probably have to calculate estimates ourselves, which is a pretty big task, arguably out of scope for evcc, and unfortunately probably done best at the continent level by services like electricitymaps, etc. (Someone feel free to correct me but I couldn't find anything relevant in the documentation from a quick look)

@andig
Copy link
Member

andig commented Sep 3, 2023

Year, CO2 means mangling production and consumption plus specific CO2 per production type. I wouldn't try that honestly.

@duckfullstop
Copy link
Contributor

duckfullstop commented Sep 3, 2023

Spent a little time reading the documentation for ENTSO-E in more detail, and section 2. has some specific requirements for requesting an API key:

To request access to the Restful API, please register on the Transparency Platform (link) and send an email to transparency@entsoe.eu with “Restful API access” in the subject line. Indicate the email address you entered during registration in the email body. The ENTSO-E Helpdesk will make their best efforts to respond to your request within 3 working days.

https://transparency.entsoe.eu/content/static_content/Static%20content/web%20api/Guide.html#_authentication_and_authorisation

This feels like they don't intend this API for use by end users - I'm still happy to request a key and implement it, but it will substantially limit user friendliness if you have to register an account and then wait 3 days before you can request an API key.

@RTTTC
Copy link
Contributor

RTTTC commented Sep 3, 2023

Maybe we could all use one key ? evcc as an organisation?

@duckfullstop
Copy link
Contributor

duckfullstop commented Sep 3, 2023

Maybe we could all use one key ? evcc as an organisation?

Doesn't seem to be the case, these keys seem to be private use only:

If you suspect that the token has been compromised, you must reset the token by yourself.
If the token is missing or invalid (including suspended account), the system will respond with Http 401 Unauthorized.

I'm pretty sure some of these calls could be quite heavy (like repeatedly calling for decades of complex data at once), so it's not a surprise this restriction exists.

Handling this in evcc cloud is an option (maybe with some heavy caching), but feels like possibly the wrong route to take, as it creates a single point of failure under our control.

@duckfullstop
Copy link
Contributor

The Home Assistant ENTSO-E plugin has just come to my attention, and that seems to be popular enough even with the API key restriction, so I'll go ahead and request a key and look into implementing this. @andig reopen this issue?

@andig andig reopened this Sep 5, 2023
@github-actions github-actions bot removed the stale Outdated and ready to close label Sep 6, 2023
@duckfullstop
Copy link
Contributor

I have received an API key, starting work on implementing this now. Should have something rudimentary by next week at the latest (my health's a bit up and down!).

@duckfullstop
Copy link
Contributor

duckfullstop commented Sep 8, 2023

@bsmout @RTTTC @djfanatix Hey there! I'm busy implementing this for you now in #9794, but as someone that's never really dealt with european tariffs, it would be beneficial to know how you would expect this to work once it's finished.

Does your provider give you a specific ENTSO-E domain code (i.e 10YDE-ENBW-----N for DETransnetW, for example), or would you expect to just define something like DETransnetW or NL for example?

And when it comes to how you get charged based on these rates, is it a simple multiplier (say 115% of the ENTSO-E cost), or would more advanced math be needed (say (rate * 1.15) + 0.02)?

Many thanks in advance!

@djfanatix
Copy link
Contributor

Hi,

Speaking for Belgium, but I think for the netherlands, germany and some other countries it is the same.
We have only 1 spot price, so BE,NL,DE,.. will be sufficient.

The different providers use a calculation which is complicated:

(((Entsoespot* 1.15) + 0.02)*tax) + government costs)

@andig
Copy link
Member

andig commented Sep 8, 2023

Tbo, we don‘t necessarily need the exact costs. I‘d prefer to keep an identical model across tariffs, currently in embed.go.

@RTTTC
Copy link
Contributor

RTTTC commented Sep 8, 2023

I would expect to use country code (LT) There are a couple of countries in EU that have few regions per country, such as Sweden, UK, Norway. In such case there is NO1, NO2 etc. (As per ENTSO-E)

For me price = (rate + fixed addon fees)*1,21 (VAT)
#7437 integration works perfectly for me (may be helpful to check out it's implementation?)

  planner:
    # planner tariff can be used for target charging if no grid tariff is specified
    type: elering
    region: lt
    charges: 0.07825 # EUR/kWh
    tax: 0.21 # This would be 21% VAT

This way I get exact cost, and I love it! ❤️

@andig
Copy link
Member

andig commented Sep 8, 2023

Think that is https://github.com/evcc-io/evcc/blob/master/tariff/embed.go

duckfullstop added a commit to duckfullstop/evcc that referenced this issue Sep 8, 2023
@github-actions github-actions bot added the stale Outdated and ready to close label Sep 29, 2023
andig pushed a commit to duckfullstop/evcc that referenced this issue Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request stale Outdated and ready to close
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants