Writing zmcontrol file for ABS Megacam
Posted: Mon Feb 23, 2009 10:33 pm
OK, I've done some testing and found out that I can control the ABS Megacams from a command line using wget as follows:
wget --http-user=admin --http-password=admin "http://<cam>/ptz.cgi?move=down&speed=10"
The "move" can be up, down, right, left, etc. Speed can be adjusted to change the stepping or left off completely to use the last value.
I copied the zmcontrol-axis-v2.pl to zmcontrol-abs.pl and added into zoneminder. The axis controls seemed more similar than the others to the abs cameras.
I made some changes to the script. For instance, in the axis zmcontrol file, there was this section:
sub moveUp
{
Debug( "Move Up\n" );
my $cmd = "/axis-cgi/com/ptz.cgi?move=up";
sendCmd( $cmd );
}
In my new file, I changed it to:
sub moveUp
{
Debug( "Move Up\n" );
my $cmd = "/ptz.cgi?move=up";
sendCmd( $cmd );
}
Unfortunately, I'm not getting any results with this. I've set Debug to !=0 in the script but I can't seem to find any debug output -- even when run from the command line.
In the ZM console, under the Control tab, I have my new script chose for Control Type.
Control Device is blank since this is a remote IP cam.
Control address is admin:admin@<ip> (this is the same thing I use for Remote Host Name on the Source tab, and video works.
Any insights would be appreciated. When I get this script functional, I will post it for others.
wget --http-user=admin --http-password=admin "http://<cam>/ptz.cgi?move=down&speed=10"
The "move" can be up, down, right, left, etc. Speed can be adjusted to change the stepping or left off completely to use the last value.
I copied the zmcontrol-axis-v2.pl to zmcontrol-abs.pl and added into zoneminder. The axis controls seemed more similar than the others to the abs cameras.
I made some changes to the script. For instance, in the axis zmcontrol file, there was this section:
sub moveUp
{
Debug( "Move Up\n" );
my $cmd = "/axis-cgi/com/ptz.cgi?move=up";
sendCmd( $cmd );
}
In my new file, I changed it to:
sub moveUp
{
Debug( "Move Up\n" );
my $cmd = "/ptz.cgi?move=up";
sendCmd( $cmd );
}
Unfortunately, I'm not getting any results with this. I've set Debug to !=0 in the script but I can't seem to find any debug output -- even when run from the command line.
In the ZM console, under the Control tab, I have my new script chose for Control Type.
Control Device is blank since this is a remote IP cam.
Control address is admin:admin@<ip> (this is the same thing I use for Remote Host Name on the Source tab, and video works.
Any insights would be appreciated. When I get this script functional, I will post it for others.