Invalid config: ssdp and default_config
The problem
Setup failed for default_config: (DependencyError(...), 'Could not setup dependencies: ssdp')
What version of Home Assistant Core has the issue?
2022.11.0b0
What was the last working version of Home Assistant Core?
2022.10.5
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Camera: Record
Link to integration documentation on our website
https://www.home-assistant.io/integrations/camera/
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response
Hey there @home-assistant/core, mind taking a look at this issue as it has been labeled with an integration (camera) you are listed as a code owner for? Thanks!
Code owner commands
Code owners of camera can trigger bot actions by commenting:
@home-assistant closeCloses the issue.@home-assistant rename Awesome new titleChange the title of the issue.@home-assistant unassign cameraRemoves the current integration label and assignees on the issue, add the integration domain after the command.
(message by CodeOwnersMention)
camera documentation camera source (message by IssueLinks)
I am also seeing these errors in ssdp, albeit triggered by a different integration. This started in 2022.11.0b0 and still happening in 2022.11.0b1
2022-10-28 10:50:33.151 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of default_config. Setup failed for dependencies: ssdp
2022-10-28 10:50:33.153 ERROR (MainThread) [homeassistant.setup] Setup failed for default_config: (DependencyError(...), 'Could not setup dependencies: ssdp')
2022-10-28 10:50:49.181 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of dlna_dms. Setup failed for dependencies: ssdp
2022-10-28 10:50:49.189 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/discovery_flow.py", line 71, in _async_start
await gather_with_concurrency(
File "/usr/src/homeassistant/homeassistant/util/async_.py", line 199, in gather_with_concurrency
return await gather(
File "/usr/src/homeassistant/homeassistant/util/async_.py", line 197, in sem_task
return await task
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 225, in async_init
flow, result = await task
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 243, in _async_init
flow = await self.async_create_flow(handler, context=context, data=data)
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 804, in async_create_flow
await async_process_deps_reqs(self.hass, self._hass_config, integration)
File "/usr/src/homeassistant/homeassistant/setup.py", line 358, in async_process_deps_reqs
raise DependencyError(failed_deps)
homeassistant.exceptions.DependencyError: (DependencyError(...), 'Could not setup dependencies: ssdp')
2022-10-28 10:50:49.204 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of upnp. Setup failed for dependencies: ssdp
EDIT: Some more logs. I do not have an external URL set as there is not external access to this box.
Logger: homeassistant.setup
Source: helpers/network.py:207
First occurred: 10:50:05 AM (1 occurrences)
Last logged: 10:50:05 AM
Error during setup of component ssdp
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 235, in _async_setup_component
result = await task
File "/usr/src/homeassistant/homeassistant/components/ssdp/__init__.py", line 223, in async_setup
await server.async_start()
File "/usr/src/homeassistant/homeassistant/components/ssdp/__init__.py", line 687, in async_start
await self._async_start_upnp_servers()
File "/usr/src/homeassistant/homeassistant/components/ssdp/__init__.py", line 700, in _async_start_upnp_servers
presentation_url = get_url(self.hass)
File "/usr/src/homeassistant/homeassistant/helpers/network.py", line 168, in get_url
request_host = _get_request_host()
File "/usr/src/homeassistant/homeassistant/helpers/network.py", line 207, in _get_request_host
raise NoURLAvailableError
homeassistant.helpers.network.NoURLAvailableError
Same issue for me.
Manually setting my local network URL (as opposed to using the automatic setting) seems to have resolved this error message
Manually setting my local network URL (as opposed to using the automatic setting) seems to have resolved this error message
Interesting, it worked for me as well. I looks like I commented this out at some point in my config.
cc @StevenLooman
The problem lies with getting the url hass can be reached at:
File "/usr/src/homeassistant/homeassistant/components/ssdp/__init__.py", line 700, in _async_start_upnp_servers
presentation_url = get_url(self.hass)
There are two options as I see it:
- Get the URL via a different method (is there a way, and if so, how?)
- If the URL cannot be determined, do not set up the UPnP server
@balloob @bdraco, what do you think?
I'd probably warn and skip setting up the upnp server since we don't want it to break ssdp
Yeah we shouldn’t break SSDP.
Allow IP defaults to False if HTTP is not set up (not possible I think) or if SSL has been configured in HA. https://github.com/home-assistant/core/blob/dev/homeassistant/helpers/network.py#L135
If you have SSL configured in HA you really should configure an external URL. However, I guess in this case we should just pass allow_ip=True as invalid certs can be bypassed in a browser.
Fix https://github.com/home-assistant/core/pull/81171
If SSL has been setup without the URL configured, could this be something that is warned of via Repairs There is obviously already a warning on the network settings page, but I hadnt noticed that before!
Just adding this, I had to configure my internal and external manually to fix this too. Was a few months back and all was well.. updated today and had to find this tracker to solve it.
@sherkborg it was supposed to be fixed. If you still encounter this, please open a new issue, include the stack trace and tag me.