The Wanscam PTZ camera is limited in the commands it will receive but I have Pan/Tilt/Zoom working. Right now you have to keep clicking the PTZ buttons to make it PTZ in small amounts. I have some ideas to get P/T to move for longer periods of time but I dont think I can get zoom to do the same. Its only a 3x zoom so after a few clicks your at the extremes with the zoom anyway. You have all 16 presets that can be called and set from ZM.
Camera now can move relative and diagonally. I've corrected the movements so they move the right way. I'm unable to get auto stop to work at the moment so you will have to stop manually if doing a continuous pan or tilt.
Here is how to setup ZM for the camera.
Control Capability
Main
Name - Wanscam
Type - Remote
Protocol - Wanscam
Can wake - no
Can sleep - no
Can reset - yes
Move
Can move - yes
Can Move Diagonally - yes
Can Move Relative - yes
Can move continous - yes
Pan
Can pan - yes
Min Pan Step - 1
Max Pan Step - 50
Tilt
Can tilt - yes
Min Tilt Step - 1
Max Tilt Step - 50
Zoom
Can zoom - yes
Can zoom continous - yes (Not currently but you must check this for it to zoom)
Presets
Has presets - yes
Num presets - 16
Has home preset - yes
Can set presets - yes
Leave everything else default and you should be OK.
Here is the file
http://stuff.jaygroh.com/zoneminder/Wanscam.pm
Camera setup
Username = admin
Password =
You can change this in the Wanscam.pm file to fit your camera setup.
An example on how to get the camera to move to a preset location from the command line or script.
Code: Select all
zmcontrol.pl --id 23 --command=presetGoto1
Here is a list of commands for the camera from the cameras webpage. Some commands are oppssite in what they do like the TZ_LEFT_UP. You use the numbers in the URL to control the camera. Example = http://YOURcameraIP/decoder_control.cgi?command=0 to tilt the camera down. Some commands dont work since the camera does not have that feature. All stop commands are the same as far as I can tell. You can use 1 to stop movement of any control. I think the file comments explain how the set presets work.
var PTZ_STOP=1;
var TILT_DOWN=0;
var TILT_DOWN_STOP=1;
var TILT_UP=2;
var TILT_UP_STOP=3;
var PAN_RIGHT=4;
var PAN_RIGHT_STOP=5;
var PAN_LEFT=6;
var PAN_LEFT_STOP = 7;
var PTZ_ZOOM_WIDE = 16;
var PTZ_ZOOM_WIDE_STOP = 17;
var PTZ_ZOOM_TELE = 18;
var PTZ_ZOOM_TELE_STOP = 19;
var PTZ_PELCO_D_HPATROL = 20;
var PTZ_PELCO_D_HPATROL_STOP = 21;
var PTZ_CENTER=25;
var PTZ_VPATROL=26;
var PTZ_VPATROL_STOP=27;
var PTZ_HPATROL=28;
var PTZ_HPATROL_STOP=29;
var PTZ_PRESET_START = 30;
var PTZ_LEFT_UP = 90;
var PTZ_RIGHT_UP = 91;
var PTZ_LEFT_DOWN = 92;
var PTZ_RIGHT_DOWN = 93;
var IO_ON = 94;
var IO_OFF=95;
There are some issues with the file. An example is that you can click on the image to diagonally move but the controls are reversed and continous. I've gotten the camera to work well with what I use it for so I'm not really motivated at the moment to get all capibilities working correctly. So dont expect any updates anytime soon.