yo-han / Home-Assistant-Carelink

Unofficial Home Assistant Carelink Component
MIT License
19 stars 8 forks source link

use auth token #51

Closed sedy89 closed 4 months ago

sedy89 commented 4 months ago

Merged in the latest changes from Ondrej. Adapted the integration setup, no need for user/password anymore. Initial setup requires auth token from Carelink portal. See Ondrej readme -> Ondrej Inital Token Instead "saving domain to file" in ondrejs description, we only need to value of the auth_tmp_token from the details view as parameter for initial setup. New implementation requires to use a sperate carelink follower account, otherwise the account will keep logging off from other applications. Implemented persistent storage of (new) cookie to survive a home assistant reset (if it does not take longer than 10 mins). Implementation will refresh token 10 min before expire (token should last for 40 min once refreshed).

Merry Christmas :)

yo-han commented 4 months ago

I'm missing an explanation of how to retrieve the session token by the user. Users that install this component by HACS should be informed in the README and I think at the login screen about what steps are needed to get this token. Not just a link to someone else's repo.

yo-han commented 4 months ago

Code looks good to me at first glance but I will test it later this week. Thanks for your work so far!

ozaibi commented 4 months ago

IF your using Crome: use this addon : Cookie Editor https://chromewebstore.google.com/detail/cookiemanager-cookie-edit/hdhngoamekjhmnpenphenpaiindoinpo?hl=en-US&utm_source=ext_sidebar