Hikvision PTZ control

Post here to ask any questions about hardware suitability, configuration in ZoneMinder, or experiences. If you just want to know if something works with ZoneMinder or not, please check the Hardware Compatibility sections in the forum, and the Wiki first. Also search this topic as well.
Post Reply
iamnotme
Posts: 8
Joined: Mon Aug 29, 2022 9:21 am

Hikvision PTZ control

Post by iamnotme »

I've returned to Zoneminder after playing about with it previously but not implementing it. I am using the master ppa so I am on 1.37.47

I did manage to get the Hikvision PTZ control working last time, albeit slowly, for my camera DS-2DE5425IW-AE. However I've tried again this morning and whenever I try and move the camera I get a 500 Internal Server Error from zmcontrol.

Anything obvious I may be missing?
User avatar
iconnor
Posts: 2835
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Hikvision PTZ control

Post by iconnor »

Turn on debugging and restart. There will e more info in the logs. zmcontrol doesn't do 500's so i assue it is reporting a 500 from the camera. Which means it doesn't like what we are sending.
iamnotme
Posts: 8
Joined: Mon Aug 29, 2022 9:21 am

Re: Hikvision PTZ control

Post by iamnotme »

It's taken a while to get back to. I couldn't get the debug log to save where I wanted or even generate.

I put _zmc_m1 | _zmcontrol_1 in the devices to log, and /home/jon/zmc_m1_ptz.log as my log file but nothing appears even after several restarts.
Attachments
Screenshot_20231222_122541.png
Screenshot_20231222_122541.png (82.82 KiB) Viewed 5618 times
User avatar
iconnor
Posts: 2835
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Hikvision PTZ control

Post by iconnor »

It won't have permission to write to your home directory.
iamnotme
Posts: 8
Joined: Mon Aug 29, 2022 9:21 am

Re: Hikvision PTZ control

Post by iamnotme »

It wouldn't write to /var/log either so I tried /var/log/zm and still no logging output to a dedicated file as specified.
SonopaalFounik
Posts: 4
Joined: Sat Oct 28, 2023 11:41 am

Re: Hikvision PTZ control

Post by SonopaalFounik »

I'm here to help you troubleshoot the 500 Internal Server Error with Hikvision PTZ control in Zoneminder 1.37.47. Here are some steps to investigate:

1. Check Logs:

Zoneminder Logs: Carefully review Zoneminder's logs (often in /var/log/zm) for specific error messages or clues related to PTZ control or Hikvision communication.
Web Server Logs: If Zoneminder uses Apache or Nginx, examine their logs for additional insights into server-side errors.
2. Verify Camera Connectivity:

Network Access: Ping the camera's IP address to ensure network connectivity.
Credentials: Double-check that you're using the correct username and password for PTZ control in Zoneminder's configuration.
Firmware Updates: Consider updating the camera's firmware to the latest version for compatibility and bug fixes.
3. Inspect Configuration:

Hikvision Protocol: Ensure you've selected the correct Hikvision protocol (e.g., "Hikvision-CGI") in Zoneminder's camera configuration.
Port Number: Verify that the port number for PTZ control matches the camera's settings.
User Permissions: Confirm that the user running Zoneminder has the necessary permissions to access camera controls.
4. Test Manually:

zmcontrol: Attempt to control the camera directly using the zmcontrol command-line tool to isolate issues with the web interface.
5. Permissions and File Integrity:

Check Permissions: Ensure Zoneminder has appropriate permissions to access files and directories related to PTZ control.
Verify File Integrity: Use tools like md5sum or sha1sum to check the integrity of Zoneminder files, especially those involved in PTZ functionality.
6. Browser Compatibility:

Try Different Browsers: Test PTZ control in different web browsers to rule out browser-specific issues.
Disable Extensions: Temporarily disable browser extensions that might interfere with web requests.
7. Server Resource Availability:

Check Resource Usage: Ensure your server has sufficient resources (CPU, RAM) to handle PTZ operations smoothly.
Post Reply