Set an event handler entry in the event handler configuration table or read all entries from event handler configuration table.
There are 10 entries in the event handler configuration table. Every entry connects a specific event source to one or more event outputs. The event outputs will link to the their output configurations and external servers to process their tasks.
For PlatformT camera, there is one default-enabled event rule in the first entry of event handler configuration table. This rule could switch the video day/night profile based on the day/night state in the camera. This rule could be disabled if people do not want to have this function.
Because some video configurations in the day/night video profiles refer to this event rule, the event source and event output in this rule must NOT be changed.
When this rule is disabled, the settings in the night video profile will not take effective. The settings in day video profile are used all the time even the camera is in the night time mode.If there is no input argument, the device will show configurations of all event handler entries no matter they are enabled or disabled.
entry,state,wday,sHH:SMM,dHH:dMM,EventSrc,EventOutput[,RepeatTime]
where
entry: the index of the entry in the event handler configuration table. It is from 1 ~ 10 where 1 is the first entry of the table.
state: 0:Disable, 1:Enable. If it is disable, this event entry will not be used.
wday: the valid weekday of the events. Here is the format of wday.
wday Description 1 Monday 2 Tuesday 3 Wednesday 4 Thursday 5 Friday 6 Saturday 7 Sunday Example
wday=1237 means the event will be active in every Monday, Tuesday, Wednesday and Sunday
wday=1234567 means the event will be active everyday.
wday=76421 means the event will be active in every Monday, Tuesday, Thursday, Saturday and Sunday. That is the same as wday=12467.sHH:sMM: It gives the starting time of a day specified in the wday argument. sHH is from 00~23 and sMM is from 00~59.
dHH:dMM: it give the duration started from sHH:sMM of a day specified in the wday argument. The range of the dHH and dMM depends on the wday and sHH:sMM. The principle to setup the schedule rule of these arguments is the active event time should not be overlapped.
Example
wday,sHH,sMM,dHH,dMM=135,20:00,06:00 means the active event time is from 20:00 to 23:59 in every Monday, Wednesday, Friday and 00:00~02:00 in every Tuesday, Thursday and Saturday. wday,sHH,sMM,dHH,dMM=1,00:00,48:00 means the active event time is from 00:00 every Monday to 00:00 every Thursday.EventSrc: indicates the event source. Here is the mapping of event source.
Value in EventSrc Description DI1 DI1 (Digital Input 1) is an event source. refer to EVENT_DIn for further details DI2 DI2 (Digital Input 2) is an is an event source. refer to EVENT_DIn for further details DI1|DI2 DI1 or DI2 are event sources. The event will be triggered as the DI1 or DI2 levels match the trigger levels. Refer to EVENT_DIn for further details. MDn|MDn|MDn|MDPIR MD1, MD2 or MD3 are event sources,
PIR Motion Sensor is an event source,
In PlatformK cameras,
the available motion detection regions are more than 3 regions when the video streaming mode is 4VGA or 6VGA. Every video stream has only one motion detection region In these two video streaming mode. Therefore, the MDn means the motion of video stream n acts as the event source. For example, the MD4 means the motion of video stream 4 is the event source in 4VGA or 6VGA video streaming mode.
The possible values are MD1, MD2, MD3, MD4 in 4VGA video streaming mode and MD1, MD2, MD3, MD4, MD5, MD6 in 6VGA video streaming mode.VLOSS Video Loss State is an event source SCH Schedule event. There is no external signals to act as event trigger. The device will use wday,sHH,sMM,dHH,dMM as the trigger source. When the device time is in the active event time, the event was triggered. Otherwise, the event was inactive. The RepeatTime is the time parameter of this event source. The device repeats responses the action of the event periodically then. NIGHT Day&Night status is an event source. When the device entered the night mode, the event was triggered. READY Trigger the device when the streaming service is ready (device is ready to server the video streaming). This is one shot event. As this event was triggered, no further trigger happens.
This event type will be available in PlatformA firmware 3.13 and PlatformT 4.09.STOP Trigger the device when the streaming service was stopped (device closes its video streaming service when it received firmware upgrade or reboot commands). The upload still images and video clip will not be available with this event source. This is one shot event. As this event was triggered, no further trigger happens because the event hander function in the device was shutdown.
This event type will be available in PlatformA firmware 3.13 and PlatformT 4.09.DISK_LOW Trigger the device when the free space in local storage media is lower than the pre-defined low space threshold. This event stays triggered state until the free local storage space does not match the threshold condition. This event source is only available in the device with local storage media.
Refer to the DISK_CONFIG URL in system CGI for detail.DISK_ERR Trigger the device when the firmware fails in writing to the local storage media. This event becomes inactive after response the event. When the failure of writing to local storage media, this event is triggered again.
The available event response for this event is uploading the message to SMTP server or HTTP servers.
This event source is only available in the device with local storage media.DISK_REMOVED Trigger the local storage media was removed from the device. This event becomes inactive after response the event. After the local storage media was inserted to the device, the firmware monitors the state of local storage media for this event then. The available event response for this event is uploading the message to SMTP server or HTTP servers. This event source is only available in the device with local storage media. EventOutput: an event entry could connect single output or several output. It needs to put much attention if several outputs were connected. Or multiple event entry connect to the same event output. Here is the mapping of the EventOutput.
value in EventOutput Description DOn Set the DO (Digital Output Signal) to the specific level. The n could be 1 or 2. Please refer to EVENT_RSPDOn for further details. MSGn Send the notification message vs. email or HTTP CGIs. The n could be 1 ~ 3. Please refer to EVENT_RSPMSGn for further details. IMGn Upload the video still image or video clip to the FTP server, email, or HTTP CGIs. The n could be 1 ~ 3. Please refer to EVENT_RSPIMGn for further details. GO Go to a preset point if it is a PTZ/Speed Dome camera (not available in KCM and Platform D/E/B/I cameras) MDn Change Motion configuration of the motion region n if event was triggered. If the event becomes inactive, restore the motion configuration back. The n could be 1 ~ 3.
In PlatformK cameras,
the available motion detection regions are more than 3 regions when the video streaming mode is 4VGA or 6VGA. Every video stream has only one motion detection region In these two video streaming modes. Therefore, the MDn means the change of motion settings of video stream n is the event output. For example, the MD4 means the firmware changes video stream 4 motion settings when the event was triggered in 4VGA or 6VGA video streaming mode.
The possible values are MD1, MD2, MD3, MD4 in 4VGA video streaming mode and MD1, MD2, MD3, MD4, MD5, MD6 in 6VGA video streaming mode.PIR Change PIR motion detector settings if event was triggered. If the event becomes inactive, restore the PIR motion configuration back. DAY Change the device to day mode if triggered. If event source is inactive, change device to night mode.
The Day/Night mode has to be AUTO when use this event response. Otherwise, this rule will not work correctly.NIGHT Change the device to night mode if triggered. If event source is inactive, change device to day mode.
The Day/Night mode has to be AUTO when use this event response. Otherwise, this rule will not work correctly.VPROFILE Load the night time video profile to the camera when the event NIGHT was triggered. The day time video profile will be restored back to the camera when the event NIGHT was not triggered. This event output was associated with event source is NIGHT only. For other event sources, this event output will not be allowed.
This event output is only available in the PlatformT camera.CMD send an URL command to a HTTP CGI The '|' is used to connect different Event Output's.
Example:
DO1|DO2. The DO1 and DO2 levels will be updated based on event condition.
MSG1|DO1. The DO1 levels will be updated and message will be issues based on EVENT_RSPIMG1 settings when the event source is triggered.RepeatTime: The repeat timer in minutes form 0 to 1440. This is only used when the EventSrc=SCH. If this argument is missed in the EventSrc=SCH, there is no repeat timer in the event and the repeat timer is set to 0. Otherwise, the repeat timer will be applied to this event rule.
If the RepeatTime is 0. the event is triggered during the active event time interval.
The upload time should be smaller than this repeat time if the output of event is uploading image/video to remote servers. If the upload timer is equal to or larger than the repeat time, the event is always triggered during the effective event time interval. The image rate will be calculated by this repeat time. The upload time will not be used then.
Example
0,1,1234567,00:00,24:00,SCH,IMG1,5 : perform upload image/video defined on EVENT_RSPIMG1 every 5 minutes all the time.
0,1,1234567,00:00,24:00,SCH,IMG1 : perform upload image/video defined on EVENT_RSPIMG1 all the time
EVENT_CONFIG='1,1,1234567,00:00,24:00,DI1,MSG1|IMG1'
EVENT_CONFIG='2,0,1234567,00:00,24:00,NONE,NONE'
EVENT_CONFIG='3,0,1234567,00:00,24:00,NONE,NONE'
EVENT_CONFIG='4,0,1234567,00:00,24:00,NONE,NONE'
EVENT_CONFIG='5,0,1234567,00:00,24:00,NONE,NONE'
EVENT_CONFIG='6,0,1234567,00:00,24:00,NONE,NONE'
EVENT_CONFIG='7,0,1234567,00:00,24:00,NONE,NONE'
EVENT_CONFIG='8,0,1234567,00:00,24:00,NONE,NONE'
EVENT_CONFIG='9,0,1234567,00:00,24:00,NONE,NONE'
EVENT_CONFIG='10,0,1234567,00:00,24:00,NONE,NONE'
OK: EVENT_CONFIG='1,1,1234567,00:00,24:00,DI1,MSG1|IMG1'
or
ERROR: EVENT_CONFIG='1,1,1234567,00:00,24:00,DI1,MSG1|IMG1'
Valid
EVENT_DIn, EVENT_RSPDOn, EVENT_RSPMSGn, EVENT_RSPIMGn, EVENT_RSPCMDn, EVENT_RSPMDPIR, EVENT_RSPGO, FTP_SERVER, SMTP_PRI, SMTP_SEC, HTTP_SERVER
http://ip:port/cgi-bin/encoder?USER=Admin&PWD=123456&EVENT_CONFIG
or
http://ip:port/cgi-bin/cmd/encoder?EVENT_CONFIG
http://ip:port/cgi-bin/encoder?USER=Admin&PWD=123456&EVENT_CONFIG=1,1,1234567,00:00,24:00,DI1,MSG1|IMG1
or
http://ip:port/cgi-bin/cmd/encoder?EVENT_CONFIG=1,1,1234567,00:00,24:00,DI1,MSG1|IMG1
HOME, ENCODER CGI