Page 1 of 2
DLink PTZ cam not recognizing PTZ clicks
Posted: Thu Sep 19, 2013 12:40 am
by UtahJarhead
I'm fairly certain that I do not have something set up exactly right.
I bought a DLink DCS-5020L to start my ZM setup with. I'm using the setup instructions using the
DCS-5010L settings (copied into its own section for the 5020L) but PTZ doesn't appear to work for the 5020L.
Below are my settings for the monitor and PTZ settings:
Here is my directory listing showing the perl module:
Code: Select all
art@tv:/usr/share/perl5/ZoneMinder/Control$ ls -l
total 92
-rw-r--r-- 1 root root 10990 Jun 21 2011 AxisV2.pm
-rw-r--r-- 1 root root 7095 Sep 17 20:06 DLink-DCS5020L.pm
-rw-r--r-- 1 root root 5261 Aug 26 2011 mjpgStreamer.pm
-rw-r--r-- 1 root root 5274 Jun 21 2011 Ncs370.pm
-rw-r--r-- 1 root root 7382 Jun 21 2011 PanasonicIP.pm
-rw-r--r-- 1 root root 18941 Jun 21 2011 PelcoD.pm
-rw-r--r-- 1 root root 7597 Sep 17 16:17 TVIP400.pm
-rw-r--r-- 1 root root 20103 Jun 21 2011 Visca.pm
Below is the error I get about 30 seconds after I click one of the PTZ controls:
Code: Select all
Control response was status = undefined
message = /usr/bin/zmcontrol.pl --panstep=16 --command=moveRelUpRight --id=1=>
Any ideas?
Re: DLink PTZ cam not recognizing PTZ clicks
Posted: Thu Sep 19, 2013 7:12 pm
by UtahJarhead
Found this in /var/log/apache2/error.log
Looks like it's forming up the shell command wrong.
[Thu Sep 19 13:08:07 2013] [error] [client ip_addr] ERR [/usr/bin/zmcontrol.pl --panstep=13 --command=moveRelUpRight --id=1=>], referer: http://ip_addr/zm/?view=watch&mid=1
Is that right?
Re: DLink PTZ cam not recognizing PTZ clicks
Posted: Fri Sep 20, 2013 1:36 am
by UtahJarhead
Found this in my syslog, now just need to find out why I'm getting Permissions errors.
Code: Select all
443 Sep 19 19:32:36 tv zmcontrol[27568]: INF [Starting control server 1/DLink-DCS5020L]
444 Sep 19 19:32:36 tv zmcontrol[27570]: INF [Control server 1/DLink-DCS5020L starting at 13/09/19 19:32:36]
445 Sep 19 19:32:46 tv zmcontrol[27568]: FAT [Can't connect: Permission denied]
Re: DLink PTZ cam not recognizing PTZ clicks
Posted: Fri Sep 20, 2013 1:39 am
by UtahJarhead
I definitely feel stupid. Bad password on the Control tab of the monitor. I figured it used the same path as the Monitor's main tab. I was wrong.
Code: Select all
Sep 19 19:37:59 tv zmcontrol[29786]: INF [Starting control server 1/DLink-DCS5020L]
Sep 19 19:37:59 tv zmcontrol[29788]: INF [Control server 1/DLink-DCS5020L starting at 13/09/19 19:37:59]
Sep 19 19:38:09 tv zmcontrol[29786]: FAT [Can't connect: No such file or directory]
Re: DLink PTZ cam not recognizing PTZ clicks
Posted: Fri Sep 20, 2013 2:52 am
by UtahJarhead
I've determined through perl debugging that the error is coming from line 139 in zmcontrol.pl. If I look at the contents of $saddr, I get '#002'. I don't really know what I'm doing in perl, so that's where I'm at. ideas?
Code: Select all
137 socket( CLIENT, PF_UNIX, SOCK_STREAM, 0 ) or die( "Can't open socket: $!" );
138 my $attempts = 0;
139 while (!connect( CLIENT, $saddr ))
140 {
141 $attempts++;
142 Fatal( "Can't connect: $!" ) if ($attempts > MAX_CONNECT_DELAY);
143 sleep(1);
144 }
Re: DLink PTZ cam not recognizing PTZ clicks
Posted: Fri Sep 20, 2013 4:24 pm
by TheKorn
As the guy that added the 5010L, I was kind of wondering why you copied only half of it for the 5020L!
In the TVIP400 file, did you remember to change the line
to
? If you don't, then you'll get almost exactly the symptoms you describe.
(I'm happy someone found what I added useful!)
Re: DLink PTZ cam not recognizing PTZ clicks
Posted: Fri Sep 20, 2013 4:34 pm
by TheKorn
I may have found your problem!
When you're in the control capabilities section, the "protocol" must match the package name (not the filename)! So unless you edited the file, "TVIP400" must be the protocol name!
Here is my definition for the 5010-L, for example.
HTH!
Re: DLink PTZ cam not recognizing PTZ clicks
Posted: Sun Sep 22, 2013 2:56 am
by UtahJarhead
TheKorn wrote:As the guy that added the 5010L, I was kind of wondering why you copied only half of it for the 5020L!
I didn't want to add data that I wasn't sure was yet useful and accurate since I hadn't verified that it would work with the 5020L. Once it was working, I'd planned on going back and fixing it. The work you've done with the 5010L is fantastic, however.
Re: DLink PTZ cam not recognizing PTZ clicks
Posted: Sun Sep 22, 2013 3:11 am
by UtahJarhead
I found my issue. While your advice was correct based off of the information you know, it wasn't my issue.
I'd taken the TVIP400 file and copied to another file and I modified the module name internally, so in my settings it WAS correct. They key to figuring out *MY* error was when I took your file and threw it back into place and got it working. Well what did I do to screw it up?
https://gist.github.com/6656345
See the /PANTILTCONTROL.CGI ? Well, me cleaning things up changed it to /pantiltcontrol.cgi.... Stupid stupid me. I changed it to lower case because when I visit the lower case URL in the browser, it appears to work. Dummy me.
Re: DLink PTZ cam not recognizing PTZ clicks
Posted: Sun Sep 22, 2013 3:44 am
by UtahJarhead
I've corrected the Wiki article to include an accurate script (which you may wish to copy to your 5010L description)
http://www.zoneminder.com/wiki/index.ph ... #DCS-5020L
Re: DLink PTZ cam not recognizing PTZ clicks
Posted: Sun Sep 22, 2013 5:16 pm
by TheKorn
Ha! Gave yourself a landmine to find, I hate it when I do that!
Since the 5010 and 5020 are really just the same camera with different paint jobs, I took a crack at combining their wiki entries together. Looks OK, could be better, but good enough for now.
One thing... do(es) your 5020L(s) every once in a while send corrupt frames? Both of my 5010L's will occasionally send a corrupt frame or two. Obviously this then triggers motion detection for a false event. Was wondering if it happens to anyone else.
Re: DLink PTZ cam not recognizing PTZ clicks
Posted: Sun Sep 22, 2013 5:18 pm
by TheKorn
And then just as quickly as it starts sending corrupt frames, it quits!
Re: DLink PTZ cam not recognizing PTZ clicks
Posted: Sun Sep 22, 2013 6:14 pm
by UtahJarhead
I haven't seen any corrupt packets, but I haven't been paying a ton of attention to it and I haven't had it for very long, either.
Re: DLink PTZ cam not recognizing PTZ clicks
Posted: Sun Sep 22, 2013 6:16 pm
by UtahJarhead
I never looked at the difference between the 5010L and the 5020L. Looks like the only difference is the 5020L has the wifi repeater. Nice.
Re: DLink PTZ cam not recognizing PTZ clicks
Posted: Mon Sep 23, 2013 12:02 am
by TheKorn
For me, the difference was "the 5010L
is on SALE!"