Foscam FI8910W control in 1.28.1

Forum for questions and support relating to the 1.28.x releases only.
Locked
mikeybs
Posts: 13
Joined: Fri Jul 24, 2015 3:41 am

Foscam FI8910W control in 1.28.1

Post 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?
User avatar
asker
Posts: 1553
Joined: Sun Mar 01, 2015 12:12 pm

Re: Foscam FI8910W control in 1.28.1

Post 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
I no longer work on zmNinja, zmeventnotification, pyzm or mlapi. I may respond on occasion based on my available time/interest.

Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
mikeybs
Posts: 13
Joined: Fri Jul 24, 2015 3:41 am

Re: Foscam FI8910W control in 1.28.1

Post 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?
mikeybs
Posts: 13
Joined: Fri Jul 24, 2015 3:41 am

Re: Foscam FI8910W control in 1.28.1

Post 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.
User avatar
asker
Posts: 1553
Joined: Sun Mar 01, 2015 12:12 pm

Re: Foscam FI8910W control in 1.28.1

Post 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.
I no longer work on zmNinja, zmeventnotification, pyzm or mlapi. I may respond on occasion based on my available time/interest.

Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
bbunge
Posts: 2944
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Foscam FI8910W control in 1.28.1

Post by bbunge »

Thanks for the info. I get 2 FI891W's tomorrow!

bb
mikeybs
Posts: 13
Joined: Fri Jul 24, 2015 3:41 am

Re: Foscam FI8910W control in 1.28.1

Post 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
User avatar
asker
Posts: 1553
Joined: Sun Mar 01, 2015 12:12 pm

Re: Foscam FI8910W control in 1.28.1

Post 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
I no longer work on zmNinja, zmeventnotification, pyzm or mlapi. I may respond on occasion based on my available time/interest.

Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
mikeybs
Posts: 13
Joined: Fri Jul 24, 2015 3:41 am

Re: Foscam FI8910W control in 1.28.1

Post 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
User avatar
asker
Posts: 1553
Joined: Sun Mar 01, 2015 12:12 pm

Re: Foscam FI8910W control in 1.28.1

Post 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?
I no longer work on zmNinja, zmeventnotification, pyzm or mlapi. I may respond on occasion based on my available time/interest.

Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
mikeybs
Posts: 13
Joined: Fri Jul 24, 2015 3:41 am

Re: Foscam FI8910W control in 1.28.1

Post 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
User avatar
asker
Posts: 1553
Joined: Sun Mar 01, 2015 12:12 pm

Re: Foscam FI8910W control in 1.28.1

Post by asker »

The function should be called moveRelDown
you have written it as movRelDown (missing e)

You should enable debug and look at logs
I no longer work on zmNinja, zmeventnotification, pyzm or mlapi. I may respond on occasion based on my available time/interest.

Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
mikeybs
Posts: 13
Joined: Fri Jul 24, 2015 3:41 am

Re: Foscam FI8910W control in 1.28.1

Post by mikeybs »

can't believe I missed such a silly typo. works fine now. thanks
Locked