Hello,
Will it be possible to add full ONVIF support for this camera ?
Actually only part of functionalities is available…
PTZ and events seems not working
I have the ONVIF reference table received from manufacturer at disposal
Thx,
Hello,
Will it be possible to add full ONVIF support for this camera ?
Actually only part of functionalities is available…
PTZ and events seems not working
I have the ONVIF reference table received from manufacturer at disposal
Thx,
Hello sonuss,
i’ m facing many problems with this camera. The ONVIF connection works but not all features are available. I had so many problems with the onvif stream in the picture glance so i decided to use only the rtsp stream. PTZ seems to work fine.
in the end in cameras.yaml i created 2 platforms for the same camera:
- platform: onvif
name: ptz_vigna
host: 192.168.1.212
port: 8080
username: !secret cameras_username
password: !secret cameras_password
- platform: generic
name: ptz_vigna_stream
stream_source: rtsp://myuser:[email protected]:554/11
and in the ui-lovelace.yaml i did this:
- type: picture-glance
title: VIGNA
entities:
- entity: camera.ptz_vigna_mainstreamprofile
tap_action:
action: call-service
service: onvif.ptz
service_data:
entity_id: all
pan: LEFT
speed: 1
distance: 0.3
move_mode: ContinuousMove
name: Pan Left
show_state: false
icon: mdi:arrow-left
show_icon: true
- entity: camera.ptz_vigna_mainstreamprofile
tap_action:
action: call-service
service: onvif.ptz
service_data:
entity_id: all
tilt: UP
speed: 1
distance: 0.3
move_mode: ContinuousMove
name: Tilt Up
icon: mdi:arrow-up
- entity: camera.ptz_vigna_mainstreamprofile
tap_action:
action: call-service
service: onvif.ptz
service_data:
entity_id: all
tilt: DOWN
speed: 1
distance: 0.3
move_mode: ContinuousMove
name: Tilt Down
icon: mdi:arrow-down
- entity: camera.ptz_vigna_mainstreamprofile
tap_action:
action: call-service
service: onvif.ptz
service_data:
entity_id: all
pan: RIGHT
speed: 1
distance: 0.3
move_mode: ContinuousMove
name: Pan Right
icon: mdi:arrow-right
show_icon: true
- entity: camera.ptz_vigna_mainstreamprofile
tap_action:
action: call-service
service: onvif.ptz
service_data:
entity_id: all
zoom: ZOOM_IN
speed: 1
distance: 0.3
move_mode: ContinuousMove
name: Zoom IN
icon: mdi:magnify-plus
show_icon: true
- entity: camera.ptz_vigna_mainstreamprofile
tap_action:
action: call-service
service: onvif.ptz
service_data:
entity_id: all
zoom: ZOOM_OUT
speed: 1
distance: 0.3
move_mode: ContinuousMove
name: Zoom OUT
icon: mdi:magnify-minus
show_icon: true
stream_source: camera.ptz_vigna_stream
camera_image: camera.ptz_vigna_stream
#camera_image: camera.ptz_vigna_mainstreamprofile#####ONVIF####
#camera_view: live#####ONVIF####
Let me know if you find something better.
Can you share your documentation? I asked the manufacturer for this but i had no answer
Hi Stefano,
I didn’t deployed this camera yet, at that time it was mainly for testing the platform.
I had no issue with video stream, PTZ works with ONVIF but not the position presets.
I had to go for a shell script in the course to make this feature available. (see below)
UI card:
type: picture-glance
title: Test-low
entities:
- entity: camera.cam1_secondstreamprofile
tap_action:
action: call-service
service: onvif.ptz
service_data:
entity_id: camera.cam1_secondstreamprofile
pan: LEFT
speed: 1
distance: 0.3
move_mode: ContinuousMove
name: Pan Left
show_state: false
icon: mdi:arrow-left
show_icon: true
- entity: camera.cam1_secondstreamprofile
tap_action:
action: call-service
service: onvif.ptz
service_data:
entity_id: camera.cam1_secondstreamprofile
tilt: UP
speed: 1
distance: 0.3
move_mode: ContinuousMove
name: Tilt Up
icon: mdi:arrow-up
- entity: camera.cam1_secondstreamprofile
tap_action:
action: call-service
service: onvif.ptz
service_data:
entity_id: camera.cam1_secondstreamprofile
tilt: DOWN
speed: 1
distance: 0.3
move_mode: ContinuousMove
name: Tilt Down
icon: mdi:arrow-down
- entity: camera.cam1_secondstreamprofile
tap_action:
action: call-service
service: onvif.ptz
service_data:
entity_id: camera.cam1_secondstreamprofile
pan: RIGHT
speed: 1
distance: 0.3
move_mode: ContinuousMove
name: Pan Right
icon: mdi:arrow-right
show_icon: true
- entity: camera.cam1_secondstreamprofile
tap_action:
action: call-service
service: shell_command.ptz_camera_preset
service_data:
value: 1,1
name: Preset 1
show_state: false
icon: mdi:numeric-1-box
show_icon: true
- entity: camera.cam1_secondstreamprofile
tap_action:
url_path: null
navigation_path: null
action: call-service
service: shell_command.ptz_camera_preset
service_data:
value: 1,2
name: Preset 2
show_state: false
icon: mdi:numeric-2-box
show_icon: true
- entity: camera.cam1_secondstreamprofile
tap_action:
url_path: null
navigation_path: null
action: call-service
service: shell_command.ptz_camera_preset
service_data:
value: 1,3
name: Preset 3
show_state: false
icon: mdi:numeric-3-box
show_icon: true
camera_image: camera.cam1_secondstreamprofile
camera_view: live
Shell script:
#! /bin/bash
CONF=cameras.conf
source $CONF
CAMERA_ID=$(echo $1|cut -d ',' -f1)
POS_ID=$(echo $1|cut -d ',' -f2)
CAMERA_N="CAM"$CAMERA_ID
CAMERA_IP=${!CAMERA_N}
curl -u $CAM_USR:$CAM_PWD -A "Mozilla/5.0" -H "Connection: keep-alive" -H "Keep-Alive: timeout=5, max=100" --data "cmd=preset&-act=goto&-status=1&-number="$POS_ID -G http://$CAMERA_IP/web/cgi-bin/hi3510/param.cgi
# Camera configuration file
CAM1="10.10.3.104"
CAM2=""
CAM_USR="xxx"
CAM_PWD="xxx"
Camera protocol specifications can be found here:
Hi sonusss,
for camera presets i used input select + automation and it works fine
input_select.yaml
vignapreset:
name: Vigna Preset
options:
- Preset001
- Preset002
- Preset003
- Preset004
- Preset005
- Preset006
initial: Preset001
automations.yaml
- id: camera.vigna.presets
alias: "Vigna Preset"
trigger:
- platform: state
entity_id: input_select.vignapreset
action:
- service: onvif.ptz
data:
entity_id: camera.ptz_vigna_mainstreamprofile
preset: "{{ states('input_select.vignapreset') }}"
move_mode: GotoPreset
initial_state: true
mode: single