Result event of AnalyticsEventTriggerViaLibrary

I am currently evaluating Milestone XProtect Corporate and trying the MIP SDK component sample: AnalyticsEventTriggerViaLibrary. In the sample component after clicking on “Send analytics event”, where will be the analytics event generated? I can not find the generated analytics event.

The easiest way to see the event generated is to use the Smart Client, make a view with an Alarm List and set the list to show Events (instead of alarm which is default).

Note that another sample that might be explained better is the Analytics Event trigger via library sample.

I recommend reading this document. (http://download.milestonesys.com/MIPSDK/Samples/TriggerAlarmFromExternal-ConceptSolution.pdf)

Thanks a lot Bo.

I modified the sample of AnalyticsEventTrigger SDK library by eliminating the UI to enter camera source and alert message. I managed to generate an event entry in the event list, however, I can not get the corresponding video recording.

In the original AnalyticsEventTrigger SDK library sample, I can generate the event and at the same time the corresponding video recording.

Any idea why?

Best regards,

Willie

A guess: If you have changed how you get the camera source take care that you still have a camera source on the analytics event that you submit. If you send an event without a valid camera source the event will be unable to point to any camera and camera footage.

Thanks a lot Bo,

I have got it to run properly now.

I have further questions:

1). I modified the sample of AnalyticsEventTrigger SDK library by eliminating the UI to enter camera source and alert message. Right now, I have to hard-code it as the following:

ServerId serverId = new ServerId();

serverOd/Od = new Guid(“xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx”);

FQID fqid = new FQID();

fqid.Kind = new Guid(“xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx”);

fqid.ObjectId = new Guid(“xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx”);

Is there any better way to do this rather than to hardcode the information for each camera as shown above?

Is it possible to get the GUID for a new installed camera programmatically?

2). How can I stop the recording of an event? Can I do this programmatically using AnalyticsEventTriggerViaLibrary?

Best regards,

Willie

You should read the configuration and from there find the camera Item. You can make a hardcoded routine if you do not want the user to pick it using UI.

To understand the configuration I recommend that you run the ConfigAccessViaSDK sample, it illustrates how the configuration is a tree structure with all the relevant information on all sorts of items.

Something that might be close to what you need to implement is in the Camera Stream Resolution sample in the FindCameras routine..

You can trigger events that will cause a camera to start recording when the event happens.

If multiple events (or rules) causes the camera footage to be recorded you cannot with one event cause a stop of recording, this is contrary to the way it has been designed to work.

If you have a setup where you with an event causes recording, and nothing else triggers recording, you can also cause the recording to stop.

So the answer is yes, but take care how you configure the system to make this possible.

You will have to disable the default record on motion rule and default record on request rule (and any other “record” rule), and then implement a rule like..

Perform an action on ev1
      from External
start recording immediately on Camera 1
 
Perform stop action on ev2
      from External
stop recording immediately

Note: If the system restarts and you do not trigger event “ev1” nothing will be recorded.

I am a little worried about this, as you can see being able to stop recording can only happen in a very specail setup, it is NOT my recommendation that you set anything like this up.

Rules are used in XProtect Corporate and Expert If using XProtect Enterprise, Professional, Express you will have to rely on “recording on event”.