Page 1 of 1

Foscam FI8910W control in 1.28.1

Posted: Fri Jul 24, 2015 3:52 am
by mikeybs
I've got the camera monitor working, and I attempted to follow the instructions in the wiki
http://www.zoneminder.com/wiki/index.php/Foscam_FI8918W

but I am not able to control the camera.

When I try any of the controls I get a browser error, here is the one for pan left:
Control response was status = undefined
message = /usr/bin/zmcontrol.pl --panspeed=2 --autostop --command=moveConLeft --id=2=>

In the logs I see:
2015-07-23 23:49:00.222560 zmcontrol 3044 FAT Can't load ZoneMinder::Control::FI8918W zmcontrol.pl


I did download FI8918W.pm and place it in /usr/share/perl5/ZoneMinder/Control/

Not sure what could be going wrong. Any suggestions?

Re: Foscam FI8910W control in 1.28.1

Posted: Fri Jul 24, 2015 11:16 am
by asker
Try to use the updated script in the master branch of Zoneminder:
https://github.com/ZoneMinder/ZoneMinde ... FI8918W.pm

Remember to follow the instructions written in that file:
You need to set "user=xxx&pwd=yyy" in the ControlDevice field

Re: Foscam FI8910W control in 1.28.1

Posted: Sat Jul 25, 2015 10:43 pm
by mikeybs
I tried the script you linked to. Same results. I had the control device field filled out correctly already. Is there anywhere I can get more descriptive logs?

Re: Foscam FI8910W control in 1.28.1

Posted: Sat Jul 25, 2015 10:50 pm
by mikeybs
nevermind I just figured it out. I was using wget to grab the file and it was pulling the full html page from github. I copied and pasted the correct content and all is well now.

Re: Foscam FI8910W control in 1.28.1

Posted: Sun Jul 26, 2015 1:27 pm
by asker
:D As funny as that sounds, I've done it more than once myself --> I keep forgetting you need to grab the raw page from github
Glad it worked for you.
mikeybs wrote:nevermind I just figured it out. I was using wget to grab the file and it was pulling the full html page from github. I copied and pasted the correct content and all is well now.

Re: Foscam FI8910W control in 1.28.1

Posted: Sun Jul 26, 2015 2:54 pm
by bbunge
Thanks for the info. I get 2 FI891W's tomorrow!

bb

Re: Foscam FI8910W control in 1.28.1

Posted: Wed Aug 05, 2015 8:44 pm
by mikeybs
I just purchased the zmview pro app with the hopes of using the PT controls. However, they are not working from the zmview pro app. The controls work just fine from the web interface as already noted in this thread.

I get the following error in the logs:
Can't access moveRelDown member of object of class ZoneMinder::Control::FI8918W

Re: Foscam FI8910W control in 1.28.1

Posted: Wed Aug 05, 2015 10:46 pm
by asker
I have the pro version of this app too and to be honest, I briefly tried to get PTZ working with it, and it did not work. I never checked why.

Anyway, FI8918W does not have any method called moveRelDown so I don't know why it is calling it. It is possible that in some old version, it did. Try this if you are upto tinkering a bit:

Edit your copy of the FI8918W.pm file in your ZM install and around line 170, where you have a function called "moveConDown" -- just create a copy of that function called moveRelDown just below it like so:

Code: Select all

sub movRelDown
{
	my $self = shift;
	Debug( "Move Down" );
	my $cmd = "decoder_control.cgi?command=2";
	$self->sendCmd( $cmd );
}
If it works, then you can do this for the other directions. IF it doesn't, then zmviewer pro is broken.
mikeybs wrote:I just purchased the zmview pro app with the hopes of using the PT controls. However, they are not working from the zmview pro app. The controls work just fine from the web interface as already noted in this thread.

I get the following error in the logs:
Can't access moveRelDown member of object of class ZoneMinder::Control::FI8918W

Re: Foscam FI8910W control in 1.28.1

Posted: Wed Aug 12, 2015 2:25 am
by mikeybs
I tried your suggestion, and added a moveRelDown function, but I still get the same error when trying to use the down control in zmview pro

Re: Foscam FI8910W control in 1.28.1

Posted: Wed Aug 12, 2015 12:54 pm
by asker
mikeybs wrote:I tried your suggestion, and added a moveRelDown function, but I still get the same error when trying to use the down control in zmview pro
It's hard for me to know what is going on as I have no visibility on what that client is doing. But if you have added a moveRelDown, it should at least not report the same error

Code: Select all

Can't access moveRelDown member of object of class ZoneMinder::Control::FI8918W
Did you try rebooting ZM and are you sure its picking up the modified script? Can you post your modified script to pastebin?

Re: Foscam FI8910W control in 1.28.1

Posted: Wed Aug 19, 2015 6:39 am
by mikeybs
here is my modified script

http://pastebin.com/VQnRxBvw

I have restarted zoneminder as well as apache, and I have rebooted the server as well. How can I check to see if it is using the modified script?

The script I modified is in /usr/share/perl5/ZoneMinder/Control

it appears to be the only one on my system...

root@zoneminder:~# locate FI8918W.pm
/usr/share/perl5/ZoneMinder/Control/FI8918W.pm

Re: Foscam FI8910W control in 1.28.1

Posted: Wed Aug 19, 2015 3:00 pm
by asker
The function should be called moveRelDown
you have written it as movRelDown (missing e)

You should enable debug and look at logs

Re: Foscam FI8910W control in 1.28.1

Posted: Wed Aug 19, 2015 5:05 pm
by mikeybs
can't believe I missed such a silly typo. works fine now. thanks