core: Hikvision DS-2CD2232-I5 onvif cameras not working in 2023.4.0

The problem

I have 3x Hikvision DS-2CD2232-I5 cameras that have been working fine with the onvif integration for a very long time. After upgrading to 2023.4.0 all 3 cameras stopped working. The cameras are reachable over the network (from a browser)

The logfile shows

2023-04-06 10:24:51.999 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Kamera - kældertrappe - 44:19:b6:4e:d2:23 for onvif
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 383, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/usr/src/homeassistant/homeassistant/components/onvif/__init__.py", line 30, in async_setup_entry
    if not await device.async_setup():
  File "/usr/src/homeassistant/homeassistant/components/onvif/device.py", line 112, in async_setup
    self.profiles = await self.async_get_profiles()
  File "/usr/src/homeassistant/homeassistant/components/onvif/device.py", line 309, in async_get_profiles
    result = await media_service.GetProfiles()
  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 1620, in send
    response = await self._send_handling_auth(
  File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1648, in _send_handling_auth
    response = await self._send_handling_redirects(
  File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1685, in _send_handling_redirects
    response = await self._send_single_request(request)
  File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1722, in _send_single_request
    response = await transport.handle_async_request(request)
  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 112, in handle_async_request
    raise exc
  File "/usr/local/lib/python3.10/site-packages/httpcore/_async/http11.py", line 91, in handle_async_request
    ) = await self._receive_response_headers(**kwargs)
  File "/usr/local/lib/python3.10/site-packages/httpcore/_async/http11.py", line 155, in _receive_response_headers
    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 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

Could this be related to https://github.com/mvantellingen/python-zeep/pull/1369 ?

What version of Home Assistant Core has the issue?

2023.4.0

What was the last working version of Home Assistant Core?

2023.3.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?

No response

Additional information

No response

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 4
  • Comments: 30 (18 by maintainers)

Most upvoted comments

I have the same issue. Started happening immediately after 2023.4 update. The DS-2CV2Q21FD-IW working, but DS-2CD2720F-I and DS-2CD2720F-IS stopped working.

Its not particularly helpful if you post a “me too” without a trace as it only makes this issue harder to follow and doesn’t get this closer to resolution. In fact it will likely make people unsubscribe and ignore this issue to stop getting notifications which is the opposite of what we want.

I found one from a different seller so I should have it here by the 24th as well

To “bdraco” concerning your comments above. You are correct. I should have provided the configuration and logs. Will upgrade in the morning and do so. Thanks for the advice.

I appreciate the work you put into solving this issue. I have a spare camera, that I can connect directly to the Internet, to allow you to access it. Let me know if that would be useful

If eBay doesn’t come through that should be a good fallback but since this is a timing issue, I would probably need something local to be able to run code in to talk to the camera as talking to it over the internet will add several hundred milliseconds and might not be a good test case to develop a workaround.

Hi, same here, I have two Hikvisions and three Dahuas in Onvif integration. Dahuas are working just fine, but both Hikvisions stopped working after update to 2023.4.0. It seems it’s somehow related to only Hikvision.