Onvif Setup gives "unknown Error"

Hi,

I have an Eminent E6330 camera which I try to setup through onvif, but it doesn’t work.

In my camera back-end, onvif is activated:

But the onvif setup doesn’t detect it and manual input gives “unknown error”
Tried multiple ports (including 80 & 443), but no luck :frowning:

Logger: aiohttp.server
Source: components/onvif/config_flow.py:203
First occurred: 13:40:09 (1 occurrences)
Last logged: 13:40:09

Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/httpx/_transports/default.py", line 61, in map_httpcore_exceptions
    yield
  File "/usr/local/lib/python3.8/site-packages/httpx/_transports/default.py", line 277, in handle_async_request
    ) = await self._pool.handle_async_request(
  File "/usr/local/lib/python3.8/site-packages/httpcore/_async/connection_pool.py", line 230, in handle_async_request
    response = await connection.handle_async_request(
  File "/usr/local/lib/python3.8/site-packages/httpcore/_async/connection.py", line 99, in handle_async_request
    self.socket = await self._open_socket(timeout)
  File "/usr/local/lib/python3.8/site-packages/httpcore/_async/connection.py", line 130, in _open_socket
    return await self.backend.open_tcp_stream(
  File "/usr/local/lib/python3.8/site-packages/httpcore/_backends/auto.py", line 44, in open_tcp_stream
    return await self.backend.open_tcp_stream(
  File "/usr/local/lib/python3.8/site-packages/httpcore/_backends/asyncio.py", line 268, in open_tcp_stream
    return SocketStream(
  File "/usr/local/lib/python3.8/contextlib.py", line 131, in __exit__
    self.gen.throw(type, value, traceback)
  File "/usr/local/lib/python3.8/site-packages/httpcore/_exceptions.py", line 12, in map_exceptions
    raise to_exc(exc) from None
httpcore.ConnectError: [Errno 111] Connect call failed ('192.168.0.25', 5000)

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

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
    resp = await self._request_handler(request)
  File "/usr/local/lib/python3.8/site-packages/aiohttp/web_app.py", line 499, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.8/site-packages/aiohttp/web_middlewares.py", line 119, in impl
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 56, in security_filter_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 18, in request_context_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 74, in ban_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 135, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 131, in handle
    result = await result
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 155, in post
    return await super().post(request, flow_id)
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 63, in wrapper
    result = await method(view, request, *args, **kwargs)
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 109, in post
    result = await self._flow_mgr.async_configure(flow_id, data)
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 199, 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 257, in _async_handle_step
    result: FlowResult = await getattr(flow, method)(user_input)
  File "/usr/src/homeassistant/homeassistant/components/onvif/config_flow.py", line 170, in async_step_auth
    return await self.async_step_profiles()
  File "/usr/src/homeassistant/homeassistant/components/onvif/config_flow.py", line 203, in async_step_profiles
    await device.update_xaddrs()
  File "/usr/local/lib/python3.8/site-packages/onvif/client.py", line 276, in update_xaddrs
    capabilities = await devicemgmt.GetCapabilities({"Category": "All"})
  File "/usr/local/lib/python3.8/site-packages/zeep/proxy.py", line 64, in __call__
    return await self._proxy._binding.send_async(
  File "/usr/local/lib/python3.8/site-packages/zeep/wsdl/bindings/soap.py", line 156, in send_async
    response = await client.transport.post_xml(
  File "/usr/local/lib/python3.8/site-packages/zeep/transports.py", line 230, in post_xml
    response = await self.post(address, message, headers)
  File "/usr/local/lib/python3.8/site-packages/zeep/transports.py", line 215, in post
    response = await self.client.post(
  File "/usr/local/lib/python3.8/site-packages/httpx/_client.py", line 1747, in post
    return await self.request(
  File "/usr/local/lib/python3.8/site-packages/httpx/_client.py", line 1426, in request
    response = await self.send(
  File "/usr/local/lib/python3.8/site-packages/httpx/_client.py", line 1511, in send
    response = await self._send_handling_auth(
  File "/usr/local/lib/python3.8/site-packages/httpx/_client.py", line 1546, in _send_handling_auth
    response = await self._send_handling_redirects(
  File "/usr/local/lib/python3.8/site-packages/httpx/_client.py", line 1580, in _send_handling_redirects
    response = await self._send_single_request(request, timeout)
  File "/usr/local/lib/python3.8/site-packages/httpx/_client.py", line 1621, in _send_single_request
    ) = await transport.handle_async_request(
  File "/usr/local/lib/python3.8/site-packages/httpx/_transports/default.py", line 272, in handle_async_request
    (
  File "/usr/local/lib/python3.8/contextlib.py", line 131, in __exit__
    self.gen.throw(type, value, traceback)
  File "/usr/local/lib/python3.8/site-packages/httpx/_transports/default.py", line 78, in map_httpcore_exceptions
    raise mapped_exc(message) from exc
httpx.ConnectError: [Errno 111] Connect call failed ('192.168.0.25', 5000)

Any idea?
Thanks

Same issue for me.
Worked in the past.

Camera: Dahua VTO 2202f-p

Logger: aiohttp.server
Source: components/onvif/config_flow.py:203
First occurred: 16:38:57 (17 occurrences)
Last logged: 16:44:37

Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/httpx/_transports/default.py", line 61, in map_httpcore_exceptions
    yield
  File "/usr/local/lib/python3.8/site-packages/httpx/_transports/default.py", line 277, in handle_async_request
    ) = await self._pool.handle_async_request(
  File "/usr/local/lib/python3.8/site-packages/httpcore/_async/connection_pool.py", line 230, in handle_async_request
    response = await connection.handle_async_request(
  File "/usr/local/lib/python3.8/site-packages/httpcore/_async/connection.py", line 115, in handle_async_request
    return await self.connection.handle_async_request(
  File "/usr/local/lib/python3.8/site-packages/httpcore/_async/http11.py", line 69, in handle_async_request
    ) = await self._receive_response(timeout)
  File "/usr/local/lib/python3.8/site-packages/httpcore/_async/http11.py", line 130, in _receive_response
    event = await self._receive_event(timeout)
  File "/usr/local/lib/python3.8/site-packages/httpcore/_async/http11.py", line 178, in _receive_event
    raise RemoteProtocolError(msg)
httpcore.RemoteProtocolError: Server disconnected without sending a response.

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

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
    resp = await self._request_handler(request)
  File "/usr/local/lib/python3.8/site-packages/aiohttp/web_app.py", line 499, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.8/site-packages/aiohttp/web_middlewares.py", line 119, in impl
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 56, in security_filter_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 18, in request_context_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 74, in ban_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 135, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 131, in handle
    result = await result
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 155, in post
    return await super().post(request, flow_id)
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 63, in wrapper
    result = await method(view, request, *args, **kwargs)
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 109, in post
    result = await self._flow_mgr.async_configure(flow_id, data)
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 199, 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 257, in _async_handle_step
    result: FlowResult = await getattr(flow, method)(user_input)
  File "/usr/src/homeassistant/homeassistant/components/onvif/config_flow.py", line 170, in async_step_auth
    return await self.async_step_profiles()
  File "/usr/src/homeassistant/homeassistant/components/onvif/config_flow.py", line 203, in async_step_profiles
    await device.update_xaddrs()
  File "/usr/local/lib/python3.8/site-packages/onvif/client.py", line 276, in update_xaddrs
    capabilities = await devicemgmt.GetCapabilities({"Category": "All"})
  File "/usr/local/lib/python3.8/site-packages/zeep/proxy.py", line 64, in __call__
    return await self._proxy._binding.send_async(
  File "/usr/local/lib/python3.8/site-packages/zeep/wsdl/bindings/soap.py", line 156, in send_async
    response = await client.transport.post_xml(
  File "/usr/local/lib/python3.8/site-packages/zeep/transports.py", line 230, in post_xml
    response = await self.post(address, message, headers)
  File "/usr/local/lib/python3.8/site-packages/zeep/transports.py", line 215, in post
    response = await self.client.post(
  File "/usr/local/lib/python3.8/site-packages/httpx/_client.py", line 1747, in post
    return await self.request(
  File "/usr/local/lib/python3.8/site-packages/httpx/_client.py", line 1426, in request
    response = await self.send(
  File "/usr/local/lib/python3.8/site-packages/httpx/_client.py", line 1511, in send
    response = await self._send_handling_auth(
  File "/usr/local/lib/python3.8/site-packages/httpx/_client.py", line 1546, in _send_handling_auth
    response = await self._send_handling_redirects(
  File "/usr/local/lib/python3.8/site-packages/httpx/_client.py", line 1580, in _send_handling_redirects
    response = await self._send_single_request(request, timeout)
  File "/usr/local/lib/python3.8/site-packages/httpx/_client.py", line 1621, in _send_single_request
    ) = await transport.handle_async_request(
  File "/usr/local/lib/python3.8/site-packages/httpx/_transports/default.py", line 272, in handle_async_request
    (
  File "/usr/local/lib/python3.8/contextlib.py", line 131, in __exit__
    self.gen.throw(type, value, traceback)
  File "/usr/local/lib/python3.8/site-packages/httpx/_transports/default.py", line 78, in map_httpcore_exceptions
    raise mapped_exc(message) from exc
httpx.RemoteProtocolError: Server disconnected without sending a response.

Same situation here. It worked last month, now with 2021.8.x and 2021.9.0 it does not work any more.

Cams: Annke CZ400 PTZ

My Doorbird camera bell (on the same network) is just working fine.

Any ideas or suggestions how to proceed?

Did anyone ever find a solution to this? I have the same issue.

Thanks,

Chris

1 Like

I have found the reason for the issue on my side, a bit by accident: my password was containing a “@” sign which messed up with the calls of the format USER:PASSWORD@IP_OF_CAMERA.
So, now I have an integration.
But only an image, no other sensor like motion detection

1 Like

Anyone an idea?

1 Like