Unable to fill Command field in Control Capability Main Tab

Support and queries relating to all previous versions of ZoneMinder
Locked
jduda
Posts: 18
Joined: Tue Nov 28, 2006 10:54 pm

Unable to fill Command field in Control Capability Main Tab

Post by jduda »

I'm trying to identify a script to run for controlling a camera. I drill down to the Control Capabilities page, and I add a new Name called "Ninja". I can edit some fields, for example Can Move, Can Move relative, Can Tile. However, I am unable to load the Command field in the Main page.

This used to work before I recently upgraded to fedora 9 and zm 1.23.3.

If I look in the mysql database, I can see the control capability (Ninja record), however, I cannot see the data I enter in the Command field. Each time I SAVE on the Control Capability page, the infomrmation is lost when I reenter the page.

I know that the mysql interface is working as I can delete, enter, and change other fields within Control Capabilities and see the change in the mysql records.

Thanks,

Jim
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Did you create a perl module for ninja?
jduda
Posts: 18
Joined: Tue Nov 28, 2006 10:54 pm

Post by jduda »

Yes, I have /usr/local/bin/zmcontrol-ninja.pl in place.

This used to work, but now it doesn't after upgrading to fedora 9. I had earlier updated to zm 1.23.3, before upgrading to fc9. After upgrading to fc9, zm failed to start. So, I simply recompiled and reinstalled zm. zm now starts and works, but I cannot use the controls anymore. The controls were working with my perl script before. I think I need to get the Command field reloaded, by the data won't stick.

Jim
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

1.23.x does not use perl scripts any more as noted in the change log, they are now perl modules.
http://www.zoneminder.com/wiki/index.php/Change_History
jduda
Posts: 18
Joined: Tue Nov 28, 2006 10:54 pm

Post by jduda »

I appreciate the pointer to the note in the release notes. I don't understand why my perl script continued to work between my upgrade to 1.23.3 and my upgrade to fedora release 9.

Is there any new documentation which describes how to implement camera control using the new scheme? The documentation on the wiki continues to describe the older method of using a simple perl script for camera control.

Thanks,

Jim
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Actually if you look at the new modules, it is very similar and shouldn't be trivial to recreate as a module.
jduda
Posts: 18
Joined: Tue Nov 28, 2006 10:54 pm

Post by jduda »

thanks for you help and patience with this, still not there yet.

I found the pm files in /usr/local/lib/perl5/site-perl/5.10.0/Zoneminder/Control

I cloned the Pelco-D.pm to a Ninja.pm. Yes, it was straight forward.

i don't understand how to "attach" Ninja.pm to my camera control. I added a new "Control Capabilites" and called it Ninja. I now have 7 Control Capabilities. I don't understand how the mapping is supposed to work.
.
Also, for some reason, I can no longer get the LEFT and RIGHT icons to appear as control events, when I used to have them. I have enable can move relative as well as can tile. The only control icons I have are up and down. Neither of which appear to call any method in my new Ninja.pm library module.

Jim
jduda
Posts: 18
Joined: Tue Nov 28, 2006 10:54 pm

Post by jduda »

I appear to have resolved the missing left/right control icons. What I did was turned on "all" of the move options, relative, absolute, etc. I did a save, then all the icons appeared. I then turned off all but 'move relative' and I was able to retain the left and right control icons.

I'm still failing to understand how to attach the Ninja.pm module to the camera control features.
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

When you set it up in the daatabase just name it "Ninja" zm will append the ".pm" to the end.
jduda
Posts: 18
Joined: Tue Nov 28, 2006 10:54 pm

Post by jduda »

Okay, so I have Ninja in place, that makes sense.

Can you help me understand how to turn on debugging such that I can see progress within the perl module?

How do I turn on debugging and where does the debug output go?

Jim
jduda
Posts: 18
Joined: Tue Nov 28, 2006 10:54 pm

Post by jduda »

Duh, I just read the manual re debugging. I think I can handle this :-)
jduda
Posts: 18
Joined: Tue Nov 28, 2006 10:54 pm

Post by jduda »

I was continuing to struggle with this. In the Control capabilities page, the only field I had access to was a "Command" field, however, reading the zmcontrodl.pl script I learned that I should have been expecting a "Protocol" field.

I uninstalled and reinstalled Zoneminder 1.23. And now I was getting a "Protocol" field in the Control capabilities field.

I dropped in my /usr/local/lib/perl5/site-perl/5.10.0/Zoneminder/Control/Ninja.pm perl module.

In the log files, I'm getting:

Sep 6 21:09:01 linux zmcontrol[23549]: INF [loading ... ZoneMinder::Control::Ninja]
Sep 6 21:09:11 linux zmcontrol[23543]: FAT [Can't connect: No such file or directory]

I added this line of code to /usr/local/bin/zmcontrol.pl

Info ("loading ... ZoneMinder::Control::$protocol");
load "ZoneMinder::Control::$protocol";
Info ("loaded...");

Any explanation as to why the load is failing?

l /usr/local/lib/perl5/site_perl/5.10.0/ZoneMinder/Control
total 80
-r--r--r-- 1 root root 10999 2008-02-25 04:49 AxisV2.pm
-r--r--r-- 1 root root 5283 2008-02-25 04:49 Ncs370.pm
-r--r--r-- 1 root root 9881 2008-09-06 20:32 Ninja.pm
-r--r--r-- 1 root root 7391 2008-02-25 04:49 PanasonicIP.pm
-r--r--r-- 1 root root 18952 2008-02-25 04:49 PelcoD.pm
-r--r--r-- 1 root root 20114 2008-02-25 04:49 Visca.pm

Jim
Locked