Closed luckyzor closed 1 year ago
Hey there @hunterjm, mind taking a look at this issue as it has been labeled with an integration (onvif
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
onvif documentation onvif source (message by IssueLinks)
having same issue with the other IPCAM:
Please post a link to the camera model and where you purchased the camera
https://a.aliexpress.com/_EvYrbJT
The cam is no more available to buy. But it worked on HA for 4+ years...
Please enable debug logs, restart, and post a full log
# Example configuration.yaml entry
logger:
default: info
logs:
homeassistant.components.onvif: debug
custom_components.onvif: debug
httpx: debug
onvif: debug
zeep: debug
It looks like the firmware on the camera crashes when the webhook subscription is created
2023-05-15 15:49:44.918 DEBUG (MainThread) [onvif] Error: while calling <function WebHookManager._async_create_webhook_subscription at 0x7f09fe2d7010>, backing off: 4.5, retrying...
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 353, in handle_async_request
resp = await self._pool.handle_async_request(req)
File "/usr/local/lib/python3.10/site-packages/httpcore/_async/connection_pool.py", line 253, in handle_async_request
raise exc
File "/usr/local/lib/python3.10/site-packages/httpcore/_async/connection_pool.py", line 237, in handle_async_request
response = await connection.handle_async_request(request)
File "/usr/local/lib/python3.10/site-packages/httpcore/_async/connection.py", line 90, in handle_async_request
return await self._connection.handle_async_request(request)
File "/usr/local/lib/python3.10/site-packages/httpcore/_async/http11.py", line 116, in handle_async_request
raise exc
File "/usr/local/lib/python3.10/site-packages/httpcore/_async/http11.py", line 95, in handle_async_request
) = await self._receive_response_headers(**kwargs)
File "/usr/local/lib/python3.10/site-packages/httpcore/_async/http11.py", line 159, in _receive_response_headers
event = await self._receive_event(timeout=timeout)
File "/usr/local/lib/python3.10/site-packages/httpcore/_async/http11.py", line 195, 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/onvif/client.py", line 75, in _async_wrap_connection_error_retry
return await func(*args, **kwargs)
File "/usr/src/homeassistant/homeassistant/components/onvif/event.py", line 681, in _async_create_webhook_subscription
self._webhook_subscription = await self._notification_manager.setup()
File "/usr/local/lib/python3.10/site-packages/onvif/client.py", line 395, in setup
notify_subscribe = await notify_service.Subscribe(self._config)
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 1845, in post
return await self.request(
File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1530, 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 1617, in send
response = await self._send_handling_auth(
File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1645, in _send_handling_auth
response = await self._send_handling_redirects(
File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1682, in _send_handling_redirects
response = await self._send_single_request(request)
File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1719, in _send_single_request
response = await transport.handle_async_request(request)
File "/usr/local/lib/python3.10/site-packages/httpx/_transports/default.py", line 352, in handle_async_request
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
2023-05-15 15:49:44.942 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: onvif
On some other cameras there were reports that the camera firmware will crash if the webhook URL was longer than 64 characters.
Check with the vendor to see if they have a newer firmware which fixes the problem.
2024.5.4 should shorten the length of the URL a bit, but if that doesn't fix it, I'd suggest opening a feature request at https://community.home-assistant.io/c/feature-requests/13 to get the process started to request a feature to disable webhooks on cameras that have these broken firmwares
unfortunately there are no more updates for this cam. what can I do now?
Issue solved after updating to Home Assistant 2023.5.4
The problem
No video Image of my CAM. it works in the Onvif Manager.
What version of Home Assistant Core has the issue?
core-2023.5.2
What was the last working version of Home Assistant Core?
Home Assistant 2023.4.X
What type of installation are you running?
Home Assistant OS
Integration causing the issue
ONVIF
Link to integration documentation on our website
https://www.home-assistant.io/integrations/onvif/
Diagnostics information
config_entry-onvif-073c6921cdff27033b610698b1464da3.json (1).txt
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response