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
73.55k stars 30.73k forks source link

pull_point_support = onvif_capabilities.get("Events", {}).get #92510

Closed smithbill17 closed 1 year ago

smithbill17 commented 1 year ago

The problem

I have two HomeAssistant installations on rpi4b & rpi2b.

The rpi4b had ONVIF cameras set up & working fine. After upgrading the rpi4b to 2023.5.0, the existing ONVIF cameras wouldn't load. I deleted them & readded them, but they would not load

The rpi2b had no ONVIF cameras previous, so I tried adding one of them to this HomeAssistant (after upgrading to 2023.5.0) and get the error in the Logs as indicated.

I have been able to add a v380 Onvif camera successfully, but my other cameras won't load (mainly SriCam SP009 cameras)

What version of Home Assistant Core has the issue?

2023.5.0

What was the last working version of Home Assistant Core?

2023.4.6

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

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2023-05-04 14:46:45.851 WARNING (MainThread) [homeassistant.components.onvif] Couldn't get device 'BallCam' date/time. Error: Server disconnected without sending a response.
2023-05-04 14:46:49.040 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry BallCam - ee-4f-ea-54-13-e5 for onvif
File "/usr/src/homeassistant/homeassistant/components/onvif/__init__.py", line 39, in async_setup_entry
File "/usr/src/homeassistant/homeassistant/components/onvif/device.py", line 151, in async_setup
File "/usr/src/homeassistant/homeassistant/components/onvif/device.py", line 331, in async_start_events
pull_point_support = onvif_capabilities.get("Events", {}).get(

Additional information

If I use the TinyCam Pro app on my phone to set up a new Generic Onvif camera (Profile S), then it works without issue: Video url - rtsp://192.168.68.69:554/onvif1

home-assistant[bot] commented 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!

Code owner commands Code owners of `onvif` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign onvif` Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


onvif documentation onvif source (message by IssueLinks)

kdelios commented 1 year ago

Same problem. ONVIF broke since 2023.5.0b0 and is still broken on 2023.5.0. Downgraded to 2023.4.6 (ha core update --version=2023.4.6) and is working fine. Updated to 2023.5.0 breaks again.

2023-05-04 16:39:42.360 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: onvif 2023-05-04 16:40:42.453 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: onvif 2023-05-04 16:41:42.542 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: onvif 2023-05-04 16:42:42.624 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: onvif 2023-05-04 16:43:40.424 WARNING (MainThread) [homeassistant.config_entries] Config entry 'balcony - 1C:BF:CE:A6:06:AB' for onvif integration not ready yet: Could not connect to camera 192.168.100.39:8080: ; Retrying in background 2023-05-04 16:58:18.237 DEBUG (MainThread) [homeassistant.components.onvif] balcony: Creating webhook subscription with URL: http://192.168.100.150:8123/api/webhook/onvif_44a56154d73b437a3bff5af097828967 2023-05-04 16:58:18.244 DEBUG (MainThread) [zeep.transports] HTTP Post to http://192.168.100.39:8080/onvif/event_service: b'<?xml version=\'1.0\' encoding=\'utf-8\'?>\nhttp://docs.oasis-open.org/wsn/bw-2/NotificationProducer/SubscribeRequest</wsa:Action>urn:uuid:f44cdd57-077b-405d-9f57-ba4195f7a8ee</wsa:MessageID>http://192.168.100.39:8080/onvif/event_service</wsa:To>admin</wsse:Username>6qwegwpNTE3N1qwx0GmeeOYS0ow=</wsse:Password>lGwQ6BIx9zALaxO3A4eBOw==</wsse:Nonce>2023-05-04T13:58:18+00:00</wsu:Created></wsse:UsernameToken></wsse:Security></soap-env:Header>http://192.168.100.150:8123/api/webhook/onvif_44a56154d73b437a3bff5af097828967</ns1:Address></ns0:ConsumerReference>PT3M</ns0:InitialTerminationTime></ns0:Subscribe></soap-env:Body></soap-env:Envelope>' 2023-05-04 16:58:51.305 WARNING (MainThread) [aioesphomeapi.connection] esp32-bluetooth-proxy-5d10e8 @ 192.168.100.251: Connection error occurred: [Errno 104] Connection reset by peer 2023-05-04 16:59:48.294 DEBUG (MainThread) [homeassistant.components.onvif] balcony: Device does not support notification service or too many subscriptions: Device sent empty error 2023-05-04 16:59:48.295 DEBUG (MainThread) [homeassistant.components.onvif] Camera balcony capabilities = Capabilities(snapshot=True, events=False, ptz=True, imaging=True) 2023-05-04 16:59:48.300 DEBUG (MainThread) [zeep.transports] HTTP Post to http://192.168.100.39:8080/onvif/media_service: b'<?xml version=\'1.0\' encoding=\'utf-8\'?>\nhttp://www.onvif.org/ver10/media/wsdl/GetSnapshotUri</wsa:Action>urn:uuid:c0264ae6-5d11-4f4c-a392-d3563660dddf</wsa:MessageID>http://192.168.100.39:8080/onvif/media_service</wsa:To>admin</wsse:Username>iQYcA7D7DHarRCyy4lTRhIFLSgo=</wsse:Password>QCgg7vhEEFnYI47AIx6O5w==</wsse:Nonce>2023-05-04T13:59:48+00:00</wsu:Created></wsse:UsernameToken></wsse:Security></soap-env:Header>MainStreamProfileToken</ns0:ProfileToken></ns0:GetSnapshotUri></soap-env:Body></soap-env:Envelope>' Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/anyio/_core/_sockets.py", line 164, in try_connect stream = await asynclib.connect_tcp(remote_host, remote_port, local_address) File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 1691, in connect_tcp await get_running_loop().create_connection( File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1076, in create_connection raise exceptions[0] File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1060, in create_connection sock = await self._connect_sock( File "/usr/local/lib/python3.10/asyncio/base_events.py", line 969, in _connect_sock await self.sock_connect(sock, address) File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 501, in sock_connect return await fut File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 509, in _sock_connect sock.connect(address) OSError: [Errno 101] Network unreachable

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

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 111, in connect_tcp stream: anyio.abc.ByteStream = await anyio.connect_tcp( File "/usr/local/lib/python3.10/site-packages/anyio/_core/_sockets.py", line 222, in connect_tcp raise OSError("All connection attempts failed") from cause OSError: All connection attempts failed

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 86, in handle_async_request raise exc File "/usr/local/lib/python3.10/site-packages/httpcore/_async/connection.py", line 63, in handle_async_request stream = await self._connect(request) File "/usr/local/lib/python3.10/site-packages/httpcore/_async/connection.py", line 111, in _connect stream = await self._network_backend.connect_tcp(**kwargs) File "/usr/local/lib/python3.10/site-packages/httpcore/backends/auto.py", line 29, in connect_tcp return await self._backend.connect_tcp( File "/usr/local/lib/python3.10/site-packages/httpcore/backends/asyncio.py", line 109, in connect_tcp 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.ConnectError: All connection attempts failed

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

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 26, in _handle_async_response await func(hass, connection, msg) File "/usr/src/homeassistant/homeassistant/components/camera/init.py", line 811, in ws_camera_stream url = await _async_stream_endpoint_url(hass, camera, fmt=msg["format"]) File "/usr/src/homeassistant/homeassistant/components/camera/init.py", line 969, in _async_stream_endpoint_url stream = await camera.async_create_stream() File "/usr/src/homeassistant/homeassistant/components/camera/init.py", line 529, in async_create_stream source = await self.stream_source() File "/usr/src/homeassistant/homeassistant/components/onvif/camera.py", line 136, in stream_source return await self._async_get_stream_uri() File "/usr/src/homeassistant/homeassistant/components/onvif/camera.py", line 202, in _async_get_stream_uri return await self._stream_uri_future File "/usr/src/homeassistant/homeassistant/components/onvif/camera.py", line 206, in _async_get_stream_uri uri_no_auth = await self.device.async_get_stream_uri(self.profile) File "/usr/src/homeassistant/homeassistant/components/onvif/device.py", line 414, in async_get_stream_uri result = await media_service.GetStreamUri(req) 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.ConnectError: All connection attempts failed 2023-05-04 17:40:15.357 ERROR (MainThread) [aiohttp.server] Error handling request Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/anyio/_core/_sockets.py", line 164, in try_connect stream = await asynclib.connect_tcp(remote_host, remote_port, local_address) File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 1691, in connect_tcp await get_running_loop().create_connection( File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1076, in create_connection raise exceptions[0] File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1060, in create_connection sock = await self._connect_sock( File "/usr/local/lib/python3.10/asyncio/base_events.py", line 969, in _connect_sock await self.sock_connect(sock, address) File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 501, in sock_connect return await fut File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 509, in _sock_connect sock.connect(address) OSError: [Errno 101] Network unreachable

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

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 111, in connect_tcp stream: anyio.abc.ByteStream = await anyio.connect_tcp( File "/usr/local/lib/python3.10/site-packages/anyio/_core/_sockets.py", line 222, in connect_tcp raise OSError("All connection attempts failed") from cause OSError: All connection attempts failed

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 86, in handle_async_request raise exc File "/usr/local/lib/python3.10/site-packages/httpcore/_async/connection.py", line 63, in handle_async_request stream = await self._connect(request) File "/usr/local/lib/python3.10/site-packages/httpcore/_async/connection.py", line 111, in _connect stream = await self._network_backend.connect_tcp(**kwargs) File "/usr/local/lib/python3.10/site-packages/httpcore/backends/auto.py", line 29, in connect_tcp return await self._backend.connect_tcp( File "/usr/local/lib/python3.10/site-packages/httpcore/backends/asyncio.py", line 109, in connect_tcp 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.ConnectError: All connection attempts failed

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/camera/init.py", line 735, in get return await self.handle(request, camera) File "/usr/src/homeassistant/homeassistant/components/camera/init.py", line 775, in handle stream = await camera.handle_async_mjpeg_stream(request) File "/usr/src/homeassistant/homeassistant/components/onvif/camera.py", line 179, in handle_async_mjpeg_stream stream_uri = await self._async_get_stream_uri() File "/usr/src/homeassistant/homeassistant/components/onvif/camera.py", line 202, in _async_get_stream_uri return await self._stream_uri_future httpx.ConnectError: All connection attempts failed 2023-05-04 17:40:28.568 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [547004810336] Error handling message: Unknown error (unknown_error) Konstantinos from 192.168.100.17 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36) Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/anyio/_core/_sockets.py", line 164, in try_connect stream = await asynclib.connect_tcp(remote_host, remote_port, local_address) File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 1691, in connect_tcp await get_running_loop().create_connection( File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1076, in create_connection raise exceptions[0] File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1060, in create_connection sock = await self._connect_sock( File "/usr/local/lib/python3.10/asyncio/base_events.py", line 969, in _connect_sock await self.sock_connect(sock, address) File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 501, in sock_connect return await fut File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 509, in _sock_connect sock.connect(address) OSError: [Errno 101] Network unreachable

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

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 111, in connect_tcp stream: anyio.abc.ByteStream = await anyio.connect_tcp( File "/usr/local/lib/python3.10/site-packages/anyio/_core/_sockets.py", line 222, in connect_tcp raise OSError("All connection attempts failed") from cause OSError: All connection attempts failed

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 86, in handle_async_request raise exc File "/usr/local/lib/python3.10/site-packages/httpcore/_async/connection.py", line 63, in handle_async_request stream = await self._connect(request) File "/usr/local/lib/python3.10/site-packages/httpcore/_async/connection.py", line 111, in _connect stream = await self._network_backend.connect_tcp(**kwargs) File "/usr/local/lib/python3.10/site-packages/httpcore/backends/auto.py", line 29, in connect_tcp return await self._backend.connect_tcp( File "/usr/local/lib/python3.10/site-packages/httpcore/backends/asyncio.py", line 109, in connect_tcp 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.ConnectError: All connection attempts failed

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

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 26, in _handle_async_response await func(hass, connection, msg) File "/usr/src/homeassistant/homeassistant/components/camera/init.py", line 811, in ws_camera_stream url = await _async_stream_endpoint_url(hass, camera, fmt=msg["format"]) File "/usr/src/homeassistant/homeassistant/components/camera/init.py", line 969, in _async_stream_endpoint_url stream = await camera.async_create_stream() File "/usr/src/homeassistant/homeassistant/components/camera/init.py", line 529, in async_create_stream source = await self.stream_source() File "/usr/src/homeassistant/homeassistant/components/onvif/camera.py", line 136, in stream_source return await self._async_get_stream_uri() File "/usr/src/homeassistant/homeassistant/components/onvif/camera.py", line 202, in _async_get_stream_uri return await self._stream_uri_future httpx.ConnectError: All connection attempts failed 2023-05-04 17:40:28.603 ERROR (MainThread) [aiohttp.server] Error handling request Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/anyio/_core/_sockets.py", line 164, in try_connect stream = await asynclib.connect_tcp(remote_host, remote_port, local_address) File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 1691, in connect_tcp await get_running_loop().create_connection( File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1076, in create_connection raise exceptions[0] File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1060, in create_connection sock = await self._connect_sock( File "/usr/local/lib/python3.10/asyncio/base_events.py", line 969, in _connect_sock await self.sock_connect(sock, address) File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 501, in sock_connect return await fut File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 509, in _sock_connect sock.connect(address) OSError: [Errno 101] Network unreachable

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

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 111, in connect_tcp stream: anyio.abc.ByteStream = await anyio.connect_tcp( File "/usr/local/lib/python3.10/site-packages/anyio/_core/_sockets.py", line 222, in connect_tcp raise OSError("All connection attempts failed") from cause OSError: All connection attempts failed

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 86, in handle_async_request raise exc File "/usr/local/lib/python3.10/site-packages/httpcore/_async/connection.py", line 63, in handle_async_request stream = await self._connect(request) File "/usr/local/lib/python3.10/site-packages/httpcore/_async/connection.py", line 111, in _connect stream = await self._network_backend.connect_tcp(**kwargs) File "/usr/local/lib/python3.10/site-packages/httpcore/backends/auto.py", line 29, in connect_tcp return await self._backend.connect_tcp( File "/usr/local/lib/python3.10/site-packages/httpcore/backends/asyncio.py", line 109, in connect_tcp 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.ConnectError: All connection attempts failed

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/camera/init.py", line 735, in get return await self.handle(request, camera) File "/usr/src/homeassistant/homeassistant/components/camera/init.py", line 775, in handle stream = await camera.handle_async_mjpeg_stream(request) File "/usr/src/homeassistant/homeassistant/components/onvif/camera.py", line 179, in handle_async_mjpeg_stream stream_uri = await self._async_get_stream_uri() File "/usr/src/homeassistant/homeassistant/components/onvif/camera.py", line 202, in _async_get_stream_uri return await self._stream_uri_future httpx.ConnectError: All connection attempts failed 2023-05-04 17:40:35.598 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [547004810336] Error handling message: Unknown error (unknown_error) Konstantinos from 192.168.100.17 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36) Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/anyio/_core/_sockets.py", line 164, in try_connect stream = await asynclib.connect_tcp(remote_host, remote_port, local_address) File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 1691, in connect_tcp await get_running_loop().create_connection( File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1076, in create_connection raise exceptions[0] File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1060, in create_connection sock = await self._connect_sock( File "/usr/local/lib/python3.10/asyncio/base_events.py", line 969, in _connect_sock await self.sock_connect(sock, address) File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 501, in sock_connect return await fut File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 509, in _sock_connect sock.connect(address) OSError: [Errno 101] Network unreachable

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

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 111, in connect_tcp stream: anyio.abc.ByteStream = await anyio.connect_tcp( File "/usr/local/lib/python3.10/site-packages/anyio/_core/_sockets.py", line 222, in connect_tcp raise OSError("All connection attempts failed") from cause OSError: All connection attempts failed

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 86, in handle_async_request raise exc File "/usr/local/lib/python3.10/site-packages/httpcore/_async/connection.py", line 63, in handle_async_request stream = await self._connect(request) File "/usr/local/lib/python3.10/site-packages/httpcore/_async/connection.py", line 111, in _connect stream = await self._network_backend.connect_tcp(**kwargs) File "/usr/local/lib/python3.10/site-packages/httpcore/backends/auto.py", line 29, in connect_tcp return await self._backend.connect_tcp( File "/usr/local/lib/python3.10/site-packages/httpcore/backends/asyncio.py", line 109, in connect_tcp 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.ConnectError: All connection attempts failed

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

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 26, in _handle_async_response await func(hass, connection, msg) File "/usr/src/homeassistant/homeassistant/components/camera/init.py", line 811, in ws_camera_stream url = await _async_stream_endpoint_url(hass, camera, fmt=msg["format"]) File "/usr/src/homeassistant/homeassistant/components/camera/init.py", line 969, in _async_stream_endpoint_url stream = await camera.async_create_stream() File "/usr/src/homeassistant/homeassistant/components/camera/init.py", line 529, in async_create_stream source = await self.stream_source() File "/usr/src/homeassistant/homeassistant/components/onvif/camera.py", line 136, in stream_source return await self._async_get_stream_uri() File "/usr/src/homeassistant/homeassistant/components/onvif/camera.py", line 202, in _async_get_stream_uri return await self._stream_uri_future httpx.ConnectError: All connection attempts failed 2023-05-04 17:40:35.633 ERROR (MainThread) [aiohttp.server] Error handling request Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/anyio/_core/_sockets.py", line 164, in try_connect stream = await asynclib.connect_tcp(remote_host, remote_port, local_address) File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 1691, in connect_tcp await get_running_loop().create_connection( File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1076, in create_connection raise exceptions[0] File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1060, in create_connection sock = await self._connect_sock( File "/usr/local/lib/python3.10/asyncio/base_events.py", line 969, in _connect_sock await self.sock_connect(sock, address) File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 501, in sock_connect return await fut File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 509, in _sock_connect sock.connect(address) OSError: [Errno 101] Network unreachable

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

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 111, in connect_tcp stream: anyio.abc.ByteStream = await anyio.connect_tcp( File "/usr/local/lib/python3.10/site-packages/anyio/_core/_sockets.py", line 222, in connect_tcp raise OSError("All connection attempts failed") from cause OSError: All connection attempts failed

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 86, in handle_async_request raise exc File "/usr/local/lib/python3.10/site-packages/httpcore/_async/connection.py", line 63, in handle_async_request stream = await self._connect(request) File "/usr/local/lib/python3.10/site-packages/httpcore/_async/connection.py", line 111, in _connect stream = await self._network_backend.connect_tcp(**kwargs) File "/usr/local/lib/python3.10/site-packages/httpcore/backends/auto.py", line 29, in connect_tcp return await self._backend.connect_tcp( File "/usr/local/lib/python3.10/site-packages/httpcore/backends/asyncio.py", line 109, in connect_tcp 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.ConnectError: All connection attempts failed

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/camera/init.py", line 735, in get return await self.handle(request, camera) File "/usr/src/homeassistant/homeassistant/components/camera/init.py", line 775, in handle stream = await camera.handle_async_mjpeg_stream(request) File "/usr/src/homeassistant/homeassistant/components/onvif/camera.py", line 179, in handle_async_mjpeg_stream stream_uri = await self._async_get_stream_uri() File "/usr/src/homeassistant/homeassistant/components/onvif/camera.py", line 202, in _async_get_stream_uri return await self._stream_uri_future httpx.ConnectError: All connection attempts failed 2023-05-04 17:40:52.798 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [547004810336] Error handling message: Unknown error (unknown_error) Konstantinos from 192.168.100.17 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36) Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/anyio/_core/_sockets.py", line 164, in try_connect stream = await asynclib.connect_tcp(remote_host, remote_port, local_address) File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 1691, in connect_tcp await get_running_loop().create_connection( File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1076, in create_connection raise exceptions[0] File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1060, in create_connection sock = await self._connect_sock( File "/usr/local/lib/python3.10/asyncio/base_events.py", line 969, in _connect_sock await self.sock_connect(sock, address) File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 501, in sock_connect return await fut File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 509, in _sock_connect sock.connect(address) OSError: [Errno 101] Network unreachable

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

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 111, in connect_tcp stream: anyio.abc.ByteStream = await anyio.connect_tcp( File "/usr/local/lib/python3.10/site-packages/anyio/_core/_sockets.py", line 222, in connect_tcp raise OSError("All connection attempts failed") from cause OSError: All connection attempts failed

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 86, in handle_async_request raise exc File "/usr/local/lib/python3.10/site-packages/httpcore/_async/connection.py", line 63, in handle_async_request stream = await self._connect(request) File "/usr/local/lib/python3.10/site-packages/httpcore/_async/connection.py", line 111, in _connect stream = await self._network_backend.connect_tcp(**kwargs) File "/usr/local/lib/python3.10/site-packages/httpcore/backends/auto.py", line 29, in connect_tcp return await self._backend.connect_tcp( File "/usr/local/lib/python3.10/site-packages/httpcore/backends/asyncio.py", line 109, in connect_tcp 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.ConnectError: All connection attempts failed

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

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 26, in _handle_async_response await func(hass, connection, msg) File "/usr/src/homeassistant/homeassistant/components/camera/init.py", line 811, in ws_camera_stream url = await _async_stream_endpoint_url(hass, camera, fmt=msg["format"]) File "/usr/src/homeassistant/homeassistant/components/camera/init.py", line 969, in _async_stream_endpoint_url stream = await camera.async_create_stream() File "/usr/src/homeassistant/homeassistant/components/camera/init.py", line 529, in async_create_stream source = await self.stream_source() File "/usr/src/homeassistant/homeassistant/components/onvif/camera.py", line 136, in stream_source return await self._async_get_stream_uri() File "/usr/src/homeassistant/homeassistant/components/onvif/camera.py", line 202, in _async_get_stream_uri return await self._stream_uri_future httpx.ConnectError: All connection attempts failed 2023-05-04 17:40:52.830 ERROR (MainThread) [aiohttp.server] Error handling request Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/anyio/_core/_sockets.py", line 164, in try_connect stream = await asynclib.connect_tcp(remote_host, remote_port, local_address) File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 1691, in connect_tcp await get_running_loop().create_connection( File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1076, in create_connection raise exceptions[0] File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1060, in create_connection sock = await self._connect_sock( File "/usr/local/lib/python3.10/asyncio/base_events.py", line 969, in _connect_sock await self.sock_connect(sock, address) File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 501, in sock_connect return await fut File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 509, in _sock_connect sock.connect(address) OSError: [Errno 101] Network unreachable

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

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 111, in connect_tcp stream: anyio.abc.ByteStream = await anyio.connect_tcp( File "/usr/local/lib/python3.10/site-packages/anyio/_core/_sockets.py", line 222, in connect_tcp raise OSError("All connection attempts failed") from cause OSError: All connection attempts failed

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 86, in handle_async_request raise exc File "/usr/local/lib/python3.10/site-packages/httpcore/_async/connection.py", line 63, in handle_async_request stream = await self._connect(request) File "/usr/local/lib/python3.10/site-packages/httpcore/_async/connection.py", line 111, in _connect stream = await self._network_backend.connect_tcp(**kwargs) File "/usr/local/lib/python3.10/site-packages/httpcore/backends/auto.py", line 29, in connect_tcp return await self._backend.connect_tcp( File "/usr/local/lib/python3.10/site-packages/httpcore/backends/asyncio.py", line 109, in connect_tcp 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.ConnectError: All connection attempts failed

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/camera/init.py", line 735, in get return await self.handle(request, camera) File "/usr/src/homeassistant/homeassistant/components/camera/init.py", line 775, in handle stream = await camera.handle_async_mjpeg_stream(request) File "/usr/src/homeassistant/homeassistant/components/onvif/camera.py", line 179, in handle_async_mjpeg_stream stream_uri = await self._async_get_stream_uri() File "/usr/src/homeassistant/homeassistant/components/onvif/camera.py", line 202, in _async_get_stream_uri return await self._stream_uri_future httpx.ConnectError: All connection attempts failed

dennidoubles commented 1 year ago

Here it is also broken after upgrading to 2023.5

Home Assistant 2023.5.0 Supervisor 2023.04.1 Operating System 10.0 Frontend 20230503.1 - latest

Logger: homeassistant.config_entries
Source: components/onvif/device.py:331
First occurred: 16:05:36 (1 occurrences)
Last logged: 16:05:36

Error setting up entry Zolder for onvif
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 387, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/usr/src/homeassistant/homeassistant/components/onvif/__init__.py", line 39, in async_setup_entry
    await device.async_setup()
  File "/usr/src/homeassistant/homeassistant/components/onvif/device.py", line 151, in async_setup
    self.capabilities.events = await self.async_start_events()
  File "/usr/src/homeassistant/homeassistant/components/onvif/device.py", line 331, in async_start_events
    pull_point_support = onvif_capabilities.get("Events", {}).get(
AttributeError: 'NoneType' object has no attribute 'get' 
bdraco commented 1 year ago

AttributeError fixed via #92447 for 2023.5.1

If that's not the error you have you need to open a new issue as it's not the same issue as the op if you don't see AttributeError in the logs

bdraco commented 1 year ago

also ordered a SriCam to test against for future changes.