Table Of Contents
Event Commands
Event Setup
Event Setup Notification
Enable Event
Disable Event
Remove Event
Trigger VSMS Event
Event Trigger Notification
Event Clip Creation Notification
Event Clip Start/Stop
Get Event Information
Motion Event Configuration and Event Handling
Single Alarm (trigger) Event Configuration and Handling
Soft Trigger Event Configuration and Handling
Event Commands
Table 5-1 provides a summary of the event commands. Each command is described in detail in the section that is listed.
Event Setup
http://host/event.bwt?command=setup&data=xmlData
Purpose
Sets up an event in VSMS.
Required Fields
host
|
IP address or hostname (hostname.domain) where VSMS is running.
By default, VSMS runs on port 80 (HTTP), however, you can use an alternate port, such as port 8080. For example, to specify port 8080, use host:8080.
|
command=setup
|
Setup command. The setup keyword associates the command with a setup action. The setup keyword is a reserved value.
|
data=xmlData
|
XML data comprised of XML elements and values. The structure of the XML data is as follows:
<notificationtype></notificationtype>
<daystolive></daystolive>
<acclframerate></acclframerate>
<postbuffer></postbuffer>
<proxysource></proxysource>
For more information about the XML elements, see Table 5-2.
|
Table 5-2 Event Setup XML Elements
XML Element
|
Description
|
xml
|
Start XML parsing element; contains the event element.
|
event
|
Start event data element; contains the name, ipdevice, srctype, notifyurl, action, cliphost, and trigger elements.
|
name
|
The name for this event. The name element may contain 1 to 32 of the following characters:
• Digits (0 to 9)
• Upper case letters (A to Z)
• Lower case letters (a to z)
• Underscore (_)
• Hyphen (-)
The reserved value is -1.
|
ipdevice
|
Can be one of the following:
• Format: [IP address] IP address of device for a running proxy where the trigger is set up. This will enable the triggers from the event driver of the device.
• Format: [unique ID] for soft triggers.
Each event must be setup with a unique IP address or ID. Contains no other elements.
|
srctype
|
Specifies the type of video server to set up the trigger; contains no other elements.
Note Sending soft triggers from other devices or applications is supported by the generic <srctype>. Use input of Ø with a unique ID for ipdevice.
|
notifyurl
|
Format: http://host/handlerPath. The notification URL to use when an event trigger is received by VSMS, and if archive clips are requested, after archives are saved; contains no other elements.
Use the notifyurl element in conjunction with the notificationtype element. Valid values for the notificationtype element can be one of the following:
• 0—An event notification is sent.
• 2—An event notification and after event clip saved notification are sent.
For more information, see the "Event Setup Notification" section.
|
action
|
Start action data element; contains the clip-ondemand, clip, and accelerate elements.
Note If the action element is not specified but notificationtype is set to 2 (record event triggered archives), event clips are still recorded.
|
clip
|
Tag Format: <clip/>. Creates a clip when an event occurs.
Note The notificationtype must be set to 2 (record event triggered archives).
|
accelerate
|
Tag Format: <accelerate/>. Accelerates the event archive recording framerate at the event for the postbuffer time.
Note The notificationtype must be set to 2 (record event triggered archives).
|
cliphost
|
Start cliphost data element; contains localhost element.
Note If no cliphost element is specified, then the event clip is saved to local host.
|
localhost
|
Tag Format: <localhost/>. Event clip is saved to the local host.
Saves the event clip directly to the repository mount location. Only one mount will be recognized. If no repository is specified, an error will be generated when an event clip is attempted. This repository will also serve as a workspace area for remote event clip generation.
Note The clip repository option must be chosen from the Clipping drop-down menu on the VSMC Console page.
|
trigger
|
Start trigger data element; contains the input, state, type, notificationtype, maxevents, daystolive, framerate, acclframerate, duration, prebuffer, postbuffer, and proxysource elements.
|
input
|
Range: [0] Reserved for generic trigger input number. Make sure to pair this with a unique ID for the ipdevice value.
Range: [1-6] Trigger input number on the device. Range: [1-10] Window number for motion detection.
|
state
|
Reserved values: [rising | falling] Specifies whether the circuit for the event trigger mechanism is open (rising) or closed (falling).
|
type
|
Reserved values: [motion | alarm] Specifies whether the type of event is motion detection or trigger.
|
notificationtype
|
Reserved values: [0 | 1 | 2 | 3] 0: Only track events, no archives 1: Unsupported 2: Record event triggered archives (should have action type as clip) 3: Unsupported
|
maxevents
|
Format: [integer] Maximum number of events recorded per month.
|
daystolive
|
Format: [integer] (default=0) Number of days from the date archive stops the archive will be stored before system removal.
For permanent storage set daystolive to Ø.
|
framerate
|
Range: [0.001-30](proxy frame rate) Maximum number of frames per second transmitted to record proxy.
|
acclframerate
|
Range: [0.001-30] Accelerated archive frame rate that the event is recorded at.
Note The accelerated archive frame rate must be less than or equal to the proxy frame rate.
|
duration
|
Format: [integer] Duration of the event archive loop in seconds.
Note The only supported duration is 300 seconds.
|
prebuffer
|
Format: [integer] (default=10 seconds) The number of seconds before the event that will be included in the event archive clip.
|
postbuffer
|
Format: [integer] (default=30 seconds) The number of seconds after the event that will be included in the event archive clip.
|
proxysource
|
Proxy name for event to archive. Each triggered event can record up to 10 different proxies. The proxysource element may contain 1 to 64 of the following characters:
• Digits (0 to 9)
• Upper case letters (A to Z)
• Lower case letters (a to z)
• Underscore (_)
• Hyphen (-)
The reserved value is -1.
Note The proxy must exist before adding an event trigger.
|
Return Values
A standard HTTP/1.x header followed by:
Return Code: <1 or -1 or output>
1 Successful completion of the URL command
-1 Error in execution of the URL command
Usage Guidelines
When an event is set up using an IP address (device trigger), the device inputs are used to trigger the event through the event driver.
The event command uses the generic srctype and an <input> of Ø with a unique <ipdevice> value to set up events for systems not directly related to video encoding to send soft triggers. The <ipdevice> value must be unique as it used by VSMS internally as part of the unique key (input and ipdevice) for events. Then configure the trigger to send the correct URL notification to VSMS.
Examples
The following is an example of the XML data that is specified as an HTTP command to the VSM:
<ipdevice>1234567</ipdevice>
<srctype>optelecom_c50</srctype>
<notificationtype>0</notificationtype>
The above XML data is specified as an HTTP command to VSMS as follows:
http://vsms.cisco.com/event.bwt?command=setup&data=<xml><event><name>test_event</name><ipd
evice>1234567</ipdevice><srctype>optelecom_c50</srctype><trigger><input>0</input><state>ri
sing</state><type>alarm</type><notificationtype>0</notificationtype></trigger></event></xm
l>
Event Setup Notification
Purpose
When an event is set up with a notificationtype element value of 2, event setup notification data is sent to the specified notification URL.
Note
No event setup notification data is sent when an event is set up with a notificationtype element value of 0.
notifyUrl?data=xmlData
Required Fields
notifyUrl
|
The notification URL specified by an Event Setup command. For more information, see the notifyurl XML element description in Table 5-2.
|
data=xmlData
|
XML data comprised of XML elements and values. The structure of the XML data is as follows:
<VideoServer></VideoServer>
<TriggerInput></TriggerInput>
<ArchiveName></ArchiveName>
For more information about the XML elements, see Table 5-3.
|
Table 5-3 Event Setup Notification XML Elements
XML Element
|
Description
|
xml
|
Start XML parsing element; contains the TriggerNotification element.
|
ConfigNotification
|
Event configuration (setup) notification element. Contains the Host, VideoServer, TriggerInput, ProxyName, ArchiveName, StartUTC, Duration, StopMode, and Type elements.
|
Host
|
Format: [hostname.domain | IP address] The web address of the host where VSMS is running. VSMS runs on port 80 by default.
|
VideoServer
|
Name of the event. The event name may contain 1 to 256 of the following characters:
• Digits (0 to 9)
• Upper case letters (A to Z)
• Lower case letters (a to z)
• Underscore (_)
• Hyphen (-)
|
TriggerInput
|
Range: [0] Generic Trigger input number. Range: [1-6] Trigger input number on device. Range: [1-10] Window number for motion detection.
|
ProxyName
|
The proxy name for the event. The ProxyName element may contain 1 to 256 of the following characters:
• Digits (0 to 9)
• Upper case letters (A to Z)
• Lower case letters (a to z)
• Underscore (_)
• Hyphen (-)
The reserved value is -1.
Note The proxy must exist before adding an event trigger.
|
ArchiveName
|
The archive name for this event. The ArchiveName element may contain 1 to 256 of the following characters:
• Digits (0 to 9)
• Upper case letters (A to Z)
• Lower case letters (a to z)
• Underscore (_)
• Hyphen (-)
The reserved value is -1.
|
StartUTC
|
Format: [UTC milliseconds] Date of the event in UTC milliseconds. This date is when VSMS received notification of the event from the encoder.
|
Duration
|
Format: [integer] Duration of the event archive in seconds.
Note The only supported duration is 300 seconds.
|
StopMode
|
Reserved values: [auto | manual] Specifies whether the clip is auto-stopped or manually stopped.
|
Type
|
Reserved values: [motion | alarm]. Specifies whether the type of event is motion detection or trigger.
|
Enable Event
http://host/event.bwt?command=enable&name=eventName
Purpose
Enables an event previously set up or disabled in VSMS.
For more information about setting up or disabling an event, see Event Setup or Disable Event.
Required Fields
host
|
IP address or hostname (hostname.domain) where VSMS is running.
By default, VSMS runs on port 80 (HTTP), however, you can use an alternate port, such as port 8080. For example, to specify port 8080, use host:8080.
|
command=enable
|
Enable event command. The enable keyword associates the command with an enable event action. The enable keyword is a reserved value.
|
name=eventName
|
The name for the event to be enabled. The eventName value may contain 1 to 32 of the following characters:
• Digits (0 to 9)
• Upper case letters (A to Z)
• Lower case letters (a to z)
• Underscore (_)
• Hyphen (-)
The reserved value is -1.
|
Return Values
A standard HTTP/1.x header followed by:
Return Code: <1 or -1 or output>
1 Successful completion of the URL command
-1 Error in execution of the URL command
Usage Guidelines
Enabling an event is accomplished by sending a HTTP request to VSMS with the event name to be enabled. This command enables the specified event set up in VSMS.
Examples
The following example enables the event named test:
http://vsms.cisco.com/event.bwt?command=enable&name=test
Disable Event
http://host/event.bwt?command=disable&name=eventName
Purpose
Disables an event previously set up or enabled in VSMS.
For more information about setting up or enabling an event, see Event Setup or Enable Event.
Required Fields
host
|
IP address or hostname (hostname.domain) where VSMS is running.
By default, VSMS runs on port 80 (HTTP), however, you can use an alternate port, such as port 8080. For example, to specify port 8080, use host:8080.
|
command=disable
|
Disable event command. The disable keyword associates the command with an disable event action. The disable keyword is a reserved value.
|
name=eventName
|
The name for the event to be disabled. The eventName value may contain 1 to 32 of the following characters:
• Digits (0 to 9)
• Upper case letters (A to Z)
• Lower case letters (a to z)
• Underscore (_)
• Hyphen (-)
The reserved value is -1.
|
Return Values
A standard HTTP/1.x header followed by:
Return Code: <1 or -1 or output>
1 Successful completion of the URL command
-1 Error in execution of the URL command
Usage Guidelines
Disabling an event is accomplished by sending a HTTP request to VSMS with the event name to be disabled. This command disables the specified event set up in VSMS.
Examples
The following example disables the event named test:
http://vsms.cisco.com/event.bwt?command=disable&name=test
Remove Event
http://host/event.bwt?name=eventName&command=remove&killarchive=boolValue
Purpose
Removes an event previously set up in VSMS.
For more information about setting up an event, see Event Setup.
Required Fields
host
|
IP address or hostname (hostname.domain) where VSMS is running.
By default, VSMS runs on port 80 (HTTP), however, you can use an alternate port, such as port 8080. For example, to specify port 8080, use host:8080.
|
command=remove
|
Remove event command. The remove keyword associates the command with a remove event action. The remove keyword is a reserved value.
|
name=eventName
|
The name for the event to be removed. The eventName value may contain 1 to 32 of the following characters:
• Digits (0 to 9)
• Upper case letters (A to Z)
• Lower case letters (a to z)
• Underscore (_)
• Hyphen (-)
The reserved value is -1.
|
Optional Fields
killarchive=boolVal
|
Specifies whether the buffered event archive is removed when the event is removed. The killVal value is one of the following boolean values:
• true—The buffered event archive is stopped and removed from storage.
• false—The buffered event archive is shelved after the event is removed.
The default value is true.
|
Return Values
A standard HTTP/1.x header followed by:
Return Code: <1 or -1 or output>
1 Successful completion of the URL command
-1 Error in execution of the URL command
Usage Guidelines
Removing an event set-up is accomplished by sending an HTTP request to VSMS with the event name to be removed. Because events require a unique name even for the same device, remove requests do not need the trigger parameter. The command removes the event set up for the trigger only in VSMS.
Examples
The following example removes the event named test:
http://vsms.cisco.com/event.bwt?command=remove&name=test
Trigger VSMS Event
http://host/event.bwt?command=event&name=triggerName&nolog=1
Purpose
Triggers an event configured in VSMS.
Required Fields
host
|
IP address or hostname (hostname.domain) where VSMS is running.
By default, VSMS runs on port 80 (HTTP), however, you can use an alternate port, such as port 8080. For example, to specify port 8080, use host:8080.
|
command=event
|
Send event command. The event keyword associates the command with an send event action. The event keyword is a reserved value.
|
name=triggerName
|
The name for the event. The triggerName element may contain 1 to 32 of the following characters:
• Digits (0 to 9)
• Upper case letters (A to Z)
• Lower case letters (a to z)
• Underscore (_)
• Hyphen (-)
The reserved value is -1.
|
nolog=1
|
specifies that clips will have no entry in media server database (repos.db).
|
Return Values
A standard HTTP/1.x header followed by:
Return Code: <1 or -1 or output>
1 Successful completion of the URL command
-1 Error in execution of the URL command
Usage Guidelines
When an event occurs, the device sends an HTTP request to notify VSMS that an event has occurred. The HTTP request contains parameters for the event name. This command can also be used to manually tag events. Since event names are required to be unique on a given host, input numbers are not required.
VSMS sends a notification if the <notifyurl> is specified in the XML when the event was set up. Along with the notify URL, the following XML data, defined in the event trigger setup, is sent to a host. This URL must have a handler running that parses the XML data and can react to the notification.
When event archives are requested for this event setup, the notification is sent only after each archive clip has been created. That is, a separate notification is sent for each event archive clip after it has been saved.
Examples
The following example notifies VSMS that an event named test has occurred on a trigger device.
http://host/event.bwt?command=event&name=test&nolog=1
Event Trigger Notification
Purpose
When an event is set up with a notificationtype element value of 0 or 2, and an event is triggered, event trigger notification information is sent to the specified notification URL.
NnotifyUrl?info=xmlData
Required Fields
notifyUrl
|
The notification URL specified by an Event Setup command. For more information, see the notifyurl XML element description in Table 5-2.
|
data=xmlData
|
XML data comprised of XML elements and values. The structure of the XML data is as follows:
<TriggerInput><TriggerInput>
<ArchiveName></ArchiveName>
For more information about the XML elements, see Table 5-5.
|
Table 5-4 Event Trigger Notification XML Elements
XML Element
|
Description
|
xml
|
Start XML parsing element; Contains the TriggerNotification element.
|
TriggerNotification
|
Event trigger notification element. Contains the Host, EventUTC, Name, IpDevice, SrcType, TriggerInput, ProxyList, and ArchiveList elements.
|
Host
|
Format: [hostname.domain | IP address] The web address of the host where VSMS is running. VSMS runs on port 80 by default.
|
EventUTC
|
Format: [UTC milliseconds] Date of the event in UTC milliseconds. This date is when VSMS received notification of the event from the encoder.
|
Name
|
The name of this event as defined in Event Setup as <name>. The name may contain 1 to 32 of the following characters:
• Digits (0 to 9)
• Upper case letters (A to Z)
• Lower case letters (a to z)
• Underscore (_)
• Hyphen (-)
The reserved value is -1.
|
IpDevice
|
Format: [hostname.domain | IP address] The web address where the trigger is set up; contains no other elements.
|
SrcType
|
Specifies the type of video server to set up the trigger.
Note Sending soft triggers from other devices or applications is supported by the generic <srctype>. Use input of Ø with a unique ID for ipdevice.
|
TriggerInput
|
Range: [0] Generic Trigger input number. Range: [1-6] Trigger input number on device. Range: [1-10] Window number for motion detection.
|
ProxyList
|
Proxy list element. Contains the ProxyName element.
|
ProxyName
|
The proxy name for the event. The ProxyName element may contain 1 to 256 of the following characters:
• Digits (0 to 9)
• Upper case letters (A to Z)
• Lower case letters (a to z)
• Underscore (_)
• Hyphen (-)
The reserved value is -1.
Note The proxy must exist before adding an event trigger.
|
ArchiveList
|
Archive list element. Contains the ArchiveName element.
|
ArchiveName
|
The archive name for this event. The ArchiveName element may contain 1 to 256 of the following characters:
• Digits (0 to 9)
• Upper case letters (A to Z)
• Lower case letters (a to z)
• Underscore (_)
• Hyphen (-)
The reserved value is -1.
|
Event Clip Creation Notification
notifyUrl?data=xmlData
Purpose
When an event is set up with a notificationtype element value of 2, and an event is triggered, event clip creation notification data is sent to the specified notification URL.
Required Fields
notifyUrl
|
The notification URL specified by an Event Setup command. For more information, see the notifyurl XML element description in Table 5-2.
|
info=xmlData
|
XML data comprised of XML elements and values. The structure of the XML data is as follows:
<VideoServer></VideoServer>
<TriggerInput></TriggerInput>
<ArchiveName></ArchiveName>
For more information about the XML elements, see Table 5-4.
|
Table 5-5 Event Clip Creation Notification XML Elements
XML Element
|
Description
|
xml
|
Start XML parsing element; contains the TriggerNotification element.
|
TriggerNotification
|
Trigger notification data element. Contains the Host, VideoServer, TriggerInput, ProxyName, ArchiveName, StartUTC, Duration, StopMode, and Type elements.
|
Host
|
Format: [hostname.domain | IP address] The web address of the host where VSMS is running. VSMS runs on port 80 by default.
|
VideoServer
|
Name of the event. The event name may contain 1 to 256 of the following characters:
• Digits (0 to 9)
• Upper case letters (A to Z)
• Lower case letters (a to z)
• Underscore (_)
• Hyphen (-)
|
TriggerInput
|
Range: [0] Generic Trigger input number. Range: [1-6] Trigger input number on device. Range: [1-10] Window number for motion detection.
|
ProxyName
|
The proxy name for the event. The ProxyName element may contain 1 to 256 of the following characters:
• Digits (0 to 9)
• Upper case letters (A to Z)
• Lower case letters (a to z)
• Underscore (_)
• Hyphen (-)
The reserved value is -1.
Note The proxy must exist before adding an event trigger.
|
ArchiveName
|
The archive name for this event. The ArchiveName element may contain 1 to 256 of the following characters:
• Digits (0 to 9)
• Upper case letters (A to Z)
• Lower case letters (a to z)
• Underscore (_)
• Hyphen (-)
The reserved value is -1.
|
StartUTC
|
Format: [UTC milliseconds] Date of the event in UTC milliseconds. This date is when VSMS received notification of the event from the encoder.
|
Duration
|
Format: [integer] Duration of the event archive in seconds.
Note The only supported duration is 300 seconds.
|
StopMode
|
Reserved values: [auto | manual] Specifies whether the clip is auto-stopped or manually stopped.
|
Type
|
Reserved values: [motion | alarm]. Specifies whether the type of event is motion detection or trigger.
|
Event Clip Start/Stop
http://host/event.bwt?command=event&name=triggerName&type=startStop
Purpose
Starts or stops event-based clips.
Required Fields
host
|
IP address or hostname (hostname.domain) where VSMS is running.
By default, VSMS runs on port 80 (HTTP), however, you can use an alternate port, such as port 8080. For example, to specify port 8080, use host:8080.
|
command=event
|
Event command. The event keyword associates the command with an event action. The event keyword is a reserved value.
|
name=triggerName
|
The name for the event. The triggerName element may contain 1 to 32 of the following characters:
• Digits (0 to 9)
• Upper case letters (A to Z)
• Lower case letters (a to z)
• Underscore (_)
• Hyphen (-)
The reserved value is -1.
|
type=startStop
|
Start/stop type where startStop specifies whether to start or stop a clip. Valid startStop values can be one of the following reserved keywords:
• start—Starts the clip.
• stop—Stops the clip.
The default value is start. No other values are supported.
|
Return Values
A standard HTTP/1.x header followed by:
Return Code: <1 or -1 or output>
1 Successful completion of the URL command
-1 Error in execution of the URL command
Usage Guidelines
A clip will be created from the start command time minus the prebuffer time up to the time of the stop command. If the stop command is not issued before the post-buffer time elapses, the clip will be stopped when the post-buffer time is attained.
When the event has been setup to start the clip, use the soft-trigger
Examples
The following example stops the clip that was started when the event named lobbyMotion was triggered:
http://vsms.cisco.com/event.bwt?command=event&name=lobbyMotion&type=stop
Get Event Information
http://host/info.bwt?type=event&property=propValue&name=eventName&startutc=utcMs
&stoputc=utcMs&display=dispFormat
Purpose
Retrieves event information.
Required Fields
host
|
IP address or hostname (hostname.domain) where VSMS is running.
By default, VSMS runs on port 80 (HTTP), however, you can use an alternate port, such as port 8080. For example, to specify port 8080, use host:8080.
|
type=event
|
Event type. The event keyword associates the type with an event action. The event keyword is a reserved value.
|
property=propValue
|
Property type where propValue specifies which event information to retrieve. Valid propValue values can be one of the following reserved keywords:
• setup—List all events set up on the VSMS host being queried.
• proxies—List all events, and the proxies they use to record event archives. Events with multiple proxies are listed per proxy.
• archives—List each event trigger received, including any event archives that were requested. An event set up with trigger tracking is returned without archive clip names.
|
Optional Fields
name=eventName
|
The name of the event being queried. If no name is given, VSMS returns all events. The eventName value may contain 1 to 32 of the following characters:
• Digits (0 to 9)
• Upper case letters (A to Z)
• Lower case letters (a to z)
• Underscore (_)
• Hyphen (-)
The reserved value is -1.
|
startutc=utcMs
|
Start date filter for archives. The utcMs value is the start date in UTC milliseconds.
Note This field is used only when property=archives is specified.
|
stoputc=utcMs
|
Stop date filter for archives. The utcMs value is the stop date in UTC milliseconds.
Note This field is used only when property=archives is specified.
|
display=dispFormat
|
Display format where dispFormat specifies the format to use when displaying the list of running proxies. Valid dispFormat values include the following keywords:
• html—Hypertext markup language format
• text—Plain text format
• ssv—Space-separated value format
The default dispFormat value is html.
|
Return Values
A standard HTTP/1.x header followed by:
Return Code: <[archive info] or -1 or output>
[archive info] Successful completion of the URL command
For property=archives, table containing the following columns: name, input/window,
type, archive name, time
For property=proxies, table containing the following columns: name, input/window,
type, proxysource
For property=setup, table containing the following columns: name, ipdevice,
srctype, notifyURL, input/motion, type, state, notificationtype, maxevents,
daystolive, framerate, prebuffer, postbuffer, totalevents, cliphost, action,
acclframerate, duration
-1 Error in execution of the URL command
Usage Guidelines
Information can be retrieved based on property type, event name, start and stop dates.
Examples
Retrieving All Event Archive Information
The following example retrieves information about all event archives:
http://vsms.cisco.com/info.bwt?type=event&property=archives
Retrieving Archive Information for a Specific Event
The following example retrieves information about the event archives for the event named abc:
http://vsms.cisco.com/info.bwt?type=event&property=archives&name=abc
Retrieving Archive Information for a Specific Event Within a Specific Time Frame
The following example retrieves information about the event archives for the event named abc that start on or after 1018642188000 UTC and end on or before 1018642228000 UTC:
http://vsms.cisco.com/info.bwt?type=event&property=archives&name=abc&startutc=101864218800
0&stoputc=1018642228000
Retrieving Archive Information in SSV Format for a Specific Event Within a Specific Time Frame
The following example retrieves information in SSV format about all event archives for events named abc that start on or after 101864218800 UTC and end on or before 1018642228000 UTC:
http://vsms.cisco.com/info.bwt?type=event&property=archives&name=abc&startutc=101864218800
0&stoputc=1018642228000&display=ssv
Motion Event Configuration and Event Handling
The following steps discuss motion event configuration and event handling.
Step 1
An event profile is added in VSOM and associated with the required feed(s) on which motion detection is to be tracked. The actions are configured to occur upon event along with the relevant parameters to perform the action such as pre-buffer, post-buffer, rate, and resolution.
Step 2
VSOM will send the event profile information to VSMS via the event.bwt apache module adding it as a software (soft) trigger (trigger input # 0, srctype generic). The event handler will parse the command and start the archives based on the actions to be performed when a motion event occurs.
Command and sample xml
<name>e_SampleEvent</name>
<ipdevice>1207870147</ipdevice>
<srctype>generic</srctype> I
<notifyurl> http://10.10.50.32/vsom/event_notify.php?</notifyurl>
<notificationtype>2</notificationtype>
<daystolive>30</daystolive>
<prebuffer>30</prebuffer>
<postbuffer>60</postbuffer>
<proxysource>p_SampleFeed</proxysource>
Step 3
On the VSOM motion configuration page, motion windows are configured on the applicable feed and the previously setup soft-trigger event profile is registered with this configuration.
Step 4
VSOM sends the motion configuration data to VSMS through the motion.bwt handler.
Step 5
Motion.bwt parses the data, writes it into conf/motion/proxy_name.xml, and notifies the proxy.
Step 6
The proxy communicates the motion configuration information to the device including the server and URL to notify when a motion occurs.
Step 7
When motion is detected, the device sends a motion start command to VSMS via the motionrecv.bwt apache module.
Step 8
The motionrecv.bwt apache handler forwards the message onto the proxy motion driver.
Step 9
The proxy motion driver notifies VSOM using the starturl URL setup during motion configuration.
Step 10
VSOM sends a start event command to the VSMS event.bwt module. The event module will perform the necessary actions such as update properties, start recording, and mark as event.
Command
event.bwt?command=event&name=<e_SampleEvent>&type=start&nolog=1
The proxy motion driver keeps track of all the windows it receives motion start commands for. It also monitors the time elapsed since the last motion start command was received for any window exceeding the ttl_motion_events. The ttl_motion_events was configured in conf/devices/Cisco-avg.xml and the default is one second. A motion stop command is sent to VSOM using the stopurl URL, setup during motion configuration.
Step 11
VSOM sends a stop event command to the VSMS event.bwt module. The event module with perform necessary actions such as set back feed properties and stop recording after post-buffer.
Command
event.bwt?command=event&name=<e_SampleEvent>&type=stop&nolog=1
Single Alarm (trigger) Event Configuration and Handling
The following steps discuss adding alarm triggered event configurations and handling triggered events.
Step 1
An event profile is added in VSOM and associated with the required feed(s) on which motion detection is to be tracked. The actions are configured to occur upon event along with the relevant parameters to perform the action such as pre-buffer, post-buffer, rate, and resolution.
Step 2
VSOM sends the event profile information to VSMS through the event.bwt apache module. The event handler parses the command and starts the archives depending on the actions to be performed when an event occurs. For devices such as Cisco_avg, the event driver will update the device so that the device communicates with the server with the relevant information when events occur via the following command.
Command
event.bwt?command=event&name=<e_SampleEvent>
Step 3
When the event.bwt command is received from the IP device, the actions setup in the event profile are performed by VSMS and VSOM is notified that the event occurred.
Step 4
Once the event.bwt module finishes processing the event, it notifies VSOM with the status of the actions taken.
Soft Trigger Event Configuration and Handling
Soft triggers are used when VSOM generates events in response to particular feedback. The following steps discuss adding soft triggered event configurations and handling triggered events.
Step 1
An event profile is added in VSOM and associated with the required feed(s) along with the actions to occur upon event with the relevant parameters for the action such as pre-buffer, post-buffer, rate, and resolution.
Step 2
VSOM sends the event profile information to VSMS through the event.bwt apache module. The event handler parses the command and starts the archives depending on the actions to be performed when an event occurs.
Step 3
The application sends an event.bwt command to trigger the event. When the event.bwt command is received from the IP device, the actions setup in the event profile are performed by VSMS and VSOM is notified that the event occurred.
Command
event.bwt?command=event&name=<e_SampleEvent>
Step 4
Once the event.bwt module finishes processing the event, it notifies VSOM with the status of the actions taken.