Protocol: camera motion - jdeananderson/Lumens-IP-Camera-Control GitHub Wiki
Camera motion is controlled by passing actions to vb.htm. Each action should receive a response of “OK” followed by the name of the action. Multiple actions can be passed on one line, separated by an “&”. For instance, it is possible to tell the camera in one HTML GET request to go to a preset, and then start panning right.
Moves the camera up, down, left, and right
Function | Command | Variable | Values | Comments |
---|---|---|---|---|
Pan & Tilt | http://[camera ip]/vb.htm?[action]=1&_=[UTS] | [camera ip] | Camera’s current ip | |
[UTS] | Current Unix time stamp | |||
[action] | tiltupstart | Starts moving camera ‘up’ | ||
tiltdownstart | Starts moving camera ‘down’ | |||
panleftstart | Starts moving camera ‘left’ | |||
panrightstart | Starts moving camera ‘right’ | |||
panlefttiltup | Starts moving camera ‘left & up’ | |||
panrighttiltup | Starts moving camera ‘right & up’ | |||
panlefttiltdown | Starts moving camera ‘left & down’ | |||
panrighttiltdown | Starts moving camera ‘right & down’ | |||
ptstop | Stops all camera motion |
- Returns: “OK panrightstart”
- All pan and tilt commands will start the camera in motion in the specified direction until told to "ptstop".
- Send the move commands about 10 times a second or so.
- There does not seem to be a way within the URL controls to change the pan or tilt speeds.
The following example would cause the camera at 192.168.2.137 to pan right until the stop command is given. Remember that it is normal to send the PTZ "start" motion commands continually 10 times a second or so until the stop command is issued. This is not the case for the home or preset commands, just when specifying to start moving in a direction.
http://192.168.2.137/vb.htm?panrightstart=1&_=1574816874839<br/>
http://192.168.2.137/vb.htm?panrightstart=1&_=1574816874846<br/>
http://192.168.2.137/vb.htm?panrightstart=1&_=1574816874854<br/>
http://192.168.2.137/vb.htm?panrightstart=1&_=1574816874862<br/>
http://192.168.2.137/vb.htm?ptstop=1&_=1574816874870<br/>
Changes the zoom level of the camera lens
Function | Command | Variable | Values | Comments |
---|---|---|---|---|
Zoom | http://[camera ip]/vb.htm?zoompositionfromindex=[zoomposition]&_=[UTS] | [camera ip] | Camera’s current ip | |
[UTS] | Current Unix time stamp | |||
[zoomposition] | 1 | Lowest zoom position | ||
... | Ranges from 1 to 37 | |||
37 | Highest zoom position |
- zoompositionfromindex returns “OK zoompositionfromindex “
- The 37 zoom levels correspond to the “levels” of zoom as seen below. So for example, a zoomposition of “1” is a 1x zoom, and a zoomposition of “8” is a “1.7x” zoom.
[1,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,1.9,2,2.2,2.4,2.6,2.8,3,3.3,3.6,4,4.5,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]
- There does not seem to be a way within the URL controls to change the zoom speed.
Returns current zoom level of the camera
Function | Command | Variable | Values | Comments |
---|---|---|---|---|
Query zoom position | http://[camera ip]/vb.htm?getzoompositon&_=[UTS] | [camera ip] | ||
[UTS] | Current Unix time stamp | |||
Returns: OK getzoompositon=[zoom level] from the camera |
1 | Lowest “zoom level” queried | ||
... | [zoom level] returned from camera ranges from 1 to 37 | |||
37 | Highest “zoom level” queried |
- Many camera settings may have changed after loading a preset, and it is preferred to load ini.htm call to retrieve all camera settings into the UI. Look for zoomposition=[zoom level] in the ini.htm file.
- Getzoompositon is mispelled in the Lumens vb.htm, and is missing an “i”.
Returns camera to straight dead center
Function | Command | Variable | Values | Comments |
---|---|---|---|---|
Home Position | http://[camera ip]/vb.htm?[action]=1&_=[UTS] | [camera ip] | Camera’s current ip | |
[UTS] | Current Unix time stamp | |||
[action] | ptzgotohome | Moves camera to home position |
- Do NOT follow ptzgotohome by a “pstop” command; it will stop the camera from moving all the way to the home position.
Move the camera at IP address 192.168.2.137 to the home position. Remember to NOT follow a ptzgotohome by a ptstop command.
http://192.168.2.137/vb.htm?ptzgotohome=1&_=1574814134541
Sets and recalls presets saved in the camera itself. Presets include PTZ location plus camera settings such as exposure, whitebalance, etc.
Function | Command | Variable | Values | Comments |
---|---|---|---|---|
Preset | http://[camera ip]/vb.htm?[action]=[position number]&_=[UTS] | [camera ip] | Camera’s current ip | |
[UTS] | Current Unix time stamp | |||
[action] | [loadpreset] | Position “call” | ||
[savepreset] | Position “set” | |||
[position number] | 0 | Lowest preset number | ||
... | Presets 0 through 127 | |||
127 | Highest preset number |
- Do NOT follow load preset by a stop command; it will stop the camera from moving all the way to the preset location.
- Loading a preset may change every camera parameter including but not limited to zoom, whitebalance, exposure, etc. This allows the various presets stored in the camera to account for different venues, lighting conditions of various camera angles, and other factors. This does however mean that all camera parameters may have changed after loading a camera preset, and whatever parameters that were previously tracked in the user interface as local variables may no longer be relevant. It is recommended to reload all camera settings into the UI from a call to ini.htm after calling a camera preset.