EasyN FS-613B-M166 IP PTZ camera
EasyN FS-613B-M166 IP PTZ camera
Got the video to work on zoneminder but not able to control the ptz function, anyone have any experience with this camera. Thanks.
[ General ]
Name
Source Type Remote
Function Monitor
Enabled yes
Linked Monitors
Maximum FPS 10.0
Alarm Maximum FPS
Reference Image Blend %ge 7
Triggers None available
[ Source ]
Remote Protocol HTTP
Remote Method Simple
Remote Host Name 192.168.1.130
Remote Host Port 81
Remote Host Path /videostream.cgi?user=admin&pwd=(enter here if any)&resolution=8&rate=6
Remote Image Colours 24 bit colour
Capture Width (pixels) 320
Capture Height (pixels) 240
Preserve Aspect Ratio
Orientation Normal
Here is what I have found so far on this camera...
/ip address/videostream.cgi?user=admin&pwd=&resolution=8&rate=0 (remote host path)
/ip address/decoder_control.cgi?command=6 (pan right)
/ip address/decoder_control.cgi?command=1 (stop)
/ip address/decoder_control.cgi?command=4 (pan left)
/ip address/decoder_control.cgi?command=0 (up)
/ip address/decoder_control.cgi?command=2 (down)
/ip address/decoder_control.cgi?command=31 (preset 1)
/ip address/decoder_control.cgi?command=33 (preset 2)
/ip address/decoder_control.cgi?command=35 (preset 3)
/ip address/decoder_control.cgi?command=37 (preset 4)
/ip address/camera_control.cgi?param=5&value=1 (mirror vertically)
/ip address/camera_control.cgi?param=5&value=2 (mirror horizontally)
PTZ control on camera getting this message..
Control response was status = undefined
message = /usr/bin/zmcontrol.pl --autostop --command=moveConRight --id=5=>
[ General ]
Name
Source Type Remote
Function Monitor
Enabled yes
Linked Monitors
Maximum FPS 10.0
Alarm Maximum FPS
Reference Image Blend %ge 7
Triggers None available
[ Source ]
Remote Protocol HTTP
Remote Method Simple
Remote Host Name 192.168.1.130
Remote Host Port 81
Remote Host Path /videostream.cgi?user=admin&pwd=(enter here if any)&resolution=8&rate=6
Remote Image Colours 24 bit colour
Capture Width (pixels) 320
Capture Height (pixels) 240
Preserve Aspect Ratio
Orientation Normal
Here is what I have found so far on this camera...
/ip address/videostream.cgi?user=admin&pwd=&resolution=8&rate=0 (remote host path)
/ip address/decoder_control.cgi?command=6 (pan right)
/ip address/decoder_control.cgi?command=1 (stop)
/ip address/decoder_control.cgi?command=4 (pan left)
/ip address/decoder_control.cgi?command=0 (up)
/ip address/decoder_control.cgi?command=2 (down)
/ip address/decoder_control.cgi?command=31 (preset 1)
/ip address/decoder_control.cgi?command=33 (preset 2)
/ip address/decoder_control.cgi?command=35 (preset 3)
/ip address/decoder_control.cgi?command=37 (preset 4)
/ip address/camera_control.cgi?param=5&value=1 (mirror vertically)
/ip address/camera_control.cgi?param=5&value=2 (mirror horizontally)
PTZ control on camera getting this message..
Control response was status = undefined
message = /usr/bin/zmcontrol.pl --autostop --command=moveConRight --id=5=>
Re: EasyN FS-613B-M166 IP PTZ camera
Hi Therese,
I will respond into this topic
I created a new control in the web administration module.
Evenso I have created a new control file in the Perl directory.
In this file all actions are specifeid.
I already saw that your camera is different from mine.
But I think you have to use for example to use PTZ up
But I think you have to use for example to use PTZ down
Togheter with this and my other post I think you will be able to create your own control
EasyN Control H serie
Let me know if you manage otherwise I will try to help.
I will respond into this topic
I created a new control in the web administration module.
Evenso I have created a new control file in the Perl directory.
In this file all actions are specifeid.
I already saw that your camera is different from mine.
But I think you have to use for example to use PTZ up
Code: Select all
sub Up
{
my $self = shift;
Debug( "Move Up" );
my $cmd = "decoder_control.cgi?command=0";
$self->sendCmd( $cmd );
}
Code: Select all
Sub Down
{
my $self = shift;
Debug( "Move Down" );
my $cmd = "decoder_control.cgi?command=2";
$self->sendCmd( $cmd );
}
EasyN Control H serie
Let me know if you manage otherwise I will try to help.
Enjoyment Matters
Re: EasyN FS-613B-M166 IP PTZ camera
Thank you for replying so quickly , I will try and I will keep you posted...
Re: EasyN FS-613B-M166 IP PTZ camera
Created perl file and saved it as Easyn.pm @ usr/share/perl5/zoneminder/control/ but still not able to control ptz function, am I still missing something...thanks.
sub Up
{
my $self = shift;
Debug( "Move Up" );
my $cmd = "decoder_control.cgi?command=0";
$self->sendCmd( $cmd );
}
sub Down
{
my $self = shift;
Debug( "Move Down" );
my $cmd = "decoder_control.cgi?command=2";
$self->sendCmd( $cmd );
}
sub Left
{
my $self = shift;
Debug( "Move Left" );
my $cmd = "decoder_control.cgi?command=4";
$self->sendCmd( $cmd );
}
sub Right
{
my $self = shift;
Debug( "Move Right" );
my $cmd = "decoder_control.cgi?command=6";
$self->sendCmd( $cmd );
}
Checked under /tmp/zmcontrol log and this is what I was getting...
02/06/12 17:21:23.825888 zmcontrol[1482].INF [Starting control server 5/EasyN]
02/06/12 17:21:23.835769 zmcontrol[1484].INF [Control server 5/EasyN starting at 12/02/06 17:21:23]
02/06/12 17:21:33.833488 zmcontrol[1482].FAT [Can't connect: No such file or directory]
sub Up
{
my $self = shift;
Debug( "Move Up" );
my $cmd = "decoder_control.cgi?command=0";
$self->sendCmd( $cmd );
}
sub Down
{
my $self = shift;
Debug( "Move Down" );
my $cmd = "decoder_control.cgi?command=2";
$self->sendCmd( $cmd );
}
sub Left
{
my $self = shift;
Debug( "Move Left" );
my $cmd = "decoder_control.cgi?command=4";
$self->sendCmd( $cmd );
}
sub Right
{
my $self = shift;
Debug( "Move Right" );
my $cmd = "decoder_control.cgi?command=6";
$self->sendCmd( $cmd );
}
Checked under /tmp/zmcontrol log and this is what I was getting...
02/06/12 17:21:23.825888 zmcontrol[1482].INF [Starting control server 5/EasyN]
02/06/12 17:21:23.835769 zmcontrol[1484].INF [Control server 5/EasyN starting at 12/02/06 17:21:23]
02/06/12 17:21:33.833488 zmcontrol[1482].FAT [Can't connect: No such file or directory]
Re: EasyN FS-613B-M166 IP PTZ camera
Therese
The location you are mentioning is this also the directory where other control files are located?
Otherwise you can search for a file using the command "find / -name PanasonicIP.pm"
You system should give you the correct file location then were to put your own control file.
regards
The location you are mentioning is this also the directory where other control files are located?
Otherwise you can search for a file using the command "find / -name PanasonicIP.pm"
You system should give you the correct file location then were to put your own control file.
regards
Enjoyment Matters
Re: EasyN FS-613B-M166 IP PTZ camera
yes that is where the other files are. I am using Ubuntu 10.04 LTS.
I am new at using Linux so not too sure. Using terminal mode and get into the file by "sudo gedit " open a new document then I copied the file and saved it as EasyN.pm in usr/share/perl5/zoneminder/control. I hope this is correct. Thank you for helping me.
I am new at using Linux so not too sure. Using terminal mode and get into the file by "sudo gedit " open a new document then I copied the file and saved it as EasyN.pm in usr/share/perl5/zoneminder/control. I hope this is correct. Thank you for helping me.
- Attachments
-
- file location.jpg (37.66 KiB) Viewed 9959 times
Re: EasyN FS-613B-M166 IP PTZ camera
Therese,
ZoneMinder can not find the file. Maybe you didn't have set rights to read the file?
Evenso I post some screenshots from my config maybe that will also help.
ZoneMinder can not find the file. Maybe you didn't have set rights to read the file?
Evenso I post some screenshots from my config maybe that will also help.
- Attachments
-
- ZM_CC_1.PNG (5.79 KiB) Viewed 9947 times
-
- ZM_CC_0.PNG (7.85 KiB) Viewed 9947 times
Enjoyment Matters
Re: EasyN FS-613B-M166 IP PTZ camera
Maybe that is what I was doing wrong. How do you setup rights to read the file ? I am new on Linux and not sure how to do this. Thanks. Screen shots of my setup.
- Attachments
-
- scrn_shots.jpg (47.94 KiB) Viewed 9941 times
Re: EasyN FS-613B-M166 IP PTZ camera
This is what shows up and my zmcontrol log file.
- Attachments
-
- control scrn_shot.jpg (61.69 KiB) Viewed 9934 times
Re: EasyN FS-613B-M166 IP PTZ camera
Therese,
First you have to remove the "EasyN" text from the label control device.
This setting is e.q. for serial ports etc.
Second your address i would try:
username:password@192.168.1.30:81
Just fill in your username and password.
First you have to remove the "EasyN" text from the label control device.
This setting is e.q. for serial ports etc.
Second your address i would try:
username:password@192.168.1.30:81
Just fill in your username and password.
Enjoyment Matters
Re: EasyN FS-613B-M166 IP PTZ camera
I tried that and it was still the same. The same error log.
username:password@192.168.1.30:81
admin:@192.168.1.30:81
there is no password for the camera just the username.
username:password@192.168.1.30:81
admin:@192.168.1.30:81
there is no password for the camera just the username.
Re: EasyN FS-613B-M166 IP PTZ camera
Therese,
Try to modify the EasyN.pm file command with
my $cmd = "decoder_control.cgi?command=0&user=admin&pwd=";
The control address as specified 192.168.1.30:81
No control device
Try to modify the EasyN.pm file command with
my $cmd = "decoder_control.cgi?command=0&user=admin&pwd=";
The control address as specified 192.168.1.30:81
No control device
Enjoyment Matters
Re: EasyN FS-613B-M166 IP PTZ camera
Try to modify the EasyN.pm file command with
my $cmd = "decoder_control.cgi?command=0&user=admin&pwd=";
The control address as specified 192.168.1.30:81
No control device
Did the changes to the my $cmd but still not working.
my $cmd = "decoder_control.cgi?command=0&user=admin&pwd=";
The control address as specified 192.168.1.30:81
No control device
Did the changes to the my $cmd but still not working.
Re: EasyN FS-613B-M166 IP PTZ camera
Therese,
I just saw in one of your screenshots that you have the message moveConRight.
Can you post your config file?
Check also your "Control Capabilities" of EasyN "Can Move Continuous" should NOT be selected for this camera that's another configuration. I think that you have selected that on this moment
I just saw in one of your screenshots that you have the message moveConRight.
Can you post your config file?
Check also your "Control Capabilities" of EasyN "Can Move Continuous" should NOT be selected for this camera that's another configuration. I think that you have selected that on this moment
Enjoyment Matters
Re: EasyN FS-613B-M166 IP PTZ camera
Configuration file ? is it the Easyn.pm file you wanted...
# ==========================================================================
#
# ZoneMinder Foscam FI8908W IP Control Protocol Module, $Date: 2009-11-25 09:20:00 +0000 (Wed, 04 Nov 2009) $, $Revision: 0001 $
# Copyright (C) 2001-2008 Philip Coombes
# Modified for use with Foscam FI8908W IP Camera by Dave Harris
#
# 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 module contains the implementation of the Foscam FI8908W IP camera control
# protocol
#
package ZoneMinder::Control::EasyN;
use 5.006;
use strict;
use warnings;
require ZoneMinder::Base;
require ZoneMinder::Control;
our @ISA = qw(ZoneMinder::Control);
our $VERSION = $ZoneMinder::Base::VERSION;
# ==========================================================================
#
# Foscam FI8908W IP Control Protocol
#
# ==========================================================================
use ZoneMinder::Debug qw(:all);
use ZoneMinder::Config qw(:all);
use Time::HiRes qw( usleep );
sub new
{
my $class = shift;
my $id = shift;
my $self = ZoneMinder::Control->new( $id );
my $logindetails = “”;
bless( $self, $class );
srand( time() );
return $self;
}
our $AUTOLOAD;
sub AUTOLOAD
{
my $self = shift;
my $class = ref($self) || croak( “$self not object” );
my $name = $AUTOLOAD;
$name =~ s/.*://;
if ( exists($self->{$name}) )
{
return( $self->{$name} );
}
Fatal( “Can’t access $name member of object of class $class” );
}
our $stop_command;
sub open
{
my $self = shift;
$self->loadMonitor();
use LWP::UserAgent;
$self->{ua} = LWP::UserAgent->new;
$self->{ua}->agent( “ZoneMinder Control Agent/”.ZM_VERSION );
$self->{state} = ‘open’;
}
sub close
{
my $self = shift;
$self->{state} = ‘closed’;
}
sub printMsg
{
my $self = shift;
my $msg = shift;
my $msg_len = length($msg);
Debug( $msg.”[".$msg_len."]” );
}
sub sendCmd
{
my $self = shift;
my $cmd = shift;
my $result = undef;
printMsg( $cmd, “Tx” );
my $req = HTTP::Request->new( GET=>”http://”.$self->{Monitor}->{ControlAddress}.”/$cmd” );
my $res = $self->{ua}->request($req);
if ( $res->is_success )
{
$result = !undef;
}
else
{
Error( “Error check failed:’”.$res->status_line().”‘” );
}
return( $result );
}
sub reset
{
my $self = shift;
Debug( “Camera Reset” );
my $cmd = “reboot.cgi?user=admin&pwd=”;
$self->sendCmd( $cmd );
}
#Up Arrow
sub moveConUp
{
my $self = shift;
$stop_command = “1?;
Debug( “Move Up” );
my $cmd = “decoder_control.cgi?command=0&user=admin&pwd=”;
$self->sendCmd( $cmd );
}
#Down Arrow
sub moveConDown
{
my $self = shift;
$stop_command = “1?;
Debug( “Move Down” );
my $cmd = “decoder_control.cgi?command=2&user=admin&pwd=”;
$self->sendCmd( $cmd );
}
#Left Arrow
sub moveConLeft
{
my $self = shift;
$stop_command = “1?;
Debug( “Move Left” );
my $cmd = “decoder_control.cgi?command=4&user=admin&pwd=”;
$self->sendCmd( $cmd );
}
#Right Arrow
sub moveConRight
{
my $self = shift;
$stop_command = “1?;
Debug( “Move Right” );
my $cmd = “decoder_control.cgi?command=6&user=admin&pwd=”;
$self->sendCmd( $cmd );
}
#Diagonally Up Right Arrow
sub moveConUpRight
{
my $self = shift;
$stop_command = “1?;
Debug( “Move Diagonally Up Right” );
my $cmd = “decoder_control.cgi?command=91&user=admin&pwd=”;
$self->sendCmd( $cmd );
}
#Diagonally Down Right Arrow
sub moveConDownRight
{
my $self = shift;
$stop_command = “1?;
Debug( “Move Diagonally Down Right” );
my $cmd = “decoder_control.cgi?command=93&user=admin&pwd=”;
$self->sendCmd( $cmd );
}
#Diagonally Up Left Arrow
sub moveConUpLeft
{
my $self = shift;
$stop_command = “1?;
Debug( “Move Diagonally Up Left” );
my $cmd = “decoder_control.cgi?command=90&user=admin&pwd=”;
$self->sendCmd( $cmd );
}
#Diagonally Down Left Arrow
sub moveConDownLeft
{
my $self = shift;
$stop_command = “1?;
Debug( “Move Diagonally Down Left” );
my $cmd = “decoder_control.cgi?command=92&user=admin&pwd=”;
$self->sendCmd( $cmd );
}
#Stop
sub moveStop
{
my $self = shift;
Debug( “Move Stop” );
my $cmd = “decoder_control.cgi?user=admin&pwd=&command=1?;
$self->sendCmd( $cmd );
}
#Move Camera to Home Position
sub presetHome
{
my $self = shift;
Debug( “Home Preset” );
my $cmd = “decoder_control.cgi?command=25&user=admin&pwd=”;
$self->sendCmd( $cmd );
}
1;
__END__
# ==========================================================================
#
# ZoneMinder Foscam FI8908W IP Control Protocol Module, $Date: 2009-11-25 09:20:00 +0000 (Wed, 04 Nov 2009) $, $Revision: 0001 $
# Copyright (C) 2001-2008 Philip Coombes
# Modified for use with Foscam FI8908W IP Camera by Dave Harris
#
# 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 module contains the implementation of the Foscam FI8908W IP camera control
# protocol
#
package ZoneMinder::Control::EasyN;
use 5.006;
use strict;
use warnings;
require ZoneMinder::Base;
require ZoneMinder::Control;
our @ISA = qw(ZoneMinder::Control);
our $VERSION = $ZoneMinder::Base::VERSION;
# ==========================================================================
#
# Foscam FI8908W IP Control Protocol
#
# ==========================================================================
use ZoneMinder::Debug qw(:all);
use ZoneMinder::Config qw(:all);
use Time::HiRes qw( usleep );
sub new
{
my $class = shift;
my $id = shift;
my $self = ZoneMinder::Control->new( $id );
my $logindetails = “”;
bless( $self, $class );
srand( time() );
return $self;
}
our $AUTOLOAD;
sub AUTOLOAD
{
my $self = shift;
my $class = ref($self) || croak( “$self not object” );
my $name = $AUTOLOAD;
$name =~ s/.*://;
if ( exists($self->{$name}) )
{
return( $self->{$name} );
}
Fatal( “Can’t access $name member of object of class $class” );
}
our $stop_command;
sub open
{
my $self = shift;
$self->loadMonitor();
use LWP::UserAgent;
$self->{ua} = LWP::UserAgent->new;
$self->{ua}->agent( “ZoneMinder Control Agent/”.ZM_VERSION );
$self->{state} = ‘open’;
}
sub close
{
my $self = shift;
$self->{state} = ‘closed’;
}
sub printMsg
{
my $self = shift;
my $msg = shift;
my $msg_len = length($msg);
Debug( $msg.”[".$msg_len."]” );
}
sub sendCmd
{
my $self = shift;
my $cmd = shift;
my $result = undef;
printMsg( $cmd, “Tx” );
my $req = HTTP::Request->new( GET=>”http://”.$self->{Monitor}->{ControlAddress}.”/$cmd” );
my $res = $self->{ua}->request($req);
if ( $res->is_success )
{
$result = !undef;
}
else
{
Error( “Error check failed:’”.$res->status_line().”‘” );
}
return( $result );
}
sub reset
{
my $self = shift;
Debug( “Camera Reset” );
my $cmd = “reboot.cgi?user=admin&pwd=”;
$self->sendCmd( $cmd );
}
#Up Arrow
sub moveConUp
{
my $self = shift;
$stop_command = “1?;
Debug( “Move Up” );
my $cmd = “decoder_control.cgi?command=0&user=admin&pwd=”;
$self->sendCmd( $cmd );
}
#Down Arrow
sub moveConDown
{
my $self = shift;
$stop_command = “1?;
Debug( “Move Down” );
my $cmd = “decoder_control.cgi?command=2&user=admin&pwd=”;
$self->sendCmd( $cmd );
}
#Left Arrow
sub moveConLeft
{
my $self = shift;
$stop_command = “1?;
Debug( “Move Left” );
my $cmd = “decoder_control.cgi?command=4&user=admin&pwd=”;
$self->sendCmd( $cmd );
}
#Right Arrow
sub moveConRight
{
my $self = shift;
$stop_command = “1?;
Debug( “Move Right” );
my $cmd = “decoder_control.cgi?command=6&user=admin&pwd=”;
$self->sendCmd( $cmd );
}
#Diagonally Up Right Arrow
sub moveConUpRight
{
my $self = shift;
$stop_command = “1?;
Debug( “Move Diagonally Up Right” );
my $cmd = “decoder_control.cgi?command=91&user=admin&pwd=”;
$self->sendCmd( $cmd );
}
#Diagonally Down Right Arrow
sub moveConDownRight
{
my $self = shift;
$stop_command = “1?;
Debug( “Move Diagonally Down Right” );
my $cmd = “decoder_control.cgi?command=93&user=admin&pwd=”;
$self->sendCmd( $cmd );
}
#Diagonally Up Left Arrow
sub moveConUpLeft
{
my $self = shift;
$stop_command = “1?;
Debug( “Move Diagonally Up Left” );
my $cmd = “decoder_control.cgi?command=90&user=admin&pwd=”;
$self->sendCmd( $cmd );
}
#Diagonally Down Left Arrow
sub moveConDownLeft
{
my $self = shift;
$stop_command = “1?;
Debug( “Move Diagonally Down Left” );
my $cmd = “decoder_control.cgi?command=92&user=admin&pwd=”;
$self->sendCmd( $cmd );
}
#Stop
sub moveStop
{
my $self = shift;
Debug( “Move Stop” );
my $cmd = “decoder_control.cgi?user=admin&pwd=&command=1?;
$self->sendCmd( $cmd );
}
#Move Camera to Home Position
sub presetHome
{
my $self = shift;
Debug( “Home Preset” );
my $cmd = “decoder_control.cgi?command=25&user=admin&pwd=”;
$self->sendCmd( $cmd );
}
1;
__END__