UPnP/IGD integration „Failed setup“
The problem
The UPnP/IGD integration shows „Failed setup“ in the integrations panel.
UPnP is enabeled on the Fritz!Box, restart of the Fritz!Box didn‘t solve the issue.
What version of Home Assistant Core has the issue?
2024.10.0
What was the last working version of Home Assistant Core?
2024.9.x (dont remember an issue during the last weeks)
What type of installation are you running?
Home Assistant Container
Integration causing the issue
UPnP/IGD
Link to integration documentation on our website
No response
Diagnostics information
InternetGatewayDeviceV2 - FRITZ!Box 6490 Cable (lgi) 1 device and 8 entities
Failed setup, will retry: Device not discovered: uuid:75802409-bccb-40e7-9f6c-989BCB6B6D97::urn:schemas-upnp-org:device:InternetGatewayDevice:2
FRITZ!Box 6490 Cable (lgi) 1 device and 8 entities
Failed setup, will retry: Device not discovered: uuid:75802409-bccb-40e7-8e6c-989BCB6B6D97::urn:schemas-upnp-org:device:InternetGatewayDevice:1
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response
Hey there @stevenlooman, mind taking a look at this issue as it has been labeled with an integration (upnp) you are listed as a code owner for? Thanks!
Code owner commands
Code owners of upnp can trigger bot actions by commenting:
@home-assistant closeCloses the issue.@home-assistant rename Awesome new titleRenames the issue.@home-assistant reopenReopen the issue.@home-assistant unassign upnpRemoves the current integration label and assignees on the issue, add the integration domain after the command.@home-assistant add-label needs-more-informationAdd a label (needs-more-information, problem in dependency, problem in custom component) to the issue.@home-assistant remove-label needs-more-informationRemove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.
(message by CodeOwnersMention)
upnp documentation upnp source (message by IssueLinks)
Got same stuff on TPLink router but on 2024.9.3 version
`Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 604, in async_setup
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/upnp/__init__.py", line 96, in async_setup_entry
await device.async_subscribe_services()
File "/usr/src/homeassistant/homeassistant/components/upnp/device.py", line 208, in async_subscribe_services
await self._igd_device.async_subscribe_services(auto_resubscribe=True)
File "/usr/local/lib/python3.12/site-packages/async_upnp_client/profiles/profile.py", line 355, in async_subscribe_services
new_sid, timeout = await self._event_handler.async_subscribe(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/async_upnp_client/event_handler.py", line 208, in async_subscribe
raise UpnpResponseError(
async_upnp_client.exceptions.UpnpResponseError: Did not receive HTTP 200 but 500`
Deleted the integration and then later a new device was discovered, but setup dont succeed anymore:
Error setting up entry TP-Link SMB ER7206 for upnp
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 604, in async_setup
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/upnp/__init__.py", line 88, in async_setup_entry
device = await async_create_device(hass, location, force_poll)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/upnp/device.py", line 95, in async_create_device
upnp_device = await factory.async_create_device(location)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/async_upnp_client/client_factory.py", line 100, in async_create_device
root_el = await self._async_get_device_spec(description_url)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/async_upnp_client/client_factory.py", line 433, in _async_get_device_spec
bare_response = await self.requester.async_http_request(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/async_upnp_client/aiohttp.py", line 184, in async_http_request
return await self._async_http_request(http_request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/async_upnp_client/aiohttp.py", line 216, in _async_http_request
async with self._session.request(
File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 1353, in __aenter__
self._resp = await self._coro
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 684, in _request
await resp.start(conn)
File "/usr/local/lib/python3.12/site-packages/aiohttp/client_reqrep.py", line 999, in start
message, payload = await protocol.read() # type: ignore[union-attr]
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/streams.py", line 640, in read
await self._waiter
asyncio.exceptions.CancelledError
Thank you for creating this issue @hegien. Can you enable debug logging for the upnp component and either post the output here, or mail it to me?
@checkiecheck, this seems to be a different problem. Can you create a new issue for this?
@StevenLooman I‘ve switched on Debug mode in the Integration pane. But unfortunately I still only get this messsge there: Failed setup, will retry: Device not discovered: uuid:75802409-bccb-40e7-9f6c-989BCB6B6D97::urn:schemas-upnp-org:device:InternetGatewayDevice:2
There is no additional log. I‘m not an HA expert. Do I need to search somewhere else for logs?
How long did you wait @hegien after enabling debug logging? It can take some time before upnp tries to (re)initialise.
Also, when you disable the debug logging again, the logs should be automatically downloaded.
@checkiecheck, this seems to be a different problem. Can you create a new issue for this?
Seems something is fixed already, integration behaves fine again. Upgrade HA to oktober release did the trick
How long did you wait @hegien after enabling debug logging? It can take some time before upnp tries to (re)initialise.
Also, when you disable the debug logging again, the logs should be automatically downloaded.
@StevenLooman Thanks a lot fo your reply. Seems as if I did not wait long enough. I switched on Debug logging this morning. Now I got a logfile, see attached file. home-assistant_upnp_2024-10-19T18-18-28.430Z.log
Thank you for the logs. The problem will be fixed with #127006. I expect this to be fixed with the 2024.11 release of Home Assistant.
have the same problem with a AVM 6660 which has been updated to Firmware 8 since that time the UPnP dont work FRITZ!Box 6660 Cable von AVM Verbunden über [FritzBox7590-Anbau] Firmware: 8.00
with the 7590 still 7.59 IT WORKS RITZ!Box 7590 von AVM Verbunden über [FRITZ!Box 6660 Cable] Firmware: 7.59
same for me with a netgear router
Same for me with latest home asssistant release: Core 2024.11.2 Frontend 20241106.2
Registratore: homeassistant.config_entries Fonte: config_entries.py:635 Prima occorrenza: 12:39:14 (4 occorrenze) Ultima registrazione: 12:41:50
Error setting up entry InternetGatewayDeviceV2 - FRITZ!Box 7530 AX for upnp
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 635, in __async_setup_with_context
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/upnp/__init__.py", line 169, in async_setup_entry
device_entry = dev_registry.async_update_device(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/device_registry.py", line 1030, in async_update_device
new_values["identifiers"] = self._validate_identifiers(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/device_registry.py", line 1136, in _validate_identifiers
raise DeviceIdentifierCollisionError(identifiers, existing_device)
homeassistant.helpers.device_registry.DeviceIdentifierCollisionError: Identifiers {
('upnp_host', '192.168.178.1'), ('upnp', 'uuid:75802409-bccb-40e7-9f6c-485D3539B893::urn:schemas-upnp-org:device:InternetGatewayDevice:2')
} already registered with DeviceEntry(
area_id=None,
config_entries={'5ede965eb356ab431697436207a2f22a'},
configuration_url=None,
connections={('upnp', 'uuid:75802409-bccb-40e7-8e6c-485D3539B893')},
created_at=datetime.datetime(1970, 1, 1, 0, 0, tzinfo=datetime.timezone.utc),
disabled_by=None,
entry_type=None,
hw_version=None,
id='956b43923ac3700abd07643d170d299f',
identifiers={('upnp_host', '192.168.178.1'), ('upnp', 'uuid:75802409-bccb-40e7-9f6c-485D3539B893::urn:schemas-upnp-org:device:InternetGatewayDevice:2')},
labels=set(),
manufacturer='AVM Berlin',
model='FRITZ!Box 7530 AX',
model_id=None,
modified_at=datetime.datetime(2024, 8, 8, 12, 50, 55, 526657,
tzinfo=datetime.timezone.utc),
name_by_user=None,
name='FRITZ!Box 7530 AX',
primary_config_entry=None,
serial_number=None,
suggested_area=None,
sw_version=None,
via_device_id=None,
is_new=False,
_cache={
'json_repr': b'{"area_id":null,"configuration_url":null,"config_entries":["5ede965eb356ab431697436207a2f22a"],"connections":[["upnp","uuid:75802409-bccb-40e7-8e6c-485D3539B893"]],"created_at":0.0,"disabled_by":null,"entry_type":null,"hw_version":null,"id":"956b43923ac3700abd07643d170d299f","identifiers":[["upnp_host","192.168.178.1"],["upnp","uuid:75802409-bccb-40e7-9f6c-485D3539B893::urn:schemas-upnp-org:device:InternetGatewayDevice:2"]],"labels":[],"manufacturer":"AVM Berlin","model":"FRITZ!Box 7530 AX","model_id":null,"modified_at":1723121455.526657,"name_by_user":null,"name":"FRITZ!Box 7530 AX","primary_config_entry":null,"serial_number":null,"sw_version":null,"via_device_id":null}'
})
Did you try removing the integration and creating it again, @liquidand ?
Did you try removing the integration and creating it again, @liquidand ?
It works again without any special action. Probably it was solved by one of the last HA updates.
Great! I'm closing this issue. If new problems arise, please create a new issue.