Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2024.7.0b10 breaks Tradfri Integration #121082

Open
pedolsky opened this issue Jul 3, 2024 · 3 comments
Open

2024.7.0b10 breaks Tradfri Integration #121082

pedolsky opened this issue Jul 3, 2024 · 3 comments

Comments

@pedolsky
Copy link

pedolsky commented Jul 3, 2024

The problem

The Tradfri Integration fails to initialize so all devices became unavailable. Restart of Home Assistant and host reboot didn't help.

In the 2024.7 beta versions before I had countless aiocaop warnings and had to reload the integration.

What version of Home Assistant Core has the issue?

core-2024.7.0b10

What was the last working version of Home Assistant Core?

core-2024.6.3

What type of installation are you running?

Home Assistant Supervised

Integration causing the issue

Tradfri

Link to integration documentation on our website

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

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Error setting up entry 192.168.178.47 for tradfri

2024-07-03 16:48:17.863 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry 192.168.178.47 for tradfri
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/asyncio/tasks.py", line 520, in wait_for
    return await fut
           ^^^^^^^^^
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/pytradfri/api/aiocoap_api.py", line 107, in _get_response
    pr_resp = await asyncio.wait_for(pr_req.response, timeout)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/asyncio/tasks.py", line 519, in wait_for
    async with timeouts.timeout(timeout):
  File "/usr/local/lib/python3.12/asyncio/timeouts.py", line 115, in __aexit__
    raise TimeoutError from exc_val
TimeoutError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 586, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/tradfri/__init__.py", line 82, in async_setup_entry
    devices: list[Device] = await api(devices_commands, timeout=TIMEOUT_API)
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pytradfri/api/aiocoap_api.py", line 204, in request
    command_results = await asyncio.gather(*commands)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pytradfri/api/aiocoap_api.py", line 167, in _execute
    _, res = await self._get_response(msg, timeout)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pytradfri/api/aiocoap_api.py", line 116, in _get_response
    await self._reset_protocol(exc)
  File "/usr/local/lib/python3.12/site-packages/pytradfri/api/aiocoap_api.py", line 87, in _reset_protocol
    await protocol.shutdown()
  File "/usr/local/lib/python3.12/site-packages/aiocoap/protocol.py", line 438, in shutdown
    await item
  File "/usr/local/lib/python3.12/site-packages/aiocoap/tokenmanager.py", line 62, in shutdown
    request.add_exception(error.LibraryShutdown())
  File "/usr/local/lib/python3.12/site-packages/aiocoap/pipe.py", line 195, in add_exception
    self._add_event(self.Event(None, exception, True))
  File "/usr/local/lib/python3.12/site-packages/aiocoap/pipe.py", line 180, in _add_event
    keep_calling = cb(event)
                   ^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiocoap/protocol.py", line 577, in process
    self._runner.send(event)
  File "/usr/local/lib/python3.12/site-packages/aiocoap/protocol.py", line 620, in _run
    self.response.set_exception(first_event.exception)
asyncio.exceptions.InvalidStateError: invalid state

Additional information

I'm using the old IKEA hub.

@home-assistant
Copy link

home-assistant bot commented Jul 3, 2024

@mib1185 mib1185 added this to the 2024.7.1 milestone Jul 3, 2024
@frenck frenck removed this from the 2024.7.1 milestone Jul 4, 2024
@dwd1

This comment was marked as resolved.

@Bassadin
Copy link

Bassadin commented Jul 6, 2024

This also seems to happen to me on 2024.7.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants