What is the best approach for integrating alarm events from a camera

Firstly let me state that I’m new to this knowledge domain so please ignore any mistakes in terminology!

I am trying to ascertain the best approach for integrating alarm events from a camera. I’ve looked at the “Introduction to Analytics Integration” in the the Milestone SDK documentation and it would appear that the simplest approach would be to ensure that the camera output the required events direct to the XProtect Event Server. The format of these events would have to be declared either by configuring them as analytics events or by a XProtect Event Server plug-in.

Would this approach be ONVIF compliant i.e. the camera (server) can send events without the VMS system (client) asking for them? If this isn’t ONVIF compliant then would I need to write a VMS (client) plugin that polled all cameras (server) for their alarm states?

I really want to handle the alarms within the VMS in the simplest way possible without having to reinvent the wheel and write alarm handing code.

Please ask any questions necessary for clarification.

Many thanks in advance.

Camera events are implemented in the driver. If you have the camera in the Management Client you can in the Events tab add the supported driver events.

Analytics events are loosely coupled and can come from external services, but can carry more information describing video analytics results or similar. The events are sent without the recording server asking.

If you are a camera device developer there might be information from the CAPP (Camera Alliance Partner Program) team, on how to implement and use camera events.

Both kind of events can be used as basis for an Alarm Definition where events are turned into alarms for the sake of operator awareness and responsiveness.

@Bo Ellegård Andersen (Milestone Systems)​ Thank you for the reply.

After some checking it is apparent that the addition of the events into the camera driver is still work in progress. The ONVIF standard states that metadata shall be sent for any analytics. I think that once the events have been added to the driver then they will be exposed to Milestone (or other VMS’s).

Until these have been added I will add a plugin that polls all cameras for it’s alarm information (sent using bespoke protocol) and encode that before pushing it through to the event server.

I will keep this functionality separate from the alarm reset as I am unsure if resets are covered by the ONVIF standard (more investigation needed). That should enable me to turn off / remove the functions as and when they are provided by metadata.

Thanks for pointing me in the right direction.

@Bo Ellegård Andersen (Milestone Systems)​ I have a question related to the above.

I have added a “Reset Fire Alarm” button to the Alarm Preview window. This works fine and sends the necessary message to the relevant camera.

I’d like to force the user to use this method instead of closing the alarm via the Alarm List.

Therefore I’m trying to do the following:

  1. Alter the code in the Alarm List plugin so that the right click close option isn’t available for fire alarm events.

  2. Complete the close of the alarm from the “Reset Fire Alarm” button event.

For (1) I can’t find the Alarm List code anywhere. Is this exposed for developers?

For (2) I’m guessing this will involve sending an update event to the event server?

Any assistance you can provide would be appreciated.

Regards - David

  1. No

  2. You should be able to do so on the AlarmClient interface using UpdateAlarm . Please see the Alarm and Events Viewer sample and its update alarm buttons. The sample is standalone but you can use the same method in a Smart Client plugin.

@Bo Ellegård Andersen (Milestone Systems)​ thanks again for the reply. I have a follow up question and also a couple of additional questions that I’m hoping you can help with…

Regarding (1) not being exposed. Is it possible to trap the right click close option so that I can determine how best to handle it or could I add some code to monitor the alarm states and trigger a message to my plugin?

The next question I have is regarding best practice…I have a number of cameras to connect to (TCP). The user names and passwords can differ from one camera to the next. I’m therefore considering how best to store the user name and password so that I can access them for my connect call. Would adding a Admin component to my solution be a reasonable approach. This could contain a table of cameras, usernames and passwords.

And finally…I have a plugin based on “SmartClientExtension”. This connects to the camera via TCP but I’ve noticed that the connection is lost if I navigate away from the “Live” tab. What I actually want to achieve is a process that runs in the background of the XProtect client and is active for all tabs. Is there a configuration item that I should set for this or a specific example you can point me to that achieves the same.

Thanks in advance.

David

You cannot trap the right click or close on the Alarm List. You can instead subscribe to ChangedAlarmIndication. The Alarm and Event Viewer sample shows this.

Your integration needs to communicate with the cameras directly? Normally this is not required since you get footage etc. from the XProtect system. I would recommend to avoid communication directly with the cameras if feasible.

If you make a background plugin and set TargetEnvironments to SmartClient the background plugin runs in the Smart Client. An example is the SCOverlayOnEvent sample.

OK I will subscribe to ChangedAlarmIndication and offer the user the option to reset the alarm on the camera from there.

The current camera system requires a poll for it’s alarm state. Therefore I need to communicate directly with the camera for that and also to reset the alarm. Future releases of the camera will pass the alarm information as part of the meta data to the video stream. Thereby removing the necessity for the poll. The reset alarm functionality will have to remain though.

I will follow the example of the background plugin to ensure that the integration runs under the Smart Client.

Thanks once again.

David

Note that with the Configuration API it is possible to read or modify user name and password for cameras. So it would be possible to use the information in your integration solution. It does not have to be an Management Client plugin but that might be the best place, the user has to be in the administrators role.

You could start by having a look into the Config API Client sample.

@Bo Ellegård Andersen (Milestone Systems)​ Thanks for that info. I will look into that as a possible solution.

@Bo Ellegård Andersen (Milestone Systems)​ I don’t see the Configuration API - is this only available for Corporate and Expert? I’ve also looked at the Config API Client sample and can’t see reference to username and password.

Thanks in advance.

David.

Configuration API is available for XProtect Corporate, Expert, Professional+, Express+ and Essential+ (note the plus) or what we in MIP SDK refer to as c-code servers.