Posted: Wed Apr 28, 2010 8:53 pm
Do I send those commands to the camera or the zoneminder?
ZoneMinder Forums
https://forums.zoneminder.com/
Code: Select all
19863ERROR: ld.so: object '/usr/lib/libv4l/v4l2convert.so' from LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object '/usr/lib/libv4l/v4l2convert.so' from LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object '/usr/lib/libv4l/v4l2convert.so' from LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object '/usr/lib/libv4l/v4l2convert.so' from LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object '/usr/lib/libv4l/v4l2convert.so' from LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object '/usr/lib/libv4l/v4l2convert.so' from LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object '/usr/lib/libv4l/v4l2convert.so' from LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object '/usr/lib/libv4l/v4l2convert.so' from LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object '/usr/lib/libv4l/v4l2convert.so' from LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object '/usr/lib/libv4l/v4l2convert.so' from LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object '/usr/lib/libv4l/v4l2convert.so' from LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object '/usr/lib/libv4l/v4l2convert.so' from LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object '/usr/lib/libv4l/v4l2convert.so' from LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object '/usr/lib/libv4l/v4l2convert.so' from LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object '/usr/lib/libv4l/v4l2convert.so' from LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object '/usr/lib/libv4l/v4l2convert.so' from LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object '/usr/lib/libv4l/v4l2convert.so' from LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object '/usr/lib/libv4l/v4l2convert.so' from LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object '/usr/lib/libv4l/v4l2convert.so' from LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object '/usr/lib/libv4l/v4l2convert.so' from LD_PRELOAD cannot be preloaded: ignored.
I tried that with the IP address of the camera but the results were the same.PacoLM wrote:You need to put the control address, I think.
Code: Select all
Can't connect: No such file or directory at /usr/lib/perl5/vendor_perl/5.10.0/ZoneMinder/Debug.pm line 349
ZoneMinder::Debug::Fatal('Can\'t connect: No such file or directory') called at /usr/bin/zmcontrol.pl line 154
Code: Select all
Can't connect: Connection refused at /usr/lib/perl5/vendor_perl/5.10.0/ZoneMinder/Debug.pm line 349
ZoneMinder::Debug::Fatal('Can\'t connect: Connection refused') called at /usr/bin/zmcontrol.pl line 158
Code: Select all
perl /usr/lib/perl5/vendor_perl/5.10.0/ZoneMinder/Control/FoscamFI8908W.pm
Code: Select all
# ==========================================================================
#
# ZoneMinder HooToo IP Camera Control Protocol Module
# Copyright (C) 2010 Steven M Campbell
#
# 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 HooToo IP camera control
# protocol. It was adapted from control protocol's written by Phillip Combes.
#
package ZoneMinder::Control::HooTooIPCam;
use 5.006;
use strict;
use warnings;
require ZoneMinder::Base;
require ZoneMinder::Control;
our @ISA = qw(ZoneMinder::Control);
our $VERSION = $ZoneMinder::Base::VERSION;
# ==========================================================================
#
# HooTooIPCam Control Protocol
#
# ==========================================================================
use ZoneMinder::Debug qw(:all);
use ZoneMinder::Config qw(:all);
sub new {
my $class = shift;
my $id = shift;
my $self = ZoneMinder::Control->new( $id );
Debug( "Camera New" );
bless( $self, $class );
return $self;
}
our $AUTOLOAD;
sub AUTOLOAD {
my $self = shift;
my $class = ref($self) || croak( "$self not object" );
my $name = $AUTOLOAD;
Debug( "Camera AUTOLOAD" );
$name =~ s/.*://;
if ( exists($self->{$name}) ) {
return( $self->{$name} );
}
# You can change the user and password here for all control commands
my $user = "admin";
my $pwd = "";
# The basic decoder_control url just to make the below commands table easy
# to read
my $decoder = "decoder_control.cgi?user=$user&pwd=$pwd";
# Instead of writing a bunch of individual routines lets make real
# autoloader, we'll just look up the requested command in this table
# and send the corresponding url string
my %commands = (
'Up' => "$decoder&command=1",
'Down' => "$decoder&command=3",
'Left' => "$decoder&command=5",
'Right' => "$decoder&command=7",
'moveConUp' => "$decoder&command=1",
'moveConDown' => "$decoder&command=3",
'moveConLeft' => "$decoder&command=5",
'moveConRight' => "$decoder&command=7",
'moveStop' => "$decoder&command=2",
'presetHome' => "$decoder&command=25",
'reset' => "reboot.cgi?user=$user&pwd=$pwd",
'cameraReset' => "reboot.cgi?user=$user&pwd=$pwd"
);
# If the command exists in the table then we send it's url string
if (exists($commands{$name})) {
return($self->sendCmd($commands{$name}));
}
# Otherwise we fail
Fatal( "Can't access $name member of object of class $class" );
}
sub open {
my $self = shift;
$self->loadMonitor();
Debug( "Camera open" );
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 );
}
1;
__END__
=head1 NAME
ZoneMinder::Control::HooTooIPCam - Perl extension to zoneminder to implement
the control protocol for the HooToo IP Camera
=head1 SYNOPSIS
use ZoneMinder::Control::HooTooIPCam;
=head1 DESCRIPTION
An implementation of the control protocol for the HooToo IP Camera for
zoneminder.
=head1 EXPORT
None by default.
=head1 SEE ALSO
ZoneMinder
ZoneMinder::Control
=head1 AUTHOR
Steven M Campbell
=head1 COPYRIGHT AND LICENSE
Copyright (C) 2010 by Steven M Campbell
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself, either Perl version 5.8.3 or,
at your option, any later version of Perl 5 you may have available.
=cut
Happy to help!sraasch wrote:I managed to buy two of these Hootoo cameras myself... I was hoping that someone here could help me get ZM configured to use them.
I've put the module provided above in place, but I can't even get video/images from them, so I'll let the control aspect wait on that.
My monitor settings are:
General
----------
source type: remote
function: monitor
enabled: checked
max fps: 10 or blank (no difference)
alarm max fps: 10 or blank (no difference)
ref image blend: 7
Source
---------
protocol: http
method: simple
host name: 192.168.1.30
host port: 80 (this is correct)
host path: /videostream.cgi (tried this with user/pass also)
host subpath: <blank>
colours: 24 bit
width: 640
height: 480
Everything else left with defaults
I appreciate any help you can give!