Software Development with Phyton

Dear Technical Team,

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?

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.

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

Best Regards.

I think generic events is a wrong choice and you should consider using Analytics events instead.

When using analytics events you can make the camera the source for the event. Please explore analytics events…

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

https://doc.developer.milestonesys.com/html/index.html?base=gettingstarted/intro_analytics.html&tree=tree_4.html

If exploring the sample does not answer all the questions, or you get new questions don’t hesitate to ask.

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?

We will be sending the code we use for testing purposes in the attachment/attachment. The technical guidance we will receive from you on this issue will be very valuable for us to move the process forward in a healthy way.

Thank you for your interest and support.

No, but in the Management Client when you enable this you can filter on the sender IP, please see the mention of setting this up in the description of the sample. https://doc.developer.milestonesys.com/html/index.html?base=samples/protocolsamples/triggeranalyticseventxml/readme.html&tree=tree_3.html

(I wonder if the Rest API would be more to your liking, this one requires authentication. Sorry for pointing in so many directions, please see - https://doc.developer.milestonesys.com/mipvmsapi/api/events-rest/v1/#tag/Events/operation/Events_Post )

Please see the elements in the sample, note that the sample comes with a schema and a button to test with the schema.

All the rules that can be setup in the Management Client can be triggered by a Analytics Event, I am not aware that there are any known limitation if this is what is being used.