iCatcher Console SDK
[googlefont font=”roboto” size=”12pt” margin=”10px 0 20px 0″]The iCatcher Console SDK is an open HTTP API to enable integration of iCatcher Console functionality with third-party systems. Please contact us with any queries.[/googlefont]
[hr style=”1″]
[one_third]
Live Views
JPEG images
Streaming video
Live view pages
PTZ
PTZ control
PTZ preset list
PRZ preset images
[/one_third]
[one_third]
Playback
Playback page
Input/Output
Device list
Device control
Device state images
[/one_third]
[one_third_last]
Information
Feed lists
Groups
Reference image
Live view URL
Motion map
Information stream
Administration
Control
Adding feeds
Viewing a screenshot
[/one_third_last]
[hr style=”1″]
Live views
JPEG images
/image.jpg
Individual full JPEG images.
[custom_table style=”2″]
Parameter |
Value |
Description |
feed |
feedid/name |
The ID or name of the requested feed. The ID takes priority. |
width/height |
… |
Width and Height of the image. If not set, the original image size is used.
If just one is given, the other is adjusted to keep the aspect ratio. |
quality |
1 to 100 |
JPEG quality level. If not set or set to 0, a default of 75 is used. |
factor |
-3 to 3 |
Scaling factor of the image (current size x 2 ^ factor). |
scale |
… |
Scaling factor of the image (current size x scale). |
noupsample |
0 or 1 |
If this is set to 1, then iCatcher will not increase the size of the frame beyond its native size. |
[/custom_table]
If the quality, width and height are not specified, then the image will be sent using the native size and quality.
Streaming video
/video.mjpg
Multipart MIME Motion JPEG video stream.
[custom_table style=”2″]
Parameter |
Value |
Description |
feed |
feedid/name |
The ID or name of the requested feed. The ID takes priority. |
width/height |
… |
Width and Height of the image stream. If not set or set to 0, the original image size is used.
If just one is given, the other is adjusted to keep the aspect ratio. |
quality |
1 to 100 |
JPEG quality level. If not set or set to 0, a default of 75 is used. |
noupsample |
0 or 1 |
If this is set to 1, then iCatcher will not increase the size of the frame beyond its native size. |
[/custom_table]
If the quality, width and height are not specified or set to 0, then the image will be sent using the native size and quality.
/video.ipeg
iPEG video stream.
[custom_table style=”2″]
Parameter |
Value |
Description |
feed |
feedid/name |
The ID or name of the requested feed. The ID takes priority. |
width/height |
… |
Width and Height of the image stream. If not set or set to 0, the original image size is used.
If just one is given, the other is adjusted to keep the aspect ratio. |
quality |
1 (Lowest)
2 (Medium)
3 (Highest iPEG)
4 (Medium full frame)
5 (Highest full frame)
6 to 100 (Mapped equally to 1 to 5) |
JPEG quality level. If not set or set to 0, the highest iPEG quality (3) is used. |
noupsample |
0 or 1 |
If this is set to 1, then iCatcher will not increase the size of the frame beyond its native size. |
[/custom_table]
If the quality, width and height are not specified or set to 0, then the image will be sent using the native size and the highest iPEG quality (3).
/video.h264
H.264 video stream.
[custom_table style=”2″]
Parameter |
Value |
Description |
feed |
feedid/name |
The ID or name of the requested feed. The ID takes priority. |
fallback |
mjpg
ipeg |
Fallback stream type. If this parameter is specified and the stream does not support H.264 then it will redirect to the specified stream type. If it’s not set then an error will be returned. |
[/custom_table]
These streams can not be changed using /setstreamparams.cgi.
/setstreamparams.cgi
Change the parameters of an existing video stream.
[custom_table style=”2″]
Parameter |
Value |
Description |
id |
streamid |
The ID of the Motion JPEG stream to change. |
width/height |
… |
New Width and Height of the image stream. If not set or set to 0, the original image size is used.
If just one is given, the other is adjusted to keep the aspect ratio. |
quality |
0 to 100 |
New JPEG quality level. If not set or set to 0, a default of 75 is used.
For iPEG streams, the quality values above apply. |
noupsample |
0 or 1 |
If this is set to 1, then iCatcher will not increase the size of the frame beyond its native size. |
slot1 to slotN |
feedid |
Allows iCatcher to send multiple feeds out on a single Motion JPEG stream. Any unspecified or empty slots will be deleted and you MUST specify slot1 otherwise it will ignore the rest. |
doubleslot |
0 to 16 |
Any image sent out on this slot will be doubled in size relative to to width/height and subject to the noupsample parameter. Set this to 0 for no slot to be increased. |
[/custom_table]
If the quality, width and height are not specified or set to 0, then the image will be sent using the native size and quality.
H.264 video streams can not be changed using this API.
Live view page
/ and /index.htm
[custom_table style=”2″]
Parameter |
Value |
Description |
feed |
feedname/id |
The name or ID of the requested feed. The name takes priority. |
mode |
0 (MJPEG Java applet)
1 (JavaScript) |
Mode used to view the live stream from the Console.
If the web browser won’t display Java applets, this is forced to JavaScript mode. |
quality |
0 (Highest)
to
4 (Lowest) |
The image quality to view. The lower the quality, the less bandwidth will be used. |
/simple.htm
Parameter |
Value |
Description |
feed |
feedname/id |
The name or ID of the requested feed. The name takes priority. |
quality |
1 to 100 |
JPEG quality level. If not set or set to 0, a default of 75 is used. |
sourcewidth/sourceheight |
… |
Force a fixed source width and height of the image to request from the server. If not set, the image display size is used. |
[/custom_table]
This page is designed to be embedded in an IFrame with code similar to the following:
<iframe name="live" src="http://ip.ad.dre.ss/simple.htm?feed=local" width="320" height="240" frameborder="0"></iframe>
The view will resize to fit the entire iframe and the borders are included in the size if they are visible.
Playback
Playback page
/playback/ and /playback/index.htm
[custom_table style=”2″]
Parameter |
Value |
Description |
feed |
feedname/id |
The name or ID of the requested feed. The name takes priority. |
date |
date |
Date for the requested playback session. |
year/month/day |
… |
The individual year, month, and day for the requested playback session. |
time |
time |
Time for the requested playback session. |
hour/minute |
… |
The individual hour, and minute for the requested playback session. |
mode |
0 (MJPEG Java applet)
1 (JavaScript) |
Mode used to view/control the playback stream from the Console.
If the web browser won’t display Java applets, this is forced to JavaScript mode. |
[/custom_table]
Information
Feed lists
/feedlist.xml, /feedlist.json
These URLs will return a list of feeds that the user has permission to access, and optionally include stopped feeds.
Both lists include the feed ID associated name and the PTZ capabilities.
[custom_table style=”2″]
Parameter |
Value |
Description |
showstopped |
|
If this parameter is included, all stopped feeds will be shown in the list. |
group |
groupid |
If this parameter is included, only feeds that are member of the group will be included. |
[/custom_table]
Use of the old feedlist.txt and feedlist.js are deprecated and for backwards compatibility only.
The XML schema uses the namespace http://schemas.icode.co.uk/icatcher/feeds/2
.
Groups
/groups.xml, /groups.json
These URLs will return a list of groups and optionally the contents that the user has permission to access.
[custom_table style=”2″]
Parameter |
Value |
Description |
includecontents |
|
If this parameter is included, the contents (feeds and I/O devices) will be included in the output. |
[/custom_table]
The XML schema uses the namespace http://schemas.icode.co.uk/icatcher/groups/1
.
Reference image
/reference.jpg
[custom_table style=”2″]
Parameter |
Value |
Description |
feed |
feedid/name |
The ID or name of the requested feed. The ID takes priority. |
width/height |
… |
Width and Height of the image. If not set, the original image size is used. |
quality |
1 to 100 |
JPEG quality level. If not set or set to 0, a default of 75 is used. |
fallbacklive |
|
If this parameter is included, and no reference image is available, the current live image will be returned. |
[/custom_table]
If the quality, width and height are not specified, then the image will be sent using the original size and quality.
Live view URL
/liveurl.htm
Performs an HTTP redirect to the cameras live view URL if configured, or the built in web view for the given feed.
All access permissions still take effect.
[custom_table style=”2″]
Parameter |
Value |
Description |
feed |
feedid/name |
The ID or name of the requested feed. The ID takes priority. |
[/custom_table]
<h3″>Motion map
<h4″>/motionmap.jpg
Returns the motion map image in JPEG format
All access permissions still take effect.
[custom_table style=”2″]
Parameter |
Value |
Description |
feed |
feedid |
The ID of the requested feed. |
lower/upper |
0 to 100 |
The lower and upper bounds for the motion map data.
If these parameters are not specified, the full range of 0 to 100 are included. |
includebackground |
|
If this parameter is included, the current live image will be drawn behind the motion map data. |
[/custom_table]
Information stream
/infostream.cgi
Returns a continuous stream of information/events occurring on the system.
Each entry is CrLf separated and consists of a category followed by a number of comma separated values specific to each category. Each value will be surrounded by double quotes if it contains commas, spaces or double quotes.
Permission to view feeds is required but information for all feeds and devices is included.
[custom_table style=”2″]
Category |
Values |
Description |
motion |
feedid,start/stop/trigger |
Motion has started or stopped on the specified feed or a motion trigger has occurred. |
iodevice |
deviceid,set/changed,value,displayvalue |
An I/O device has changed state or been set by iCatcher Console. |
keepalive |
No values |
Sent every 5 seconds on an inactive stream to keep the connection alive. |
[/custom_table]
This resource returns data of the form:
motion: {6C9040F2-1FFF-4E43-93D7-4DE81C11F711},start
motion: {6C9040F2-1FFF-4E43-93D7-4DE81C11F711},end
iodevice: {C60C69D7-3D98-4DF5-8D7C-26BAE2CCDC04},change,True,True
motion: {C1E7A1BC-3BF6-4411-9171-CA39E4AAD0F6},start
motion: {C1E7A1BC-3BF6-4411-9171-CA39E4AAD0F6},end
motion: {6C9040F2-1FFF-4E43-93D7-4DE81C11F711},start
motion: {6C9040F2-1FFF-4E43-93D7-4DE81C11F711},trigger
motion: {6C9040F2-1FFF-4E43-93D7-4DE81C11F711},end
motion: {6C9040F2-1FFF-4E43-93D7-4DE81C11F711},start
motion: {92917E16-8862-42EB-ACA3-450F776AD926},start
iodevice: {C60C69D7-3D98-4DF5-8D7C-26BAE2CCDC04},set,True,True
keepalive:
motion: {92917E16-8862-42EB-ACA3-450F776AD926},end
motion: {6C9040F2-1FFF-4E43-93D7-4DE81C11F711},end
iodevice: {C60C69D7-3D98-4DF5-8D7C-26BAE2CCDC04},set,False,False
keepalive:
PTZ
PTZ control
/ptz/control.htm
[custom_table style=”2″]
Parameter |
Value |
Description |
feed |
feedid |
The ID of the requested feed. |
move |
up
upleft
upright
down
downleft
downright
left
right
offset
inimage
home (Preset home position)
preset
joystick
to (Specified position) |
Command to carry out.
If this is omitted, it defaults to the “to” operation with the pan and tilt parameters. |
angle |
… |
Angle to move in degrees. The direction is specified in the move parameter.
If this is omitted, it defaults to 5 degrees. |
pan/tilt |
… |
The pan/tilt position in degrees from the centre. Negative values are down and left. |
x/y |
… |
The coordinates in the image to move to, in pixels from the top left for in image move requests.
These can be negative or larger than the width and height to move beyond the bounds of the visible area. |
width/height |
… |
The width and height in pixels to use for in image move requests. |
preset |
…
presetid |
The preset index or ID to move to. The index is 1 based and 0 and blank are the home position. |
x/y |
… |
Values from the centre that determines speed and direction of movement from -20 to 20 (Up to approximately 20 degrees per second). |
zoom |
in
out
to
offset
joystick
0 to 100 |
Zoom operation to carry out or the magnification level. See the level parameter for more information.
If this is omitted, it defaults to the “to” operation with the level parameter. |
level |
… |
The magnification level to zoom to. A value of 0 is wide angle, 1 shows half the image, etc…
When doing a joystick zoom, this value is a speed from -10 to 10, with 0 being stationary. |
return |
status
nocontent |
Specifies what data to return after the operation. “nocontent” allows you to link direct to it and the browser not go to a new page. Defaults to returning the status. |
[/custom_table]
/ptz/info.txt
[custom_table style=”2″]
Parameter |
Value |
Description |
feed |
feedid |
The ID of the requested feed. |
[/custom_table]
This resource returns a crlf delimited list of colon (“:”) separated values specifying the current capabilities, pan, tilt and zoom values. If that value is not supported, “n/a” will be returned.
capabilities:0x470297
pan:-64
tilt:-29
zoom:n/a
PTZ preset list
/ptz/presets.xml
[custom_table style=”2″]
Parameter |
Value |
Description |
feed |
feedid |
The ID of the requested feed. |
[/custom_table>
This resource returns XML of the form:
<presets>
<preset id="{FE791B72-8606-488f-97AD-C4DC843DA709}" index="1" name="Entrance"/>
<preset id="{D09F6FC2-C547-4a98-939D-49714A393234}" index="2" name="Reception"/>
<preset id="{77E4CEF1-646F-45cb-BA5B-6E0B4C777568}" index="3" name="Window"/>
</presets>
The index is 1 based and the Home preset is implied and not listed but uses a blank ID and an index of 0.
PTZ preset images
/ptz/presetimage.jpg
Returns the reference image for the PTZ home or specified preset.
[custom_table style=”2″]
Parameter |
Value |
Description |
feed |
feedid |
The ID of the requested feed. |
preset |
…
presetid |
The preset index or ID to return. The index is 1 based and 0 and blank are the home position. |
[/custom_table]
Input/Output
I/O device list
/io/sensors.xml
[custom_table style=”2″]
Parameter |
Value |
Description |
feed |
feedid |
If this parameter is included, the list is limited to devices associated with the given feed. |
group |
groupid |
If this parameter is included, only devices that are member of the group will be included. |
[/custom_table]
This resource returns XML of the form:
<sensors>
<sensor>
<id>{04ED93C1-A41A-4E4E-A879-F2A13F25F711}</id>
<name>Switch</name>
<nativevalue>True</nativevalue>
<value>Connected</value>
</sensor>
<sensor>
<id>{B17047E8-2730-46EF-A928-468075C3C57A}</id>
<name>Fan</name>
<nativevalue>False</nativevalue>
<value>Off</value>
<valuetype>boolean</valuetype>
<values>
<value value="True">On</value>
<value value="False">Off</value>
</values>
</sensor>
</sensors>
The XML schema uses the namespace http://schemas.icode.co.uk/icatcher/iodevices/1
but this isn’t specified in the XML for compatibility reasons.
I/O device control
/io/setsensor.htm
[custom_table style=”2″]
Parameter |
Value |
Description |
sensor |
sensorid |
The ID of the requested device. |
value |
… |
The value to set the device to.
If this is omitted, the default value or action will be performed. |
interval |
… |
The interval the device is set for. After this period, it will reset to off.
If this is omitted, the configured interval for the device will be used. If it is set to 0. No reset will be performed.. |
return |
status
nocontent |
Specifies what data to return after the operation. “nocontent” allows you to link direct to it and the browser not go to a new page. Defaults to returning the status. |
[/custom_table]
Device state images
/io/sensorimage.jpg
Gets an image for the device and its states.
[custom_table style=”2″]
Parameter |
Value |
Description |
sensor |
sensorid |
The ID of the requested device. |
value |
… |
The value to retreive the image for.
If this is omitted, the device’s current state is used. |
[/custom_table]
If there is no image for the specified value, then the default image will be returned.
Administration
Control
/admin/action.cgi
This URL allows you to control the Console’s state.
[custom_table style=”2″]
Parameter |
Value |
Description |
action |
start
stop
arm
disarm |
The action to perform in the Console, either start or stop monitoring or arm/disarm the alerting. |
delay |
… |
When using the “arm” action, this specifies a delay in seconds before alerting is fully armed.
If this is omitted, the alerting is armed immediately. |
return |
status
nocontent |
Specifies what data to return after the operation. “nocontent” allows you to link direct to it and the browser not go to a new page. Defaults to returning the status. |
[/custom_table]
Adding feeds
/admin/addfeed.cgi
This URL allows you to add feeds remotely and configure the most basic settings needed to get it working.
[custom_table style=”2″]
Parameter |
Value |
Description |
id |
… |
The ID for the new feed.
If this is omitted, a GUID will be used for the ID. |
name |
… |
The friendly name of the new feed.
If this is omitted, “New feed” will be used. |
type |
0 (Manual configuration)
1 (Local device)
2 (Network device)
3 (Batch feed) |
Type of feed to add.
If this is omitted, it will default to “Manual configuration”. |
device |
… |
The device ID for the local WDM device to be added. |
parameters |
… |
The parameters for the local WDM device to be added. |
url |
… |
The URL for the network device to be added. |
path |
… |
The path to read the batch images from. |
pattern |
… |
The pattern of the batch image file names. |
clearpending |
0 (Leave pending images)
1 (Delete pending images) |
Controls whether pending images are deleted before starting.
If this is omitted, it will default to “Delete pending images”. |
[/custom_table]
This resource returns a status code of “OK” or “Error: ” followed by the error status text.
Viewing a screen shot
/admin/screenshot.jpg, /admin/screenshot.bmp
Returns an image of the system’s screen.