Closed bvdkerkhof closed 1 year ago
Fix van @sedy89 hierboven lost het login probleem alhier op.
New version with a fix is released.
I would like to notice you that you hard coded last time new host "mdtlogin-ocl.medtronic.com" , after last Carelink maintenance, but it's true only for EU server. US server host is still "mdtlogin.medtronic.com" so it's better to change the code for more flexible. I mean 185 line in api.py.
Probably you can use : login_session_response.url.host to get suitable host server instead of hard coded text
I would like to notice you that you hard coded last time new host "mdtlogin-ocl.medtronic.com" , after last Carelink maintenance, but it's true only for EU server. US server host is still "mdtlogin.medtronic.com" so it's better to change the code for more flexible. I mean 185 line in api.py.
Probably you can use : login_session_response.url.host to get suitable host server instead of hard coded text
Yes, you are right. I just saw it on the xdrip PRs. Thanks for the hint!
2023_6 version for me is working again.. :-)
After updating through HACS today I'm now getting:
2023-06-29 12:00:27.474 ERROR (MainThread) [custom_components.carelink] Unexpected error fetching carelink data: 'auth_tmp_token' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 283, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/carelink/init.py", line 149, in _async_update_data recent_data = await self.client.get_recent_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/carelink/api.py", line 467, in get_recent_data if await self.__get_authorization_token() is not None: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/carelink/api.py", line 429, in __get_authorization_token auth_token = self.async_client.cookies[CARELINK_AUTH_TOKEN_COOKIE_NAME]
File "/usr/local/lib/python3.11/site-packages/httpx/_models.py", line 1148, in getitem raise KeyError(name) KeyError: 'auth_tmp_token'
I noticed line 185 in api.py is using url = "https://mdtlogin-ocl.medtronic.com" + "/mmcl/auth/oauth/v2/authorize/login"
but I'm in the US, do I need to change that to use "login_session_response.url.host"?
version 2023.6.6
I wasn't sure how exactly it should read so I just removed the "-ocl" and it works again.
It can be like this
Login url fix release ready with version 2023.6.7
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.
I was having issues with my account and had to reset my password in CareLink itself. This was done succesfully and now can sign-in through the Browser, but after deleting, upgrading CareLink with HACS i'm not able to setup the CareLink integration anymore. I have enabled Debug logging and see the following:
This might have to do with the switch of the Auth server as suggested in the latest release (3 hours ago)?
Home Assistant 2023.6.3 CareLink: 2023.6.5