Is there API for disabling alarm?

In Milestone smart client, one can diable an alarm. Is there SDK API for this feature?

You can manage alarm definitions using the Configuration API. Introduced in 2018R2; requires XProtect c-code 2018R2 or newer, MIP SDK 2018R2 or newer.

The Config API Client can show you that this can be done.

Hi Bo, thanks for you reply. We refered to the configuration API and did some practice. The API can read all alarm definitions defined in management client. We thought that DisableEventList should be the one what we wanted. However, it always returned NULL although we did disabled some alarms via smart client. Also, in the management client, we can’t see any clue what changed when a user disabled an alarm for a period. So, could you help to explain how the disabled alarm take effect?

The following all info we read for an alarm:

{alarm201}

AutoClose: false

Category: “00000000-0000-0000-0000-000000000000”

CategoryValues: Count = 1

Description: “test1”

DisableEventList: “”

DisplayName: “alarm201”

EnableEventList: “”

EnableRule: “0”

EnableRuleValues: Count = 3

Enabled: true

EventType: “0245bafd-91f3-4845-af29-8fc3461fa037” MessageId:

EventTypeGroup: “b1ca6710-f244-4ce2-8daf-662e342c405a”

EventTypeGroupValues: Count = 7

EventTypeValues: Count = 15

Id: “4C95032C-9B97-40EA-9E62-907327412546”

ItemCategory: “Item”

ManagementTimeoutEventList: “Output[F4B38EA2-612B-45D3-818E-06B560DE99A5]”

ManagementTimeoutTime: “00:01:00”

Methods: Count = 0

Name: “alarm201”

Owner: “”

ParentItemPath: “System[]”

ParentPath: “/AlarmDefinitionFolder”

Path: “AlarmDefinition[4c95032c-9b97-40ea-9e62-907327412546]”

Priority: “9ad9338b-22ba-4f2e-bf62-e6948ae99bbf”

PriorityValues: Count = 3

RelatedCameraList: “Camera[A820B4CF-FEE9-475B-9037-5DFA01DFF6F0]”

RelatedMap: “a3c748b6-8182-4e63-8f95-2b2a88723b98”

RelatedMapValues: Count = 7

ServerId: {VideoOS.Platform.ServerId}

SourceList: “Camera[A820B4CF-FEE9-475B-9037-5DFA01DFF6F0]”

TimeProfile: “TimeProfile[00000000-0000-0000-0000-000000000000]”

TriggerEventlist: “”

There is much more to this question than i had realized when I made my first reply.

When you in the Management Client disable an alarm definition this is a permanent configuration change. This is supported by the Configuration API, you can do this in a Configuration API based application.

When you in the Smart Client disable an Alarm this is a temporary change of state. You will not be able to see in the Management Client or using the Configuration API that the Alarm Definition has changed state.

I found that there is currently no API or MIP method that can give you the information that an Alarm is temporarily disabled, nor is there methods to control this outside the Smart Client Alarm List user interface.

I will describe this for Milestone Product Management, and based on this question request that this is considered for future development work.

Hi Bo,

Do you have any news on this request?

I just got the question to show a visual indication in the smart client whether an alarm definition is on or off.

This state is toggled by user defined events.

Thanks,

Alex

The ConfigurationAPI supports this via VideoOS.Platform.ConfigurationItems.AlarmDefinition.Enabled; You can retrieve and set the property (make sure to call Save() after setting it). I work on a Component-based application so I can’t speak to plugin development specifically but I hope that helps.

Hi Derek,

Thanks for your answer.

The property you refer to is the enable/disable on the alarm definition.

However, you can activate/deactivate the alarm definition based on events. I need to know when an alarm definition is activated. This is independent of the check box “enabled”.

Thanks,

Alex

Your description is unfortunately correct, you can disable an alarm definition using Configuration API, but you cannot determine if it is temporarily deactivated by a user. Similarly you cannot see if an alarm definition which has been configured to have an activation period based on a time profile or an event is activated.

Based on this thread I had a discussion with Milestone Product Management. The feedback was positive and there is a relatively high probability that this will be picked up in the near future.

It will not be in 2021R1 currently being developed though. It is important to note that these plans are subject to change without notice. Please follow the news on new features or new releases.

Thanks for this reply Bo. We’ll see when it gets there