Hello,
So I’m trying to reverse-engineer this.
First, I registered an Analytics Event and used it to trigger an Alarm on a Specific Source Camera using XProtect Management Client.
Second, I used the GetAlarmLines (using Alarm Command Protocol) and inferred the Id of the created Alarm and used it as in as Input to Get request of the Alarm Command Protocol and found the fields that should be populated so that I can use the Add request.
Find http request below for which I got 200 OK status:
POST /Central/AlarmServiceToken HTTP/1.1
Host: 192.168.1.104:22331
Content-Type: text/xml
SOAPAction: http://videoos.net/2/CentralServerAlarmCommand/IAlarmCommandToken/Add
<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope
xmlns:SOAP-ENV=“http://schemas.xmlsoap.org/soap/envelope/”
xmlns:SOAP-ENC=“http://schemas.xmlsoap.org/soap/encoding/”
xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”
xmlns:xsd=“http://www.w3.org/2001/XMLSchema”
xmlns:ns7=“http://schemas.microsoft.com/2003/10/Serialization/Arrays”
xmlns:ns8=“http://schemas.datacontract.org/2004/07/System.Collections.Generic”
xmlns:ns5=“http://schemas.microsoft.com/2003/10/Serialization/”
xmlns:ns6=“urn:milestone-systems”
xmlns:ns4=“http://schemas.datacontract.org/2004/07/VideoOS.Platform.Proxy.Alarm”
xmlns:ns1=“http://tempuri.org/”
xmlns:ns3=“http://videoos.net/2/CentralServerAlarmCommand”>
<ns3:Add>
<ns3:token>TOKEN#7791e16c-da28-4e44-b307-25d0556f917f#desktop-47um62b//ServerConnector#</ns3:token>
<ns3:alarm>
<ns6:EventHeader>
<ns6:ID>0c335dc6-757b-4d7e-95d6-8022bf1b8a06</ns6:ID>
<ns6:Timestamp>2020-08-10T15:59:44Z</ns6:Timestamp>
<ns6:Type>MyType</ns6:Type>
<ns6:Priority>1</ns6:Priority>
<ns6:PriorityName>High</ns6:PriorityName>
<ns6:Name>MyAlarm03</ns6:Name>
<ns6:Message>MyAnalyticsEvent03</ns6:Message>
<ns6:CustomTag>TagFromXML</ns6:CustomTag>
<ns6:Source>
<ns6:Name>Avigilon 1.0-H3-B1 (192.168.0.222) - Camera 1</ns6:Name>
<ns6:FQID>
<ns6:ServerId>
<ns6:Type>XPCORS</ns6:Type>
<ns6:Hostname>desktop-47um62b</ns6:Hostname>
<ns6:Port>7563</ns6:Port>
<ns6:Id>16760179-b8db-4d19-9ad5-09a9d04f5489</ns6:Id>
<ns6:Scheme>http</ns6:Scheme>
</ns6:ServerId>
<ns6:ParentId>16760179-b8db-4d19-9ad5-09a9d04f5489</ns6:ParentId>
<ns6:ObjectId>69dee837-08a0-4686-87b8-d3ec58961a1a</ns6:ObjectId>
<ns6:FolderType>0</ns6:FolderType>
<ns6:Kind>5135ba21-f1dc-4321-806a-6ce2017343c0</ns6:Kind>
</ns6:FQID>
</ns6:Source>
<ns6:MessageId>1ff1da10-8a9a-4c96-85c5-5ff0803382e0</ns6:MessageId>
</ns6:EventHeader>
<ns6:Description>SOAP Event</ns6:Description>
<ns6:Location>Gate-1</ns6:Location>
<ns6:State>1</ns6:State>
<ns6:StateName>New</ns6:StateName>
<ns6:CategoryName></ns6:CategoryName>
<ns6:AssignedTo></ns6:AssignedTo>
<ns6:RuleList>
<ns6:Rule>
<ns6:ID>5a0762ef-bc4f-484e-bbef-57b39c833261</ns6:ID>
<ns6:Name>MyAlarm03</ns6:Name>
<ns6:Type>4547f085-8b68-4639-826f-8722afb0ffc5</ns6:Type>
</ns6:Rule>
</ns6:RuleList>
<ns6:ReferenceList>
<ns6:Reference>
<ns6:FQID>
<ns6:ServerId>
<ns6:Type>XPCORS</ns6:Type>
<ns6:Hostname>desktop-47um62b</ns6:Hostname>
<ns6:Port>7563</ns6:Port>
<ns6:Id>16760179-b8db-4d19-9ad5-09a9d04f5489</ns6:Id>
<ns6:Scheme>http</ns6:Scheme>
</ns6:ServerId>
<ns6:ParentId>16760179-b8db-4d19-9ad5-09a9d04f5489</ns6:ParentId>
<ns6:ObjectId>69dee837-08a0-4686-87b8-d3ec58961a1a</ns6:ObjectId>
<ns6:FolderType>0</ns6:FolderType>
<ns6:Kind>5135ba21-f1dc-4321-806a-6ce2017343c0</ns6:Kind>
</ns6:FQID>
</ns6:Reference>
</ns6:ReferenceList>
<ns6:Vendor>
<ns6:Name>Avidbeam Technologies</ns6:Name>
</ns6:Vendor>
</ns3:alarm>
</ns3:Add>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Now when using the Message MyAnalyticsEvent03 to send an Analytics Event to the Event Server, I get Warning: Event message not known. Any idea what’s wrong here?
Also, I do not see the Event or Alarm listed in XProtect Management Client. Is this how it supposed to be?
Kind Regards,
Eslam