Hello,
I’m on a Linux server and I would like to trigger alarms (Video alarms) on the XProtect Solution. My end-user wants to trigger a macro (or something else) when I send him an alarm. So far, I’ve been using the Central/AlarmServiceToken?wsdl service with the “Add” method. The alarm are well sent but he can’t triggered anything based on the reception of my alarm. I have several leads:
1- There is a AddAsEvent method on the same service which could help. But when I use it I don’t see my alarm anymore and I don’t see the event either (but maybe I’m looking at the wrong place). There is also a AddEvent method…
2- There are some fields of my alarm that are not filled like “class” or “category”
3- I’ve seen in the documentation that there a AnalyticsEvent protocol. is that the one I should use ? It’s not based on SOAP I think but just raw XML. Is there something I have to active on the XProtect side to start listening to my events?
Don’t hesitate to ask for more details if needed, I have some XML samples available.
I recommend that you use the Analytics Events protocol. Explore the sample Analytics Event Trigger via XML.
https://doc.developer.milestonesys.com/html/index.html?base=samples/analyticseventxml.html&tree=tree_3.html
(Enable this protocol in the Management Client - Tools → Options → Analytics Events tab.)
The sample is C# but purely protocol, should be easy to transfer and use in a Linux environment.
The “protocol” is just raw XML..
1- It is important to note that the recommended usage is to submit an event, then have the event raised to be an alarm through an Alarm Definition setup. So when you add an event it is the recommended method but is expected that an Alarm Definition is in should the event also result in an alarm.
If you switch to the method I recommend here you cannot make a direct alarm but only an analytics event.
Historically many integrations then left instructions for the users to create the needed alarm definitions, but today an alarm definition can be made using the configuration API.
I have sort of answered in the order that made more sense to me, do not hesitate to ask further if needed..
Hey, thanks you very much for your full answer. About this sentence : “an alarm definition can be made using the configuration API” => which API are you talking about ? The SOAP API I’m currently using ? or the XML on HTTP API (default port 9090) for Analytics Events? Or another one? I’m on a distant Ubuntu server, therefore I cannot use any .NET internal API
Explore the Config API Client sample.
https://doc.developer.milestonesys.com/html/index.html?base=samples/configapiclient.html&tree=tree_2.html
The sample is not protocol, there is no protocol sample but there is a soap service: ConfigurationApiService.svc
Thanks ! Is there any info regarding the ConfigurationApiService ? I don’t have the SDK samples on my XProtect installation (I dont know how to get those, so far I didn’t need the SDK as I’m using the distant SOAP API). I see that there are a ConstructItem and a SetItem services but they are a little bit too generic for being easy to use…
That is the nature of the Configuration API. See the Config API Client sample for illustration of the structure on this.
Note that Milestone made this easier by introducing strongly typed classes for the Configuration API, if you want this it will however mean that you will be using component integration rather than the SOAP API directly.
https://doc.developer.milestonesys.com/html/index.html?base=gettingstarted/mip2017r3_intro.html&tree=tree_search.html?search=strongly+type
I found the samples but there are’nt any example of how to use the SOAP API (or XML API) to create item. Don’t you have any samples?
We have the sample to send analytic events.
We have no SOAP sample to use the Configuration API. It might prove useful to see the Config API Client sample running as to understand the structure of the items, how they relate to each other.