dahua icon indicating copy to clipboard operation
dahua copied to clipboard

Dahua 0.9.64

Open Milkaschoko opened this issue 1 year ago • 15 comments

< Dahua

Geräteinformationen IPC-HDW5541HP-AS-PV von Dahua Firmware: 2.840.0000000.18.R,build:2022-06-29 don`t work

Geräteinformationen IPC-EBW81242 von Dahua Firmware: 2.800.0000000.3.R,build:2021-12-23 is Ok

2024-11-02 17:43:11.831 ERROR (MainThread) [custom_components.dahua] Failed to initialize device at 192.168.178.66 Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 1061, in _wrap_create_connection sock = await aiohappyeyeballs.start_connection( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohappyeyeballs/impl.py", line 104, in start_connection raise first_exception File "/usr/local/lib/python3.12/site-packages/aiohappyeyeballs/impl.py", line 82, in start_connection sock = await _connect_sock( ^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohappyeyeballs/impl.py", line 174, in _connect_sock await loop.sock_connect(sock, address) File "/usr/local/lib/python3.12/asyncio/selector_events.py", line 641, in sock_connect return await fut ^^^^^^^^^ File "/usr/local/lib/python3.12/asyncio/selector_events.py", line 681, in _sock_connect_cb raise OSError(err, f'Connect call failed {address}') ConnectionRefusedError: [Errno 111] Connect call failed ('192.168.178.66', 443)

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

Traceback (most recent call last): File "/config/custom_components/dahua/init.py", line 197, in _async_update_data self._max_streams = await self.client.get_max_extra_streams() + 1 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/dahua/client.py", line 141, in get_max_extra_streams result = await self.get("/cgi-bin/magicBox.cgi?action=getProductDefinition&name=MaxExtraStream") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/dahua/client.py", line 812, in get raise exception File "/config/custom_components/dahua/client.py", line 794, in get response = await auth.request("GET", url) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/dahua/digest.py", line 46, in request response = await self.session.request(method, url, headers=headers, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 659, in _request conn = await self._connector.connect( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 557, in connect proto = await self._create_connection(req, traces, timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 1002, in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 1336, in _create_direct_connection raise last_exc File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 1305, in _create_direct_connection transp, proto = await self._wrap_create_connection( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 1076, in _wrap_create_connection raise client_error(req.connection_key, exc) from exc aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 192.168.178.66:443 ssl:default [Connect call failed ('192.168.178.66', 443)] 2024-11-02 17:43:11.835 ERROR (MainThread) [custom_components.dahua] Unexpected error fetching dahua data Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 1061, in _wrap_create_connection sock = await aiohappyeyeballs.start_connection( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohappyeyeballs/impl.py", line 104, in start_connection raise first_exception File "/usr/local/lib/python3.12/site-packages/aiohappyeyeballs/impl.py", line 82, in start_connection sock = await _connect_sock( ^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohappyeyeballs/impl.py", line 174, in _connect_sock await loop.sock_connect(sock, address) File "/usr/local/lib/python3.12/asyncio/selector_events.py", line 641, in sock_connect return await fut ^^^^^^^^^ File "/usr/local/lib/python3.12/asyncio/selector_events.py", line 681, in _sock_connect_cb raise OSError(err, f'Connect call failed {address}') ConnectionRefusedError: [Errno 111] Connect call failed ('192.168.178.66', 443)

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

Traceback (most recent call last): File "/config/custom_components/dahua/init.py", line 197, in _async_update_data self._max_streams = await self.client.get_max_extra_streams() + 1 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/dahua/client.py", line 141, in get_max_extra_streams result = await self.get("/cgi-bin/magicBox.cgi?action=getProductDefinition&name=MaxExtraStream") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/dahua/client.py", line 812, in get raise exception File "/config/custom_components/dahua/client.py", line 794, in get response = await auth.request("GET", url) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/dahua/digest.py", line 46, in request response = await self.session.request(method, url, headers=headers, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 659, in _request conn = await self._connector.connect( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 557, in connect proto = await self._create_connection(req, traces, timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 1002, in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 1336, in _create_direct_connection raise last_exc File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 1305, in _create_direct_connection transp, proto = await self._wrap_create_connection( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 1076, in _wrap_create_connection raise client_error(req.connection_key, exc) from exc aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 192.168.178.66:443 ssl:default [Connect call failed ('192.168.178.66', 443)]

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 354, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/dahua/init.py", line 297, in _async_update_data raise PlatformNotReady("Dahua device at " + self._address + " isn't fully initialized yet") homeassistant.exceptions.PlatformNotReady: Dahua device at 192.168.178.66 isn't fully initialized yet 2024-11-02 17:43:15.780 ERROR (MainThread) [homeassistant] Error doing job: Unclosed client session (None)

sorry can`t speak english

Milkaschoko avatar Nov 02 '24 17:11 Milkaschoko

Same here, fails to initialise (I have 4 cameras) and continues in a loop to try and initialise but fails and keeps failing.

wgumaa avatar Nov 02 '24 19:11 wgumaa

I just released 0.9.65. Can you try that one

rroller avatar Nov 02 '24 20:11 rroller

I downloaded 0.9.65 in Hacs and restarted it. However, the integration does not update to 0.9.65.

Milkaschoko avatar Nov 02 '24 20:11 Milkaschoko

I downloaded and tested 0.9.63 as a test. The integration shows 0.9.60, which is known, and the cameras work again as usual. Then I downloaded and installed 0.9.65, but the integration shows 0.9.64 and, as before, only the 1st camera works. The second one does not work again.

Milkaschoko avatar Nov 02 '24 21:11 Milkaschoko

0.9.65 does not work. Rolled back to version 0.9.63 and it works

Vovoronale avatar Nov 02 '24 21:11 Vovoronale

0.9.66 is also not working for me i go back to 0.9.63 is working fine

nao982 avatar Nov 03 '24 02:11 nao982

I'm looking forward to see the working 0.9.67

nao982 avatar Nov 03 '24 02:11 nao982

The identical has happened here with multiple cameras since 0.9.63. 0.9.62 is the last version where they all worked.

Since 0.9.63 version and up, had one or more Amcrest cameras keep failing sync. In 0.9.66, it has finally reduced to only 1 camera which fails; An Amcrest IP8M-DT3949EW-3AI with Firmware: 2.840.00AC001.0.R, build:2022-10-19.

Restoring to 0.9.62 fixes it and restores all functionality.

Issue is identical, so I didn't want to file a new issue.

MNOiSY avatar Nov 03 '24 03:11 MNOiSY

0.9.66 is nog working for me. Same issue as The other.

scns avatar Nov 03 '24 06:11 scns

Same problem for me even with 0.9.66. I had to restart my XVR because the failed initilizaion has overloaded my DVR. Just disabled all the dahua entities for now until this is resolved.

23534664 avatar Nov 03 '24 09:11 23534664

0.9.66 is nog working for me. Same issue as The other.

Ive downgraded to 0.9.62 and everythingbis working again

scns avatar Nov 03 '24 09:11 scns

I downgraded to 0.9.62 but still facing "500 Internal Server Error" (and none of the streams / snapshots are working). Not sure if that's related - mentioned it in 348 as well.

gituser28910 avatar Nov 03 '24 11:11 gituser28910

I downgraded to 0.9.62 but still facing "500 Internal Server Error" (and none of the streams / snapshots are working). Not sure if that's related - mentioned it in 348 as well.

Turns out it's unrelated - error 500 gone after tweaking user permissions (details in the issue linked above). Updated to the latest, but still no live video feed (same situation as on 0.9.62).

gituser28910 avatar Nov 04 '24 08:11 gituser28910

My 2 cameras are down too. Error message: No devices or entities. Both are model: DH-IPC-HDW3849H-AS-PV-S3. Both have latest firmware but this didn't help. Other NVR software (BlueIris) have no issues at all. I'm on 0.9.66 version.

2024-11-04 13:56:44.768 DEBUG (MainThread) [custom_components.dahua] Failed to sync device state for 192.168.0.129 Traceback (most recent call last): File "/config/custom_components/dahua/init.py", line 334, in _async_update_data results = await asyncio.gather(*coros) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/dahua/client.py", line 655, in async_get_event_notifications return await self.get(url) ^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/dahua/client.py", line 812, in get raise exception File "/config/custom_components/dahua/client.py", line 795, in get response.raise_for_status() File "/usr/local/lib/python3.12/site-packages/aiohttp/client_reqrep.py", line 1121, in raise_for_status raise ClientResponseError( aiohttp.client_exceptions.ClientResponseError: 400, message='Bad Request', url='http://192.168.0.129/cgi-bin/configManager.cgi?action=getConfig&name=DisableEventNotify' 2024-11-04 13:56:47.612 DEBUG (Thread-97) [custom_components.dahua] reconnecting to camera's event stream...

sebastiannowicki avatar Nov 04 '24 13:11 sebastiannowicki

Same issue with my 3 IP cameras DH-IPC-HFW3849T1-AS-PV-S3 with the latest firmware: 2.840.0000000.28.R, build: 2024-08-07. I reverted to dahua integration 0.9.63.

The S5 version DH-IPC-HFW3849T1-AS-PV works correctly with 0.9.64, 0.9.65 e 0.9.66.

lsantoro avatar Nov 05 '24 11:11 lsantoro