Can't get PTZ controls to work using Axis 215 w/ Axis API v2

Forum for questions and support relating to the 1.25.x releases only.
Locked
butlerm1977
Posts: 36
Joined: Wed Sep 09, 2009 4:47 pm

Can't get PTZ controls to work using Axis 215 w/ Axis API v2

Post by butlerm1977 »

[SOLVED, see bottom post] PTZ functions for my Axis 215 will not work on ZM. I've tried on both CentOS 5.6 x86 and x64. Same problem on both. The camera feed is coming through just fine, but when I try to adjust any of the PTZ control settings, I get the following in the error log...

Code: Select all

2011-12-01 13:09:42.267420	zmcontrol	3056	INF	Control server 1/AxisV2 starting at 11/12/01 13:09:42	zmcontrol.pl	
2011-12-01 13:09:42.219420	zmcontrol	3052	INF	Starting control server 1/AxisV2	                                zmcontrol.pl
2011-12-01 13:09:42.219420	zmfix	        2713	ERR	Can't stat axis-cgi/com/ptz.cgi: No such file or directory	zmfix.cpp	86
I've done a basic ZM setup with only 1 camera to try to narrow the problem down. I enabled the PTZ under Options -> System -> OPT_CONTROL. My settings for the camera include:

Source:
HTTP
Simple
user:pass@ipaddr
port 80
host path: /axis-cgi/mjpg/video.cgi?resolution=640x480&req_fps=7
24bit / 640 / 480

Control Tab:
Controllable, Axis API v2
Control Device: axis-cgi/com/ptz.cgi
Control Address: ipaddr:80
0, uncheck, 0, none, 0

Side note, even though the controls are not working within the ZM, I can browse to the following address and actually move the camera...

http://ipaddr/axis-cgi/com/ptz.cgi?camera=1&move=left

So I know the camera is accepting remote PTZ controls. So I think it must be something on the server not sending the right string to the URL. I'm not sure what the "Can't stat axis-cgi/com/ptz.cgi: No such file or directory" error is meaning. Does it think that the cgi file is on the local server? I found a reference to installing a perl module called libmodule-load-perl on another writeup for Axis cameras, but I cannot find that module for CentOS. Not sure if that might be causing the problem.

Also, firewall and SELinux is disabled.
Last edited by butlerm1977 on Wed Dec 21, 2011 7:33 pm, edited 1 time in total.
butlerm1977
Posts: 36
Joined: Wed Sep 09, 2009 4:47 pm

Re: Can't get PTZ controls to work using Axis 215 w/ Axis AP

Post by butlerm1977 »

As an update to this, I have set up a second server running ZM 1.25 using Ubuntu 11.04 as opposed to CentOS in my previous post. I am still unable to control the PTZ. I get the exact same error in the log as above. Can't stat : No such file or directory.

Any ideas?
kylejohnson
Posts: 260
Joined: Tue Aug 21, 2007 1:42 pm
Location: Baltimore, MD

Re: Can't get PTZ controls to work using Axis 215 w/ Axis AP

Post by kylejohnson »

The error message says that it can't find axis-cgi/com/ptz.cgi

Try
Control Device: /axis-cgi/com/ptz.cgi

Note the beginning /
Idling as gnulnx in #zoneminder on freenode. Come say hi!
User avatar
AllenTuttle
Posts: 30
Joined: Tue Sep 25, 2007 4:56 pm
Location: Sequim WA.

Re: Can't get PTZ controls to work using Axis 215 w/ Axis AP

Post by AllenTuttle »

ZoneMinder (v1.25.0 on Redhat) is able to control my Axis 214PTZ which I think uses the same control codes.
I have nothing entered in the 'Control Device' field and use the same entry in 'Control Address' and 'Remote Host Name'.
Up/Down/Left/Right, Zoom, Iris, focus, and Presets all work well.
Diagional movements are not available.
butlerm1977
Posts: 36
Joined: Wed Sep 09, 2009 4:47 pm

Re: Can't get PTZ controls to work using Axis 215 w/ Axis AP

Post by butlerm1977 »

Still no luck with this. I've tried the suggestions above and verified settings with AllenTuttle's configuration. During my troubleshooting, I have tried Centos ZM 1.25 and 1.24 and also on Ubuntu with ZM 1.25. Each time I still get the errors above. Can anyone else offer some suggestions?
butlerm1977
Posts: 36
Joined: Wed Sep 09, 2009 4:47 pm

Re: Can't get PTZ controls to work using Axis 215 w/ Axis AP

Post by butlerm1977 »

I'm going to mark this issue as SOLVED. I poked through the settings within the 215 and found that you can adjust the cookie option for different user levels. The solution I came up with was to disable the cookie requirement for the Viewer account type. The cookie setting is found in System Options -> Advanced -> Plain Config -> PTZ (from drop down) -> PTZ UserCtlQueue U2 (uncheck the Use Cookie box). Next just restart the camera.

Beyond that, my working settings are:
remote host name = user:pass@ipaddress (just make sure the user is in the Viewer group on the camera)
remote host port = 80
remote host path = /axis-cgi/mjpg/video.cgi?resolution=640x480&req_fps=5
controllable = checked
control type = Axis API v2
control device = axis-cgi/com/ptz.cgi
control address = user:pass@ipaddress
Locked