Foscam FI8918w control not working

Forum for questions and support relating to the 1.30.x releases only.
Locked
kfrank
Posts: 6
Joined: Thu Mar 29, 2018 10:59 pm

Foscam FI8918w control not working

Post by kfrank »

When I click any of the controls for my camera I get the following errors in my logs(and no movement from the camera):
2018-04-04 13:52:46.017830 zmcontrol 24129 ERR Cmd:HTTP::Request=HASH(0x2a85a30) zmcontrol.pl
2018-04-04 13:52:45.917550 zmcontrol 24129 ERR Error REALLY check failed:'500 Can't connect to 172.17.255.235:80' zmcontrol.pl
Any help would be appreciated.

The error appears to be coming from here in the FI8918W.pm control script:

Code: Select all

sub sendCmd
{
        my $self = shift;
        my $cmd = shift;
        my $result = undef;
        printMsg( $cmd, "Tx" );

        # PP Old cameras also support onstep=1 but it is too granular. Instead using moveCon and stop after interval
        # PP - cleaned up URL to take it properly from Control device
        # Control device needs to be of format user=xxx&pwd=yyy
        my $req = HTTP::Request->new( GET=>"http://".$self->{Monitor}->{ControlAddress}."/$cmd"."&".$self->{Monitor}->{ControlDevice});
        print ("Sending $req\n");
        my $res = $self->{ua}->request($req);

        if ( $res->is_success )
        {
                $result = !undef;
        }
        else
        {
                Error( "Error REALLY check failed:'".$res->status_line()."'" );
                Error ("Cmd:".$req);
        }

        return( $result );
}

However, if I use the string produced by "http://".$self->{Monitor}->{ControlAddress}."/$cmd"."&".$self->{Monitor}->{ControlDevice}" it produces a url that when sent in my browser does move the camera in the proper direction.
bbunge
Posts: 2934
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Foscam FI8918w control not working

Post by bbunge »

See: https://wiki.zoneminder.com/Foscam_FI8918W

For an older version of Zoneminder but should still work.
kfrank
Posts: 6
Joined: Thu Mar 29, 2018 10:59 pm

Re: Foscam FI8918w control not working

Post by kfrank »

All my settings are correct as far as "https://wiki.zoneminder.com/Foscam_FI8918W" is concerned.
Camera is on port 80 as well.
Thanks for the suggestion bbunge. Any other ideas? Based on the errors I'm getting?
rockedge
Posts: 1173
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA

Re: Foscam FI8918w control not working

Post by rockedge »

authentication problem with the hash when sending the movement command url?
kfrank
Posts: 6
Joined: Thu Mar 29, 2018 10:59 pm

Re: Foscam FI8918w control not working

Post by kfrank »

That is what it looks like rockedge. Just don't know where to fix it :P
Paranoid
Posts: 129
Joined: Thu Feb 05, 2009 10:40 pm

Re: Foscam FI8918w control not working

Post by Paranoid »

it produces a url that when sent in my browser does move the camera in the proper direction.
But does it produce a URL that when sent via the command line moves the camera? It might be that you have logged into the camera with the browser so when you send the command that way it authenticates.

Try this on the command line:

Code: Select all

wget "http://172.17.255.235:80/decoder_control.cgi?command=2&user=xxx&pwd=yyy"
and see if the camera moves
Paranoid
Posts: 129
Joined: Thu Feb 05, 2009 10:40 pm

Re: Foscam FI8918w control not working

Post by Paranoid »

Does your password contain any characters such as "&$%*"? If so try changing it to simple password and see if you get the same errors.
Locked