The details about hard hat detection alarm are uploaded in JSON format of EventNotificationAlert message, here shows an example.
Content-Type: multipart/form-data; boundary=MIME_boundary --MIME_boundary Content-Type: application/json Content-Length: 480 { "ipAddress":, /*required, string, IPv4 address of alarm device, the maximum size is 32 bytes*/ "ipv6Address":"", /*optional, string, IPv6 address of alarm device, the maximum size is 128 bytes*/ "portNo":, /*optional, integer32, port No. of alarm device*/ "protocolType":"", /*optional, string, protocol type: "HTTP", "HTTPS", "EHome"; the maximum size is 32 bytes*/ "macAddress":"", /*optional, string, MAC address, the maximum size is 32 bytes*/ "channelID":, /*optional, integer32, device channel No. triggering alarm*/ "releatedChannelList": [1,2,3], /*optional, array of integers, list of alarm related channels, which are of the same camera with channelID; this parameter is used for live view or playback on the platform*/ "dateTime":"", /*required, string, alarm triggered time (ISO 8601 time format), the maximum size is 32 bytes*/ "activePostCount":, /*required, integer32, uploaded times of one alarm*/ "eventType":"", /*required, string, triggered event type, here it should be set to "safetyHelmetDetection" (hard hat detection alarm); the maximum size is 128 bytes*/ "eventState":"", /*required, string, event triggering status: "active"-triggered, "inactive"-not triggered (heartbeat data); the maximum size is 32 bytes*/ "eventDescription":"", /*required, string, event description*/ "channelName":"", /*required, string, channel name (camera name)*/ "deviceID":"", /*optional, device ID which is also the PUID. This field must be returned when passing through ISAPI event information by ISUP*/ "Target":[{ /*array, target, multiple targets can be output after being recognized once*/ "recognitionType":"", /*required, string, recognition type, here it should be set to "safetyHelmet" (hard hat detection)*/ "TargetInfo":{ /*target information*/ "recognition":"", /*required, string, recognition type, here it should be set to "safetyHelmet" (hard hat detection)*/ "dataSource":"" /*required, detection data source: "timing"-scheduled, "trigger" (when exceeding the configured level limit)*/ }, "rect":[{ /*optional, rectangle frame of hard hat*/ "height":, /*optional, float, height*/ "width":, /*optional, float, width*/ "x":, /*optional, float, X-coordinate*/ "y": /*optional, float, Y-coordinate*/ }], "contentID":"", /*optional, string, picture content ID, the maximum size is 256 bytes*/ "pId":"" /*string, thumbnail ID of no hard hat detection alarm, the maximum length is 64 characters*/ "faceContrastResult":"", /*optional, string, face picture comparison result, this node is returned only when the hard hat detection is linked to face picture comparison*/ "Face":{ /*optional, face information, this node is returned when faceContrastResult is "success"*/ "FDID": "", /*required, string, face picture library ID, the maximum size is 63 bytes*/ "FPID": "", /*optional, string, face record ID, if it is inputted, it should be unique ID consisting of letters and digits, and the maximum size is 63 bytes*/ "contentID":"" /*optional, string, picture content ID, the maximum size is 256 bytes*/ "pId": "", /*optional, string, ID of the matched picture in the library, the maximum size is 64 bytes*/ } }], "contentID":"", "pId":"" /*string, background picture ID, the maximum length is 64 characters*/ } --MIME_boundary Content-Disposition: form-data; name="F4F665D6A18E41308CE9934DCDDD1111"; filename=" background_image.jpg"; Content-Type: image/jpeg Content-Length: 516876 Content-ID: background_image fefefwageegfqaeg...//picture data (the background picture is prior to the thumbnail of no hard hat detection alarm when both of them need to be uploaded) --MIME_boundary Content-Disposition: form-data; name="F4F665D6A18E41308CE9934DCDDD2222"; filename="safetyHelmet1_image.jpg"; Content-Type: image/jpeg Content-Length: 516876 Content-ID: safetyHelmet1_image fefefwageegfqaeg...//picture data --MIME_boundary--
Content-Type: multipart/form-data; boundary=MIME_boundary
--MIME_boundary
Content-Type: application/json
Content-Length: 480
{
"ipAddress":,
/*required, string, IPv4 address of alarm device, the maximum size is 32 bytes*/
"ipv6Address":"",
/*optional, string, IPv6 address of alarm device, the maximum size is 128 bytes*/
"portNo":,
/*optional, integer32, port No. of alarm device*/
"protocolType":"",
/*optional, string, protocol type: "HTTP", "HTTPS", the maximum size is 32 bytes*/
"macAddress":"",
/*optional, string, MAC address, the maximum size is 32 bytes*/
"channelID":,
/*optional, integer32, device channel No. triggering alarm*/
"dateTime":"",
/*required, string, alarm triggered time (ISO 8601 time format), the maximum size is 32 bytes*/
"activePostCount":,
/*required, integer32, uploaded times of one alarm*/
"eventType":"",
/*required, string, triggered event type, here it should be set to "safetyHelmetDetection" (hard hat detection alarm); the maximum size is 128 bytes*/
"eventState":"",
/*required, string, event triggering status: "active"-triggered, "inactive"-not triggered (heartbeat data); the maximum size is 32 bytes*/
"eventDescription":"",
/*required, event description*/
"channelName":"",
/*required, channel name (camera name)*/
"deviceID":"",
/*optional, device ID which is also the PUID. This field must be returned when passing through ISAPI event information by ISUP*/
"Target":[{
/*array, target, multiple targets can be output after being recognized once*/
"recognitionType":"",
/*required, string, recognition type, here it should be set to "safetyHelmet" (hard hat detection)*/
"TargetInfo":{
/*target information*/
"recognition":"",
/*required, string, recognition type, here it should be set to "safetyHelmet" (hard hat detection)*/
"dataSource":""
/*required, detection data source: "timing"-scheduled, "trigger" (when exceeding the configured level limit)*/
},
"rect":[{
/*optional, rectangle frame of hard hat*/
"height":,
/*optional, float, height*/
"width":,
/*optional, float, width*/
"x":,
/*optional, float, X-coordinate*/
"y":
/*optional, float, Y-coordinate*/
}],
"safetyHelmetURL":""
/*string, thumbnail URL of no hard hat detection alarm*/
"faceContrastResult":"",
/*optional, string, face picture comparison result, "success,failed"*/
"Face":{
/*optional, face picture information, this node is returned when faceContrastResult is "success"*/
"FDID": "",
/*required, string, face picture library ID, the maximum size is 63 bytes*/
"FPID": "",
/*optional, string, face picture record ID, if it is inputted, it should be the unique ID consisting of letters and digits, and the maximum length is 63 bytes*/
"libFacePicURL":"",
/*optional, string, URL of the matched picture in the library, the maximum size is 256 bytes*/
}
}],
"imageURL":"",
/*optional, string, background picture URL, the maximum size is 256 bytes*/
"URLCertificationType":""
/*optional, string, picture URL authentication mode: "no"-no authentication, "digest"-digest authentication (it is used for devices (such as DVR, NVR, etc.) to store returned URLs locally); the maximum size is 32 bytes*/
}
--MIME_boundary--