Page 1 of 1

Foscam FI8918E Pan and Tilt

Posted: Thu Nov 08, 2012 4:12 pm
by iitywygms
Hi All:
New Zoneminder user and fairly familiar with Linux.
I have Mythbuntu 12.04 backend up and running fine. I have Zoneminder 1.25 installed.
The Foscam FI8918E is installed and I get an image and video in Zoneminder.
However, I cannot get it to pan or tilt using the controls.
I followed this guide to the letter for the Fi8918W. http://www.zoneminder.com/wiki/index.php/Foscam_FI8918W
Controls should be the same yes??
Anyway, when I go to control the camera it does not respond. The log file show the various erros below.
Any help would be greatly appreciated.

2012-11-08 00:45:33.801080 zmcontrol 5821 INF Control server 1/FoscamF18918W starting at 12/11/08 00:45:33 zmcontrol.pl
2012-11-08 00:45:33.799480 zmcontrol 5819 INF Starting control server 1/FoscamF18918W zmcontrol.pl
2012-11-08 00:45:33.612155 web_php 5745 ERR /usr/bin/zmcontrol.pl --autostop --command=moveConUp --id=1=> /usr/share/zoneminder/includes/functions.php 2322
2012-11-08 00:45:33.607670 zmcontrol 5815 FAT Can't connect: No such file or directory zmcontrol.pl

Re: Foscam FI8918E Pan and Tilt

Posted: Thu Nov 08, 2012 8:14 pm
by steveaggie
Same here, man. Here is my log:

2012-11-08 20:11:11.483655 web_php 7290 ERR /usr/bin/zmcontrol.pl --autostop --command=moveConRight --id=4=> /usr/share/zoneminder/includes/functions.php 2322
2012-11-08 20:11:11.472080 zmcontrol 7558 FAT Can't connect: No such file or directory zmcontrol.pl
2012-11-08 20:11:01.472610 zmcontrol 7562 INF Control server 4/FoscamFI8918W starting at 12/11/08 14:11:01 zmcontrol.pl
2012-11-08 20:11:01.462120 zmcontrol 7558 INF Starting control server 4/FoscamFI8918W zmcontrol.pl

I have the FI8918E also, but tried naming the script both 'E' and 'W' but neither made a difference. I still get the same errors you're getting.

Re: Foscam FI8918E Pan and Tilt

Posted: Thu Nov 08, 2012 9:26 pm
by steveaggie
In doing some research on this issue I see a lot of people over the past few years have had similar issue. Occasionally someone posts that they fixed it by making sure the filenames matched up. But it seems most people did not solve the issue. It seems like it's common enough that someone would know the solution! :shock:

Re: Foscam FI8918E Pan and Tilt

Posted: Thu Nov 08, 2012 9:33 pm
by iitywygms
I am going to see if this gets sorted over the next couple of days. If not, I am returning these and going with the W version that should work.

Re: Foscam FI8918E Pan and Tilt

Posted: Wed Nov 14, 2012 11:57 am
by zefiro88
i have done a working setup for an Apexis j011 (foscam FI8918E).Try to change in zmcontrol.pl at line 164


my $control = "ZoneMinder::Control::$protocol"->new( $id );

with for example:

my $control = "ZoneMinder::Control::PanasonicIP"->new( $id );

Make sure about the setting in the control tab and control protocol tab(Remember if you want to use PanasonicIP control protocol like me you have to edit this one with Can Continuos and without can move mapped)

then change PanasonicIP.pm with the function for moveCon.For example.
sub moveConUp
{
my $self = shift;
Info("DentromoveConup");
Debug( "Move Up" );
my $cmd = "decoder_control.cgi?command=0&user=&pwd=";
$self->sendCmd( $cmd );
}

here you need to set your user and pwd.

Re: Foscam FI8918E Pan and Tilt

Posted: Thu Nov 15, 2012 3:02 am
by iitywygms
zefiro88 wrote:i have done a working setup for an Apexis j011 (foscam FI8918E).Try to change in zmcontrol.pl at line 164


my $control = "ZoneMinder::Control::$protocol"->new( $id );

with for example:

my $control = "ZoneMinder::Control::PanasonicIP"->new( $id );

Make sure about the setting in the control tab and control protocol tab(Remember if you want to use PanasonicIP control protocol like me you have to edit this one with Can Continuos and without can move mapped)

then change PanasonicIP.pm with the function for moveCon.For example.
sub moveConUp
{
my $self = shift;
Info("DentromoveConup");
Debug( "Move Up" );
my $cmd = "decoder_control.cgi?command=0&user=&pwd=";
$self->sendCmd( $cmd );
}

here you need to set your user and pwd.
Thank you for the suggestion.
Since I already had the foscam pm installed (copy and pasted really)
I tried as you suggested like this.
my $control = "ZoneMinder::Control::FoscamFI8918W"->new( $id );

When I start zm and try to move the camera, zmcont starts chewing up memory and the system freezes.

Can I not use the Foscam.pm that I have?
Do I need to use the panasonic one? Because to be honest, I am not sure I totally understand all the changes you described about the Panasonic.pm

Re: Foscam FI8918E Pan and Tilt

Posted: Thu Nov 15, 2012 4:14 am
by iitywygms
Okay, after a little more thinking I think I figured out what you meant and now am trying the Panasonic.pm

But now I get these errors

2012-11-14 20:08:40.049910 zmcontrol 3344 ERR Error check failed: '401 Unauthorized' zmcontrol.pl
2012-11-14 20:08:40.036620 zmcontrol 3344 INF DentromoveConup zmcontrol.pl

Maybe it is because I have username and password entered wrong?? (replace the x with my info)

sub moveConUp
{
my $self = shift;
Info("DentromoveConup");
Debug( "Move Up" );
my $cmd = "decoder_control.cgi?command=0&xxxxxxxxx=&xxxxxxxx=";
$self->sendCmd( $cmd );
}

Maybe? Hopefully?

Re: Foscam FI8918E Pan and Tilt

Posted: Thu Nov 15, 2012 10:42 am
by zefiro88
im still focusing on how to add a new control type like you said.I suppose that apache have in the database some information regarding the localization of control type and don't refresh this information when you create a new control.For this reason i use PanasonicIP.pm.
The 2012-11-14 20:08:40.049910 zmcontrol 3344 ERR Error check failed: '401 Unauthorized' zmcontrol.pl nedd to add in the command line your admin information like (example with user=admin and pwd=1234)

my $cmd = "decoder_control.cgi?command=0&user=admin&pwd=1234";

these information are needed also in the Control Device field in the control tab

If you are running 1.25 remember that you gotta change also the use ZoneMinder::Debug with use ZoneMinder::Logger

Re: Foscam FI8918E Pan and Tilt

Posted: Thu Nov 15, 2012 10:48 am
by zefiro88
if u still have problem send me a pm with your email i can send you zmcontrol.pl and PanasonicIP.pm so you can put that in your folders.

Re: Foscam FI8918E Pan and Tilt

Posted: Fri Nov 16, 2012 4:55 am
by iitywygms
zefiro88 wrote:if u still have problem send me a pm with your email i can send you zmcontrol.pl and PanasonicIP.pm so you can put that in your folders.
PM sent. Thank you.

Re: Foscam FI8918E Pan and Tilt

Posted: Sat Dec 01, 2012 11:07 pm
by ramasule
I believe it has to do with zmcontrol.pl. As I posted in another thread the zmcontrol.pl gets stuck in the

Code: Select all

 if ( my $cpid = fork() )
    {
        logReinit();

        # Parent process just sleep and fall through
        socket( CLIENT, PF_UNIX, SOCK_STREAM, 0 ) or die( "Can't open socket: $!" );
        my $attempts = 0;
        while (!connect( CLIENT, $saddr ))
        {
            $attempts++;
            Fatal( "Can't connect: $!" ) if ($attempts > MAX_CONNECT_DELAY);
            sleep(1);
        }
    }
while !connect loop

I'm not good enough to fix this but if I put print "$attempts"; in there it will count to 11 (max_connect_delay is 10) and then the script stops that's it. It does not get down to the elseif where it calls the foscam control script.

Please help masters,

Ram