oyvindwe / connectlife-ha

ConnectLife integration for Home Assistant
GNU General Public License v3.0
62 stars 24 forks source link

Timeout fetching connectlife data #86

Closed bartashevich closed 3 months ago

bartashevich commented 3 months ago

From time to time connection timeout and devices become unavailable.

Logger: custom_components.connectlife.coordinator
Source: helpers/update_coordinator.py:318
integration: ConnectLife ([documentation](https://github.com/oyvindwe/connectlife-ha))
First occurred: 19 July 2024 at 14:01:20 (8 occurrences)
Last logged: 14:54:08

Timeout fetching connectlife data
Changed to Eco
14:55:08 - 40 seconds ago
Became unavailable
14:54:08 - 2 minutes ago
Changed to Eco
12:13:45 - 3 hours ago
Became unavailable
12:12:45 - 3 hours ago
Changed to Eco
11:07:39 - 4 hours ago
Became unavailable
11:06:39 - 4 hours ago
Changed to Eco
10:25:37 - 5 hours ago
Became unavailable
10:24:37 - 5 hours ago
Changed to Eco
09:25:31 - 6 hours ago
Became unavailable
09:24:31 - 6 hours ago
Changed to Eco
08:34:25 - 6 hours ago
Became unavailable
08:33:25 - 6 hours ago
Changed to Eco
07:51:20 - 7 hours ago
Became unavailable
07:50:20 - 7 hours ago
Changed to Eco
07:04:16 - 8 hours ago
Became unavailable
07:03:16 - 8 hours ago
Changed to Eco
06:39:13 - 8 hours ago
Became unavailable
06:38:13 - 8 hours ago
Changed to Eco
06:15:11 - 9 hours ago
Became unavailable
06:14:11 - 9 hours ago
Changed to Eco
05:47:06 - 9 hours ago
Became unavailable
05:46:05 - 9 hours ago
Changed to Eco
05:30:03 - 9 hours ago
Became unavailable
05:29:03 - 9 hours ago
Changed to Eco
04:45:59 - 10 hours ago
Became unavailable
04:44:59 - 10 hours ago
Changed to Eco
04:35:58 - 10 hours ago
Became unavailable
04:34:58 - 10 hours ago
Changed to Eco
03:37:53 - 11 hours ago
Became unavailable
03:36:53 - 11 hours ago
Changed to Eco
02:50:51 - 12 hours ago
Became unavailable
02:49:51 - 12 hours ago
oyvindwe commented 3 months ago

The timeout is 5 minutes (default value in aiohttp), which is fairly high. The integration polls every 60 seconds, so I wonder if the client either should have a lower timeout (<60 seconds), or avoid doing a second request if one is already in progress to avoid putting more stress on the ConnectLife API when it already seems to be in problem.

oyvindwe commented 3 months ago

Should be fixed in version 0.16.0.