Patrolling using MIP SDK/API

Hello, we are developing an application that allows configuring and sending a patrolling action to a camera. From what we’ve seen, setting up a patrolling profile can be done following the example in ConfigApiClient. However, we’re less certain about the process for sending the command to start or stop a patrolling profile. While browsing the forum, we came across this post: https://developer.milestonesys.com/s/question/0D53X00007bxudASAQ/start-patrolling-using-mips-sdk. Has there been any update on this? If not, is there a way within the SDK/API to create the rule and event, and start de event that launchs the start/stop of a patrolling profile?

The link is still containing accurate information, but one thing which is significant is changed.

Today the Configuration API can be used to make the rule.

It would be possible through code to create..

  1. Patrolling profile.
  2. Configure rule that can start the patrolling.
  3. Create event to trigger the rule.
  4. Submit/trigger the event

So it is still true that there is no direct way to start/stop patrolling profile from SDK, but indirectly there is.

Steps 1 thru 3 can be achieved with the Configuration API, Rest API or VideoOS.Platform.ConfigurationItems classes in the MIP SDK.

One valuable tool for seeing what you can achieve is the Config API Client sample. -

https://doc.developer.milestonesys.com/html/index.html?base=samples/componentsamples/configapiclient/readme.html&tree=tree_2.html

Hello, we will try implementing patrolling with this, if we have any doubt we will comment it in this thread.

Thank you so much for your response.

Hello again, we have been investigating, and to accomplish this, it would be necessary to create a rule for each patrolling profile and an event for each rule, which might make things a bit complex. Is there a way to achieve this in a simpler manner? For example, having a rule where the camera and the patrolling profile are parameterizable, so we could also control it with a single event.

When making a rule in the Management Client (MC) you can for a wide range of rules use “the devices on which the event occurred”. This works when the event has a source, in this way indicating the camera. Unfortunately this does not work for the “Start patrolling on using with PTZ ” rule action. Perhaps because there are more parameters not only the camera.

One thing that came as a surprise to me while investigating this question is that there is no command to start a patrolling in the MIP SDK.

In order to start patrolling from code I find that the only option is the RecorderCommandService SOAP PTZActivatePatrollingSchema

https://doc.developer.milestonesys.com/html/index.html?base=recordersoaphelp/class_recorder_command_service.html&tree=tree_search.html?search=patrol

If you implement a way to start patrolling you could implement it in a rule action. See the BatAction plugin sample for inspiration.

If not developing your own functionality I must agree with you and your findings. You will need a separate rule for each camera and patrolling profile combination.