gillesvs / librelink

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

After a (re)start the integration doesnt work, when I start it after all has started it works #11

Closed diedvdyk closed 6 months ago

diedvdyk commented 6 months ago

When I (re)start HA the integration doesnt start. A manual start after all has loaded starts the integration succesfully.

I am from Europe, on the latest integration version on HA version 2024.2.1 (pi 4, HAOS)

Debug log is attached.

librelinkup.debug.log

gillesvs commented 6 months ago

Hello, Log shows an API time out. Meaning that the API didn't respond in time at startup. Then it seems to be fine. So more a network issue or an Abbott API unavailability. Is everything working fine now?

diedvdyk commented 6 months ago

This afternoon I tested it several times with each time the same result. Restart HA --> API timeout Restart Integration after total HA startup --> working and no API timeout I will test this tomorrow another time.

gillesvs commented 6 months ago

In the file api.py of the integration, line 169 there is: async with asyncio.timeout(10)

Maybe try 30. I will make it as a constant in a later release to be able to modify this in a cleaner way..

diedvdyk commented 6 months ago

Changed the parameter in the api.py to 30. Deleted the pycache of the integration. Restarted HA twice --> No API timeout at startup anymore

gillesvs commented 6 months ago

timeout increased and managed through a constant in v1.2.1