nordicopen / pyeasee

Easee EV charger API python library
MIT License
39 stars 11 forks source link

Refreh Token #36

Closed aradoorolesen closed 3 years ago

aradoorolesen commented 3 years ago

First of all, great work on this.

I noticed you have a comment in easee _refresh_token: "TODO: seems not to work. Debug later", and I wonder if its because you from the _refresh_token call self.post which will call verify_updated_token ending in _refresh_token again if the token has expired.

With the refresh_token fixed and the ability to use cached tokens I will definitely start using this api.

fondberg commented 3 years ago

Hi! I am not sure what the problem is. Didnt spend too much time on it. Do you have any ideas? I will see if I can try and debug it soon.

Maybe it is because what u wrote. I'll make a new release and check

fondberg commented 3 years ago

I've released a fixed version on pypi

aradoorolesen commented 3 years ago

Super you fixed it by not calling the self.post.

Do you plan on making the cashed token functionality any time soon?

For now I have made my own code to log the /api/sites/{siteId}/energy, because I wanted the token refresh, and I need to save the tokens because I run it periodically from a cron job.

Thanks, Anders