Scheduled Alarms
Pre-requisite
- The user has to be signed in to perform the following operations.
- The user should have an active pro-monitoring plan activated on the space.
A schedule arms or disarms the system automatically on the given days and time slot.
Get Scheduled Alarms
To get the list of schedules on a security profile, The following method can be used:
spaceId(required): The space id of the User.securityProfileId(required): The space id of the security profile.
Factory.proMonitoringService.getScheduledAlarms(spaceId: String, securityProfileId: String) -> IVPublisher<ScheduledAlarmModelResponse>
Create a Scheduled Alarm
To add a schedule to a security profile, The following method can be used:
spaceId(required): The space id of the User.securityProfileId(required): The id of the security profile.request(required):ScheduledAlarmRequest— the days, thetimeSlot(TimeSlot(hour:minute:)), thetype(AlarmActionType.arm.rawValueor.disarm.rawValue) and the timezone.
The days of ScheduledAlarmRequest are numbered 1 to 7, where 1 is Sunday.
Factory.proMonitoringService.scheduleAlarm(spaceId: String, securityProfileId: String, request: ScheduledAlarmRequest) -> IVPublisher<Void>
Update a Scheduled Alarm
To update an existing schedule, The following method can be used:
spaceId(required): The space id of the User.securityProfileId(required): The id of the security profile.scheduleId(required): The id of the schedule to be updated.request(required): The request object containing the updated schedule details.
Factory.proMonitoringService.updateScheduledAlarm(spaceId: String, securityProfileId: String, scheduleId: String, request: ScheduledAlarmRequest) -> IVPublisher<Void>
Delete Scheduled Alarms
To delete one or more schedules, The following method can be used:
spaceId(required): The space id of the User.securityProfileId(required): The id of the security profile.request(required): The request object containing the list of schedule ids.
Factory.proMonitoringService.deleteScheduledAlarm(spaceId: String, securityProfileId: String, request: DeleteScheduledAlarmRequest) -> IVPublisher<Void>