Event Server plugin and PTZ commands/overrides via priorities

Hello,

We have developed an event server plugin that accepts PTZ commands from a service running on another node in our network. This remote service is tracking an object and needs to move the PTZ to follow the object. However, we would like a Video Client user to be able to override commands from the remote service and take control of the camera for a configurable time. I have tried configuring the PTZ priorities in the Management Client for two user roles. One is for the Video Client user (call it VCUser) and another is for a user I have created that is for the remote service to use (call it SiteIQ) and I have put this user into the Administrator’s group on the machine where the VMS is installed. The Event Server Service is configured to start using the SiteIQ user’s credentials. The VCUser’s PTZ priority is 10,000. The SiteIQ user’s PTZ Priority is 1. What I am seeing is the commands coming from the remote service always takes control of the PTZ, even though the PTZ priority is lower than the VCUser’s priority. I am wondering if this is due to the Event Server service running as an Administrator, and it always can override the PTZ. If I move the SiteIQ user out of the Administrator’s group though, the Event Server service hangs during startup with the following in the Event Server log:

2015-08-10 6:57:09 AM UTC-04:00 Info Log -------------------------- Version: 3.3.1020.4

2015-08-10 6:57:09 AM UTC-04:00 Info Log Available MAC address:00:0C:29:92:C7:79

2015-08-10 6:57:09 AM UTC-04:00 Info Log Local time is now: 6:57:09 AM

2015-08-10 6:57:09 AM UTC-04:00 Info Log UTC time is now: 10:57:09 AM

2015-08-10 6:57:09 AM UTC-04:00 Info Server Event Server is starting.

2015-08-10 6:57:09 AM UTC-04:00 Info Server Server machine name: DLWVMS2, Server domain name: DLWVMS2

2015-08-10 6:57:09 AM UTC-04:00 Info Server Event Server feature manager started.

2015-08-10 6:57:09 AM UTC-04:00 Info FeatureManager Siveillance VMS 300 detected, Alarm, Map and Access Control feature started

2015-08-10 6:57:09 AM UTC-04:00 Info ServerRegistration Server registration has started.

2015-08-10 6:57:09 AM UTC-04:00 Error ServerRegistration Service registration failed with error message: Access to the registry key ‘HKEY_LOCAL_MACHINE\SOFTWARE\Milestone\XProtect Event Server’ is denied., retrying…

2015-08-10 6:57:09 AM UTC-04:00 Info ServerRegistration Retrying server registration…

It seems that an event server service runinng as a non-administrator user can’t register with the VMS, which I can understand; however, can anyone offer some assistance with commanding PTZs through an event server plugin and overriding PTZs from a Video Client user?

Thanks,

David Wolf

Siemens Industry, Inc.

BT SSP ES R&D

400 Interstate North Parkway, SE

Suite 400

Atlanta, GA 30339, USA

Tel: +1 (678) 819-5596

Fax: +1 (678) 819-5561

Mobile: +1 (815) 814-1478

David,

the Event Server must always run with administrator rights in order to be able to fulfil its tasks.

But you could possibly achieve what you need in a different away:

Option (1): Make your Event Server plugin react to any PTZ action triggered by someone else (there is a suitable event to subscribe to). Let the plugin not issue any PTZ commands until you receive a event saying that the “other” PTZ action has stopped, then continue with your own PTZ actions.

Option (2): Do not connect your service to the Event Server, but connect it directly to the Recording Server. Your service would appear as an “ordinary” user, which can be assigned any desired (low) PTZ priority. This option has the positive side-effect that it considerably reduces latency, which might is an advantage for your tracking service.

Option (3): You could try to remove the user running the Event Server from the administrator role and add it to some other role instead. Ths other role could be given a suitable PTZ priority. But it would be somewhat clumsy and I have not been able to test if it would work. So, this option is the least recommended one.

The Event Server must run as a user which is part of Administrators role.

As a consequence the PTZ command issued from an event server plugin will always have maximum priority. This is unavoidable.

I see two possible workarounds:

Instead of letting an event server plugin be responsible for doing the PTZ commands, develop a standalone service to be responsible for doing the PTZ commands. This service will not have a requirement to login as a user that is part of the administrators role which means this services login user will then be able to belong to a user role where you can configure the PTZ priority settings value.

The PTZandPresets sample is an example of such an independent program.

Let the event server plugin listen to find out if somebody else is doing manual PTZ in the camera. A knowledge base article (1189 (https://force.milestonesys.com/support/MccSupportCommunity?id=kA2200000004TKJ) ) explains how to listen for this using the Status Soap Protocol.

Hi Torsten, Thanks for the suggestions! I had already tried option 1, but what I found in our plugin was that I couldn’t see all of the “PTZ Manual Session Start” or “PTZ Manual Session Stopped” events like I could in the Video Client. If I remember correctly, all I could receive were events for movement that my process generated. Perhaps my subscription was incorrect, but I think I was subscribing for all events, just to see what I could receive. If you could provide me a small example of how to subscribe for PTZ movement events that were triggered by someone else, that would be greatly appreciated. I’ll also investigate options 2 and 3 to see how feasible they are in our current design. Thanks again for your help, Dave.

Hi Bo, Thanks for the response! For option 1, this is a possible solution we can explore. We currently do a lot more in the event service plugin (mapping camera Guids to our representation of them in our tracking service, camera calibration, etc), but splitting this out would work, based on my testing with the PTZ and Presets example. As for option 2, I looked at the sample you suggested, but wouldn’t a PTZ command from our service also be reflected in the status being polled for periodically? How would I know if our tracking service triggered the status update vs. an update from someone moving the camera in a Video Client? Or is there a way to specifically look for events not from my process? I had already asked this question in response to a different support agent. Thanks again for the suggestions! Dave.

You are right, there is no way knowing who did the PTZ. I am not sure if a workaround dismissing a status message because you have done a PTZ command would work. A routine that counts and detects if it gets more status messages with “PTZ Manual Session Start” than you do PTZ commands might work, but this seems a bit insecure and might be prone to errors. For starters what if a PTZ command fails for some reason?

Option 1 seems the better option..

Hi Bo, I agree with your assessment and will recommend we move forward with option 1 that you suggested. I really appreciate your help in working through this issue and coming up with a feasible solution! Cheers, Dave.

If a post has adequately answered your question, select ‘Best Answer’ to close out the conversation. Thank You!