SmartAlarmAbility.getCustomAlarmList(options?: GetCustomAlarmListParams)

Requires:
@ray-js/panel-sdk≥1.8.0

Description

Query the list of custom alert rules

Parameters

ParameterTypeRequiredDescription
NoQuery parameters

Return Value

Type: Promise<CustomAlarmList>
Custom alarm rule list, including triggerRuleId, triggerRuleVO, bizDomain, bindId, etc.

Referenced Types

typeCustomAlarmList
export type CustomAlarmList = CustomAlarmRule[];
typeCustomAlarmRule
PropertyTypeDescription
triggerRuleIdstringID of the rule executed by the alarm
Details of the rule that triggers the alarm; see AlarmTriggerRuleVO
bizDomainstringBusiness domain identifier, fixed as miniAppPanelSDKAlarm in the alarm SDK
associativeEntityValuestringUsed when associativeEntityId is not sufficient to distinguish cases—for example, when the same DP is used but alarm types must be differentiated. You can use DpValue; generally not required.
sourceEntityIdstringDevice ID associated with the current alarm
namestringName or note
iconstringIcon
bindIdnumberBinding ID
associativeEntityIdstringDP ID associated with the current alarm
enablebooleanWhether enabled

Examples

Example

// Get all custom alarms
const rules = await sdm.alarm.getCustomAlarmList();
console.log('Custom alarm count:', rules.length);

// Filter by DP
const dpRules = await sdm.alarm.getCustomAlarmList({ dpId: '1' });