Difference between revisions of "Foscam FI8918W"
Tylerschwend (talk | contribs) |
|||
(24 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
==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: | |||
* 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. | ||
*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 == | == Camera configuration == | ||
# 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. | # 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. | ||
# 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. | # 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. | ||
# 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[http://www.foscam.com/help.aspx?TypeId=11]. | # 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[http://www.foscam.com/help.aspx?TypeId=11]. 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. | ||
# 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. | # 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. | ||
Line 35: | Line 124: | ||
[[File:Greenshot_2011-11-22_15-42-51.png]] | [[File:Greenshot_2011-11-22_15-42-51.png]] | ||
*Controllable: Yes | *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 | *Control Type: Foscam FI8918W ''This option may need to be added by clicking "Edit" and adding a new control as described in the [[Foscam_FI8918W#New_Control_Type|"New Control Type"]] section below.'' | ||
*Control Device: 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. | |||
*Control Device: | |||
# 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. | |||
# 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.'' | *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.'' | *Track Motion: No ''This camera does not support absolute movement, so motion tracking is not possible.'' | ||
Line 50: | Line 143: | ||
*Name: Foscam FI8918W ''This can be anything you want, but why change it.'' | *Name: Foscam FI8918W ''This can be anything you want, but why change it.'' | ||
*Type: Remote | *Type: Remote | ||
*Protocol: This must be the name of the script provided in the [[Foscam_FI8918W | *Protocol: This must be the name of the script provided in the [[Foscam_FI8918W#New_Control_Protocol_Script|"New Control Protocol Script"]] section. | ||
*Can Wake: Yes ''The wake control is used to turn the IR on.'' | *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 Sleep: Yes ''The sleep control is used to turn the IR off.'' | ||
Line 100: | Line 193: | ||
====New Control Protocol Script==== | ====New Control Protocol Script==== | ||
Note: The device accepts most of the commands listed in this PDF[http://www.notesco.net/download/ipcamcgisdk21.pdf]. | |||
#Find the location of the ZoneMinder control script Perl modules on your server: | |||
#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: <tt>find / | grep 'PanasonicIP.pm'</tt> | |||
#You should receive output similar to this: <tt>/usr/share/perl5/ZoneMinder/Control/PanasonicIP.pm</tt> | |||
Now... | |||
'''For firmware 11.22.x.x''' | |||
#Copy [[http://durdle.com/archives/2011/02/26/zoneminder-control-module-for-foscam-fi8918w/ Hdurdle's]] [[http://durdle.com/wp-content/uploads/FoscamFI8918W.pm_.txt control script]] to the Zone Minder control script folder. | |||
#Rename the control script to <tt>FoscamFI8918W.pm</tt> | |||
#Make sure all users have read access to FoscamFI8918W.pm. <tt>chmod a+r FoscamFI8918W.pm</tt> | |||
#If running version 1.25 or newer, open the file. | |||
##Comment the line "use ZoneMinder::Debug qw(:all); | |||
##Uncomment the line "#use ZoneMinder::Logger qw(:all); | |||
#If running version 1.26.5 or newer, open the file. | |||
##Change: "$self->{ua}->agent( "ZoneMinder Control Agent/".ZM_VERSION );" | |||
##With: $self->{ua}->agent( "ZoneMinder Control Agent/"); | |||
'''For firmware 11.37.x.x''' | |||
#Copy [[https://github.com/arunh/FoscamFI8918W Arun's]] [[https://raw.githubusercontent.com/arunh/FoscamFI8918W/master/FoscamFI8918W.pm modified control script]] to the Zone Minder control script folder. | |||
#Make sure all users have read access to FoscamFI8918W.pm. <tt>chmod a+r FoscamFI8918W.pm</tt> | |||
#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 |
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:
- 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
- Main tab
- Move tab
- Can Move: Yes
- Can Move Diagonally: Yes
- Can Move Continuous: Yes
- Rest no
- Move tab
- 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
- Pan Tab
- 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
- Tilt Tab
- Presets Tab
- Has Presents: Yes
- Num Presets:8
- Can Set Presets: Yes
- Presets Tab
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 (?)
- Wired:
- 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
- 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.
- 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.
- 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.
- 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.
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
- Source type: Remote
Source tab
- 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
- 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:
- 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.
- 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
- 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].
- Find the location of the ZoneMinder control script Perl modules on your server:
- 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'
- You should receive output similar to this: /usr/share/perl5/ZoneMinder/Control/PanasonicIP.pm
Now...
For firmware 11.22.x.x
- Copy [Hdurdle's] [control script] to the Zone Minder control script folder.
- Rename the control script to FoscamFI8918W.pm
- Make sure all users have read access to FoscamFI8918W.pm. chmod a+r FoscamFI8918W.pm
- If running version 1.25 or newer, open the file.
- Comment the line "use ZoneMinder::Debug qw(:all);
- Uncomment the line "#use ZoneMinder::Logger qw(:all);
- If running version 1.26.5 or newer, open the file.
- Change: "$self->{ua}->agent( "ZoneMinder Control Agent/".ZM_VERSION );"
- With: $self->{ua}->agent( "ZoneMinder Control Agent/");
For firmware 11.37.x.x
- Copy [Arun's] [modified control script] to the Zone Minder control script folder.
- Make sure all users have read access to FoscamFI8918W.pm. chmod a+r FoscamFI8918W.pm
- 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