I have an ONVIF enabled Profile S PTZ camera. In my android camera app, the url used to access it and work the PTZ is:
rtsp://192.168.0.52:554/mpeg4?username=USER&password=PASSWORD
In trying to add this to HA via the ONVIF integration, I put 192.168.0.52 as the Host, 554 as the port, and entered the user and password. After a long wait, the window responds with Unknown error. The Logbook gives these errors:
Logger: aiohttp.server
Source: components/onvif/config_flow.py:197
First occurred: 11:00:56 (1 occurrences)
Last logged: 11:00:56
Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/httpcore/backends/asyncio.py", line 34, in read
return await self._stream.receive(max_bytes=max_bytes)
File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 1265, in receive
await self._protocol.read_event.wait()
File "/usr/local/lib/python3.10/asyncio/locks.py", line 214, in wait
await fut
asyncio.exceptions.CancelledError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/httpcore/_exceptions.py", line 10, in map_exceptions
yield
File "/usr/local/lib/python3.10/site-packages/httpcore/backends/asyncio.py", line 32, in read
with anyio.fail_after(timeout):
File "/usr/local/lib/python3.10/site-packages/anyio/_core/_tasks.py", line 118, in __exit__
raise TimeoutError
TimeoutError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/httpx/_transports/default.py", line 60, in map_httpcore_exceptions
yield
File "/usr/local/lib/python3.10/site-packages/httpx/_transports/default.py", line 239, in __aiter__
async for part in self._httpcore_stream:
File "/usr/local/lib/python3.10/site-packages/httpcore/_async/connection_pool.py", line 338, in __aiter__
async for part in self._stream:
File "/usr/local/lib/python3.10/site-packages/httpcore/_async/http11.py", line 315, in __aiter__
raise exc
File "/usr/local/lib/python3.10/site-packages/httpcore/_async/http11.py", line 308, in __aiter__
async for chunk in self._connection._receive_response_body(**kwargs):
File "/usr/local/lib/python3.10/site-packages/httpcore/_async/http11.py", line 177, in _receive_response_body
event = await self._receive_event(timeout=timeout)
File "/usr/local/lib/python3.10/site-packages/httpcore/_async/http11.py", line 191, in _receive_event
data = await self._network_stream.read(
File "/usr/local/lib/python3.10/site-packages/httpcore/backends/asyncio.py", line 31, in read
with map_exceptions(exc_map):
File "/usr/local/lib/python3.10/contextlib.py", line 153, in __exit__
self.gen.throw(typ, value, traceback)
File "/usr/local/lib/python3.10/site-packages/httpcore/_exceptions.py", line 14, in map_exceptions
raise to_exc(exc)
httpcore.ReadTimeout
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 433, in _handle_request
resp = await request_handler(request)
File "/usr/local/lib/python3.10/site-packages/aiohttp/web_app.py", line 504, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.10/site-packages/aiohttp/web_middlewares.py", line 117, in impl
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 85, in security_filter_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 100, in forwarded_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 80, in ban_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 235, in auth_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 146, in handle
result = await result
File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 180, in post
return await super().post(request, flow_id)
File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 72, in wrapper
result = await method(view, request, data, *args, **kwargs)
File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 110, in post
result = await self._flow_mgr.async_configure(flow_id, data)
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 271, in async_configure
result = await self._async_handle_step(
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 367, in _async_handle_step
result: FlowResult = await getattr(flow, method)(user_input)
File "/usr/src/homeassistant/homeassistant/components/onvif/config_flow.py", line 157, in async_step_configure
return await self.async_setup_profiles()
File "/usr/src/homeassistant/homeassistant/components/onvif/config_flow.py", line 197, in async_setup_profiles
await device.update_xaddrs()
File "/usr/local/lib/python3.10/site-packages/onvif/client.py", line 336, in update_xaddrs
capabilities = await devicemgmt.GetCapabilities({"Category": "All"})
File "/usr/local/lib/python3.10/site-packages/zeep/proxy.py", line 64, in __call__
return await self._proxy._binding.send_async(
File "/usr/local/lib/python3.10/site-packages/zeep/wsdl/bindings/soap.py", line 156, in send_async
response = await client.transport.post_xml(
File "/usr/local/lib/python3.10/site-packages/zeep/transports.py", line 235, in post_xml
response = await self.post(address, message, headers)
File "/usr/local/lib/python3.10/site-packages/zeep/transports.py", line 220, in post
response = await self.client.post(
File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1848, in post
return await self.request(
File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1533, in request
return await self.send(request, auth=auth, follow_redirects=follow_redirects)
File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1634, in send
raise exc
File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1628, in send
await response.aread()
File "/usr/local/lib/python3.10/site-packages/httpx/_models.py", line 909, in aread
self._content = b"".join([part async for part in self.aiter_bytes()])
File "/usr/local/lib/python3.10/site-packages/httpx/_models.py", line 909, in <listcomp>
self._content = b"".join([part async for part in self.aiter_bytes()])
File "/usr/local/lib/python3.10/site-packages/httpx/_models.py", line 927, in aiter_bytes
async for raw_bytes in self.aiter_raw():
File "/usr/local/lib/python3.10/site-packages/httpx/_models.py", line 985, in aiter_raw
async for raw_stream_bytes in self.stream:
File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 147, in __aiter__
async for chunk in self._stream:
File "/usr/local/lib/python3.10/site-packages/httpx/_transports/default.py", line 238, in __aiter__
with map_httpcore_exceptions():
File "/usr/local/lib/python3.10/contextlib.py", line 153, in __exit__
self.gen.throw(typ, value, traceback)
File "/usr/local/lib/python3.10/site-packages/httpx/_transports/default.py", line 77, in map_httpcore_exceptions
raise mapped_exc(message) from exc
httpx.ReadTimeout
Ant Ideas on troubleshooting this would be appreciated.