set camera

Purpose

Configures the camera settings for a Watchport® camera connected to a Digi device.

Digi devices support connections to one Digi Watchport V2 or V3 USB camera.

When the camera is connected to the Digi device and configured, the current image from the camera is available directly from the device at: http://device-ip/FS/dev/camera/0

Video from the camera is available by streaming the camera data to a TCP server application or from a Java applet by clicking on the video link in the config page. See below.

Note Access to the camera is not subject to user authentication. Turning on security for the web interface does not limit direct access to the camera.

Required permissions

For Digi products with two or more users, permissions must be set to set permissions s-camera=read to display camera settings, and to set permissions s-camera=rw to display and configure camera settings. See set permissions for details on setting user permissions for commands.

Syntax

Configure basic options

set camera [state={on|off}]
[resolution={128x96|160x120|176x144|320x240|
352x288|640x360|640x480}]
[frame_delay=0-65535 milliseconds]
[quality=0-100]
[frequency={50|60}]
[tcp_client_state={on|off}]
[host=host name or ip address of tcp server]
[port=tcp server port to connect to]

Configure advanced options

set camera [agc={off|average|center|peak}]
[white_balance={manual|auto|daylight|incandescent|fluorescent}]
[backlight=0-255]
[brightness=0-255]
[gamma=0-255]
[saturation=0-255]
[sharpness=0-255]
[contrast=0-255]
[decimate={on|off}]

Display current camera settings

set camera

Options

Basic options

state={on|off}

Turns the camera on or off. When disabled, all camera activity stops and all memory used will be freed.

resolution={128x96 |160x120|176x144|320x240 352x288|640x360|640x480}

The image resolution.

frame_delay=0-65535 milliseconds

Configures how often a new image is retrieved from the camera.

The minimum time between frames (in milliseconds). The actual delay time between frames will be this number or greater. The camera will automatically increase this value as needed, such as in low-light conditions.

This delay time is the inverse of frames per second. For instance, if you wish to set the camera to process at a maximum of 5 frames per second, set the frame delay to 200 (1/5 = 0.2 second = 200 ms).

quality=0-100

Indicates the image quality of the camera image. 100 is the highest image quality; 0 is the worst image quality. The higher the quality, the more memory and other device resources will be required by the camera. It is recommended to pick a quality between 20 and 80. Quality above 80 results in much larger images than lower qualities, which in turn results in lower overall performance and increased memory use.

frequency={50|60}

This option is used to reduce flicker from fluorescent lighting only. Set this field to match the frequency of the power supply connected to the Digi device In North America, use 60. In Europe, use 50.

tcp_client_state={on|off}

Enables or disables the camera sending its images to a remote server via TCP. The TCP server application must conform to the protocol sent by this device. The protocol is: on connect, the TCP client sends a protocol id of four bytes: 0x85ce4a71, followed by a protocol version of 4 bytes: 0x00000010. After this, images are sent over and over in the form of 4 bytes containing the length of the JPEG image to follow, followed by the JPEG image. An example Java application that reads images from a device is available at the Digi website, www.digi.com.

host=host name or ip address of tcp server

The name of the remote TCP Server to receive image data.

port=tcp server port to connect to

The network port number for the remote TCP server that receives image data. The default port is 22222.

Advanced options

Advanced camera settings; Digi recommends leaving these camera settings at their defaults. They can be modified for specific needs by advanced users but do not need to be modified by most users.

agc={off|average|center|peak}

Automatic gain control.

white_balance={manual|auto|daylight|incandescent|fluorescent}

White balance.

backlight=0-255

Backlighting control.

brightness=0-255

Brightness level.

gamma=0-255

Gamma level.

saturation=0-255

Saturation level.

sharpness=0-255

Sharpness level.

contrast=0-255

Contrast level.

decimate={on|off}

Decimation control.

Examples

Configure camera images to a resolution of 640x480

#> set camera resolution=640x480

Configure camera to image quality of 50

#> set camhera quality=50

Configure camera to send all of its images to the server named “camera‑server” on port 22222

#> set camera tcp_client_state=on host=camera-server port=22222

See also