home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.07k stars 29.73k forks source link

Detected blocking call to import_module inside the event loop by integration 'insteon' #118985

Open azsoccerpop opened 3 months ago

azsoccerpop commented 3 months ago

The problem

Insteon Integration to Version 1 Hub fails to connect post upgrade to HA version core-2024.6.0. The hub has a static IP address but no Insteon devices respond and Thermostat information is not retrieved.

What version of Home Assistant Core has the issue?

core-2024.6.0

What was the last working version of Home Assistant Core?

core-2024.5.5

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Insteon

Link to integration documentation on our website

https://www.home-assistant.io/integrations/insteon/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2024-06-06 06:44:46.628 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to import_module inside the event loop by integration 'insteon' at homeassistant/components/insteon/__init__.py, line 97: await async_connect(**entry.data) (offender: /usr/local/lib/python3.12/site-packages/serial/__init__.py, line 75: handler_module = importlib.import_module(module_name, package_name)), please create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+insteon%22
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 "/usr/src/homeassistant/homeassistant/components/insteon/__init__.py", line 97, in async_setup_entry
    await async_connect(**entry.data)

Additional information

Rollback to 2024.5.5 the issue is resolved.

home-assistant[bot] commented 3 months ago

Hey there @teharris1, mind taking a look at this issue as it has been labeled with an integration (insteon) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `insteon` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign insteon` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


insteon documentation insteon source (message by IssueLinks)

elupus commented 3 months ago

Opened upstream issue here: https://github.com/pyinsteon/pyinsteon/issues/413