hi folks,
still quite new to HA, but still enjoying exploring
Am trying to control my cameras via HA. I can do everything perfectly via the HA GUI, but switching the motion detection on/off via a script seems difficult. Maybe I’m missing something obvious? If I use the devel tools service call and run this snippet:
service: camera.enable_motion_detection
data: {}
target:
entity_id: camera.camera2
Then I get an “Unknown error”, which actually transposes to the following in the system logs:
Logger: homeassistant.helpers.script.websocket_api_script
Source: components/camera/__init__.py:626
First occurred: 9:34:41 AM (3 occurrences)
Last logged: 9:35:14 AM
websocket_api script: Error executing script. Unexpected error for call_service at pos 1:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 447, in _async_step
await getattr(self, handler)()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 680, in _async_call_service_step
await service_task
File "/usr/src/homeassistant/homeassistant/core.py", line 1738, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1775, in _execute_service
await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service
await service.entity_service_call(
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 676, in entity_service_call
future.result() # pop exception if have
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 931, in async_request_call
await coro
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 713, in _handle_entity_call
await result
File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 630, in async_enable_motion_detection
await self.hass.async_add_executor_job(self.enable_motion_detection)
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 626, in enable_motion_detection
raise NotImplementedError()
NotImplementedError
Not sure, what’s quite wrong here. Unimplemented seems a strange thing for the core camera functionality to respond with, perhaps it’s the hardware, how to know? The Camera is an Imou Bullet.
I appreciate any helpful suggestions…