How to create Event/Alarm types and raise them via the SOAP API?

Hello Milestone Developer community,

We have been attempting to extend our integration with the Milestone system, and have reached a point where we are not quite sure how to progress with regards to the new features that we are intending to introduce.

Specifically, we want to trigger alarms in Milestone when icetana detects something anomalous in a video feed. We are interfacing with Milestone via Python using the SOAP API. Would you be able to give any recommendations on how to achieve this or whether this is the right approach?

If we are on the right track, some of the questions we have are:

  • What is required to be able to create Event and Alarm types via the AlarmCommand SOAP API?
    • We have been attempting to figure this out from the AlarmCommand SOAP API’s WDSL, but it is tricky to understand what parts of the types are required, and which are optional.
  • How would we be able to retrieve the GUIDs for Event and/or Alarm types that exist on Milestone? It did not seem like this could be done with the AlarmCommand SOAP API, and we did not see any related methods for it in the ServerCommandService SOAP API either.
  • Should we be using the User-Defined Event type(s) for raising external events from our system? Or should we be using the Analytics Event type(s) instead?
    • To add context here, our system currently identifies the type(s) of the event, the start/end time of the event, and the bounding boxes associated with the event type(s). The intention is to propagate at least the type(s) of the event through as part of the alarm on the Milestone installation.
  • Is it possible to trigger an Analytics Event type from either the ServerCommandService SOAP API or the AlarmCommand SOAP API? Or is the Analytics Events HTTP server endpoint (port 9090 by default) the only means of externally triggering Analytics Events?

Please note: We are aware of that there is a REST API Beta, and the intention to deprecate the SOAP API come later releases. We are targeting the SOAP API for now, as we have clients that are running Milestone installations of 2023R3 or earlier. So we cannot rely upon the existence of the REST API via the API gateway.

Regards,

icetana AI.

When you want the extra data, like the bounding box, the choice must be analytics events and not user-defined events.

The recommendation is to use the Rest API or the Analytics Events HTTP server endpoint (port 9090 by default), but those are not the only ways.

You can use AlarmCommand SOAP API. There is however no sample that shows the use of this. There is the protocol sample, Alarm List, but it only shows read alarms not sending an event.

https://doc.developer.milestonesys.com/html/index.html?base=samples/protocolsamples/alarmlist/readme.html&tree=tree_3.html

When sending an event using the AddEvent() method you must have a source which is a FQID and we have no protocol samples using this. As the recommendation is to use the other methods it is not likely that Milestone will create a sample. Perhaps my hints here are sufficient that you can use the AlarmCommand SOAP API.