VarChar42/hassio-netzooe-eservice

Q: e-portal.energieag.at

daRob87 opened this issue · 6 comments

Hello,

Do you think that it is possible for you to create a fork of this repo which works for "Energie AG".."https://e-portal.energieag.at/".
I tried many thinks but i wasn't successful with the login procedure.

BR Rob

Hi,

Since I only have credentials for the netzoö portal I can not reverse engineer the energieag's API. Both portals look pretty similar so it could be that they use the same api. In this case one would only have to adjust the base api address.

thank you for the quick reply

I already tried your login procedure with modified url but i only get a 404, that's the reason why i asked you to do a fork ;)

I also agree with you that both webside look similar but the login procedure may work differently.

As I said, without credentials to an energieag account I cannot figure out its api calls. Somebody with working creds needs to look at the requests made by the browser and implement them in python. Therefore it makes no sense for me to create a fork.

If you are able to reverse engineer the energieag page, you are welcome to contribute to this repo to make an integration which will work with multiple of these portals. (In this case we might rename the repo to something more generic)

The only thing I can see is that in the POST payload sent to the energieag page a "action=Anmelden" form field is included.

Hey @daRob87 ! I think you can create an account for NetzOÖ. Depending on your location, your power plant provider might actually be NetzOÖ. Only your payment provider is Energie AG or like in my case its Verbund. The NetzOÖ API allows fetching the meter state of the current day.

The Energie AG page only shows your meter state of the month, I guess.

login with curl works this way:
curl -v 'https://e-portal.energieag.at/steward/j_security_check' -X POST -H 'Cookie: JSESSIONID=<SessionID>' -d 'j_username=<user>&j_password=<password>'

finally i was successful

s = requests.Session()
s.get("https://e-portal.energieag.at") #get sessionid
response = s.post("https://e-portal.energieag.at/steward/j_security_check", data=datalogin ) #datalogin = user credentials

so at first it is necessary to get the sessionid afterwards the login procedure is working with that sessionid
thanks guys ;)