Difference between revisions of "Gadspot"

From ZoneMinder Wiki
Jump to navigationJump to search
 
Line 19: Line 19:


From my experience, the GS1200 without wireless works and the one with wireless does not. YMMV.
From my experience, the GS1200 without wireless works and the one with wireless does not. YMMV.
'''
 
[Alternative Working Setup - Wireless Cam]'''
[Alternative Working Setup - Wireless Cam]
I have a GS1200 wireless model working although it would not work when set to 640x480. <BR\>I had to reset camera to 320x240 and then set zm to match.<br>
I have a GS1200 wireless model working although it would not work when set to 640x480. <BR\>I had to reset camera to 320x240 and then set zm to match.<br>
I also used a different Remote Host Path:  /Jpeg/CamImg.jpg
I also used a different Remote Host Path:  /Jpeg/CamImg.jpg

Latest revision as of 22:21, 3 June 2009

The Gadspot GS-9603 and possibly others do work with Zoneminder.


Gadspot GS1200

To setup the Gadspot GS1200 add a new monitor with the following settings:

[General]
Remote type: Remote

[Source]
Remote Host Name: Ip address of camera
Remote Host Port: normally 80 but if you changed it you need to update this to whatever you changed it to.

Remote Host Path: You have two options. for a stream use /cgi-bin/getimage.cgi?motion=1 for jpeg use /cgi-bin/getimage.cgi?motion=0

Capture Width: needs to be the same as in the gadspot config: (640 is default)
Capture Height: need to be the same as in the gadspot config: (480 is default)

From my experience, the GS1200 without wireless works and the one with wireless does not. YMMV.

[Alternative Working Setup - Wireless Cam] I have a GS1200 wireless model working although it would not work when set to 640x480. <BR\>I had to reset camera to 320x240 and then set zm to match.
I also used a different Remote Host Path: /Jpeg/CamImg.jpg I did not test for mpeg pictures, only the jpeg and got feeds of 2.8fps from the wireless<BR\> and into a remotely located zm server (not onsite).

Gadspot GS9603

To setup the Gadspot 9603 add a new monitor with the following settings:

[General]
Remote type: Remote

[Source]
Remote Host Name: Ip address of camera
Remote Host Port: normally 80 but if you changed it you need to update this to whatever you changed it to.

Remote Host Path: You have two options. for a stream use /getData.cgi for jpeg use /Jpeg/CamImg.jpg

Capture Width: needs to be the same as in the gadspot config: (640 is default)
Capture Height: need to be the same as in the gadspot config: (480 is default)


Controlling the GS9603

If you have control turned on in Options you can control the gadspot by enabling control in the control tab.

First off you will need to place the ZM control file in the directory where your zoneminder scripts are located. (Look for zmcontrol-*.pl files and paste the following to a script called zmcontrol-gadspot-v2.pl:

#!/usr/bin/perl -wT
#
# ==========================================================================
#
# ZoneMinder Axis HTTP API v2 Control Script, $Date: 2006/05/08 12:37:48 $, $Revision: 1.9 $
# Copyright (C) 2003, 2004, 2005, 2006  Philip Coombes
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
#
# ==========================================================================
#
# This script continuously monitors the recorded events for the given
# monitor and applies any filters which would delete and/or upload 
# matching events
#
use strict;

# ==========================================================================
#
# These are the elements you can edit to suit your installation
#
# ==========================================================================

use constant DBG_ID => "zmctrl-gadspot"; # Tag that appears in debug to identify source
use constant DBG_LEVEL => 0; # 0 is errors, warnings and info only, > 0 for debug

# ==========================================================================

use ZoneMinder;
use Getopt::Long;

$| = 1;

$ENV{PATH}  = '/bin:/usr/bin';
$ENV{SHELL} = '/bin/sh' if exists $ENV{SHELL};
delete @ENV{qw(IFS CDPATH ENV BASH_ENV)};

sub Usage
{
	print( "
Usage: zmcontrol-gadspot-v2.pl <various options>
");
	exit( -1 );
}

zmDbgInit( DBG_ID, level=>DBG_LEVEL );

my $arg_string = join( " ", @ARGV );

my $address;
my $command;
my ( $speed, $step );
my ( $xcoord, $ycoord );
my ( $width, $height );
my ( $panspeed, $tiltspeed );
my ( $panstep, $tiltstep );
my $preset;

if ( !GetOptions(
	'address=s'=>\$address,
	'command=s'=>\$command,
	'speed=i'=>\$speed,
	'step=i'=>\$step,
	'xcoord=i'=>\$xcoord,
	'ycoord=i'=>\$ycoord,
	'width=i'=>\$width,
	'height=i'=>\$height,
	'panspeed=i'=>\$panspeed,
	'tiltspeed=i'=>\$tiltspeed,
	'panstep=i'=>\$panstep,
	'tiltstep=i'=>\$tiltstep,
	'preset=i'=>\$preset
	)
)
{
	Usage();
}

if ( !$address )
{
	Usage();
}

Debug( $arg_string."\n" );

srand( time() );

sub printMsg
{
	my $msg = shift;
	my $msg_len = length($msg);

	Debug( $msg."[".$msg_len."]\n" );
}

sub sendCmd
{
	my $cmd = shift;

	my $result = undef;

	printMsg( $cmd, "Tx" );

	use LWP::UserAgent;
	my $ua = LWP::UserAgent->new;
	$ua->agent( "ZoneMinder Control Agent/".ZM_VERSION );

	#print( "http://$address/$cmd\n" );
	my $req = HTTP::Request->new( GET=>"http://$address/$cmd" );
	my $res = $ua->request($req);

	if ( $res->is_success )
	{
		$result = !undef;
	}
	else
	{
		Error( "Error check failed: '".$res->status_line()."'\n" );
	}

	return( $result );
}


sub moveUp
{
	Debug( "Move Up\n" );
	my $cmd = "MoveCamera.cgi?Dir=Up";
	sendCmd( $cmd );
}

sub moveDown
{
	Debug( "Move Down\n" );
	my $cmd = "MoveCamera.cgi?Dir=Down";
	sendCmd( $cmd );
}

sub moveLeft
{
	Debug( "Move Left\n" );
	my $cmd = "MoveCamera.cgi?Dir=Left";
	sendCmd( $cmd );
}

sub moveRight
{
	Debug( "Move Right\n" );
	my $cmd = "MoveCamera.cgi?Dir=Right";
	sendCmd( $cmd );
}

sub moveUpRight
{
	Debug( "Move Up/Right\n" );
	my $cmd = "MoveCamera.cgi?Dir=RightUp";
	sendCmd( $cmd );
}

sub moveUpLeft
{
	Debug( "Move Up/Left\n" );
	my $cmd = "MoveCamera.cgi?Dir=LeftUp";
	sendCmd( $cmd );
}

sub moveDownRight
{
	Debug( "Move Down/Right\n" );
	 my $cmd = "MoveCamera.cgi?Dir=RightDown";
         sendCmd( $cmd );

}

sub moveDownLeft
{
	Debug( "Move Down/Left\n" );
	 my $cmd = "MoveCamera.cgi?Dir=LeftDown";
         sendCmd( $cmd );
}



if ( $command eq "up" )
{
	moveUp();
}
elsif ( $command eq "down" )
{
	moveDown();
}
elsif ( $command eq "left" )
{
	moveLeft();
}
elsif ( $command eq "right" )
{
	moveRight();
}
elsif ( $command eq "upleft" )
{
	moveUpLeft();
}
elsif ( $command eq "upright" )
{
	moveUpRight();
}
elsif ( $command eq "downleft" )
{
	moveDownLeft();
}
elsif ( $command eq "downright" )
{
	moveDownRight();
}
else
{
	Error( "Can't handle command $command\n" );
}

Now Click Edit on the Control Type line in the Monitor setup window's Control tab.

Click add new control when the window pops up.

You will want to set the Type to Remote.

Command: zmcontrol-gadspot-v2.pl (or whatever you named the file above.).

On the Move Tab check Can Move and Can move Diagonally (not sure if the second one is needed but it is in my config).

Now in the Pan tab check Can Pan.

In the Tilt tab check Can Tilt.

Save your settings and close out the add control window and the control list.

You will not want to save your monitor and then reopen it so that the gadspot will display in the Control Type pull down menu. If it is there select it. If not go back and find what you forgot.

Now your GS9603 should be ready to go. Open it up and click control at the top.

Enjoy!

EDIT by ddamron: I made some minor bug fixes to this script... please check.. perl reported 4 warnings about cmd$ being reassigned (or something like that)

Closer examination of my GS9603 (and the axel script) revealed that the command can be LeftUp, but not UpLeft.

Anywho, the above script now doesn't complain... cheers!

Gadspot GS1600 and GS1600H

The Gadspot GS1600 is a standard box camera, and the GS1600H is the same camera with an outdoor housing.

Settings are fairly basic. Set your Source Type for Remote, set the Host Name to the IP address of the camera, Host Port to 80 and the Host Path to /Jpeg/CamImg.jpg.

I have been able to bring up the MJpeg stream using the Host Path of /GetData.cgi.

I have noticed that the video quality of the GS1600 at 640x480 is "grainy". It appears that the camera is upscaleing the image from 320x240... which is a real shame. If somebody knows how to get a real 640x480 out of this camera... I'd love to know!

Outdoor housing

The Outdoor Housing appears to be a Videolarm LCH housing... It has a fan, but no heater. I spoke with a salesperson at Gadspot, and he said that the consern was not the camera getting too cold, but getting too hot. I've only had time to leave it in the cold (Sub zero for a few weeks with snow).

The housing has a light-sensor that turns on the IR emitters. When it gets dark enough, the IR turns on, and it seems to work well. The only problem is a reflection... you can see the white of the camera housing when the IR is on. It doesn't effect the video too much, but it is noticeable.