Difference between revisions of "Foscam FI8918W"

From ZoneMinder Wiki
Jump to navigationJump to search
 
(4 intermediate revisions by one other user not shown)
Line 1: Line 1:
==Updated Jun 2015 ==
==Updated Jun 2015 for support with ZM 1.28.1 ==


A lot of the information below though theoretically correct may not work for newer versions of ZM.
A lot of the information in the original article though theoretically correct may not work for newer versions of ZM.
As of Jun 2015, FI8918W has been merged into the ZM source tree. The original script was modified to make it work (original script credit: arun, as highlighted below)
As of Jun 2015, FI8918W has been merged into the ZM source tree. The original script was modified to make it work (
original script credit: arun, as highlighted below)
 
'''Note: If you read the wiki below this note, there are many more features that may be supported. I haven't tested them.
I'd suggest making this update note work first and then go into the more advanced features mentioned later in this wiki article'''


Adding support for FI8918W involves the following steps:
Adding support for FI8918W involves the following steps:
Line 18: Line 22:
You need to do the following:
You need to do the following:
* Grab a copy of https://github.com/ZoneMinder/ZoneMinder/blob/master/scripts/ZoneMinder/lib/ZoneMinder/Control/FI8918W.pm and move it to  /usr/share/perl5/ZoneMinder/Control/ or wherever your current control scripts reside (An easy way to find it is to look for AxisV2.pm  --> an existing control protocol and that's your directory)
* Grab a copy of https://github.com/ZoneMinder/ZoneMinder/blob/master/scripts/ZoneMinder/lib/ZoneMinder/Control/FI8918W.pm and move it to  /usr/share/perl5/ZoneMinder/Control/ or wherever your current control scripts reside (An easy way to find it is to look for AxisV2.pm  --> an existing control protocol and that's your directory)
*  
cd /usr/share/perl5/ZoneMinder/Control
wget https://github.com/ZoneMinder/ZoneMinder/raw/master/scripts/ZoneMinder/lib/ZoneMinder/Control/FI8918W.pm
*NOTE the 'raw' in the github url above, if you use the 'blob' url you will wget http data and not the raw file
* In the control tab of your monitor, click on Edit -> Add New Control
** Main tab
***Name: Foscam FI8918W
***Type: FFMPEG
***Protocol:FI8918W
***Can Reset:yes, rest no
 
** Move tab
***Can Move: Yes
***Can Move Diagonally: Yes
***Can Move Continuous: Yes
*** Rest no
 
**Pan Tab
***Can Pan: Yes
***Min Pan Range: 0
***Max Pan Range: 360
***Min Pan Step: 0
***Max Pan Step: 360
***Has Pan Speed: Yes
***Min Pan Speed: 0
***Max Pan Speed: 4


**Tilt Tab
***Can Tilt: Yes
***Min Tilt Range: 0
***Max Tilt Range: 90
***Min Tilt Step: 0
***Max Tilt Step: 90
***Has Tilt Speed: Yes
***Min Tilt Speed: 0
***Max Tilt Speed: 4


**Presets Tab
***Has Presents: Yes
***Num Presets:8
***Can Set Presets: Yes




'''ORIGINAL WIKI ARTICLE CONTINUES FROM HERE:'''
==Capabilities within ZoneMinder==
This article assumes you have a basic understanding of Zone Minder. Fields that are up to the user to decide on are not listed.
This article assumes you have a basic understanding of Zone Minder. Fields that are up to the user to decide on are not listed.


The camera used in the screenshots has a hostname of "Monoculous-1", which is also the friendly name used in ZoneMinder. Hopefully you're a little creative and will have your own naming convention for your cameras, so you may have different names.
The camera used in the screenshots has a hostname of "Monoculous-1", which is also the friendly name used in ZoneMinder. Hopefully you're a little creative and will have your own naming convention for your cameras, so you may have different names.


==Capabilities within ZoneMinder==
 
*Resolutions / frame rates
*Resolutions / frame rates
**Wired:
**Wired:

Latest revision as of 12:39, 10 January 2016

Updated Jun 2015 for support with ZM 1.28.1

A lot of the information in the original article though theoretically correct may not work for newer versions of ZM. As of Jun 2015, FI8918W has been merged into the ZM source tree. The original script was modified to make it work ( original script credit: arun, as highlighted below)

Note: If you read the wiki below this note, there are many more features that may be supported. I haven't tested them. I'd suggest making this update note work first and then go into the more advanced features mentioned later in this wiki article

Adding support for FI8918W involves the following steps:

  • Click on source column of ZM console next to the monitor you want to add PTZ control
  • In control Tab, make sure "Controllable" is checked. In control type, select Foscam FI8918W (If it does not exist see later)
  • In Control Device please put in:
    • user=xxx&pwd=yyy where xxx = camera user name and yyy is your password.
  • In Control Address put in IP:port of your camera
  • In Auto Stop Timeout put in 1
  • Leave track motion unchecked, track delay 0, Return Location none, Return Delay 0

If FI8918W does not exist as a control type

That means your version does not yet have the control protocol. You need to do the following:

cd /usr/share/perl5/ZoneMinder/Control
wget https://github.com/ZoneMinder/ZoneMinder/raw/master/scripts/ZoneMinder/lib/ZoneMinder/Control/FI8918W.pm
  • NOTE the 'raw' in the github url above, if you use the 'blob' url you will wget http data and not the raw file
  • In the control tab of your monitor, click on Edit -> Add New Control
    • Main tab
      • Name: Foscam FI8918W
      • Type: FFMPEG
      • Protocol:FI8918W
      • Can Reset:yes, rest no
    • Move tab
      • Can Move: Yes
      • Can Move Diagonally: Yes
      • Can Move Continuous: Yes
      • Rest no
    • Pan Tab
      • Can Pan: Yes
      • Min Pan Range: 0
      • Max Pan Range: 360
      • Min Pan Step: 0
      • Max Pan Step: 360
      • Has Pan Speed: Yes
      • Min Pan Speed: 0
      • Max Pan Speed: 4
    • Tilt Tab
      • Can Tilt: Yes
      • Min Tilt Range: 0
      • Max Tilt Range: 90
      • Min Tilt Step: 0
      • Max Tilt Step: 90
      • Has Tilt Speed: Yes
      • Min Tilt Speed: 0
      • Max Tilt Speed: 4
    • Presets Tab
      • Has Presents: Yes
      • Num Presets:8
      • Can Set Presets: Yes


ORIGINAL WIKI ARTICLE CONTINUES FROM HERE:

Capabilities within ZoneMinder

This article assumes you have a basic understanding of Zone Minder. Fields that are up to the user to decide on are not listed.

The camera used in the screenshots has a hostname of "Monoculous-1", which is also the friendly name used in ZoneMinder. Hopefully you're a little creative and will have your own naming convention for your cameras, so you may have different names.


  • Resolutions / frame rates
    • Wired:
      • 640x480 @ 15fps (In well lit room)
      • 320x240 @ 30fps(?)
    • Wireless:
      • 640x480 @ 9fps (In well lit room)
      • 320x240 @ 14fps (?)
  • Control
    • IR On/Off (Wake/Sleep)
    • Reboot
    • Movement
      • Diagonal
      • Continuous
    • Tilt, Pan
      • Variable speed possible, but not yet supported in Control Script
    • Iris
      • Brightness adjustment possible, but not yet supported in Control Script
    • Presets
      • 8 presets, and home position

Camera configuration

  1. Your camera should NOT be exposed to the Internet. There is no need for it, and it just poses the risk that others will do nasty things with it. Make sure your camera is on a local network only, and that it is pingable and accessible from your machine hosting your ZoneMinder installation. Instructions on doing this are out of the scope of this article.
  2. It can make your life simpler to have your camera registered with your local DNS server. Doing this is out of the scope of this article.
  3. The firmware utilized in this is the latest at time of writing, 11.22.2.38, with Web UI 2.4.18.17. This can be upgraded by downloading the firmware and following the instruction on Foscam's website[1]. These instructions have also been successfully used for the 11.37.x.x series of firmware which comes installed on recently purchases devices (downgrade not possible). For the latter firmware to work a different version of the control script is needed due to the introduction of HTTP basic authentication rather than query string parameter passing. The relevant information is in the control script section.
  4. It is recommended that you configure your camera with a separate visitor, operator, and admin password. This is done through the camera's web interface.

Greenshot 2011-11-22 15-11-01.png

Monitor configuration

This article assumes you have a basic understanding of Zone Minder. Fields that are up to the user to decide on are not listed. These settings are a starting point if you wish to tweak further.

The camera used in the screenshots has a hostname of "Monoculous-1", which is also the friendly name used in ZoneMinder. Your configuration will likely be different.

General tab

Greenshot 2011-11-22 15-00-52.png

  • Source type: Remote

Source tab

Greenshot 2011-11-22 15-06-41.png

  • Remote Protocol: HTTP
  • Remote Method: Simple
  • Remote Host Name: Use the resolveable hostname or IP address of the camera
  • Remote Host Port: 80 is default, change this if you have modified the camera's settings
  • Remote Host Path: /videostream.cgi?user=visitor&pwd=visitor This builds the URL used to access the camera, so it needs to have the proper visitor username and password as specified in camera configuration above. If you decide to not follow security best practices, any user with "visitor" permissions or above on the camera would be fine.
  • Remote Image Colors: 24 bit color
  • Capture Width (pixels): 640 If your camera is mounted sideways, switch the capture width and height.
  • Capture Height (pixels): 480
  • Orientation: Normal If your camera is mounted sideways, you can change this to reflect that, but you may need to transpose the capture height and width as well

Control

Greenshot 2011-11-22 15-42-51.png

  • Controllable: Yes
  • Control Type: Foscam FI8918W This option may need to be added by clicking "Edit" and adding a new control as described in the "New Control Type" section below.
  • Control Device:
  1. If control script for 11.22.x.x : user=operator&pwd=operator This is a field passed to the control script, which in this case needs to be the authentication portion of the control URL. The account specified on the camera needs to have operator privileges or above.
  2. If control script for 11.37.x.x : user:password This is a field passed to the control script, which in this case is parsed (split on colon) to set the username and password on the HTTP client for authentication. The account specified on the camera needs to have operator privileges or above.
  • Control Address: In all imaginable cases, this will be the same as the hostname/IP of the camera, the "Remote Hostname" from the source tab.
  • Track Motion: No This camera does not support absolute movement, so motion tracking is not possible.
  • Return Location: Preset 1. Preset 1 is generally used as the home position.
  • Return Delay: 30 'This setting likely has no effect since Track Motion is off.


New Control Type

Unless this is included in future versions, you will have to create a new control type for the camera. This can be done by clicking "Edit" on the "Control" tab of the monitor, and "Add new monitor".
Main

Greenshot 2011-11-22 15-47-12.png

  • Name: Foscam FI8918W This can be anything you want, but why change it.
  • Type: Remote
  • Protocol: This must be the name of the script provided in the "New Control Protocol Script" section.
  • Can Wake: Yes The wake control is used to turn the IR on.
  • Can Sleep: Yes The sleep control is used to turn the IR off.
  • Can Reset: Yes The reset control is used to reboot the camera.
Move
  • Can Move: Yes
  • Can Move Diagonally: Yes
  • Can Move Mapped: No
  • Can Move Absolute: No
  • Can Move Relative: No
  • Can Move Continuous: Yes
Pan
  • Can Pan: Yes
  • Min Pan Range: 0
  • Max Pan Range: 0
  • Min Pan Step: 0
  • Max Pan Step: 0
  • Has Pan Speed: No
  • Min Pan Speed: 0
  • Max Pan Speed: 0
  • Has Turbo Pan: No
  • Turbo Pan Speed: No
Tilt
  • Can Tilt: Yes
  • Min Tilt Range: 0
  • Max Tilt Range: 0
  • Min Tilt Step: 0
  • Max Tilt Step: 0
  • Has Tilt Speed: No
  • Min Tilt Speed: 0
  • Max Tilt Speed: 0
  • Has Tilt Pan: No
  • Turbo Tilt Speed: No
Zoom

Device can not zoom

Focus

Device can not focus

White

No support yet in script for white balance changes

Iris

Device has no iris controls

Presets
  • Has Presets: Yes
  • Num Presets: 8
  • Has Home Preset: Yes
  • Can Set Presets: Yes


New Control Protocol Script

Note: The device accepts most of the commands listed in this PDF[2].

  1. Find the location of the ZoneMinder control script Perl modules on your server:
  2. From a command shell, issue the following command which will search all directories under / for the PanasonicIP.pm control file which is included with ZoneMinder: find / | grep 'PanasonicIP.pm'
  3. You should receive output similar to this: /usr/share/perl5/ZoneMinder/Control/PanasonicIP.pm

Now...

For firmware 11.22.x.x

  1. Copy [Hdurdle's] [control script] to the Zone Minder control script folder.
  2. Rename the control script to FoscamFI8918W.pm
  3. Make sure all users have read access to FoscamFI8918W.pm. chmod a+r FoscamFI8918W.pm
  4. If running version 1.25 or newer, open the file.
    1. Comment the line "use ZoneMinder::Debug qw(:all);
    2. Uncomment the line "#use ZoneMinder::Logger qw(:all);
  5. If running version 1.26.5 or newer, open the file.
    1. Change: "$self->{ua}->agent( "ZoneMinder Control Agent/".ZM_VERSION );"
    2. With: $self->{ua}->agent( "ZoneMinder Control Agent/");

For firmware 11.37.x.x

  1. Copy [Arun's] [modified control script] to the Zone Minder control script folder.
  2. Make sure all users have read access to FoscamFI8918W.pm. chmod a+r FoscamFI8918W.pm
  3. This script has only been tested on ZoneMinder 1.27, you may need to make some tweaks for older versions.


Foscam Forum Topic

See here for more information about new script for original foscam and upgraded clones: http://foscam.us/forum/post44816.html#p44816