Does anyone know how to get this camera working with zoneminder?
Thanks
DB
Hawking HNC210
Hm. After Googling a bit, found this:
Hawking HNC210:
Edimax IC-1000:
AmberTek GC-J15:
It looks like they are similar OEM versions, actually may be the same camera running under different brand names.
For Edimax 1000 there is a solution: http://www.zoneminder.com/forums/viewto ... ght=edimax
Try it and see, may work for you! Let us know how you get along.
Hawking HNC210:
Edimax IC-1000:
AmberTek GC-J15:
It looks like they are similar OEM versions, actually may be the same camera running under different brand names.
For Edimax 1000 there is a solution: http://www.zoneminder.com/forums/viewto ... ght=edimax
Try it and see, may work for you! Let us know how you get along.
This script can get jpeg pictures from Hawking HNC210 camera.
Maybe later i wrote mjpeg relay script.
For testing this script write how many users connected to this camera and size in bytes of jpeg image from camera.
Maybe later i wrote mjpeg relay script.
Code: Select all
#!/usr/bin/perl
use IO::Socket;
#SET WHERE CAMERA IS
$sock = new IO::Socket::INET (PeerAddr => '10.11.0.101',
PeerPort => 4321,
Proto => 'tcp',
Timeout => 1);
#do it again forever
while (1){
#sleep timeout (this value give us 1fps)
select(undef, undef, undef, 0.5);
$sock->send("0110\n");
$sock->read($size, 2);
$sock->read($j1, 1);
$sock->read($j2, 1);
$j1=oct("0x".unpack("H*", $j1));
$j2=oct("0x".unpack("H*", $j2));
#print "J1_USERS:".$j1."\n";
#print "J2:".$j2."\n";
$size=oct("0x".unpack("H*", $size));
#print "SIZE:".$size."\n";
if ($size != 0) {
$sock->read($data, $size);
open OUTF, "> /var/www/hawking.jpg" or die "Can't open $outfile : $!";
print OUTF $data;
close OUTF;
}
}
Create a file named cam.pl (or whatever you want), paste the code above to it and modify it according to your preferences.
Save and close the file and chmod it "chmod 755 cam.pl" so that you can execute the script.
Run it with "./cam.pl" and test if it grabs the images correctly - if that works you can start the script in the background with "./cam.pl &"
But, as long as you can't connect from your webspace directly to your cam it won't help you very much...
Save and close the file and chmod it "chmod 755 cam.pl" so that you can execute the script.
Run it with "./cam.pl" and test if it grabs the images correctly - if that works you can start the script in the background with "./cam.pl &"
But, as long as you can't connect from your webspace directly to your cam it won't help you very much...
perl script error
I get this error when I run this script.
Can't call method "send" on an undefined value at ./hawking.pl line 17.
line 17 is this
$sock->send("0110\n");
does anyone know what this might be changed to for my implementaion.
Can't call method "send" on an undefined value at ./hawking.pl line 17.
line 17 is this
$sock->send("0110\n");
does anyone know what this might be changed to for my implementaion.