<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.staging.zoneminder.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Sagitt</id>
	<title>ZoneMinder Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.staging.zoneminder.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Sagitt"/>
	<link rel="alternate" type="text/html" href="http://wiki.staging.zoneminder.com/Special:Contributions/Sagitt"/>
	<updated>2026-04-20T00:27:32Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.37.1</generator>
	<entry>
		<id>http://wiki.staging.zoneminder.com/index.php?title=Foscam_Clones&amp;diff=6148</id>
		<title>Foscam Clones</title>
		<link rel="alternate" type="text/html" href="http://wiki.staging.zoneminder.com/index.php?title=Foscam_Clones&amp;diff=6148"/>
		<updated>2014-04-21T19:51:49Z</updated>

		<summary type="html">&lt;p&gt;Sagitt: /* Foscam Forum Topic */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Overview===&lt;br /&gt;
&lt;br /&gt;
Foscam is one of the more popular makers of wireless IP Cameras priced towards the lower end of price ranges.  Any other IP cameria that is compatible with Foscam tend to be called Foscam clones because of their popularity.  Its also common to see compatible cameras called Unbranded IP Cameras or Chinese IP Cameras.&lt;br /&gt;
&lt;br /&gt;
You can often tell the clones based on feature set alone.  Cameras in this class support 3 resolutions (640x480, 320x240, 160x120), 3 frame rates (60Hz, 50Hz, and Outdoor), Pan+Tilt and either Zoom or Nightvision or both, ability to email and FTP images during motion detection, and streaming video to VLC client.  There are more optional features but these are usually enough to detect clones.&lt;br /&gt;
&lt;br /&gt;
These cameras tend to use similar set of hardware components and share a once common firmware code base.  You can search for &amp;quot;Open IP Camera&amp;quot; for more information related to firmware and hardware.&lt;br /&gt;
&lt;br /&gt;
Most information about interacting with these cameras can be found by searching for a PDF called &amp;quot;IPCAM CGI SDK 2.1&amp;quot;.  I also found it useful to use Firefox to monitor the requests posted to camera as I clicked on its web interface.  You can do this by enabling Web Developer-&amp;gt;Web Console menu option.&lt;br /&gt;
&lt;br /&gt;
The following was tested on a Agasio a622w but should work with other brands of wireless IP cameras such as Foscam, EasyN, Wansview, and more.&lt;br /&gt;
&lt;br /&gt;
===General Zoneminder Setup===&lt;br /&gt;
&lt;br /&gt;
;General:&lt;br /&gt;
:Name: IPCAM&lt;br /&gt;
:Source Type: Remote&lt;br /&gt;
:Function: Modect&lt;br /&gt;
:Enabled: Tick&lt;br /&gt;
:Maximum FPS: Empty&lt;br /&gt;
:Alarm Maximum FPS: Empty&lt;br /&gt;
;Source&lt;br /&gt;
:Remote Protocol: HTTP&lt;br /&gt;
:Remote Method: Simple&lt;br /&gt;
:Remote Host Name: x.x.x.x (The IP used by camera)&lt;br /&gt;
:Remote Host Port: 99 (The Port used by camera)&lt;br /&gt;
:Remote Host Path: /videostream.cgi?user=admin&amp;amp;pwd= (default user account)&lt;br /&gt;
:Remote Image Colours: 24 bit colour&lt;br /&gt;
:Capture Width: 320 (You could use 640 x 480, I found 320 to be better on wireles)&lt;br /&gt;
:Capture Height: 240&lt;br /&gt;
;Control&lt;br /&gt;
:Controllable: Tick&lt;br /&gt;
:Control Type: IPCAM (need to create this first using Edit link)&lt;br /&gt;
:Control Device: user=admin&amp;amp;pwd=&lt;br /&gt;
:Control Address: x.x.x.x:yy&lt;br /&gt;
&lt;br /&gt;
===Foscam Forum Topic===&lt;br /&gt;
Follow the foscam forum topic for the new script for original foscam and upgraded clones: http://foscam.us/forum/post44816.html#p44816&lt;br /&gt;
&lt;br /&gt;
===Control Setup===&lt;br /&gt;
&lt;br /&gt;
Create /usr/share/perl5/vendor_perl/ZoneMinder/Control/IPCAM.pm with following contents.  This script supports a superset of camera controls and should work with any Foscam compatible camera.  If your camera doesn&amp;#039;t have all features then they will be disabled in Zoneminder.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ==========================================================================&lt;br /&gt;
#&lt;br /&gt;
# ZoneMinder IPCAM Control Protocol Module, $Date: 2009-11-25 09:20:00 +0000 (Wed, 04 Nov 2009) $, $Revision: 0001 $&lt;br /&gt;
# Copyright (C) 2001-2008 Philip Coombes&lt;br /&gt;
# Modified for use with Foscam FI8918W IP Camera by Dave Harris&lt;br /&gt;
# Modified Feb 2011 by Howard Durdle (http://durdl.es/x) to:&lt;br /&gt;
#      fix horizontal panning, add presets and IR on/off&lt;br /&gt;
#      use Control Device field to pass username and password&lt;br /&gt;
# Modified June 5th, 2012 by Chris Bagwell to:&lt;br /&gt;
#   Rename to IPCAM since its common protocol with wide range of cameras.&lt;br /&gt;
#   Work with Logger module instead of Debug module.&lt;br /&gt;
#   Fix off-by-1 preset bug.&lt;br /&gt;
#   Support optional autostop timeout.&lt;br /&gt;
#   Add Zoom, Brightness, and Contrast support.&lt;br /&gt;
#&lt;br /&gt;
# This program is free software; you can redistribute it and/or&lt;br /&gt;
# modify it under the terms of the GNU General Public License&lt;br /&gt;
# as published by the Free Software Foundation; either version 2&lt;br /&gt;
# of the License, or (at your option) any later version.&lt;br /&gt;
#&lt;br /&gt;
# This program is distributed in the hope that it will be useful,&lt;br /&gt;
# but WITHOUT ANY WARRANTY; without even the implied warranty of&lt;br /&gt;
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the&lt;br /&gt;
# GNU General Public License for more details.&lt;br /&gt;
#&lt;br /&gt;
# You should have received a copy of the GNU General Public License&lt;br /&gt;
# along with this program; if not, write to the Free Software&lt;br /&gt;
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.&lt;br /&gt;
#&lt;br /&gt;
# ==========================================================================&lt;br /&gt;
#&lt;br /&gt;
# This module contains the implementation of the IPCAM camera control&lt;br /&gt;
# protocol.&lt;br /&gt;
#&lt;br /&gt;
# This is a protocol shared by a wide range of affordable cameras that&lt;br /&gt;
# appear to share similar reference design and software.  Examples&lt;br /&gt;
# include Foscam, Agasio, Wansview, etc.&lt;br /&gt;
#&lt;br /&gt;
# The basis for CGI based API can be found on internet by searching for&lt;br /&gt;
# &amp;quot;IPCAM CGI SDK 2.1&amp;quot;. Here is sample site that also developes replacement&lt;br /&gt;
# firmware for some hardware versions.&lt;br /&gt;
#&lt;br /&gt;
# http://www.openipcam.com/files/Manuals/IPCAM%20CGI%20SDK%202.1.pdf&lt;br /&gt;
#&lt;br /&gt;
package ZoneMinder::Control::IPCAM;&lt;br /&gt;
&lt;br /&gt;
use 5.006;&lt;br /&gt;
use strict;&lt;br /&gt;
use warnings;&lt;br /&gt;
&lt;br /&gt;
require ZoneMinder::Base;&lt;br /&gt;
require ZoneMinder::Control;&lt;br /&gt;
&lt;br /&gt;
our @ISA = qw(ZoneMinder::Control);&lt;br /&gt;
&lt;br /&gt;
our $VERSION = $ZoneMinder::Base::VERSION;&lt;br /&gt;
&lt;br /&gt;
# ==========================================================================&lt;br /&gt;
#&lt;br /&gt;
# IPCAM Control Protocol&lt;br /&gt;
#&lt;br /&gt;
# ==========================================================================&lt;br /&gt;
&lt;br /&gt;
use ZoneMinder::Logger qw(:all);&lt;br /&gt;
use ZoneMinder::Config qw(:all);&lt;br /&gt;
&lt;br /&gt;
use Time::HiRes qw( usleep );&lt;br /&gt;
&lt;br /&gt;
sub new&lt;br /&gt;
{&lt;br /&gt;
    my $class = shift;&lt;br /&gt;
    my $id = shift;&lt;br /&gt;
    my $self = ZoneMinder::Control-&amp;gt;new( $id );&lt;br /&gt;
    my $logindetails = &amp;quot;&amp;quot;;&lt;br /&gt;
    bless( $self, $class );&lt;br /&gt;
    srand( time() );&lt;br /&gt;
    return $self;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
our $AUTOLOAD;&lt;br /&gt;
&lt;br /&gt;
sub AUTOLOAD&lt;br /&gt;
{&lt;br /&gt;
    my $self = shift;&lt;br /&gt;
    my $class = ref($self) || croak( &amp;quot;$self not object&amp;quot; );&lt;br /&gt;
    my $name = $AUTOLOAD;&lt;br /&gt;
    $name =~ s/.*://;&lt;br /&gt;
    if ( exists($self-&amp;gt;{$name}) )&lt;br /&gt;
    {&lt;br /&gt;
	return( $self-&amp;gt;{$name} );&lt;br /&gt;
    }&lt;br /&gt;
    Fatal( &amp;quot;Can&amp;#039;t access $name member of object of class $class&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub open&lt;br /&gt;
{&lt;br /&gt;
    my $self = shift;&lt;br /&gt;
&lt;br /&gt;
    $self-&amp;gt;loadMonitor();&lt;br /&gt;
&lt;br /&gt;
    use LWP::UserAgent;&lt;br /&gt;
    $self-&amp;gt;{ua} = LWP::UserAgent-&amp;gt;new;&lt;br /&gt;
    $self-&amp;gt;{ua}-&amp;gt;agent( &amp;quot;ZoneMinder Control Agent/&amp;quot;.ZM_VERSION );&lt;br /&gt;
&lt;br /&gt;
    $self-&amp;gt;{state} = &amp;#039;open&amp;#039;;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub close&lt;br /&gt;
{&lt;br /&gt;
    my $self = shift;&lt;br /&gt;
    $self-&amp;gt;{state} = &amp;#039;closed&amp;#039;;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub printMsg&lt;br /&gt;
{&lt;br /&gt;
    my $self = shift;&lt;br /&gt;
    my $msg = shift;&lt;br /&gt;
    my $msg_len = length($msg);&lt;br /&gt;
&lt;br /&gt;
    Debug( $msg.&amp;quot;[&amp;quot;.$msg_len.&amp;quot;]&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub sendCmd&lt;br /&gt;
{&lt;br /&gt;
    my $self = shift;&lt;br /&gt;
    my $cmd = shift;&lt;br /&gt;
    my $result = undef;&lt;br /&gt;
    printMsg( $cmd, &amp;quot;Tx&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
    my $req = HTTP::Request-&amp;gt;new( GET=&amp;gt;&amp;quot;http://&amp;quot;.$self-&amp;gt;{Monitor}-&amp;gt;{ControlAddress}.&amp;quot;/$cmd&amp;quot;.$self-&amp;gt;{Monitor}-&amp;gt;{ControlDevice} );&lt;br /&gt;
    my $res = $self-&amp;gt;{ua}-&amp;gt;request($req);&lt;br /&gt;
&lt;br /&gt;
    if ( $res-&amp;gt;is_success )&lt;br /&gt;
    {&lt;br /&gt;
	$result = $res-&amp;gt;decoded_content;&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
	Error( &amp;quot;Error check failed:&amp;#039;&amp;quot;.$res-&amp;gt;status_line().&amp;quot;&amp;#039;&amp;quot; );&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    return( $result );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# Turn IO on (can be internally wired to IR&amp;#039;s)&lt;br /&gt;
sub wake&lt;br /&gt;
{&lt;br /&gt;
    my $self = shift;&lt;br /&gt;
    Debug( &amp;quot;Wake - IO on&amp;quot; );&lt;br /&gt;
    my $cmd = &amp;quot;decoder_control.cgi?command=95&amp;amp;&amp;quot;;&lt;br /&gt;
    $self-&amp;gt;sendCmd( $cmd );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# Turn IO off (can be internally wired to IR&amp;#039;s)&lt;br /&gt;
sub sleep&lt;br /&gt;
{&lt;br /&gt;
    my $self = shift;&lt;br /&gt;
    Debug( &amp;quot;Sleep - IO off&amp;quot; );&lt;br /&gt;
    my $cmd = &amp;quot;decoder_control.cgi?command=94&amp;amp;&amp;quot;;&lt;br /&gt;
    $self-&amp;gt;sendCmd( $cmd );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub reset&lt;br /&gt;
{&lt;br /&gt;
    my $self = shift;&lt;br /&gt;
    Debug( &amp;quot;Camera Reset&amp;quot; );&lt;br /&gt;
    my $cmd = &amp;quot;reboot.cgi?&amp;quot;;&lt;br /&gt;
    $self-&amp;gt;sendCmd( $cmd );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub moveConUp&lt;br /&gt;
{&lt;br /&gt;
    my $self = shift;&lt;br /&gt;
    my $params = shift;&lt;br /&gt;
    Debug( &amp;quot;Move Up&amp;quot; );&lt;br /&gt;
    my $cmd = &amp;quot;decoder_control.cgi?command=0&amp;amp;&amp;quot;;&lt;br /&gt;
    $self-&amp;gt;sendCmd( $cmd );&lt;br /&gt;
    my $autostop = $self-&amp;gt;getParam( $params, &amp;#039;autostop&amp;#039;, 0 );&lt;br /&gt;
    if ( $autostop &amp;amp;&amp;amp; $self-&amp;gt;{Monitor}-&amp;gt;{AutoStopTimeout} )&lt;br /&gt;
    {&lt;br /&gt;
        usleep( $self-&amp;gt;{Monitor}-&amp;gt;{AutoStopTimeout} );&lt;br /&gt;
        $self-&amp;gt;moveStop( $params );&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub moveConDown&lt;br /&gt;
{&lt;br /&gt;
    my $self = shift;&lt;br /&gt;
    my $params = shift;&lt;br /&gt;
    Debug( &amp;quot;Move Down&amp;quot; );&lt;br /&gt;
    my $cmd = &amp;quot;decoder_control.cgi?command=2&amp;amp;&amp;quot;;&lt;br /&gt;
    $self-&amp;gt;sendCmd( $cmd );&lt;br /&gt;
    my $autostop = $self-&amp;gt;getParam( $params, &amp;#039;autostop&amp;#039;, 0 );&lt;br /&gt;
    if ( $autostop &amp;amp;&amp;amp; $self-&amp;gt;{Monitor}-&amp;gt;{AutoStopTimeout} )&lt;br /&gt;
    {&lt;br /&gt;
        usleep( $self-&amp;gt;{Monitor}-&amp;gt;{AutoStopTimeout} );&lt;br /&gt;
        $self-&amp;gt;moveStop( $params );&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub moveConRight&lt;br /&gt;
{&lt;br /&gt;
    my $self = shift;&lt;br /&gt;
    my $params = shift;&lt;br /&gt;
    Debug( &amp;quot;Move Right&amp;quot; );&lt;br /&gt;
    my $cmd = &amp;quot;decoder_control.cgi?command=6&amp;amp;&amp;quot;;&lt;br /&gt;
    $self-&amp;gt;sendCmd( $cmd );&lt;br /&gt;
    my $autostop = $self-&amp;gt;getParam( $params, &amp;#039;autostop&amp;#039;, 0 );&lt;br /&gt;
    if ( $autostop &amp;amp;&amp;amp; $self-&amp;gt;{Monitor}-&amp;gt;{AutoStopTimeout} )&lt;br /&gt;
    {&lt;br /&gt;
        usleep( $self-&amp;gt;{Monitor}-&amp;gt;{AutoStopTimeout} );&lt;br /&gt;
        $self-&amp;gt;moveStop( $params );&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub moveConLeft&lt;br /&gt;
{&lt;br /&gt;
    my $self = shift;&lt;br /&gt;
    my $params = shift;&lt;br /&gt;
    Debug( &amp;quot;Move Left&amp;quot; );&lt;br /&gt;
    my $cmd = &amp;quot;decoder_control.cgi?command=4&amp;amp;&amp;quot;;&lt;br /&gt;
    $self-&amp;gt;sendCmd( $cmd );&lt;br /&gt;
    my $autostop = $self-&amp;gt;getParam( $params, &amp;#039;autostop&amp;#039;, 0 );&lt;br /&gt;
    if ( $autostop &amp;amp;&amp;amp; $self-&amp;gt;{Monitor}-&amp;gt;{AutoStopTimeout} )&lt;br /&gt;
    {&lt;br /&gt;
        usleep( $self-&amp;gt;{Monitor}-&amp;gt;{AutoStopTimeout} );&lt;br /&gt;
        $self-&amp;gt;moveStop( $params );&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub moveConUpLeft&lt;br /&gt;
{&lt;br /&gt;
    my $self = shift;&lt;br /&gt;
    my $params = shift;&lt;br /&gt;
    Debug( &amp;quot;Move Diagonally Up Left&amp;quot; );&lt;br /&gt;
    my $cmd = &amp;quot;decoder_control.cgi?command=90&amp;amp;&amp;quot;;&lt;br /&gt;
    $self-&amp;gt;sendCmd( $cmd );&lt;br /&gt;
    my $autostop = $self-&amp;gt;getParam( $params, &amp;#039;autostop&amp;#039;, 0 );&lt;br /&gt;
    if ( $autostop &amp;amp;&amp;amp; $self-&amp;gt;{Monitor}-&amp;gt;{AutoStopTimeout} )&lt;br /&gt;
    {&lt;br /&gt;
        usleep( $self-&amp;gt;{Monitor}-&amp;gt;{AutoStopTimeout} );&lt;br /&gt;
        $self-&amp;gt;moveStop( $params );&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub moveConDownLeft&lt;br /&gt;
{&lt;br /&gt;
    my $self = shift;&lt;br /&gt;
    my $params = shift;&lt;br /&gt;
    Debug( &amp;quot;Move Diagonally Down Left&amp;quot; );&lt;br /&gt;
    my $cmd = &amp;quot;decoder_control.cgi?command=92&amp;amp;&amp;quot;;&lt;br /&gt;
    $self-&amp;gt;sendCmd( $cmd );&lt;br /&gt;
    my $autostop = $self-&amp;gt;getParam( $params, &amp;#039;autostop&amp;#039;, 0 );&lt;br /&gt;
    if ( $autostop &amp;amp;&amp;amp; $self-&amp;gt;{Monitor}-&amp;gt;{AutoStopTimeout} )&lt;br /&gt;
    {&lt;br /&gt;
        usleep( $self-&amp;gt;{Monitor}-&amp;gt;{AutoStopTimeout} );&lt;br /&gt;
        $self-&amp;gt;moveStop( $params );&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub moveConUpRight&lt;br /&gt;
{&lt;br /&gt;
    my $self = shift;&lt;br /&gt;
    my $params = shift;&lt;br /&gt;
    Debug( &amp;quot;Move Diagonally Up Right&amp;quot; );&lt;br /&gt;
    my $cmd = &amp;quot;decoder_control.cgi?command=91&amp;amp;&amp;quot;;&lt;br /&gt;
    $self-&amp;gt;sendCmd( $cmd );&lt;br /&gt;
    my $autostop = $self-&amp;gt;getParam( $params, &amp;#039;autostop&amp;#039;, 0 );&lt;br /&gt;
    if ( $autostop &amp;amp;&amp;amp; $self-&amp;gt;{Monitor}-&amp;gt;{AutoStopTimeout} )&lt;br /&gt;
    {&lt;br /&gt;
        usleep( $self-&amp;gt;{Monitor}-&amp;gt;{AutoStopTimeout} );&lt;br /&gt;
        $self-&amp;gt;moveStop( $params );&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub moveConDownRight&lt;br /&gt;
{&lt;br /&gt;
    my $self = shift;&lt;br /&gt;
    my $params = shift;&lt;br /&gt;
    Debug( &amp;quot;Move Diagonally Down Right&amp;quot; );&lt;br /&gt;
    my $cmd = &amp;quot;decoder_control.cgi?command=93&amp;amp;&amp;quot;;&lt;br /&gt;
    $self-&amp;gt;sendCmd( $cmd );&lt;br /&gt;
    my $autostop = $self-&amp;gt;getParam( $params, &amp;#039;autostop&amp;#039;, 0 );&lt;br /&gt;
    if ( $autostop &amp;amp;&amp;amp; $self-&amp;gt;{Monitor}-&amp;gt;{AutoStopTimeout} )&lt;br /&gt;
    {&lt;br /&gt;
        usleep( $self-&amp;gt;{Monitor}-&amp;gt;{AutoStopTimeout} );&lt;br /&gt;
        $self-&amp;gt;moveStop( $params );&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# command=1 is technically Up Stop but seems to work for all stops.&lt;br /&gt;
sub moveStop&lt;br /&gt;
{&lt;br /&gt;
    my $self = shift;&lt;br /&gt;
    Debug( &amp;quot;Move Stop&amp;quot; );&lt;br /&gt;
    print(&amp;quot;autostop\n&amp;quot;);&lt;br /&gt;
    my $cmd = &amp;quot;decoder_control.cgi?command=1&amp;amp;&amp;quot;;&lt;br /&gt;
    $self-&amp;gt;sendCmd( $cmd );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub zoomConTele&lt;br /&gt;
{&lt;br /&gt;
    my $self = shift;&lt;br /&gt;
    my $params = shift;&lt;br /&gt;
    Debug( &amp;quot;Zoom Tele&amp;quot; );&lt;br /&gt;
    my $cmd = &amp;quot;decoder_control.cgi?command=16&amp;amp;&amp;quot;;&lt;br /&gt;
    $self-&amp;gt;sendCmd( $cmd );&lt;br /&gt;
    my $autostop = $self-&amp;gt;getParam( $params, &amp;#039;autostop&amp;#039;, 0 );&lt;br /&gt;
    if ( $autostop &amp;amp;&amp;amp; $self-&amp;gt;{Monitor}-&amp;gt;{AutoStopTimeout} )&lt;br /&gt;
    {&lt;br /&gt;
        usleep( $self-&amp;gt;{Monitor}-&amp;gt;{AutoStopTimeout} );&lt;br /&gt;
	$cmd = &amp;quot;decoder_control.cgi?command=17&amp;amp;&amp;quot;;&lt;br /&gt;
	$self-&amp;gt;sendCmd( $cmd );&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub zoomConWide&lt;br /&gt;
{&lt;br /&gt;
    my $self = shift;&lt;br /&gt;
    my $params = shift;&lt;br /&gt;
    Debug( &amp;quot;Zoom Wide&amp;quot; );&lt;br /&gt;
    my $cmd = &amp;quot;decoder_control.cgi?command=18&amp;amp;&amp;quot;;&lt;br /&gt;
    $self-&amp;gt;sendCmd( $cmd );&lt;br /&gt;
    my $autostop = $self-&amp;gt;getParam( $params, &amp;#039;autostop&amp;#039;, 0 );&lt;br /&gt;
    if ( $autostop &amp;amp;&amp;amp; $self-&amp;gt;{Monitor}-&amp;gt;{AutoStopTimeout} )&lt;br /&gt;
    {&lt;br /&gt;
        usleep( $self-&amp;gt;{Monitor}-&amp;gt;{AutoStopTimeout} );&lt;br /&gt;
	$cmd = &amp;quot;decoder_control.cgi?command=19&amp;amp;&amp;quot;;&lt;br /&gt;
	$self-&amp;gt;sendCmd( $cmd );&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub zoomConStop&lt;br /&gt;
{&lt;br /&gt;
    my $self = shift;&lt;br /&gt;
    my $params = shift;&lt;br /&gt;
    Debug( &amp;quot;Zoom Stop&amp;quot; );&lt;br /&gt;
    my $cmd = &amp;quot;decoder_control.cgi?command=17&amp;amp;&amp;quot;;&lt;br /&gt;
    $self-&amp;gt;sendCmd( $cmd );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# Increase Brightness&lt;br /&gt;
sub irisAbsOpen&lt;br /&gt;
{&lt;br /&gt;
    my $self = shift;&lt;br /&gt;
    my $params = shift;&lt;br /&gt;
    my $step = $self-&amp;gt;getParam( $params, &amp;#039;step&amp;#039; );&lt;br /&gt;
    my $brightness = 100;&lt;br /&gt;
&lt;br /&gt;
    my $cmd = &amp;quot;get_camera_params.cgi?&amp;quot;;&lt;br /&gt;
    my $resp = $self-&amp;gt;sendCmd( $cmd );&lt;br /&gt;
&lt;br /&gt;
    $brightness = int($1) if ( $resp =~ m/var brightness=([0-9]*);/ );&lt;br /&gt;
    $brightness += $step;&lt;br /&gt;
    $brightness = 255 if ($brightness &amp;gt; 255);&lt;br /&gt;
    Debug( &amp;quot;Iris Open $brightness&amp;quot; );&lt;br /&gt;
    $cmd = &amp;quot;camera_control.cgi?param=1&amp;amp;value=&amp;quot;.$brightness.&amp;quot;&amp;amp;&amp;quot;;&lt;br /&gt;
    $self-&amp;gt;sendCmd( $cmd );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# Decrease Brightness&lt;br /&gt;
sub irisAbsClose&lt;br /&gt;
{&lt;br /&gt;
    my $self = shift;&lt;br /&gt;
    my $params = shift;&lt;br /&gt;
    my $step = $self-&amp;gt;getParam( $params, &amp;#039;step&amp;#039; );&lt;br /&gt;
    my $brightness = 100;&lt;br /&gt;
&lt;br /&gt;
    my $cmd = &amp;quot;get_camera_params.cgi?&amp;quot;;&lt;br /&gt;
    my $resp = $self-&amp;gt;sendCmd( $cmd );&lt;br /&gt;
&lt;br /&gt;
    $brightness = int($1) if ( $resp =~ m/var brightness=([0-9]*);/ );&lt;br /&gt;
    $brightness -= $step;&lt;br /&gt;
    $brightness = 0 if ($brightness &amp;lt; 0);&lt;br /&gt;
    Debug( &amp;quot;Iris Close $brightness&amp;quot; );&lt;br /&gt;
    $cmd = &amp;quot;camera_control.cgi?param=1&amp;amp;value=&amp;quot;.$brightness.&amp;quot;&amp;amp;&amp;quot;;&lt;br /&gt;
    $self-&amp;gt;sendCmd( $cmd );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub whiteAbsIn&lt;br /&gt;
{&lt;br /&gt;
    my $self = shift;&lt;br /&gt;
    my $params = shift;&lt;br /&gt;
    my $step = $self-&amp;gt;getParam( $params, &amp;#039;step&amp;#039; );&lt;br /&gt;
    my $contrast = 5;&lt;br /&gt;
&lt;br /&gt;
    my $cmd = &amp;quot;get_camera_params.cgi?&amp;quot;;&lt;br /&gt;
    my $resp = $self-&amp;gt;sendCmd( $cmd );&lt;br /&gt;
&lt;br /&gt;
    $contrast = int($1) if ( $resp =~ m/var contrast=([0-9]*);/ );&lt;br /&gt;
    $contrast += $step;&lt;br /&gt;
    $contrast = 6 if ($contrast &amp;gt; 6);&lt;br /&gt;
    Debug( &amp;quot;White In $contrast&amp;quot; );&lt;br /&gt;
    $cmd = &amp;quot;camera_control.cgi?param=2&amp;amp;value=&amp;quot;.$contrast.&amp;quot;&amp;amp;&amp;quot;;&lt;br /&gt;
    $self-&amp;gt;sendCmd( $cmd );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# Decrease Contrast&lt;br /&gt;
sub whiteAbsOut&lt;br /&gt;
{&lt;br /&gt;
    my $self = shift;&lt;br /&gt;
    my $params = shift;&lt;br /&gt;
    my $step = $self-&amp;gt;getParam( $params, &amp;#039;step&amp;#039; );&lt;br /&gt;
    my $contrast = 5;&lt;br /&gt;
&lt;br /&gt;
    my $cmd = &amp;quot;get_camera_params.cgi?&amp;quot;;&lt;br /&gt;
    my $resp = $self-&amp;gt;sendCmd( $cmd );&lt;br /&gt;
&lt;br /&gt;
    $contrast = int($1) if ( $resp =~ m/var contrast=([0-9]*);/ );&lt;br /&gt;
    $contrast -= $step;&lt;br /&gt;
    $contrast = 0 if ($contrast &amp;lt; 0);&lt;br /&gt;
    Debug( &amp;quot;White Out $contrast&amp;quot; );&lt;br /&gt;
    $cmd = &amp;quot;camera_control.cgi?param=2&amp;amp;value=&amp;quot;.$contrast.&amp;quot;&amp;amp;&amp;quot;;&lt;br /&gt;
    $self-&amp;gt;sendCmd( $cmd );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub presetHome&lt;br /&gt;
{&lt;br /&gt;
    my $self = shift;&lt;br /&gt;
    Debug( &amp;quot;Home Preset&amp;quot; );&lt;br /&gt;
    my $cmd = &amp;quot;decoder_control.cgi?command=25&amp;amp;&amp;quot;;&lt;br /&gt;
    $self-&amp;gt;sendCmd( $cmd );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub presetSet&lt;br /&gt;
{&lt;br /&gt;
    my $self = shift;&lt;br /&gt;
    my $params = shift;&lt;br /&gt;
    my $preset = $self-&amp;gt;getParam( $params, &amp;#039;preset&amp;#039; );&lt;br /&gt;
    my $presetCmd = 30 + (($preset-1)*2);&lt;br /&gt;
    Debug( &amp;quot;Set Preset $preset with cmd $presetCmd&amp;quot; );&lt;br /&gt;
    my $cmd = &amp;quot;decoder_control.cgi?command=$presetCmd&amp;amp;&amp;quot;;&lt;br /&gt;
    $self-&amp;gt;sendCmd( $cmd );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub presetGoto&lt;br /&gt;
{&lt;br /&gt;
    my $self = shift;&lt;br /&gt;
    my $params = shift;&lt;br /&gt;
    my $preset = $self-&amp;gt;getParam( $params, &amp;#039;preset&amp;#039; );&lt;br /&gt;
    my $presetCmd = 31 + (($preset-1)*2);&lt;br /&gt;
    Debug( &amp;quot;Goto Preset $preset with cmd $presetCmd&amp;quot; );&lt;br /&gt;
    my $cmd = &amp;quot;decoder_control.cgi?command=$presetCmd&amp;amp;&amp;quot;;&lt;br /&gt;
    $self-&amp;gt;sendCmd( $cmd );&lt;br /&gt;
}&lt;br /&gt;
1;&lt;br /&gt;
__END__&lt;br /&gt;
# Below is stub documentation for your module. You&amp;#039;d better edit it!&lt;br /&gt;
&lt;br /&gt;
=head1 NAME&lt;br /&gt;
&lt;br /&gt;
ZoneMinder::Database - Perl extension for blah blah blah&lt;br /&gt;
&lt;br /&gt;
=head1 SYNOPSIS&lt;br /&gt;
&lt;br /&gt;
  use ZoneMinder::Database;&lt;br /&gt;
  blah blah blah&lt;br /&gt;
&lt;br /&gt;
=head1 DESCRIPTION&lt;br /&gt;
&lt;br /&gt;
Stub documentation for ZoneMinder, created by h2xs. It looks like the&lt;br /&gt;
author of the extension was negligent enough to leave the stub&lt;br /&gt;
unedited.&lt;br /&gt;
&lt;br /&gt;
Blah blah blah.&lt;br /&gt;
&lt;br /&gt;
=head2 EXPORT&lt;br /&gt;
&lt;br /&gt;
None by default.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=head1 SEE ALSO&lt;br /&gt;
&lt;br /&gt;
Mention other useful documentation such as the documentation of&lt;br /&gt;
related modules or operating system documentation (such as man pages&lt;br /&gt;
in UNIX), or any relevant external documentation such as RFCs or&lt;br /&gt;
standards.&lt;br /&gt;
&lt;br /&gt;
If you have a mailing list set up for your module, mention it here.&lt;br /&gt;
&lt;br /&gt;
If you have a web site set up for your module, mention it here.&lt;br /&gt;
&lt;br /&gt;
=head1 AUTHOR&lt;br /&gt;
&lt;br /&gt;
Philip Coombes, E&amp;lt;lt&amp;gt;philip.coombes@zoneminder.comE&amp;lt;gt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=head1 COPYRIGHT AND LICENSE&lt;br /&gt;
&lt;br /&gt;
Copyright (C) 2001-2008  Philip Coombes&lt;br /&gt;
&lt;br /&gt;
This library is free software; you can redistribute it and/or modify&lt;br /&gt;
it under the same terms as Perl itself, either Perl version 5.8.3 or,&lt;br /&gt;
at your option, any later version of Perl 5 you may have available.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=cut&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From here, Zoneminder must be configured to know about IPCAM controls.  This is done by clicking the &amp;quot;Edit&amp;quot; link pointed out during general setup and then on the &amp;quot;Add New Control&amp;quot; button on new window.&lt;br /&gt;
&lt;br /&gt;
;Main&lt;br /&gt;
:Name: IPCAM&lt;br /&gt;
:Type: Remote&lt;br /&gt;
:Protocol: IPCAM&lt;br /&gt;
:Can Wake: Tick&lt;br /&gt;
:Can Sleep: Tick&lt;br /&gt;
:Can Reset: Tick&lt;br /&gt;
;Move&lt;br /&gt;
:Can Move: Tick&lt;br /&gt;
:Can Move Diagonally: Tick&lt;br /&gt;
:Can Move Continous: Tick&lt;br /&gt;
;Pan&lt;br /&gt;
:Can Pan: Tick&lt;br /&gt;
;Tilt&lt;br /&gt;
:Can Tilt: Tick&lt;br /&gt;
;Zoom&lt;br /&gt;
:Can Zoom: Tick&lt;br /&gt;
:Can Zoom Continous: Tick&lt;br /&gt;
;White&lt;br /&gt;
:Can White Balance: Tick&lt;br /&gt;
:Can White Balance Absolute: Tick&lt;br /&gt;
:Min White Bal. Range: 1&lt;br /&gt;
:Max White Bal. Range: 255&lt;br /&gt;
:Min White Bal. Step: 1&lt;br /&gt;
:Max White Bal. Step: 255&lt;br /&gt;
;Iris&lt;br /&gt;
:Can Iris: Tick&lt;br /&gt;
:Can Iris Absolute: Tick&lt;br /&gt;
:Min Iris Range: 1&lt;br /&gt;
:Max Iris Range: 6&lt;br /&gt;
:Min Iris Step: 1&lt;br /&gt;
:Max Iris Step: 6&lt;br /&gt;
;Presets&lt;br /&gt;
:Has Presets: Tick&lt;br /&gt;
:Num Presets: 16&lt;br /&gt;
:Has Home Preset: Tick&lt;br /&gt;
:Can Set Presets: Tick&lt;br /&gt;
&lt;br /&gt;
Wake/Sleep control is mapped to IO ON/OFF Control.  IO Control is sometimes used for IR LED Controls. If your camera does not support IO ON/OFF Control then leave the Wake/Sleep boxes unticked.&lt;br /&gt;
&lt;br /&gt;
If your camera does not support Zoom then leave Has Zoom unticked.&lt;br /&gt;
&lt;br /&gt;
The camera Tilt/Pan will work different then cameras Web interface.  It will continously move until you click the middle circle to stop movement.  If you prefer, you can set a non-zero value in the &amp;quot;Track Delay&amp;quot; box on Control tab so that movement will automatically stop after specified delay.&lt;br /&gt;
&lt;br /&gt;
It would require an update to Zoneminder to behave like stock web interface.  It sends Start Move on initial click and then Stop Move upon click release.  That seems like a nice feature to build into Zoneminder to me.&lt;/div&gt;</summary>
		<author><name>Sagitt</name></author>
	</entry>
	<entry>
		<id>http://wiki.staging.zoneminder.com/index.php?title=Foscam_Clones&amp;diff=6147</id>
		<title>Foscam Clones</title>
		<link rel="alternate" type="text/html" href="http://wiki.staging.zoneminder.com/index.php?title=Foscam_Clones&amp;diff=6147"/>
		<updated>2014-04-21T19:50:41Z</updated>

		<summary type="html">&lt;p&gt;Sagitt: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Overview===&lt;br /&gt;
&lt;br /&gt;
Foscam is one of the more popular makers of wireless IP Cameras priced towards the lower end of price ranges.  Any other IP cameria that is compatible with Foscam tend to be called Foscam clones because of their popularity.  Its also common to see compatible cameras called Unbranded IP Cameras or Chinese IP Cameras.&lt;br /&gt;
&lt;br /&gt;
You can often tell the clones based on feature set alone.  Cameras in this class support 3 resolutions (640x480, 320x240, 160x120), 3 frame rates (60Hz, 50Hz, and Outdoor), Pan+Tilt and either Zoom or Nightvision or both, ability to email and FTP images during motion detection, and streaming video to VLC client.  There are more optional features but these are usually enough to detect clones.&lt;br /&gt;
&lt;br /&gt;
These cameras tend to use similar set of hardware components and share a once common firmware code base.  You can search for &amp;quot;Open IP Camera&amp;quot; for more information related to firmware and hardware.&lt;br /&gt;
&lt;br /&gt;
Most information about interacting with these cameras can be found by searching for a PDF called &amp;quot;IPCAM CGI SDK 2.1&amp;quot;.  I also found it useful to use Firefox to monitor the requests posted to camera as I clicked on its web interface.  You can do this by enabling Web Developer-&amp;gt;Web Console menu option.&lt;br /&gt;
&lt;br /&gt;
The following was tested on a Agasio a622w but should work with other brands of wireless IP cameras such as Foscam, EasyN, Wansview, and more.&lt;br /&gt;
&lt;br /&gt;
===General Zoneminder Setup===&lt;br /&gt;
&lt;br /&gt;
;General:&lt;br /&gt;
:Name: IPCAM&lt;br /&gt;
:Source Type: Remote&lt;br /&gt;
:Function: Modect&lt;br /&gt;
:Enabled: Tick&lt;br /&gt;
:Maximum FPS: Empty&lt;br /&gt;
:Alarm Maximum FPS: Empty&lt;br /&gt;
;Source&lt;br /&gt;
:Remote Protocol: HTTP&lt;br /&gt;
:Remote Method: Simple&lt;br /&gt;
:Remote Host Name: x.x.x.x (The IP used by camera)&lt;br /&gt;
:Remote Host Port: 99 (The Port used by camera)&lt;br /&gt;
:Remote Host Path: /videostream.cgi?user=admin&amp;amp;pwd= (default user account)&lt;br /&gt;
:Remote Image Colours: 24 bit colour&lt;br /&gt;
:Capture Width: 320 (You could use 640 x 480, I found 320 to be better on wireles)&lt;br /&gt;
:Capture Height: 240&lt;br /&gt;
;Control&lt;br /&gt;
:Controllable: Tick&lt;br /&gt;
:Control Type: IPCAM (need to create this first using Edit link)&lt;br /&gt;
:Control Device: user=admin&amp;amp;pwd=&lt;br /&gt;
:Control Address: x.x.x.x:yy&lt;br /&gt;
&lt;br /&gt;
===Foscam Forum Topic===&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;See here for more information about new script for original foscam and upgraded clones: http://foscam.us/forum/post44816.html#p44816&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
===Control Setup===&lt;br /&gt;
&lt;br /&gt;
Create /usr/share/perl5/vendor_perl/ZoneMinder/Control/IPCAM.pm with following contents.  This script supports a superset of camera controls and should work with any Foscam compatible camera.  If your camera doesn&amp;#039;t have all features then they will be disabled in Zoneminder.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ==========================================================================&lt;br /&gt;
#&lt;br /&gt;
# ZoneMinder IPCAM Control Protocol Module, $Date: 2009-11-25 09:20:00 +0000 (Wed, 04 Nov 2009) $, $Revision: 0001 $&lt;br /&gt;
# Copyright (C) 2001-2008 Philip Coombes&lt;br /&gt;
# Modified for use with Foscam FI8918W IP Camera by Dave Harris&lt;br /&gt;
# Modified Feb 2011 by Howard Durdle (http://durdl.es/x) to:&lt;br /&gt;
#      fix horizontal panning, add presets and IR on/off&lt;br /&gt;
#      use Control Device field to pass username and password&lt;br /&gt;
# Modified June 5th, 2012 by Chris Bagwell to:&lt;br /&gt;
#   Rename to IPCAM since its common protocol with wide range of cameras.&lt;br /&gt;
#   Work with Logger module instead of Debug module.&lt;br /&gt;
#   Fix off-by-1 preset bug.&lt;br /&gt;
#   Support optional autostop timeout.&lt;br /&gt;
#   Add Zoom, Brightness, and Contrast support.&lt;br /&gt;
#&lt;br /&gt;
# This program is free software; you can redistribute it and/or&lt;br /&gt;
# modify it under the terms of the GNU General Public License&lt;br /&gt;
# as published by the Free Software Foundation; either version 2&lt;br /&gt;
# of the License, or (at your option) any later version.&lt;br /&gt;
#&lt;br /&gt;
# This program is distributed in the hope that it will be useful,&lt;br /&gt;
# but WITHOUT ANY WARRANTY; without even the implied warranty of&lt;br /&gt;
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the&lt;br /&gt;
# GNU General Public License for more details.&lt;br /&gt;
#&lt;br /&gt;
# You should have received a copy of the GNU General Public License&lt;br /&gt;
# along with this program; if not, write to the Free Software&lt;br /&gt;
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.&lt;br /&gt;
#&lt;br /&gt;
# ==========================================================================&lt;br /&gt;
#&lt;br /&gt;
# This module contains the implementation of the IPCAM camera control&lt;br /&gt;
# protocol.&lt;br /&gt;
#&lt;br /&gt;
# This is a protocol shared by a wide range of affordable cameras that&lt;br /&gt;
# appear to share similar reference design and software.  Examples&lt;br /&gt;
# include Foscam, Agasio, Wansview, etc.&lt;br /&gt;
#&lt;br /&gt;
# The basis for CGI based API can be found on internet by searching for&lt;br /&gt;
# &amp;quot;IPCAM CGI SDK 2.1&amp;quot;. Here is sample site that also developes replacement&lt;br /&gt;
# firmware for some hardware versions.&lt;br /&gt;
#&lt;br /&gt;
# http://www.openipcam.com/files/Manuals/IPCAM%20CGI%20SDK%202.1.pdf&lt;br /&gt;
#&lt;br /&gt;
package ZoneMinder::Control::IPCAM;&lt;br /&gt;
&lt;br /&gt;
use 5.006;&lt;br /&gt;
use strict;&lt;br /&gt;
use warnings;&lt;br /&gt;
&lt;br /&gt;
require ZoneMinder::Base;&lt;br /&gt;
require ZoneMinder::Control;&lt;br /&gt;
&lt;br /&gt;
our @ISA = qw(ZoneMinder::Control);&lt;br /&gt;
&lt;br /&gt;
our $VERSION = $ZoneMinder::Base::VERSION;&lt;br /&gt;
&lt;br /&gt;
# ==========================================================================&lt;br /&gt;
#&lt;br /&gt;
# IPCAM Control Protocol&lt;br /&gt;
#&lt;br /&gt;
# ==========================================================================&lt;br /&gt;
&lt;br /&gt;
use ZoneMinder::Logger qw(:all);&lt;br /&gt;
use ZoneMinder::Config qw(:all);&lt;br /&gt;
&lt;br /&gt;
use Time::HiRes qw( usleep );&lt;br /&gt;
&lt;br /&gt;
sub new&lt;br /&gt;
{&lt;br /&gt;
    my $class = shift;&lt;br /&gt;
    my $id = shift;&lt;br /&gt;
    my $self = ZoneMinder::Control-&amp;gt;new( $id );&lt;br /&gt;
    my $logindetails = &amp;quot;&amp;quot;;&lt;br /&gt;
    bless( $self, $class );&lt;br /&gt;
    srand( time() );&lt;br /&gt;
    return $self;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
our $AUTOLOAD;&lt;br /&gt;
&lt;br /&gt;
sub AUTOLOAD&lt;br /&gt;
{&lt;br /&gt;
    my $self = shift;&lt;br /&gt;
    my $class = ref($self) || croak( &amp;quot;$self not object&amp;quot; );&lt;br /&gt;
    my $name = $AUTOLOAD;&lt;br /&gt;
    $name =~ s/.*://;&lt;br /&gt;
    if ( exists($self-&amp;gt;{$name}) )&lt;br /&gt;
    {&lt;br /&gt;
	return( $self-&amp;gt;{$name} );&lt;br /&gt;
    }&lt;br /&gt;
    Fatal( &amp;quot;Can&amp;#039;t access $name member of object of class $class&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub open&lt;br /&gt;
{&lt;br /&gt;
    my $self = shift;&lt;br /&gt;
&lt;br /&gt;
    $self-&amp;gt;loadMonitor();&lt;br /&gt;
&lt;br /&gt;
    use LWP::UserAgent;&lt;br /&gt;
    $self-&amp;gt;{ua} = LWP::UserAgent-&amp;gt;new;&lt;br /&gt;
    $self-&amp;gt;{ua}-&amp;gt;agent( &amp;quot;ZoneMinder Control Agent/&amp;quot;.ZM_VERSION );&lt;br /&gt;
&lt;br /&gt;
    $self-&amp;gt;{state} = &amp;#039;open&amp;#039;;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub close&lt;br /&gt;
{&lt;br /&gt;
    my $self = shift;&lt;br /&gt;
    $self-&amp;gt;{state} = &amp;#039;closed&amp;#039;;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub printMsg&lt;br /&gt;
{&lt;br /&gt;
    my $self = shift;&lt;br /&gt;
    my $msg = shift;&lt;br /&gt;
    my $msg_len = length($msg);&lt;br /&gt;
&lt;br /&gt;
    Debug( $msg.&amp;quot;[&amp;quot;.$msg_len.&amp;quot;]&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub sendCmd&lt;br /&gt;
{&lt;br /&gt;
    my $self = shift;&lt;br /&gt;
    my $cmd = shift;&lt;br /&gt;
    my $result = undef;&lt;br /&gt;
    printMsg( $cmd, &amp;quot;Tx&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
    my $req = HTTP::Request-&amp;gt;new( GET=&amp;gt;&amp;quot;http://&amp;quot;.$self-&amp;gt;{Monitor}-&amp;gt;{ControlAddress}.&amp;quot;/$cmd&amp;quot;.$self-&amp;gt;{Monitor}-&amp;gt;{ControlDevice} );&lt;br /&gt;
    my $res = $self-&amp;gt;{ua}-&amp;gt;request($req);&lt;br /&gt;
&lt;br /&gt;
    if ( $res-&amp;gt;is_success )&lt;br /&gt;
    {&lt;br /&gt;
	$result = $res-&amp;gt;decoded_content;&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
	Error( &amp;quot;Error check failed:&amp;#039;&amp;quot;.$res-&amp;gt;status_line().&amp;quot;&amp;#039;&amp;quot; );&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    return( $result );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# Turn IO on (can be internally wired to IR&amp;#039;s)&lt;br /&gt;
sub wake&lt;br /&gt;
{&lt;br /&gt;
    my $self = shift;&lt;br /&gt;
    Debug( &amp;quot;Wake - IO on&amp;quot; );&lt;br /&gt;
    my $cmd = &amp;quot;decoder_control.cgi?command=95&amp;amp;&amp;quot;;&lt;br /&gt;
    $self-&amp;gt;sendCmd( $cmd );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# Turn IO off (can be internally wired to IR&amp;#039;s)&lt;br /&gt;
sub sleep&lt;br /&gt;
{&lt;br /&gt;
    my $self = shift;&lt;br /&gt;
    Debug( &amp;quot;Sleep - IO off&amp;quot; );&lt;br /&gt;
    my $cmd = &amp;quot;decoder_control.cgi?command=94&amp;amp;&amp;quot;;&lt;br /&gt;
    $self-&amp;gt;sendCmd( $cmd );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub reset&lt;br /&gt;
{&lt;br /&gt;
    my $self = shift;&lt;br /&gt;
    Debug( &amp;quot;Camera Reset&amp;quot; );&lt;br /&gt;
    my $cmd = &amp;quot;reboot.cgi?&amp;quot;;&lt;br /&gt;
    $self-&amp;gt;sendCmd( $cmd );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub moveConUp&lt;br /&gt;
{&lt;br /&gt;
    my $self = shift;&lt;br /&gt;
    my $params = shift;&lt;br /&gt;
    Debug( &amp;quot;Move Up&amp;quot; );&lt;br /&gt;
    my $cmd = &amp;quot;decoder_control.cgi?command=0&amp;amp;&amp;quot;;&lt;br /&gt;
    $self-&amp;gt;sendCmd( $cmd );&lt;br /&gt;
    my $autostop = $self-&amp;gt;getParam( $params, &amp;#039;autostop&amp;#039;, 0 );&lt;br /&gt;
    if ( $autostop &amp;amp;&amp;amp; $self-&amp;gt;{Monitor}-&amp;gt;{AutoStopTimeout} )&lt;br /&gt;
    {&lt;br /&gt;
        usleep( $self-&amp;gt;{Monitor}-&amp;gt;{AutoStopTimeout} );&lt;br /&gt;
        $self-&amp;gt;moveStop( $params );&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub moveConDown&lt;br /&gt;
{&lt;br /&gt;
    my $self = shift;&lt;br /&gt;
    my $params = shift;&lt;br /&gt;
    Debug( &amp;quot;Move Down&amp;quot; );&lt;br /&gt;
    my $cmd = &amp;quot;decoder_control.cgi?command=2&amp;amp;&amp;quot;;&lt;br /&gt;
    $self-&amp;gt;sendCmd( $cmd );&lt;br /&gt;
    my $autostop = $self-&amp;gt;getParam( $params, &amp;#039;autostop&amp;#039;, 0 );&lt;br /&gt;
    if ( $autostop &amp;amp;&amp;amp; $self-&amp;gt;{Monitor}-&amp;gt;{AutoStopTimeout} )&lt;br /&gt;
    {&lt;br /&gt;
        usleep( $self-&amp;gt;{Monitor}-&amp;gt;{AutoStopTimeout} );&lt;br /&gt;
        $self-&amp;gt;moveStop( $params );&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub moveConRight&lt;br /&gt;
{&lt;br /&gt;
    my $self = shift;&lt;br /&gt;
    my $params = shift;&lt;br /&gt;
    Debug( &amp;quot;Move Right&amp;quot; );&lt;br /&gt;
    my $cmd = &amp;quot;decoder_control.cgi?command=6&amp;amp;&amp;quot;;&lt;br /&gt;
    $self-&amp;gt;sendCmd( $cmd );&lt;br /&gt;
    my $autostop = $self-&amp;gt;getParam( $params, &amp;#039;autostop&amp;#039;, 0 );&lt;br /&gt;
    if ( $autostop &amp;amp;&amp;amp; $self-&amp;gt;{Monitor}-&amp;gt;{AutoStopTimeout} )&lt;br /&gt;
    {&lt;br /&gt;
        usleep( $self-&amp;gt;{Monitor}-&amp;gt;{AutoStopTimeout} );&lt;br /&gt;
        $self-&amp;gt;moveStop( $params );&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub moveConLeft&lt;br /&gt;
{&lt;br /&gt;
    my $self = shift;&lt;br /&gt;
    my $params = shift;&lt;br /&gt;
    Debug( &amp;quot;Move Left&amp;quot; );&lt;br /&gt;
    my $cmd = &amp;quot;decoder_control.cgi?command=4&amp;amp;&amp;quot;;&lt;br /&gt;
    $self-&amp;gt;sendCmd( $cmd );&lt;br /&gt;
    my $autostop = $self-&amp;gt;getParam( $params, &amp;#039;autostop&amp;#039;, 0 );&lt;br /&gt;
    if ( $autostop &amp;amp;&amp;amp; $self-&amp;gt;{Monitor}-&amp;gt;{AutoStopTimeout} )&lt;br /&gt;
    {&lt;br /&gt;
        usleep( $self-&amp;gt;{Monitor}-&amp;gt;{AutoStopTimeout} );&lt;br /&gt;
        $self-&amp;gt;moveStop( $params );&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub moveConUpLeft&lt;br /&gt;
{&lt;br /&gt;
    my $self = shift;&lt;br /&gt;
    my $params = shift;&lt;br /&gt;
    Debug( &amp;quot;Move Diagonally Up Left&amp;quot; );&lt;br /&gt;
    my $cmd = &amp;quot;decoder_control.cgi?command=90&amp;amp;&amp;quot;;&lt;br /&gt;
    $self-&amp;gt;sendCmd( $cmd );&lt;br /&gt;
    my $autostop = $self-&amp;gt;getParam( $params, &amp;#039;autostop&amp;#039;, 0 );&lt;br /&gt;
    if ( $autostop &amp;amp;&amp;amp; $self-&amp;gt;{Monitor}-&amp;gt;{AutoStopTimeout} )&lt;br /&gt;
    {&lt;br /&gt;
        usleep( $self-&amp;gt;{Monitor}-&amp;gt;{AutoStopTimeout} );&lt;br /&gt;
        $self-&amp;gt;moveStop( $params );&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub moveConDownLeft&lt;br /&gt;
{&lt;br /&gt;
    my $self = shift;&lt;br /&gt;
    my $params = shift;&lt;br /&gt;
    Debug( &amp;quot;Move Diagonally Down Left&amp;quot; );&lt;br /&gt;
    my $cmd = &amp;quot;decoder_control.cgi?command=92&amp;amp;&amp;quot;;&lt;br /&gt;
    $self-&amp;gt;sendCmd( $cmd );&lt;br /&gt;
    my $autostop = $self-&amp;gt;getParam( $params, &amp;#039;autostop&amp;#039;, 0 );&lt;br /&gt;
    if ( $autostop &amp;amp;&amp;amp; $self-&amp;gt;{Monitor}-&amp;gt;{AutoStopTimeout} )&lt;br /&gt;
    {&lt;br /&gt;
        usleep( $self-&amp;gt;{Monitor}-&amp;gt;{AutoStopTimeout} );&lt;br /&gt;
        $self-&amp;gt;moveStop( $params );&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub moveConUpRight&lt;br /&gt;
{&lt;br /&gt;
    my $self = shift;&lt;br /&gt;
    my $params = shift;&lt;br /&gt;
    Debug( &amp;quot;Move Diagonally Up Right&amp;quot; );&lt;br /&gt;
    my $cmd = &amp;quot;decoder_control.cgi?command=91&amp;amp;&amp;quot;;&lt;br /&gt;
    $self-&amp;gt;sendCmd( $cmd );&lt;br /&gt;
    my $autostop = $self-&amp;gt;getParam( $params, &amp;#039;autostop&amp;#039;, 0 );&lt;br /&gt;
    if ( $autostop &amp;amp;&amp;amp; $self-&amp;gt;{Monitor}-&amp;gt;{AutoStopTimeout} )&lt;br /&gt;
    {&lt;br /&gt;
        usleep( $self-&amp;gt;{Monitor}-&amp;gt;{AutoStopTimeout} );&lt;br /&gt;
        $self-&amp;gt;moveStop( $params );&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub moveConDownRight&lt;br /&gt;
{&lt;br /&gt;
    my $self = shift;&lt;br /&gt;
    my $params = shift;&lt;br /&gt;
    Debug( &amp;quot;Move Diagonally Down Right&amp;quot; );&lt;br /&gt;
    my $cmd = &amp;quot;decoder_control.cgi?command=93&amp;amp;&amp;quot;;&lt;br /&gt;
    $self-&amp;gt;sendCmd( $cmd );&lt;br /&gt;
    my $autostop = $self-&amp;gt;getParam( $params, &amp;#039;autostop&amp;#039;, 0 );&lt;br /&gt;
    if ( $autostop &amp;amp;&amp;amp; $self-&amp;gt;{Monitor}-&amp;gt;{AutoStopTimeout} )&lt;br /&gt;
    {&lt;br /&gt;
        usleep( $self-&amp;gt;{Monitor}-&amp;gt;{AutoStopTimeout} );&lt;br /&gt;
        $self-&amp;gt;moveStop( $params );&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# command=1 is technically Up Stop but seems to work for all stops.&lt;br /&gt;
sub moveStop&lt;br /&gt;
{&lt;br /&gt;
    my $self = shift;&lt;br /&gt;
    Debug( &amp;quot;Move Stop&amp;quot; );&lt;br /&gt;
    print(&amp;quot;autostop\n&amp;quot;);&lt;br /&gt;
    my $cmd = &amp;quot;decoder_control.cgi?command=1&amp;amp;&amp;quot;;&lt;br /&gt;
    $self-&amp;gt;sendCmd( $cmd );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub zoomConTele&lt;br /&gt;
{&lt;br /&gt;
    my $self = shift;&lt;br /&gt;
    my $params = shift;&lt;br /&gt;
    Debug( &amp;quot;Zoom Tele&amp;quot; );&lt;br /&gt;
    my $cmd = &amp;quot;decoder_control.cgi?command=16&amp;amp;&amp;quot;;&lt;br /&gt;
    $self-&amp;gt;sendCmd( $cmd );&lt;br /&gt;
    my $autostop = $self-&amp;gt;getParam( $params, &amp;#039;autostop&amp;#039;, 0 );&lt;br /&gt;
    if ( $autostop &amp;amp;&amp;amp; $self-&amp;gt;{Monitor}-&amp;gt;{AutoStopTimeout} )&lt;br /&gt;
    {&lt;br /&gt;
        usleep( $self-&amp;gt;{Monitor}-&amp;gt;{AutoStopTimeout} );&lt;br /&gt;
	$cmd = &amp;quot;decoder_control.cgi?command=17&amp;amp;&amp;quot;;&lt;br /&gt;
	$self-&amp;gt;sendCmd( $cmd );&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub zoomConWide&lt;br /&gt;
{&lt;br /&gt;
    my $self = shift;&lt;br /&gt;
    my $params = shift;&lt;br /&gt;
    Debug( &amp;quot;Zoom Wide&amp;quot; );&lt;br /&gt;
    my $cmd = &amp;quot;decoder_control.cgi?command=18&amp;amp;&amp;quot;;&lt;br /&gt;
    $self-&amp;gt;sendCmd( $cmd );&lt;br /&gt;
    my $autostop = $self-&amp;gt;getParam( $params, &amp;#039;autostop&amp;#039;, 0 );&lt;br /&gt;
    if ( $autostop &amp;amp;&amp;amp; $self-&amp;gt;{Monitor}-&amp;gt;{AutoStopTimeout} )&lt;br /&gt;
    {&lt;br /&gt;
        usleep( $self-&amp;gt;{Monitor}-&amp;gt;{AutoStopTimeout} );&lt;br /&gt;
	$cmd = &amp;quot;decoder_control.cgi?command=19&amp;amp;&amp;quot;;&lt;br /&gt;
	$self-&amp;gt;sendCmd( $cmd );&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub zoomConStop&lt;br /&gt;
{&lt;br /&gt;
    my $self = shift;&lt;br /&gt;
    my $params = shift;&lt;br /&gt;
    Debug( &amp;quot;Zoom Stop&amp;quot; );&lt;br /&gt;
    my $cmd = &amp;quot;decoder_control.cgi?command=17&amp;amp;&amp;quot;;&lt;br /&gt;
    $self-&amp;gt;sendCmd( $cmd );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# Increase Brightness&lt;br /&gt;
sub irisAbsOpen&lt;br /&gt;
{&lt;br /&gt;
    my $self = shift;&lt;br /&gt;
    my $params = shift;&lt;br /&gt;
    my $step = $self-&amp;gt;getParam( $params, &amp;#039;step&amp;#039; );&lt;br /&gt;
    my $brightness = 100;&lt;br /&gt;
&lt;br /&gt;
    my $cmd = &amp;quot;get_camera_params.cgi?&amp;quot;;&lt;br /&gt;
    my $resp = $self-&amp;gt;sendCmd( $cmd );&lt;br /&gt;
&lt;br /&gt;
    $brightness = int($1) if ( $resp =~ m/var brightness=([0-9]*);/ );&lt;br /&gt;
    $brightness += $step;&lt;br /&gt;
    $brightness = 255 if ($brightness &amp;gt; 255);&lt;br /&gt;
    Debug( &amp;quot;Iris Open $brightness&amp;quot; );&lt;br /&gt;
    $cmd = &amp;quot;camera_control.cgi?param=1&amp;amp;value=&amp;quot;.$brightness.&amp;quot;&amp;amp;&amp;quot;;&lt;br /&gt;
    $self-&amp;gt;sendCmd( $cmd );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# Decrease Brightness&lt;br /&gt;
sub irisAbsClose&lt;br /&gt;
{&lt;br /&gt;
    my $self = shift;&lt;br /&gt;
    my $params = shift;&lt;br /&gt;
    my $step = $self-&amp;gt;getParam( $params, &amp;#039;step&amp;#039; );&lt;br /&gt;
    my $brightness = 100;&lt;br /&gt;
&lt;br /&gt;
    my $cmd = &amp;quot;get_camera_params.cgi?&amp;quot;;&lt;br /&gt;
    my $resp = $self-&amp;gt;sendCmd( $cmd );&lt;br /&gt;
&lt;br /&gt;
    $brightness = int($1) if ( $resp =~ m/var brightness=([0-9]*);/ );&lt;br /&gt;
    $brightness -= $step;&lt;br /&gt;
    $brightness = 0 if ($brightness &amp;lt; 0);&lt;br /&gt;
    Debug( &amp;quot;Iris Close $brightness&amp;quot; );&lt;br /&gt;
    $cmd = &amp;quot;camera_control.cgi?param=1&amp;amp;value=&amp;quot;.$brightness.&amp;quot;&amp;amp;&amp;quot;;&lt;br /&gt;
    $self-&amp;gt;sendCmd( $cmd );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub whiteAbsIn&lt;br /&gt;
{&lt;br /&gt;
    my $self = shift;&lt;br /&gt;
    my $params = shift;&lt;br /&gt;
    my $step = $self-&amp;gt;getParam( $params, &amp;#039;step&amp;#039; );&lt;br /&gt;
    my $contrast = 5;&lt;br /&gt;
&lt;br /&gt;
    my $cmd = &amp;quot;get_camera_params.cgi?&amp;quot;;&lt;br /&gt;
    my $resp = $self-&amp;gt;sendCmd( $cmd );&lt;br /&gt;
&lt;br /&gt;
    $contrast = int($1) if ( $resp =~ m/var contrast=([0-9]*);/ );&lt;br /&gt;
    $contrast += $step;&lt;br /&gt;
    $contrast = 6 if ($contrast &amp;gt; 6);&lt;br /&gt;
    Debug( &amp;quot;White In $contrast&amp;quot; );&lt;br /&gt;
    $cmd = &amp;quot;camera_control.cgi?param=2&amp;amp;value=&amp;quot;.$contrast.&amp;quot;&amp;amp;&amp;quot;;&lt;br /&gt;
    $self-&amp;gt;sendCmd( $cmd );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# Decrease Contrast&lt;br /&gt;
sub whiteAbsOut&lt;br /&gt;
{&lt;br /&gt;
    my $self = shift;&lt;br /&gt;
    my $params = shift;&lt;br /&gt;
    my $step = $self-&amp;gt;getParam( $params, &amp;#039;step&amp;#039; );&lt;br /&gt;
    my $contrast = 5;&lt;br /&gt;
&lt;br /&gt;
    my $cmd = &amp;quot;get_camera_params.cgi?&amp;quot;;&lt;br /&gt;
    my $resp = $self-&amp;gt;sendCmd( $cmd );&lt;br /&gt;
&lt;br /&gt;
    $contrast = int($1) if ( $resp =~ m/var contrast=([0-9]*);/ );&lt;br /&gt;
    $contrast -= $step;&lt;br /&gt;
    $contrast = 0 if ($contrast &amp;lt; 0);&lt;br /&gt;
    Debug( &amp;quot;White Out $contrast&amp;quot; );&lt;br /&gt;
    $cmd = &amp;quot;camera_control.cgi?param=2&amp;amp;value=&amp;quot;.$contrast.&amp;quot;&amp;amp;&amp;quot;;&lt;br /&gt;
    $self-&amp;gt;sendCmd( $cmd );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub presetHome&lt;br /&gt;
{&lt;br /&gt;
    my $self = shift;&lt;br /&gt;
    Debug( &amp;quot;Home Preset&amp;quot; );&lt;br /&gt;
    my $cmd = &amp;quot;decoder_control.cgi?command=25&amp;amp;&amp;quot;;&lt;br /&gt;
    $self-&amp;gt;sendCmd( $cmd );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub presetSet&lt;br /&gt;
{&lt;br /&gt;
    my $self = shift;&lt;br /&gt;
    my $params = shift;&lt;br /&gt;
    my $preset = $self-&amp;gt;getParam( $params, &amp;#039;preset&amp;#039; );&lt;br /&gt;
    my $presetCmd = 30 + (($preset-1)*2);&lt;br /&gt;
    Debug( &amp;quot;Set Preset $preset with cmd $presetCmd&amp;quot; );&lt;br /&gt;
    my $cmd = &amp;quot;decoder_control.cgi?command=$presetCmd&amp;amp;&amp;quot;;&lt;br /&gt;
    $self-&amp;gt;sendCmd( $cmd );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub presetGoto&lt;br /&gt;
{&lt;br /&gt;
    my $self = shift;&lt;br /&gt;
    my $params = shift;&lt;br /&gt;
    my $preset = $self-&amp;gt;getParam( $params, &amp;#039;preset&amp;#039; );&lt;br /&gt;
    my $presetCmd = 31 + (($preset-1)*2);&lt;br /&gt;
    Debug( &amp;quot;Goto Preset $preset with cmd $presetCmd&amp;quot; );&lt;br /&gt;
    my $cmd = &amp;quot;decoder_control.cgi?command=$presetCmd&amp;amp;&amp;quot;;&lt;br /&gt;
    $self-&amp;gt;sendCmd( $cmd );&lt;br /&gt;
}&lt;br /&gt;
1;&lt;br /&gt;
__END__&lt;br /&gt;
# Below is stub documentation for your module. You&amp;#039;d better edit it!&lt;br /&gt;
&lt;br /&gt;
=head1 NAME&lt;br /&gt;
&lt;br /&gt;
ZoneMinder::Database - Perl extension for blah blah blah&lt;br /&gt;
&lt;br /&gt;
=head1 SYNOPSIS&lt;br /&gt;
&lt;br /&gt;
  use ZoneMinder::Database;&lt;br /&gt;
  blah blah blah&lt;br /&gt;
&lt;br /&gt;
=head1 DESCRIPTION&lt;br /&gt;
&lt;br /&gt;
Stub documentation for ZoneMinder, created by h2xs. It looks like the&lt;br /&gt;
author of the extension was negligent enough to leave the stub&lt;br /&gt;
unedited.&lt;br /&gt;
&lt;br /&gt;
Blah blah blah.&lt;br /&gt;
&lt;br /&gt;
=head2 EXPORT&lt;br /&gt;
&lt;br /&gt;
None by default.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=head1 SEE ALSO&lt;br /&gt;
&lt;br /&gt;
Mention other useful documentation such as the documentation of&lt;br /&gt;
related modules or operating system documentation (such as man pages&lt;br /&gt;
in UNIX), or any relevant external documentation such as RFCs or&lt;br /&gt;
standards.&lt;br /&gt;
&lt;br /&gt;
If you have a mailing list set up for your module, mention it here.&lt;br /&gt;
&lt;br /&gt;
If you have a web site set up for your module, mention it here.&lt;br /&gt;
&lt;br /&gt;
=head1 AUTHOR&lt;br /&gt;
&lt;br /&gt;
Philip Coombes, E&amp;lt;lt&amp;gt;philip.coombes@zoneminder.comE&amp;lt;gt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=head1 COPYRIGHT AND LICENSE&lt;br /&gt;
&lt;br /&gt;
Copyright (C) 2001-2008  Philip Coombes&lt;br /&gt;
&lt;br /&gt;
This library is free software; you can redistribute it and/or modify&lt;br /&gt;
it under the same terms as Perl itself, either Perl version 5.8.3 or,&lt;br /&gt;
at your option, any later version of Perl 5 you may have available.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=cut&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From here, Zoneminder must be configured to know about IPCAM controls.  This is done by clicking the &amp;quot;Edit&amp;quot; link pointed out during general setup and then on the &amp;quot;Add New Control&amp;quot; button on new window.&lt;br /&gt;
&lt;br /&gt;
;Main&lt;br /&gt;
:Name: IPCAM&lt;br /&gt;
:Type: Remote&lt;br /&gt;
:Protocol: IPCAM&lt;br /&gt;
:Can Wake: Tick&lt;br /&gt;
:Can Sleep: Tick&lt;br /&gt;
:Can Reset: Tick&lt;br /&gt;
;Move&lt;br /&gt;
:Can Move: Tick&lt;br /&gt;
:Can Move Diagonally: Tick&lt;br /&gt;
:Can Move Continous: Tick&lt;br /&gt;
;Pan&lt;br /&gt;
:Can Pan: Tick&lt;br /&gt;
;Tilt&lt;br /&gt;
:Can Tilt: Tick&lt;br /&gt;
;Zoom&lt;br /&gt;
:Can Zoom: Tick&lt;br /&gt;
:Can Zoom Continous: Tick&lt;br /&gt;
;White&lt;br /&gt;
:Can White Balance: Tick&lt;br /&gt;
:Can White Balance Absolute: Tick&lt;br /&gt;
:Min White Bal. Range: 1&lt;br /&gt;
:Max White Bal. Range: 255&lt;br /&gt;
:Min White Bal. Step: 1&lt;br /&gt;
:Max White Bal. Step: 255&lt;br /&gt;
;Iris&lt;br /&gt;
:Can Iris: Tick&lt;br /&gt;
:Can Iris Absolute: Tick&lt;br /&gt;
:Min Iris Range: 1&lt;br /&gt;
:Max Iris Range: 6&lt;br /&gt;
:Min Iris Step: 1&lt;br /&gt;
:Max Iris Step: 6&lt;br /&gt;
;Presets&lt;br /&gt;
:Has Presets: Tick&lt;br /&gt;
:Num Presets: 16&lt;br /&gt;
:Has Home Preset: Tick&lt;br /&gt;
:Can Set Presets: Tick&lt;br /&gt;
&lt;br /&gt;
Wake/Sleep control is mapped to IO ON/OFF Control.  IO Control is sometimes used for IR LED Controls. If your camera does not support IO ON/OFF Control then leave the Wake/Sleep boxes unticked.&lt;br /&gt;
&lt;br /&gt;
If your camera does not support Zoom then leave Has Zoom unticked.&lt;br /&gt;
&lt;br /&gt;
The camera Tilt/Pan will work different then cameras Web interface.  It will continously move until you click the middle circle to stop movement.  If you prefer, you can set a non-zero value in the &amp;quot;Track Delay&amp;quot; box on Control tab so that movement will automatically stop after specified delay.&lt;br /&gt;
&lt;br /&gt;
It would require an update to Zoneminder to behave like stock web interface.  It sends Start Move on initial click and then Stop Move upon click release.  That seems like a nice feature to build into Zoneminder to me.&lt;/div&gt;</summary>
		<author><name>Sagitt</name></author>
	</entry>
	<entry>
		<id>http://wiki.staging.zoneminder.com/index.php?title=Foscam_FI8918W&amp;diff=6146</id>
		<title>Foscam FI8918W</title>
		<link rel="alternate" type="text/html" href="http://wiki.staging.zoneminder.com/index.php?title=Foscam_FI8918W&amp;diff=6146"/>
		<updated>2014-04-21T19:49:37Z</updated>

		<summary type="html">&lt;p&gt;Sagitt: /* Foscam Forum Topic */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article assumes you have a basic understanding of Zone Minder. Fields that are up to the user to decide on are not listed.&lt;br /&gt;
&lt;br /&gt;
The camera used in the screenshots has a hostname of &amp;quot;Monoculous-1&amp;quot;, which is also the friendly name used in ZoneMinder. Hopefully you&amp;#039;re a little creative and will have your own naming convention for your cameras, so you may have different names.&lt;br /&gt;
&lt;br /&gt;
==Capabilities within ZoneMinder==&lt;br /&gt;
*Resolutions / frame rates&lt;br /&gt;
**Wired:&lt;br /&gt;
***640x480 @ 15fps (In well lit room)&lt;br /&gt;
***320x240 @ 30fps(?)&lt;br /&gt;
**Wireless:&lt;br /&gt;
***640x480 @ 9fps (In well lit room)&lt;br /&gt;
***320x240 @ 14fps (?)&lt;br /&gt;
*Control&lt;br /&gt;
**IR On/Off (Wake/Sleep)&lt;br /&gt;
**Reboot&lt;br /&gt;
**Movement&lt;br /&gt;
***Diagonal&lt;br /&gt;
***Continuous&lt;br /&gt;
**Tilt, Pan&lt;br /&gt;
***Variable speed possible, but not yet supported in Control Script&lt;br /&gt;
**Iris&lt;br /&gt;
***Brightness adjustment possible, but not yet supported in Control Script&lt;br /&gt;
**Presets&lt;br /&gt;
***8 presets, and home position&lt;br /&gt;
&lt;br /&gt;
== Camera configuration ==&lt;br /&gt;
# Your camera should NOT be exposed to the Internet. There is no need for it, and it just poses the risk that others will do nasty things with it. Make sure your camera is on a local network only, and that it is pingable and accessible from your machine hosting your ZoneMinder installation. Instructions on doing this are out of the scope of this article.&lt;br /&gt;
# It can make your life simpler to have your camera registered with your local DNS server. Doing this is out of the scope of this article.&lt;br /&gt;
# The firmware utilized in this is the latest at time of writing, 11.22.2.38, with Web UI 2.4.18.17. This can be upgraded by downloading the firmware and following the instruction on Foscam&amp;#039;s website[http://www.foscam.com/help.aspx?TypeId=11].&lt;br /&gt;
# It is recommended that you configure your camera with a separate visitor, operator, and admin password. This is done through the camera&amp;#039;s web interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Greenshot 2011-11-22 15-11-01.png]]&lt;br /&gt;
&lt;br /&gt;
== Monitor configuration ==&lt;br /&gt;
This article assumes you have a basic understanding of Zone Minder. Fields that are up to the user to decide on are not listed. These settings are a starting point if you wish to tweak further.&lt;br /&gt;
&lt;br /&gt;
The camera used in the screenshots has a hostname of &amp;quot;Monoculous-1&amp;quot;, which is also the friendly name used in ZoneMinder. Your configuration will likely be different.&lt;br /&gt;
&lt;br /&gt;
===General tab===&lt;br /&gt;
[[File:Greenshot 2011-11-22 15-00-52.png]]&lt;br /&gt;
*Source type: Remote&lt;br /&gt;
&lt;br /&gt;
===Source tab===&lt;br /&gt;
[[File:Greenshot 2011-11-22 15-06-41.png]]&lt;br /&gt;
*Remote Protocol: HTTP&lt;br /&gt;
*Remote Method: Simple&lt;br /&gt;
*Remote Host Name: &amp;#039;&amp;#039;Use the resolveable hostname or IP address of the camera&amp;#039;&amp;#039;&lt;br /&gt;
*Remote Host Port: &amp;#039;&amp;#039;80 is default, change this if you have modified the camera&amp;#039;s settings&amp;#039;&amp;#039;&lt;br /&gt;
*Remote Host Path: /videostream.cgi?user=&amp;#039;&amp;#039;&amp;#039;visitor&amp;#039;&amp;#039;&amp;#039;&amp;amp;pwd=&amp;#039;&amp;#039;&amp;#039;visitor&amp;#039;&amp;#039;&amp;#039; &amp;#039;&amp;#039;This builds the URL used to access the camera, so it needs to have the proper visitor username and password as specified in camera configuration above. If you decide to not follow security best practices, any user with &amp;quot;visitor&amp;quot; permissions or above on the camera would be fine.&amp;#039;&amp;#039;&lt;br /&gt;
*Remote Image Colors: 24 bit color&lt;br /&gt;
*Capture Width (pixels): 640 &amp;#039;&amp;#039;If your camera is mounted sideways, switch the capture width and height.&amp;#039;&amp;#039;&lt;br /&gt;
*Capture Height (pixels): 480 &lt;br /&gt;
*Orientation: Normal &amp;#039;&amp;#039;If your camera is mounted sideways, you can change this to reflect that, but you may need to transpose the capture height and width as well&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
===Control===&lt;br /&gt;
[[File:Greenshot_2011-11-22_15-42-51.png]]&lt;br /&gt;
*Controllable: Yes&lt;br /&gt;
*Control Type: Foscam FI8918W &amp;#039;&amp;#039;This option may need to be added by clicking &amp;quot;Edit&amp;quot; and adding a new control as described in the [[Foscam_FI8918W#New_Control_Type|&amp;quot;New Control Type&amp;quot;]] section below.&amp;#039;&amp;#039;&lt;br /&gt;
*Control Device: user=&amp;#039;&amp;#039;&amp;#039;operator&amp;#039;&amp;#039;&amp;#039;&amp;amp;pwd=&amp;#039;&amp;#039;&amp;#039;operator&amp;#039;&amp;#039;&amp;#039; &amp;#039;&amp;#039;This is a field passed to the control script, which in this case needs to be the authentication portion of the control URL. The account specified on the camera needs to have operator privileges or above.&lt;br /&gt;
*Control Address: &amp;#039;&amp;#039;In all imaginable cases, this will be the same as the hostname/IP of the camera, the &amp;quot;Remote Hostname&amp;quot; from the source tab.&amp;#039;&amp;#039;&lt;br /&gt;
*Track Motion: No &amp;#039;&amp;#039;This camera does not support absolute movement, so motion tracking is not possible.&amp;#039;&amp;#039;&lt;br /&gt;
*Return Location: Preset 1. &amp;#039;&amp;#039;Preset 1 is generally used as the home position.&amp;#039;&amp;#039;&lt;br /&gt;
*Return Delay: 30 &amp;#039;This setting likely has no effect since Track Motion is off.&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====New Control Type====&lt;br /&gt;
:Unless this is included in future versions, you will have to create a new control type for the camera. This can be done by clicking &amp;quot;Edit&amp;quot; on the &amp;quot;Control&amp;quot; tab of the monitor, and &amp;quot;Add new monitor&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=====Main=====&lt;br /&gt;
[[File:Greenshot 2011-11-22 15-47-12.png]]&lt;br /&gt;
*Name: Foscam FI8918W &amp;#039;&amp;#039;This can be anything you want, but why change it.&amp;#039;&amp;#039;&lt;br /&gt;
*Type: Remote&lt;br /&gt;
*Protocol: This must be the name of the script provided in the [[Foscam_FI8918W#New_Control_Protocol_Script|&amp;quot;New Control Protocol Script&amp;quot;]] section.&lt;br /&gt;
*Can Wake: Yes &amp;#039;&amp;#039;The wake control is used to turn the IR on.&amp;#039;&amp;#039;&lt;br /&gt;
*Can Sleep: Yes &amp;#039;&amp;#039;The sleep control is used to turn the IR off.&amp;#039;&amp;#039;&lt;br /&gt;
*Can Reset: Yes &amp;#039;&amp;#039;The reset control is used to reboot the camera.&amp;#039;&amp;#039;&lt;br /&gt;
=====Move=====&lt;br /&gt;
*Can Move: Yes&lt;br /&gt;
*Can Move Diagonally: Yes&lt;br /&gt;
*Can Move Mapped: No&lt;br /&gt;
*Can Move Absolute: No&lt;br /&gt;
*Can Move Relative: No&lt;br /&gt;
*Can Move Continuous: Yes&lt;br /&gt;
=====Pan=====&lt;br /&gt;
*Can Pan: Yes&lt;br /&gt;
*Min Pan Range: 0&lt;br /&gt;
*Max Pan Range: 0&lt;br /&gt;
*Min Pan Step: 0&lt;br /&gt;
*Max Pan Step: 0&lt;br /&gt;
*Has Pan Speed: No&lt;br /&gt;
*Min Pan Speed: 0&lt;br /&gt;
*Max Pan Speed: 0&lt;br /&gt;
*Has Turbo Pan: No&lt;br /&gt;
*Turbo Pan Speed: No&lt;br /&gt;
=====Tilt=====&lt;br /&gt;
*Can Tilt: Yes&lt;br /&gt;
*Min Tilt Range: 0&lt;br /&gt;
*Max Tilt Range: 0&lt;br /&gt;
*Min Tilt Step: 0&lt;br /&gt;
*Max Tilt Step: 0&lt;br /&gt;
*Has Tilt Speed: No&lt;br /&gt;
*Min Tilt Speed: 0&lt;br /&gt;
*Max Tilt Speed: 0&lt;br /&gt;
*Has Tilt Pan: No&lt;br /&gt;
*Turbo Tilt Speed: No&lt;br /&gt;
=====Zoom=====&lt;br /&gt;
&amp;#039;&amp;#039;Device can not zoom&amp;#039;&amp;#039;&lt;br /&gt;
=====Focus=====&lt;br /&gt;
&amp;#039;&amp;#039;Device can not focus&amp;#039;&amp;#039;&lt;br /&gt;
=====White=====&lt;br /&gt;
&amp;#039;&amp;#039;No support yet in script for white balance changes&amp;#039;&amp;#039;&lt;br /&gt;
=====Iris=====&lt;br /&gt;
&amp;#039;&amp;#039;Device has no iris controls&amp;#039;&amp;#039;&lt;br /&gt;
=====Presets=====&lt;br /&gt;
*Has Presets: Yes&lt;br /&gt;
*Num Presets: 8&lt;br /&gt;
*Has Home Preset: Yes&lt;br /&gt;
*Can Set Presets: Yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====New Control Protocol Script====&lt;br /&gt;
#Find the location of the ZoneMinder control script Perl modules on your server:&lt;br /&gt;
##From a command shell, issue the following command which will search all directories under / for the PanasonicIP.pm control file which is included with ZoneMinder: &amp;lt;tt&amp;gt;find / | grep &amp;#039;PanasonicIP.pm&amp;#039;&amp;lt;/tt&amp;gt;&lt;br /&gt;
##You should receive output similar to this: &amp;lt;tt&amp;gt;/usr/share/perl5/ZoneMinder/Control/PanasonicIP.pm&amp;lt;/tt&amp;gt;&lt;br /&gt;
#Copy [[http://durdle.com/archives/2011/02/26/zoneminder-control-module-for-foscam-fi8918w/ Hdurdle&amp;#039;s]] [[http://durdle.com/wp-content/uploads/FoscamFI8918W.pm_.txt control script]] to the Zone Minder control script folder&lt;br /&gt;
#Rename the control script to &amp;lt;tt&amp;gt;FoscamFI8918W.pm&amp;lt;/tt&amp;gt;&lt;br /&gt;
#Make sure all users have read access to FoscamFI8918W.pm. &amp;lt;tt&amp;gt;chmod a+r FoscamFI8918W.pm&amp;lt;/tt&amp;gt;&lt;br /&gt;
#If running version 1.25 or newer, open the file.&lt;br /&gt;
##Comment the line &amp;quot;use ZoneMinder::Debug qw(:all);&lt;br /&gt;
##Uncomment the line &amp;quot;#use ZoneMinder::Logger qw(:all);&lt;br /&gt;
#If running version 1.26.5 or newer, open the file.&lt;br /&gt;
##Change: &amp;quot;$self-&amp;gt;{ua}-&amp;gt;agent( &amp;quot;ZoneMinder Control Agent/&amp;quot;.ZM_VERSION );&amp;quot;&lt;br /&gt;
##With: $self-&amp;gt;{ua}-&amp;gt;agent( &amp;quot;ZoneMinder Control Agent/&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
The device accepts most of the commands listed in this PDF[http://www.notesco.net/download/ipcamcgisdk21.pdf].&lt;br /&gt;
&lt;br /&gt;
==== Foscam Forum Topic ====&lt;br /&gt;
&lt;br /&gt;
See here for more information about new script for original foscam and upgraded clones:&lt;br /&gt;
http://foscam.us/forum/post44816.html#p44816&lt;/div&gt;</summary>
		<author><name>Sagitt</name></author>
	</entry>
	<entry>
		<id>http://wiki.staging.zoneminder.com/index.php?title=Foscam_FI8918W&amp;diff=6145</id>
		<title>Foscam FI8918W</title>
		<link rel="alternate" type="text/html" href="http://wiki.staging.zoneminder.com/index.php?title=Foscam_FI8918W&amp;diff=6145"/>
		<updated>2014-04-21T19:49:19Z</updated>

		<summary type="html">&lt;p&gt;Sagitt: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article assumes you have a basic understanding of Zone Minder. Fields that are up to the user to decide on are not listed.&lt;br /&gt;
&lt;br /&gt;
The camera used in the screenshots has a hostname of &amp;quot;Monoculous-1&amp;quot;, which is also the friendly name used in ZoneMinder. Hopefully you&amp;#039;re a little creative and will have your own naming convention for your cameras, so you may have different names.&lt;br /&gt;
&lt;br /&gt;
==Capabilities within ZoneMinder==&lt;br /&gt;
*Resolutions / frame rates&lt;br /&gt;
**Wired:&lt;br /&gt;
***640x480 @ 15fps (In well lit room)&lt;br /&gt;
***320x240 @ 30fps(?)&lt;br /&gt;
**Wireless:&lt;br /&gt;
***640x480 @ 9fps (In well lit room)&lt;br /&gt;
***320x240 @ 14fps (?)&lt;br /&gt;
*Control&lt;br /&gt;
**IR On/Off (Wake/Sleep)&lt;br /&gt;
**Reboot&lt;br /&gt;
**Movement&lt;br /&gt;
***Diagonal&lt;br /&gt;
***Continuous&lt;br /&gt;
**Tilt, Pan&lt;br /&gt;
***Variable speed possible, but not yet supported in Control Script&lt;br /&gt;
**Iris&lt;br /&gt;
***Brightness adjustment possible, but not yet supported in Control Script&lt;br /&gt;
**Presets&lt;br /&gt;
***8 presets, and home position&lt;br /&gt;
&lt;br /&gt;
== Camera configuration ==&lt;br /&gt;
# Your camera should NOT be exposed to the Internet. There is no need for it, and it just poses the risk that others will do nasty things with it. Make sure your camera is on a local network only, and that it is pingable and accessible from your machine hosting your ZoneMinder installation. Instructions on doing this are out of the scope of this article.&lt;br /&gt;
# It can make your life simpler to have your camera registered with your local DNS server. Doing this is out of the scope of this article.&lt;br /&gt;
# The firmware utilized in this is the latest at time of writing, 11.22.2.38, with Web UI 2.4.18.17. This can be upgraded by downloading the firmware and following the instruction on Foscam&amp;#039;s website[http://www.foscam.com/help.aspx?TypeId=11].&lt;br /&gt;
# It is recommended that you configure your camera with a separate visitor, operator, and admin password. This is done through the camera&amp;#039;s web interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Greenshot 2011-11-22 15-11-01.png]]&lt;br /&gt;
&lt;br /&gt;
== Monitor configuration ==&lt;br /&gt;
This article assumes you have a basic understanding of Zone Minder. Fields that are up to the user to decide on are not listed. These settings are a starting point if you wish to tweak further.&lt;br /&gt;
&lt;br /&gt;
The camera used in the screenshots has a hostname of &amp;quot;Monoculous-1&amp;quot;, which is also the friendly name used in ZoneMinder. Your configuration will likely be different.&lt;br /&gt;
&lt;br /&gt;
===General tab===&lt;br /&gt;
[[File:Greenshot 2011-11-22 15-00-52.png]]&lt;br /&gt;
*Source type: Remote&lt;br /&gt;
&lt;br /&gt;
===Source tab===&lt;br /&gt;
[[File:Greenshot 2011-11-22 15-06-41.png]]&lt;br /&gt;
*Remote Protocol: HTTP&lt;br /&gt;
*Remote Method: Simple&lt;br /&gt;
*Remote Host Name: &amp;#039;&amp;#039;Use the resolveable hostname or IP address of the camera&amp;#039;&amp;#039;&lt;br /&gt;
*Remote Host Port: &amp;#039;&amp;#039;80 is default, change this if you have modified the camera&amp;#039;s settings&amp;#039;&amp;#039;&lt;br /&gt;
*Remote Host Path: /videostream.cgi?user=&amp;#039;&amp;#039;&amp;#039;visitor&amp;#039;&amp;#039;&amp;#039;&amp;amp;pwd=&amp;#039;&amp;#039;&amp;#039;visitor&amp;#039;&amp;#039;&amp;#039; &amp;#039;&amp;#039;This builds the URL used to access the camera, so it needs to have the proper visitor username and password as specified in camera configuration above. If you decide to not follow security best practices, any user with &amp;quot;visitor&amp;quot; permissions or above on the camera would be fine.&amp;#039;&amp;#039;&lt;br /&gt;
*Remote Image Colors: 24 bit color&lt;br /&gt;
*Capture Width (pixels): 640 &amp;#039;&amp;#039;If your camera is mounted sideways, switch the capture width and height.&amp;#039;&amp;#039;&lt;br /&gt;
*Capture Height (pixels): 480 &lt;br /&gt;
*Orientation: Normal &amp;#039;&amp;#039;If your camera is mounted sideways, you can change this to reflect that, but you may need to transpose the capture height and width as well&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
===Control===&lt;br /&gt;
[[File:Greenshot_2011-11-22_15-42-51.png]]&lt;br /&gt;
*Controllable: Yes&lt;br /&gt;
*Control Type: Foscam FI8918W &amp;#039;&amp;#039;This option may need to be added by clicking &amp;quot;Edit&amp;quot; and adding a new control as described in the [[Foscam_FI8918W#New_Control_Type|&amp;quot;New Control Type&amp;quot;]] section below.&amp;#039;&amp;#039;&lt;br /&gt;
*Control Device: user=&amp;#039;&amp;#039;&amp;#039;operator&amp;#039;&amp;#039;&amp;#039;&amp;amp;pwd=&amp;#039;&amp;#039;&amp;#039;operator&amp;#039;&amp;#039;&amp;#039; &amp;#039;&amp;#039;This is a field passed to the control script, which in this case needs to be the authentication portion of the control URL. The account specified on the camera needs to have operator privileges or above.&lt;br /&gt;
*Control Address: &amp;#039;&amp;#039;In all imaginable cases, this will be the same as the hostname/IP of the camera, the &amp;quot;Remote Hostname&amp;quot; from the source tab.&amp;#039;&amp;#039;&lt;br /&gt;
*Track Motion: No &amp;#039;&amp;#039;This camera does not support absolute movement, so motion tracking is not possible.&amp;#039;&amp;#039;&lt;br /&gt;
*Return Location: Preset 1. &amp;#039;&amp;#039;Preset 1 is generally used as the home position.&amp;#039;&amp;#039;&lt;br /&gt;
*Return Delay: 30 &amp;#039;This setting likely has no effect since Track Motion is off.&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====New Control Type====&lt;br /&gt;
:Unless this is included in future versions, you will have to create a new control type for the camera. This can be done by clicking &amp;quot;Edit&amp;quot; on the &amp;quot;Control&amp;quot; tab of the monitor, and &amp;quot;Add new monitor&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=====Main=====&lt;br /&gt;
[[File:Greenshot 2011-11-22 15-47-12.png]]&lt;br /&gt;
*Name: Foscam FI8918W &amp;#039;&amp;#039;This can be anything you want, but why change it.&amp;#039;&amp;#039;&lt;br /&gt;
*Type: Remote&lt;br /&gt;
*Protocol: This must be the name of the script provided in the [[Foscam_FI8918W#New_Control_Protocol_Script|&amp;quot;New Control Protocol Script&amp;quot;]] section.&lt;br /&gt;
*Can Wake: Yes &amp;#039;&amp;#039;The wake control is used to turn the IR on.&amp;#039;&amp;#039;&lt;br /&gt;
*Can Sleep: Yes &amp;#039;&amp;#039;The sleep control is used to turn the IR off.&amp;#039;&amp;#039;&lt;br /&gt;
*Can Reset: Yes &amp;#039;&amp;#039;The reset control is used to reboot the camera.&amp;#039;&amp;#039;&lt;br /&gt;
=====Move=====&lt;br /&gt;
*Can Move: Yes&lt;br /&gt;
*Can Move Diagonally: Yes&lt;br /&gt;
*Can Move Mapped: No&lt;br /&gt;
*Can Move Absolute: No&lt;br /&gt;
*Can Move Relative: No&lt;br /&gt;
*Can Move Continuous: Yes&lt;br /&gt;
=====Pan=====&lt;br /&gt;
*Can Pan: Yes&lt;br /&gt;
*Min Pan Range: 0&lt;br /&gt;
*Max Pan Range: 0&lt;br /&gt;
*Min Pan Step: 0&lt;br /&gt;
*Max Pan Step: 0&lt;br /&gt;
*Has Pan Speed: No&lt;br /&gt;
*Min Pan Speed: 0&lt;br /&gt;
*Max Pan Speed: 0&lt;br /&gt;
*Has Turbo Pan: No&lt;br /&gt;
*Turbo Pan Speed: No&lt;br /&gt;
=====Tilt=====&lt;br /&gt;
*Can Tilt: Yes&lt;br /&gt;
*Min Tilt Range: 0&lt;br /&gt;
*Max Tilt Range: 0&lt;br /&gt;
*Min Tilt Step: 0&lt;br /&gt;
*Max Tilt Step: 0&lt;br /&gt;
*Has Tilt Speed: No&lt;br /&gt;
*Min Tilt Speed: 0&lt;br /&gt;
*Max Tilt Speed: 0&lt;br /&gt;
*Has Tilt Pan: No&lt;br /&gt;
*Turbo Tilt Speed: No&lt;br /&gt;
=====Zoom=====&lt;br /&gt;
&amp;#039;&amp;#039;Device can not zoom&amp;#039;&amp;#039;&lt;br /&gt;
=====Focus=====&lt;br /&gt;
&amp;#039;&amp;#039;Device can not focus&amp;#039;&amp;#039;&lt;br /&gt;
=====White=====&lt;br /&gt;
&amp;#039;&amp;#039;No support yet in script for white balance changes&amp;#039;&amp;#039;&lt;br /&gt;
=====Iris=====&lt;br /&gt;
&amp;#039;&amp;#039;Device has no iris controls&amp;#039;&amp;#039;&lt;br /&gt;
=====Presets=====&lt;br /&gt;
*Has Presets: Yes&lt;br /&gt;
*Num Presets: 8&lt;br /&gt;
*Has Home Preset: Yes&lt;br /&gt;
*Can Set Presets: Yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====New Control Protocol Script====&lt;br /&gt;
#Find the location of the ZoneMinder control script Perl modules on your server:&lt;br /&gt;
##From a command shell, issue the following command which will search all directories under / for the PanasonicIP.pm control file which is included with ZoneMinder: &amp;lt;tt&amp;gt;find / | grep &amp;#039;PanasonicIP.pm&amp;#039;&amp;lt;/tt&amp;gt;&lt;br /&gt;
##You should receive output similar to this: &amp;lt;tt&amp;gt;/usr/share/perl5/ZoneMinder/Control/PanasonicIP.pm&amp;lt;/tt&amp;gt;&lt;br /&gt;
#Copy [[http://durdle.com/archives/2011/02/26/zoneminder-control-module-for-foscam-fi8918w/ Hdurdle&amp;#039;s]] [[http://durdle.com/wp-content/uploads/FoscamFI8918W.pm_.txt control script]] to the Zone Minder control script folder&lt;br /&gt;
#Rename the control script to &amp;lt;tt&amp;gt;FoscamFI8918W.pm&amp;lt;/tt&amp;gt;&lt;br /&gt;
#Make sure all users have read access to FoscamFI8918W.pm. &amp;lt;tt&amp;gt;chmod a+r FoscamFI8918W.pm&amp;lt;/tt&amp;gt;&lt;br /&gt;
#If running version 1.25 or newer, open the file.&lt;br /&gt;
##Comment the line &amp;quot;use ZoneMinder::Debug qw(:all);&lt;br /&gt;
##Uncomment the line &amp;quot;#use ZoneMinder::Logger qw(:all);&lt;br /&gt;
#If running version 1.26.5 or newer, open the file.&lt;br /&gt;
##Change: &amp;quot;$self-&amp;gt;{ua}-&amp;gt;agent( &amp;quot;ZoneMinder Control Agent/&amp;quot;.ZM_VERSION );&amp;quot;&lt;br /&gt;
##With: $self-&amp;gt;{ua}-&amp;gt;agent( &amp;quot;ZoneMinder Control Agent/&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
The device accepts most of the commands listed in this PDF[http://www.notesco.net/download/ipcamcgisdk21.pdf].&lt;br /&gt;
&lt;br /&gt;
==== Foscam Forum Topic ====&lt;br /&gt;
&lt;br /&gt;
See here for more information about new script for original foscam and upgraded clones:&lt;br /&gt;
[[http://foscam.us/forum/post44816.html#p44816]]&lt;/div&gt;</summary>
		<author><name>Sagitt</name></author>
	</entry>
	<entry>
		<id>http://wiki.staging.zoneminder.com/index.php?title=Foscam_FI8918W&amp;diff=6144</id>
		<title>Foscam FI8918W</title>
		<link rel="alternate" type="text/html" href="http://wiki.staging.zoneminder.com/index.php?title=Foscam_FI8918W&amp;diff=6144"/>
		<updated>2014-04-21T19:06:24Z</updated>

		<summary type="html">&lt;p&gt;Sagitt: /* New Control Protocol Script */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article assumes you have a basic understanding of Zone Minder. Fields that are up to the user to decide on are not listed.&lt;br /&gt;
&lt;br /&gt;
The camera used in the screenshots has a hostname of &amp;quot;Monoculous-1&amp;quot;, which is also the friendly name used in ZoneMinder. Hopefully you&amp;#039;re a little creative and will have your own naming convention for your cameras, so you may have different names.&lt;br /&gt;
&lt;br /&gt;
==Capabilities within ZoneMinder==&lt;br /&gt;
*Resolutions / frame rates&lt;br /&gt;
**Wired:&lt;br /&gt;
***640x480 @ 15fps (In well lit room)&lt;br /&gt;
***320x240 @ 30fps(?)&lt;br /&gt;
**Wireless:&lt;br /&gt;
***640x480 @ 9fps (In well lit room)&lt;br /&gt;
***320x240 @ 14fps (?)&lt;br /&gt;
*Control&lt;br /&gt;
**IR On/Off (Wake/Sleep)&lt;br /&gt;
**Reboot&lt;br /&gt;
**Movement&lt;br /&gt;
***Diagonal&lt;br /&gt;
***Continuous&lt;br /&gt;
**Tilt, Pan&lt;br /&gt;
***Variable speed possible, but not yet supported in Control Script&lt;br /&gt;
**Iris&lt;br /&gt;
***Brightness adjustment possible, but not yet supported in Control Script&lt;br /&gt;
**Presets&lt;br /&gt;
***8 presets, and home position&lt;br /&gt;
&lt;br /&gt;
== Camera configuration ==&lt;br /&gt;
# Your camera should NOT be exposed to the Internet. There is no need for it, and it just poses the risk that others will do nasty things with it. Make sure your camera is on a local network only, and that it is pingable and accessible from your machine hosting your ZoneMinder installation. Instructions on doing this are out of the scope of this article.&lt;br /&gt;
# It can make your life simpler to have your camera registered with your local DNS server. Doing this is out of the scope of this article.&lt;br /&gt;
# The firmware utilized in this is the latest at time of writing, 11.22.2.38, with Web UI 2.4.18.17. This can be upgraded by downloading the firmware and following the instruction on Foscam&amp;#039;s website[http://www.foscam.com/help.aspx?TypeId=11].&lt;br /&gt;
# It is recommended that you configure your camera with a separate visitor, operator, and admin password. This is done through the camera&amp;#039;s web interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Greenshot 2011-11-22 15-11-01.png]]&lt;br /&gt;
&lt;br /&gt;
== Monitor configuration ==&lt;br /&gt;
This article assumes you have a basic understanding of Zone Minder. Fields that are up to the user to decide on are not listed. These settings are a starting point if you wish to tweak further.&lt;br /&gt;
&lt;br /&gt;
The camera used in the screenshots has a hostname of &amp;quot;Monoculous-1&amp;quot;, which is also the friendly name used in ZoneMinder. Your configuration will likely be different.&lt;br /&gt;
&lt;br /&gt;
===General tab===&lt;br /&gt;
[[File:Greenshot 2011-11-22 15-00-52.png]]&lt;br /&gt;
*Source type: Remote&lt;br /&gt;
&lt;br /&gt;
===Source tab===&lt;br /&gt;
[[File:Greenshot 2011-11-22 15-06-41.png]]&lt;br /&gt;
*Remote Protocol: HTTP&lt;br /&gt;
*Remote Method: Simple&lt;br /&gt;
*Remote Host Name: &amp;#039;&amp;#039;Use the resolveable hostname or IP address of the camera&amp;#039;&amp;#039;&lt;br /&gt;
*Remote Host Port: &amp;#039;&amp;#039;80 is default, change this if you have modified the camera&amp;#039;s settings&amp;#039;&amp;#039;&lt;br /&gt;
*Remote Host Path: /videostream.cgi?user=&amp;#039;&amp;#039;&amp;#039;visitor&amp;#039;&amp;#039;&amp;#039;&amp;amp;pwd=&amp;#039;&amp;#039;&amp;#039;visitor&amp;#039;&amp;#039;&amp;#039; &amp;#039;&amp;#039;This builds the URL used to access the camera, so it needs to have the proper visitor username and password as specified in camera configuration above. If you decide to not follow security best practices, any user with &amp;quot;visitor&amp;quot; permissions or above on the camera would be fine.&amp;#039;&amp;#039;&lt;br /&gt;
*Remote Image Colors: 24 bit color&lt;br /&gt;
*Capture Width (pixels): 640 &amp;#039;&amp;#039;If your camera is mounted sideways, switch the capture width and height.&amp;#039;&amp;#039;&lt;br /&gt;
*Capture Height (pixels): 480 &lt;br /&gt;
*Orientation: Normal &amp;#039;&amp;#039;If your camera is mounted sideways, you can change this to reflect that, but you may need to transpose the capture height and width as well&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
===Control===&lt;br /&gt;
[[File:Greenshot_2011-11-22_15-42-51.png]]&lt;br /&gt;
*Controllable: Yes&lt;br /&gt;
*Control Type: Foscam FI8918W &amp;#039;&amp;#039;This option may need to be added by clicking &amp;quot;Edit&amp;quot; and adding a new control as described in the [[Foscam_FI8918W#New_Control_Type|&amp;quot;New Control Type&amp;quot;]] section below.&amp;#039;&amp;#039;&lt;br /&gt;
*Control Device: user=&amp;#039;&amp;#039;&amp;#039;operator&amp;#039;&amp;#039;&amp;#039;&amp;amp;pwd=&amp;#039;&amp;#039;&amp;#039;operator&amp;#039;&amp;#039;&amp;#039; &amp;#039;&amp;#039;This is a field passed to the control script, which in this case needs to be the authentication portion of the control URL. The account specified on the camera needs to have operator privileges or above.&lt;br /&gt;
*Control Address: &amp;#039;&amp;#039;In all imaginable cases, this will be the same as the hostname/IP of the camera, the &amp;quot;Remote Hostname&amp;quot; from the source tab.&amp;#039;&amp;#039;&lt;br /&gt;
*Track Motion: No &amp;#039;&amp;#039;This camera does not support absolute movement, so motion tracking is not possible.&amp;#039;&amp;#039;&lt;br /&gt;
*Return Location: Preset 1. &amp;#039;&amp;#039;Preset 1 is generally used as the home position.&amp;#039;&amp;#039;&lt;br /&gt;
*Return Delay: 30 &amp;#039;This setting likely has no effect since Track Motion is off.&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====New Control Type====&lt;br /&gt;
:Unless this is included in future versions, you will have to create a new control type for the camera. This can be done by clicking &amp;quot;Edit&amp;quot; on the &amp;quot;Control&amp;quot; tab of the monitor, and &amp;quot;Add new monitor&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=====Main=====&lt;br /&gt;
[[File:Greenshot 2011-11-22 15-47-12.png]]&lt;br /&gt;
*Name: Foscam FI8918W &amp;#039;&amp;#039;This can be anything you want, but why change it.&amp;#039;&amp;#039;&lt;br /&gt;
*Type: Remote&lt;br /&gt;
*Protocol: This must be the name of the script provided in the [[Foscam_FI8918W#New_Control_Protocol_Script|&amp;quot;New Control Protocol Script&amp;quot;]] section.&lt;br /&gt;
*Can Wake: Yes &amp;#039;&amp;#039;The wake control is used to turn the IR on.&amp;#039;&amp;#039;&lt;br /&gt;
*Can Sleep: Yes &amp;#039;&amp;#039;The sleep control is used to turn the IR off.&amp;#039;&amp;#039;&lt;br /&gt;
*Can Reset: Yes &amp;#039;&amp;#039;The reset control is used to reboot the camera.&amp;#039;&amp;#039;&lt;br /&gt;
=====Move=====&lt;br /&gt;
*Can Move: Yes&lt;br /&gt;
*Can Move Diagonally: Yes&lt;br /&gt;
*Can Move Mapped: No&lt;br /&gt;
*Can Move Absolute: No&lt;br /&gt;
*Can Move Relative: No&lt;br /&gt;
*Can Move Continuous: Yes&lt;br /&gt;
=====Pan=====&lt;br /&gt;
*Can Pan: Yes&lt;br /&gt;
*Min Pan Range: 0&lt;br /&gt;
*Max Pan Range: 0&lt;br /&gt;
*Min Pan Step: 0&lt;br /&gt;
*Max Pan Step: 0&lt;br /&gt;
*Has Pan Speed: No&lt;br /&gt;
*Min Pan Speed: 0&lt;br /&gt;
*Max Pan Speed: 0&lt;br /&gt;
*Has Turbo Pan: No&lt;br /&gt;
*Turbo Pan Speed: No&lt;br /&gt;
=====Tilt=====&lt;br /&gt;
*Can Tilt: Yes&lt;br /&gt;
*Min Tilt Range: 0&lt;br /&gt;
*Max Tilt Range: 0&lt;br /&gt;
*Min Tilt Step: 0&lt;br /&gt;
*Max Tilt Step: 0&lt;br /&gt;
*Has Tilt Speed: No&lt;br /&gt;
*Min Tilt Speed: 0&lt;br /&gt;
*Max Tilt Speed: 0&lt;br /&gt;
*Has Tilt Pan: No&lt;br /&gt;
*Turbo Tilt Speed: No&lt;br /&gt;
=====Zoom=====&lt;br /&gt;
&amp;#039;&amp;#039;Device can not zoom&amp;#039;&amp;#039;&lt;br /&gt;
=====Focus=====&lt;br /&gt;
&amp;#039;&amp;#039;Device can not focus&amp;#039;&amp;#039;&lt;br /&gt;
=====White=====&lt;br /&gt;
&amp;#039;&amp;#039;No support yet in script for white balance changes&amp;#039;&amp;#039;&lt;br /&gt;
=====Iris=====&lt;br /&gt;
&amp;#039;&amp;#039;Device has no iris controls&amp;#039;&amp;#039;&lt;br /&gt;
=====Presets=====&lt;br /&gt;
*Has Presets: Yes&lt;br /&gt;
*Num Presets: 8&lt;br /&gt;
*Has Home Preset: Yes&lt;br /&gt;
*Can Set Presets: Yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====New Control Protocol Script====&lt;br /&gt;
#Find the location of the ZoneMinder control script Perl modules on your server:&lt;br /&gt;
##From a command shell, issue the following command which will search all directories under / for the PanasonicIP.pm control file which is included with ZoneMinder: &amp;lt;tt&amp;gt;find / | grep &amp;#039;PanasonicIP.pm&amp;#039;&amp;lt;/tt&amp;gt;&lt;br /&gt;
##You should receive output similar to this: &amp;lt;tt&amp;gt;/usr/share/perl5/ZoneMinder/Control/PanasonicIP.pm&amp;lt;/tt&amp;gt;&lt;br /&gt;
#Copy [[http://durdle.com/archives/2011/02/26/zoneminder-control-module-for-foscam-fi8918w/ Hdurdle&amp;#039;s]] [[http://durdle.com/wp-content/uploads/FoscamFI8918W.pm_.txt control script]] to the Zone Minder control script folder&lt;br /&gt;
#Rename the control script to &amp;lt;tt&amp;gt;FoscamFI8918W.pm&amp;lt;/tt&amp;gt;&lt;br /&gt;
#Make sure all users have read access to FoscamFI8918W.pm. &amp;lt;tt&amp;gt;chmod a+r FoscamFI8918W.pm&amp;lt;/tt&amp;gt;&lt;br /&gt;
#If running version 1.25 or newer, open the file.&lt;br /&gt;
##Comment the line &amp;quot;use ZoneMinder::Debug qw(:all);&lt;br /&gt;
##Uncomment the line &amp;quot;#use ZoneMinder::Logger qw(:all);&lt;br /&gt;
#If running version 1.26.5 or newer, open the file.&lt;br /&gt;
##Change: &amp;quot;$self-&amp;gt;{ua}-&amp;gt;agent( &amp;quot;ZoneMinder Control Agent/&amp;quot;.ZM_VERSION );&amp;quot;&lt;br /&gt;
##With: $self-&amp;gt;{ua}-&amp;gt;agent( &amp;quot;ZoneMinder Control Agent/&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
$self-&amp;gt;{ua}-&amp;gt;agent( &amp;quot;ZoneMinder Control Agent/&amp;quot;);&lt;br /&gt;
The device accepts most of the commands listed in this PDF[http://www.notesco.net/download/ipcamcgisdk21.pdf].&lt;/div&gt;</summary>
		<author><name>Sagitt</name></author>
	</entry>
</feed>