I am trying to a VMS system integrate through the Protocol API and at some point, I need to be able to retrieve the current PTZ preset the cameras are in, if they are in a preset. I found how to create presets and move the PTZ cameras using the RecorderCommandService but I can’t find a way to get what I want, even in the RecorderStatusService. Is there a way for me to get this information.
You cannot retrieve the current PTZ preset with SDK. Even in Smart Client, there is no functionality to retrieve the current PTZ preset (As a rule of thumb; if there is no functionality on Milestone Clients, then neither is there in the MIP SDK).
You might know this page already and notice that there is no method such a Getxxx method to obtain current PTZ preset.
For absolute PTZ position cameras where I can retrieve the PTZ preset values, I’ve written code before to compare the current absolute position to the list of available presets to figure out which position the camera is in.
You may need to do a greater than/less than check and provide a small range as it’s possible the reported position could be very slightly different than the preset position value.
For relative positioning I’m not sure there’s much you could do, so this strategy would not work for every PTZ camera.
I’ll try and implement it to see if it can match our use-case.
Also, do you have any idea if this is a feature that you plan on creating anytime soon ? It is something really important for us and I guess other developers might need it for their solutions.
Milestone does not have any plans in this regard. Generally the cameras and/or camera drivers lack the possibility to return the preset, so on a low level it will be impossible.
For the majority of cameras that are absolute positioning the interface is in place to return coordinates, but there is no functionality to return what preset or even if it is at a preset. This is possible for Milestone to develop but is not on the list for enhancement development in the foreseeable future.
I hope Josh’s hint on how he has done will enable you to implement what is needed to meet your requirements.