explosivo22 / kwikset-ha

Kwikset Smart Locks integration for Home Assistant. The Kwikset App is exclusively for use with Kwikset Halo, Halo Touch, and Aura smart locks.
Apache License 2.0
34 stars 2 forks source link

Detected Blocking Call Upon Reboot of HA #71

Open malmaxx opened 3 weeks ago

malmaxx commented 3 weeks ago

HA Info: Core 2024.6.0 Supervisor 2024.06.0 Operating System 12.3 Frontend 20240605.0

Logged HA Core Error:

Logger: homeassistant.util.loop Source: util/loop.py:84 First occurred: 10:54:42 (15 occurrences) Last logged: 10:54:50

Detected blocking call to open inside the event loop by custom integration 'kwikset' at custom_components/kwikset/__init__.py, line 37: await client.renew_access_token() (offender: /usr/local/lib/python3.12/site-packages/botocore/loaders.py, line 172: with open(full_path, 'rb') as fp:), please report it to the author of the 'kwikset' custom integration Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "/usr/src/homeassistant/homeassistant/__main__.py", line 223, in <module> sys.exit(main()) File "/usr/src/homeassistant/homeassistant/__main__.py", line 209, in main exit_code = runner.run(runtime_conf) File "/usr/src/homeassistant/homeassistant/runner.py", line 190, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.12/asyncio/base_events.py", line 672, in run_until_complete self.run_forever() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 639, in run_forever self._run_once() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1988, in _run_once handle._run() File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run self._context.run(self._callback, *self._args) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 742, in async_setup_locked await self.async_setup(hass, integration=integration) 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/kwikset/__init__.py", line 37, in async_setup_entry await client.renew_access_token() 
sagargp commented 2 weeks ago

I get this too, although it doesn't seem to affect the utility of the lock in HA. Separately, I'm getting the same error in device.py:

2024-06-14 09:17:29.988 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to open inside the event loop by custom integration 'kwikset' at custom_components/kwikset/device.py, line 119: self._device_information = await self.api_client.device.get_device_info( (offender: /usr/local/lib/python3.12/site-packages/botoco
re/loaders.py, line 172: with open(full_path, 'rb') as fp:), please report it to the author of the 'kwikset' custom integration
edhuang04 commented 5 days ago

can confirm this is also happening to me. most likely looks like kwikset is making a call to a config that blocks access to that specific file. these types are calls looks like they are being frowned upon by HA going forward? atleast thats my interpretation of this.

explosivo22 commented 2 days ago

If anyone would like to test out 0.2.4-alpha2, I am not seeing this come up in my instance.