magico13 / ha-emporia-vue

Home Assistant Integration for Emporia Vue Energy Monitor
MIT License
496 stars 67 forks source link

Unable to initialize since 2024.10 update #317

Closed asinla closed 1 month ago

asinla commented 1 month ago

After updating to 2024.10 yesterday I get the following message from the logs...

Logger: homeassistant.config_entries Source: config_entries.py:594 First occurred: October 6, 2024 at 9:06:28 PM (3 occurrences) Last logged: 6:25:58 AM

Error setting up entry Customer 136037 for emporia_vue Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 594, in async_setup result = await component.async_setup_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/emporia_vue/init.py", line 203, in async_setup_entry await coordinator_1mon.async_config_entry_first_refresh() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 281, in async_config_entry_first_refresh await self._async_refresh( File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 354, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 271, in _async_update_data return await self.update_method() ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/emporia_vue/init.py", line 145, in async_update_data_1mon return await update_sensors(vue, [Scale.MONTH.value]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/emporia_vue/init.py", line 369, in update_sensors usage_dict = await loop.run_in_executor( ^^^^^^^^^^^^^^^^^^^^^^^^^^^ asyncio.exceptions.CancelledError: Global task timeout

Tried restarting, adding a hub and reloading and none of them work.

Thanks so much.

magico13 commented 1 month ago

Interesting, it hit a timeout. There's an issue right now where if a device is offline it will cause additional retries for fetching the data. You might be hitting that and it's taking too long so Home Assistant kills it. Check to see if you have any devices offline in the app and either get them back online (eg plug in any smart switches you've unplugged) or remove them from your account and then try reloading the integration. I need to update the retry logic to ignore devices that have been offline for more than a few minutes but I haven't had a chance to do that yet.

asinla commented 1 month ago

Thanks so much and apologies for the late reply.

So it started working again randomly for a few days and now my Emporia device has given up the ghost so there is zero data anywhere. It's the fourth device that this has happened to unfortunately. When I get the next one I will update the app and remove the other devices as you suggested.

Great integration otherwise, thanks!