Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ONVIF PTZ doesn't work for Hikvision cameras #1567

Closed
maisun opened this issue Aug 29, 2024 · 3 comments
Closed

ONVIF PTZ doesn't work for Hikvision cameras #1567

maisun opened this issue Aug 29, 2024 · 3 comments

Comments

@maisun
Copy link

maisun commented Aug 29, 2024

Describe the bug
ONVIF PTZ doesn't work for Hikvision PTZ cameras, it shows the PTZ control however the buttons don't work

To Reproduce
Steps to reproduce the behavior:

  1. Add Hikvision camera as ONVIF camera
  2. Enable PTZ
  3. PTZ control is displayed with the camera view however no action when clicking on it

Expected behavior
PTZ button should be able to control the camera actions.

Server (please complete the following information):

  • OS: Docker on Linux
  • Installation Method: Docker

Hardware Model (please complete the following information):

  • Device: Hikvision PTZ camera (DS-2CV3Q21FD-IW)

Client (please complete the following information, if applicable):

  • Software: Browser

Additional context
Hikvision doesn't seem to follow standard ONVIF PTZ protocol - I have tried the below API method which seems to work:
https://community.home-assistant.io/t/hikvision-camera-ptz-control-workaround-without-onvif/180366

It is sending HTTP Put with PTZ command:

`
rest_command:

pan: -100..100, tilt: -100..100, zoom: -100..100, duration: in msecs

cam04_ptz_momentary:
url: http://IP_OF_CAMERA/ISAPI/PTZCtrl/channels/1/Momentary
method: PUT
payload: '
{{ pan }}
{{ tilt }}
{{ zoom }}

500

'
username: PTZ_USER_NAME
password: PTZ_PASSWORD
content_type: 'application/xml'
verify_ssl: false

azimuth: 0..3300, elevation: 0..900, absoluteZoom: 10..40

cam04_ptz_absolute:
url: http://IP_OF_CAMERA/ISAPI/PTZCtrl/channels/1/Absolute
method: PUT
payload: '

{{ azimuth }}
{{ elevation }}
{{ absoluteZoom }}

'
username: PTZ_USER_NAME
password: PTZ_PASSWORD
content_type: 'application/xml'
verify_ssl: false
`

@SunvidWong
Copy link

I also tried many ways to use PTZ, GPU, and it also cannot be used

@koush
Copy link
Owner

koush commented Oct 5, 2024

try using the new continuous move option

@koush koush closed this as completed Oct 5, 2024
@maisun
Copy link
Author

maisun commented Oct 5, 2024

try using the new continuous move option

Thanks but where can I find the new continuous move option? Just tried ONVIF PTZ and looks the same to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants