rroller / dahua

Dahua Camera and Doorbell Home Assistant Integration
MIT License
399 stars 81 forks source link

Error with adding integration #278

Closed EvGeniyLell closed 1 year ago

EvGeniyLell commented 1 year ago

I have Dahua device DH-XVR5108C-X after install this integration with HACS I try to configure it, but each time I receive error Username, Password, or Address is wrong. but it 100% correct I'm copy it from my keychain and I already able to login by the IP and credentials and I don't see any logs on my Dahua device about un\success connection

Screenshot 2023-05-17 at 22 21 42

please help me, what I do wrong?

EvGeniyLell commented 1 year ago

the track

2023-05-18 00:31:59.285 ERROR (MainThread) [custom_components.dahua] Could not connect to Dahua device. For iMou devices see https://github.com/rroller/dahua/issues/6
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 980, in _wrap_create_connection
    return await self._loop.create_connection(*args, **kwargs)  # type: ignore[return-value]  # noqa
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1103, in create_connection
    transport, protocol = await self._create_connection_transport(
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1133, in _create_connection_transport
    await waiter
  File "/usr/local/lib/python3.10/asyncio/sslproto.py", line 534, in data_received
    ssldata, appdata = self._sslpipe.feed_ssldata(data)
  File "/usr/local/lib/python3.10/asyncio/sslproto.py", line 188, in feed_ssldata
    self._sslobj.do_handshake()
  File "/usr/local/lib/python3.10/ssl.py", line 975, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1007)
rodrigojfernandez commented 1 year ago

I have the same issue but only when using https, with http works fine

Could not connect to Dahua device. For iMou devices see https://github.com/rroller/dahua/issues/6
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 980, in _wrap_create_connection
    return await self._loop.create_connection(*args, **kwargs)  # type: ignore[return-value]  # noqa
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1103, in create_connection
    transport, protocol = await self._create_connection_transport(
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1133, in _create_connection_transport
    await waiter
  File "/usr/local/lib/python3.10/asyncio/sslproto.py", line 534, in data_received
    ssldata, appdata = self._sslpipe.feed_ssldata(data)
  File "/usr/local/lib/python3.10/asyncio/sslproto.py", line 188, in feed_ssldata
    self._sslobj.do_handshake()
  File "/usr/local/lib/python3.10/ssl.py", line 975, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1007)

it is the same error. I have some cameras that added before which are working but cannot add a new one. No change was made to my DVR settings

EvGeniyLell commented 1 year ago

I'm manually apply this changes form PR #218 and now it work for me

rroller commented 1 year ago

218 is merged. Resolving.