Alarms and Schedules
The integration of schedules in the alarm is a way to exclude datapoints based on a time factor.
In order to use that property, there must have at least one schedule on the account (at the account level or a site level).
Tip
Learn more about Schedules.
The property scheduleConfig in the alarm model allows to link a schedule to this alarm :
"scheduleConfig": {
"scheduleId": 0,
"scheduleLevelIds": [
0
]
},
The 'scheduleId' will be fulfilled by the ID of the schedule the user wants to link.
Schedules have at least one level. The Id of the level(s) the user wants to apply must be listed in the property 'scheduleLevelIds'.
Example
{
"sourceId": 123,
"id": "myAlarm123",
"siteId": 1234,
"variableId": 456,
"friendlyName": "myAlarmName",
"thresholdType": "Low",
"type": "Threshold",
"setValue": 50,
"resetValue": 100,
"frequencyType": "Raw",
"scheduleConfig": {
"scheduleId": 123,
"scheduleLevelIds": [
45,
47
]
},
"enabled": true
}
Given that a schedule with the ID '123' and the levels '45', '46' and '47' exists on the current account, the alarm will be triggered (when conditions are met) only during periods corresponding to levels 45 and 47.
The alarm will never become 'present' or 'not present' during the period corresponding to level 46, even if the conditions of a state of change are met.
Warning
Schedules are defined in UTC. Be careful about it if your source is not defined in the same timezone.
If this schedule is applied on the following raw alarm, the alarm will be trigger four times, only in the levels 45 and 47 :