dahua
dahua copied to clipboard
Set Video Profile Mode not working
Calling the action:
action: dahua.set_video_profile_mode
data:
mode: Night
target:
entity_id: camera.telecamera_soggiorno_main
I got a generic dahua.set_video_profile_mode Unknown error.
Exploring the log this is what has been logged:
2025-02-12 23:00:45.314 WARNING (MainThread) [custom_components.dahua] Exception fetching information from http://192.168.1.83:80/cgi-bin/configManager.cgi?action=setConfig&VideoInMode[0].Config[0]=1
2025-02-12 23:00:45.331 WARNING (MainThread) [custom_components.dahua] Exception fetching information from http://192.168.1.83:80/cgi-bin/configManager.cgi?action=setConfig&VideoInMode[0].Config[0]=1
2025-02-12 23:00:45.334 WARNING (MainThread) [custom_components.dahua] Exception fetching information from http://192.168.1.83:80/cgi-bin/configManager.cgi?action=setConfig&VideoInMode[0].Config[0]=1
2025-02-12 23:00:45.335 ERROR (MainThread) [homeassistant.helpers.script.websocket_api_script] websocket_api script: Error executing script. Unexpected error for call_service at pos 1: Error
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 526, in _async_step
await getattr(self, handler)()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 764, in _async_call_service_step
response_data = await self._async_run_long_action(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<9 lines>...
)
^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 727, in _async_run_long_action
return await long_task
^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2802, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2845, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1032, in entity_service_call
raise result from None
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1628, in async_request_call
return await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1079, in _handle_entity_call
result = await task
^^^^^^^^^^
File "/config/custom_components/dahua/camera.py", line 322, in async_set_video_profile_mode
await self._coordinator.client.async_set_video_profile_mode(channel, mode)
File "/config/custom_components/dahua/client.py", line 364, in async_set_video_profile_mode
return await self.get(url, True)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/dahua/client.py", line 815, in get
raise exception
File "/config/custom_components/dahua/client.py", line 799, in get
raise Exception(data)
Exception: Error
2025-02-12 23:00:45.339 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140637182884832] Error handling message: Unknown error (unknown_error) xxx from xxx (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 28, in _handle_async_response
await func(hass, connection, msg)
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 816, in handle_execute_script
script_result = await script_obj.async_run(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
msg.get("variables"), context=context
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1801, in async_run
return await asyncio.shield(create_eager_task(run.async_run()))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 464, in async_run
await self._async_step(log_exceptions=False)
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 528, in _async_step
self._handle_exception(
~~~~~~~~~~~~~~~~~~~~~~^
ex, continue_on_error, self._log_exceptions or log_exceptions
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 558, in _handle_exception
raise exception
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 526, in _async_step
await getattr(self, handler)()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 764, in _async_call_service_step
response_data = await self._async_run_long_action(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<9 lines>...
)
^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 727, in _async_run_long_action
return await long_task
^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2802, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2845, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1032, in entity_service_call
raise result from None
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1628, in async_request_call
return await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1079, in _handle_entity_call
result = await task
^^^^^^^^^^
File "/config/custom_components/dahua/camera.py", line 322, in async_set_video_profile_mode
await self._coordinator.client.async_set_video_profile_mode(channel, mode)
File "/config/custom_components/dahua/client.py", line 364, in async_set_video_profile_mode
return await self.get(url, True)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/dahua/client.py", line 815, in get
raise exception
File "/config/custom_components/dahua/client.py", line 799, in get
raise Exception(data)
Exception: Error
Any suggestion?
Camera model is: DH-IPC-HDW3441T-ZS-S2 Firmware version: 3.140.0000000.24.R Dahua integration version: 0.9.71
Thank you in advance!