PYTHON CODE INTEGRATION IN CCTV FOR REALTIME ALERTS (VIDEO ANALYTICS CODE)

Dear Milestone Developer Team,

We are currently working on integrating our AI-based video analytics system with the Milestone XProtect VMS. The goal is to trigger camera-based alarms from our system using Python, In our artificial intelligence-based analysis system we are developing, we aim to trigger camera-based alarms within the scope of integration with Milestone VMS. In this context, we want to create a popup notification on the client side by sending an outsourced alarm (generic event) to Milestone Management Server via Python.

In the first stage, we tried the generic event triggering method with HTTP/HTTPS POST requests in XML format. However, these calls are not successful due to security (authentication/authorization) limitations by the system.

In this context, we request technical support on the following issues:

1. Is there any method or API set you recommend for generic event triggering in Python?

2. What are the authentication/configuration details required for Milestone to accept XML or SOAP formatted requests sent over HTTP/HTTPS?

3. Can you share sample configuration or sample code for such external triggers on Milestone Event Server or Rule Engine side?

4. In order to create camera-based alarms, can you provide technical documentation on how parameters such as camera ID or camera URI can be transmitted in the alarm message?

Within the scope of our integration with Milestone VMS, we are testing the camera-based alarm triggering process using analytics events.

In the manual triggers we perform through the Management Client, analytics events work without any problems, an alarm is generated on VMS and at the same time, the relevant trigger is successfully displayed in the matrix on the Smart Client.

However, when we perform the same operation with Python (we will be sharing the sample code below), although the relevant analytical event appears to be sent successfully, no alarm is generated on the VMS side. We think that there may be a deficiency in the XML structure or authentication/authorization processes.

We request technical support on the following topics:

1. Is there a special authentication or metadata requirement for VMS to process the event sent via Python?

2. What are the elements that need to be considered in order to parse the XML structure correctly on the Milestone side?

3. Are there any known limitations regarding scenarios that run through the Management Client but cannot be triggered through Python?

Our goal is to be able to send triggers directly from our Python based system to Milestone and show real-time popups to the operator on the monitoring screens.

Our Questions:

1. Is there a required schema or authentication we must meet for the Analytics Event to be fully processed?

2. How do we ensure that the `DeviceId` field (Camera GUID) is correctly formatted and accepted?

3. Can you confirm if the Analytics Event endpoint works without login if IP is whitelisted?

4. Is there a tool to validate our XML against the expected schema?

Thank you in advance for your support and guidance, we wish you good work.

Does this sample work for you?

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

If it doesn’t let’s troubleshoot.

If it does, please ask the questions you have in the context of your experience working with the sample and its description found here…

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