gillesvs / librelink

Librelink integration for Home Assistant
MIT License
21 stars 6 forks source link

are not integration items #8

Closed mimasek71 closed 6 months ago

mimasek71 commented 6 months ago

Logger: homeassistant.config_entries Source: config_entries.py:444 First occurred: 01:02:20 (2 occurrences) Last logged: 06:44:44

Error setting up entry Pavel@kolarczyk.eu for librelink Traceback (most recent call last): File "/config/custom_components/librelink/api.py", line 180, in api_wrapper response.raise_for_status() File "/usr/local/lib/python3.12/site-packages/aiohttp/client_reqrep.py", line 1060, in raise_for_status raise ClientResponseError( aiohttp.client_exceptions.ClientResponseError: 429, message='Too Many Requests', url=URL('https://api.libreview.io/llu/auth/login')

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 444, in async_setup result = await component.async_setup_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/librelink/init.py", line 49, in async_setup_entry sessionToken = await myLibrelinkLogin.async_get_token() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/librelink/api.py", line 134, in async_get_token reponseLogin = await api_wrapper( ^^^^^^^^^^^^^^^^^^ File "/config/custom_components/librelink/api.py", line 189, in api_wrapper raise LibreLinkApiCommunicationError( custom_components.librelink.api.LibreLinkApiCommunicationError: Error fetching information

in the Czech Republic there is only two-factor authentication, isn't this exactly the problem?

gillesvs commented 6 months ago

Hello,

Can you activate the debug mode for the integration and send me the log file? Thanks

mimasek71 commented 6 months ago

home-assistant_librelink_2024-02-13T21-27-41.610Z.log

I replaced the username and password to hide it, thanks for understanding.

gillesvs commented 6 months ago

home-assistant_librelink_2024-02-13T21-27-41.610Z.log

I replaced the username and password to hide it, thanks for understanding.

Thanks for the feedback.

Logs tells me that the authentification process fails dut to the API returns "invalid credentials" and a failed status. Are you sure that you are using the librelink account and not the librelinkup (follower account)?

There is also two factor authentification enabled in France and it works for me, so I do not think that this is the pb. Other question, is Czech republic is using the global API? I know that in russia they have a dedicated endpoint: (https://api.libreview.ru). Maybe it is also your case, but the Abbott API has not an official documentation and support. So I might not know your local API.

mimasek71 commented 6 months ago

Hi, I'm sure I'm using a librelink account. I have no idea how it is with the API in the Czech Republic, I also tried to create an account for France, Germany, but that didn't help either, it didn't even want to log in, I don't know how to proceed

gillesvs commented 6 months ago

Hi, I'm sure I'm using a librelink account. I have no idea how it is with the API in the Czech Republic, I also tried to create an account for France, Germany, but that didn't help either, it didn't even want to log in, I don't know how to proceed

Same as issue #10 I guess.

Do the following:

setup à librelinkUp account

Accept terms of librelinkup app

Link your librelink account

Use librelinkup credendials in this integration

mimasek71 commented 6 months ago

Thank you, that helped but I had to uninstall the librelinkup app from my mobile, reinstall it and now it works, thank you very much