JaccoR / hass-entso-e

Integration for Home Assistant to fetch day ahead energy prices from European countries via ENTSO-e Transparency Platform
159 stars 25 forks source link

Can't connect to ENTSO-E platform due to IP-Block #11

Closed WhoHasMyUsername closed 1 year ago

WhoHasMyUsername commented 1 year ago

Is it possible to change the source of the price information?

Weirdly, I'm not allowed to access the transparency platform from my residential internet connection. It is from a reputable ISP but the ip-block I'm is secondhand and occasionally I run into issues. This has probably to do with so-called ip reputation services and I'm not alone in this.

My energy provider does provide an API with day-ahead-pricing in JSON format. This I can access.

JaccoR commented 1 year ago

That's unfortunate. It's not that easy to change the source of the price information as I'm using a python library of ENTSO-e to fetch prices from the API. This would also change the purpose of this integration imo. I am willing to help set up another custom component for your energy provider, as i can imagine more people using that energy provider would be interested in that. Which provider is it?

WhoHasMyUsername commented 1 year ago

It wasn't clear to me a external library was used. I will look into that.

The provider is energyzero. I pulled the api from html: https://api.energyzero.nl/v1/energyprices?fromDate=2022-09-20T22%3A00%3A00.000Z&tillDate=2022-10-02T21%3A59%3A59.999Z&interval=4&usageType=1&inclBtw=false

JaccoR commented 1 year ago

I can look into getting some kind of template of this code, which makes it easy to add different api calls. However, I don't have a lot of time for this the coming week(s). In the meantime maybe you can contact your ISP on the block? Are you using any proxy/VPN? Maybe ENTSO-e has some kind of proxy detection.

WhoHasMyUsername commented 1 year ago

My ISP is looking into this & I opened a ticket with ENTSO-E.

Meanwhile I'm looking at your and the entsoe-py code. At the moment I think if I can get JSON data into a pandas series array, I'm halfway there. I'm a programmer but haven't done much Python.

The end goal is Home Assistant showing the total energy costs hourly, daily, monthly. I believe this is possible with your sensor, but first I have to get t working.

WhoHasMyUsername commented 1 year ago

Maybe ENTSO-e has some kind of proxy detection.

I'm with Freedom Internet BV and I'm in a secondhand ip range. This means the range was bought from a previous owner and as it happens this owner was in the Middle East. I of course don't know if that's the reason for blocking-by-ip but it's not the first time this happens nor am I alone.