@yuvalhadas wrote:
I have several ONVIF IP cameras working well with Synology surveillance station (streaming, ptz, etc.)
I’ve managed to stream the cameras with Home Assistant (Home Assistant 0.107.6 using Hass.io with the HassOS image) with the following configuration (for one of the cameras):
ffmpeg:camera:
- platform: onvif
host: 192.168.1.x
port: 554
username: aaa
password: bbb- platform: ffmpeg
name: cam3
input: rtsp://aaa:@192.168.1.x:554/However, I cannot control the cameras with the onvif.ptz service.
For example, for a this camera, with these attributes:
Entity attributes:
access_token: ccc
friendly_name: cam3
entity_picture: /api/camera_proxy/camera.cam3?token=ccc
supported_features: 2When I invoke the following code:
entity_id: camera.cam3
tilt: UP
distance: 0.1
speed: 0.5
continuous_duration: 0.5
move_mode: ContinuousMoveI receive the error: Failed to call service onvif/ptz. ‘onvif’
With the following log:
‘onvif’
9:59:56 AM – websocket_api (ERROR) - message first occurred at 9:28:24 AM and shows up 10 timesLog Details (ERROR)
Logger: homeassistant.components.websocket_api.http.connection.1779581328
Source: components/onvif/camera.py:121
Integration: websocket_api (documentation, issues)
First occurred: 9:28:24 AM (10 occurrences)
Last logged: 9:59:56 AM‘onvif’
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py”, line 134, in handle_call_service
connection.context(msg),
File “/usr/src/homeassistant/homeassistant/core.py”, line 1234, in async_call
await asyncio.shield(self._execute_service(handler, service_call))
File “/usr/src/homeassistant/homeassistant/core.py”, line 1257, in _execute_service
await handler.func(service_call)
File “/usr/src/homeassistant/homeassistant/components/onvif/camera.py”, line 121, in async_handle_ptz
all_cameras = hass.data[ONVIF_DATA][ENTITIES]
KeyError: 'onvifAny ideas how to solve the error?
Posts: 3
Participants: 2