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
72.72k stars 30.45k forks source link

ONVIF Intergration not working #37101

Closed damianeickhoff closed 3 years ago

damianeickhoff commented 4 years ago

The problem

I can't create a ONVIF intergration. Where I press save, it says "Unknown error occurred". image

I already checkt the server (i'm running UnRaid), I know ONVIF is using port 554, but the only port on my server like that is 55444.

Environment

Problem-relevant configuration.yaml

n/a

Traceback/Error logs

Logger: aiohttp.server
Source: components/onvif/config_flow.py:42
First occurred: 20:15:02 (3 occurrences)
Last logged: 20:20:02

Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/aiohttp/web_protocol.py", line 418, in start
    resp = await task
  File "/usr/local/lib/python3.7/site-packages/aiohttp/web_app.py", line 458, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.7/site-packages/aiohttp/web_middlewares.py", line 119, in impl
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/real_ip.py", line 39, in real_ip_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 73, in ban_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 127, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 129, in handle
    result = await result
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 145, in post
    return await super().post(request, flow_id)
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 60, in wrapper
    result = await method(view, request, *args, **kwargs)
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 106, in post
    result = await self._flow_mgr.async_configure(flow_id, data)
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 153, in async_configure
    result = await self._async_handle_step(flow, cur_step["step_id"], user_input)
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 201, in _async_handle_step
    result: Dict = await getattr(flow, method)(user_input)
  File "/usr/src/homeassistant/homeassistant/components/onvif/config_flow.py", line 96, in async_step_user
    return await self.async_step_device()
  File "/usr/src/homeassistant/homeassistant/components/onvif/config_flow.py", line 122, in async_step_device
    discovery = await async_discovery(self.hass)
  File "/usr/src/homeassistant/homeassistant/components/onvif/config_flow.py", line 53, in async_discovery
    services = await hass.async_add_executor_job(wsdiscovery)
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/onvif/config_flow.py", line 42, in wsdiscovery
    discovery.start()
  File "/usr/local/lib/python3.7/site-packages/wsdiscovery/threaded.py", line 285, in start
    self._startThreads()
  File "/usr/local/lib/python3.7/site-packages/wsdiscovery/threaded.py", line 265, in _startThreads
    self._networkingThread.start()
  File "/usr/local/lib/python3.7/site-packages/wsdiscovery/threaded.py", line 239, in start
    self._multiInSocket = self._createMulticastInSocket()
  File "/usr/local/lib/python3.7/site-packages/wsdiscovery/threaded.py", line 109, in _createMulticastInSocket
    sock.bind(('', MULTICAST_PORT))
OSError: [Errno 98] Address in use

Additional information

I used netstat to check for port 554, but nothing found but the 55444 port.

probot-home-assistant[bot] commented 4 years ago

onvif documentation onvif source (message by IssueLinks)

probot-home-assistant[bot] commented 4 years ago

Hey there @hunterjm, mind taking a look at this issue as its been labeled with an integration (onvif) you are listed as a codeowner for? Thanks! (message by CodeOwnersMention)

damianeickhoff commented 4 years ago

Is this call being worked on?

alexolivier commented 4 years ago

I'm having this error also. Running HA in docker with host network

Holbert commented 4 years ago

I'm also having this issue on Unraid running HA as a docker container. Getting address in use as well.

damianeickhoff commented 4 years ago

So almost 6 months later still no solution but worse, no response... Also, still not working. Just moved to another house and yet the same error.

khiles commented 3 years ago

getting same error also ive disabled every docker in unraid and still facing this issue

hunterjm commented 3 years ago

A search of past issues would have helped. #35897