Engie belgium seem to be using Auth0 as a identity provider. You can find more information about the authentication flow in their documentation. Based on your screenshots, it seems that they use a “Authorization Code Flow”. The doc is here: Authorization Code Flow Documentation
In the meantime, you can see that there is a “refresh-token” in the screenshot. You can use that refresh-token to get a new access-token once this one expires.
I am interested in finding out how to scrape that data and inject it in Home Assistant. If more people are interested, I can work on a python package to do so which could then be transformed into an integration.
Hi all, I needed this as well so I spent some time reverse-engineering their platform. I’m planning to publish my integration on HACS soon but I would like to have it tested by other people first.
A few things to note:
Currently, only 2FA via SMS is supported. I might add support for email 2FA in the future. Passkeys and itsme support are off the table, not interested in touching those. I’m also not sure what will happen when ENGIE forces 2FA on all of their customers in March. EDIT: I also added support for e-mail 2FA.
I was only able to test with Easy Variabel. The API call for prices uses MONTHLY for maxGranularity, so this might not be ideal for people with a dynamic contract.
ENGIE seems to be very strict with their access tokens: they get revoked after about 2 minutes, so the integration refreshes the token every minute in the background. There is a binary sensor to keep track of the authentication status.
The integration creates sensors for offtake and injection prices (both including and excluding VAT), per EAN. Injection sensors are only created when the data is available (e.g. gas will only have offtake).
For those interested in the login flow, I’ve included a Bruno collection in the repository.
Feel free to test this out by spinning up the devcontainer, all contributions and improvements are welcome