failed to get alarm snapshot

Hi,

I wrote a program to get alarm’s snapshot. However it always returned null. Here is the code.

var _alarm = _alarmCommandClient.Get(alarm.AlarmLine.Id);

//_alarm is not null, there is alarm info like ID etc.

var _alarmSnapshots = _alarm.SnapshotList;

// it returns null

var _snapshotlist = _alarmCommandClient.GetSnapshots(alarm.AlarmLine.Id);

// it returns null

Is there anything I missed? How to get a alarm’s snapshot? Btw, I can saw the alarms’ snapshot via Milestone smart client.

Most alarms will have no snapshot!

The recommendation is that when you submit an analytics event or alarm you do not include a snapshot. (Milestone XProtect LPR ao. works like this.) Using the time of the alarm and the camera source you can very easily find the recorded image from the time of the event/alarm.

Seeing your question I remember an experiment I did modifying a sample to show images of alarms. See if it works for you.. http://download.milestonesys.com/MIPSDK/Samples/AlarmEventPictures.zip

Does Xprotect server store snapshot for alarm triggered by events and rules? In my testing, the alarm is triggered by motion detection. There is an image icon at the beginning for each alarm under the alarm management tab in smart client. Is it a snapshot?

See picture for what I meant.

No, most likely there is no snapshot. The preview images are from the recorded video for the camera recorded in the recording server.