Defining DeviceSchedules data objects
DeviceSchedules Objects
DeviceSchedule objects are data elements that nest into the “deviceSchedules” array of the DeviceSchedulesV1 data file. These objects define individual schedules for device behaviors (e.g. times when device automatically unlocks). Only recurring type schedules are allowed for the DeviceSchedules array. A recurring schedule is used when a device behavior needs a complex set of rules to apply it to specific time ranges and/or frequencies. Each recurring schedule starts each occurence at the same time (based on the specified start time) and ends the occurence after a specified duration. There are 4 different types of recurring schedule that allow a user to control the frequency and pattern of each occurence. Note: Recurring Schedules do not support exception rules within the schedule definition.
Daily Recurring Schedules
A daily recurring schedule applies the occurence continuously every day until the schedule expires (if an until dateTime was given), but it differs from an Always Active or Temporary schedule in that the duration can't have a full day duration. This sort of schedule might be used if the device behavior was to be applied during consistent business hours every day of the week (e.g. 6am to 10pm, 7 days a week)
Example Daily Recurring Schedule Object Schema
{
"id": "UniquePacSystemScheduleIdentifier1",
"scheduleType": "RECURRING",
"dtStart": "2024-04-01T15:00:00",
"recurrenceRule": {
"duration": 32400,
"rrule": {
"frequency": "DAILY",
"until": "2030-01-01T00:00:00"
}
}
}Daily Recurring Schedule Fields
Field Name | Description | Data Type | Required | Validation Info |
id | PAC System unique identifier allowing cross-system correlation | string! | true | Can be any unique, non-empty string |
startState | Lock state to be applied when schedule starts | enum string! | true | See startStateEnum table at bottom of this page for values. |
endState | Lock state to be applied when schedule ends | enum string! | true | See endStateEnum table at bottom of this page for values. |
scheduleType | Defines type of schedule which changes the validation requirements for additional schedule data fields | enum string! | true | "RECURRING" |
dtStart | Device local DateTime when schedule should go into effect. | string! | true | "YYYY-MM-DDThh:mm:ss.sss" local format dateTime value |
recurrenceRule | Object field nesting additional fields required for a recurring schedule | object! | true | |
recurrenceRule.duration | The duration in seconds that each occurrence should be active from the time of day matching that given in “dtStart”. | int! | true | 1 <= duration < 86399 |
recurrenceRule.rrule | Object field nesting r-rule fields required for a recurring schedule | object | true | |
recurrenceRule.rrule.frequency | The frequency by which the r-rule pattern repeats | enum string! | true | "DAILY" |
recurrenceRule.rrule.until | Device local DateTime when schedule expires. | string! | false | "YYYY-MM-DDThh:mm:ss.sss" local format dateTime value |
Weekly Recurring Schedules
A weekly recurring schedule applies the occurence on the specified days of week for each week until the schedule expires (if an until dateTime was given). This sort of schedule might be used if the device behavior was to be applied during consistent business hours but only on specific days of the week (e.g. 8am to 5pm, Monday through Friday).
Example Weekly Recurring Schedule Object Schema
{
"id": "UniquePacSystemScheduleIdentifier1",
"scheduleType": "RECURRING",
"dtStart": "2024-04-01T15:00:00",
"recurrenceRule": {
"duration": 86399,
"rrule": {
"frequency": "WEEKLY",
"byWeekDay": [
{ "day": "MO" },
{ "day": "TU" },
{ "day": "WE" },
{ "day": "TH" },
{ "day": "FR" }
],
"until": "2030-01-01T00:00:00"
}
}
}Weekly Recurring Schedule Fields
Field Name | Description | Data Type | Required | Validation Info |
id | PAC System unique identifier allowing cross-system correlation | string! | true | Can be any unique, non-empty string |
startState | Lock state to be applied when schedule starts | enum string! | true | See startStateEnum table at bottom of this page for values. |
endState | Lock state to be applied when schedule ends | enum string! | true | See endStateEnum table at bottom of this page for values. |
scheduleType | Defines type of schedule which changes the validation requirements for additional schedule data fields | enum string! | true | "RECURRING" |
dtStart | Device local DateTime when schedule should go into effect. | string! | true | "YYYY-MM-DDThh:mm:ss.sss" local format dateTime value |
recurrenceRule | Object field nesting additional fields required for a recurring schedule | object! | true | |
recurrenceRule.duration | The duration in seconds that each occurrence should be active from the time of day matching that given in “dtStart”. | int! | true | 1 <= duration <= 86399 |
recurrenceRule.rrule | Object field nesting r-rule fields required for a recurring schedule | object | true | |
recurrenceRule.rrule.frequency | The frequency by which the r-rule pattern repeats | enum string! | true | "WEEKLY" |
recurrenceRule.rrule.byWeekDay | Array of objects that define which days of the week the schedule should be active. | objectArray! | true | |
recurrenceRule.rrule.byWeekDay.day | The day of week that a schedule occurrence should be active. | enum string! | true | “SU”, “MO”, “TU”, “WE”, “TH”, “FR”, “SA” |
recurrenceRule.rrule.until | Device local DateTime when schedule expires. | string! | false | "YYYY-MM-DDThh:mm:ss.sss" local format dateTime value |
Monthly Recurring Schedules
A monthly recurring schedule applies the occurence on the specified monthDay(s) or specified week of the month for every month until the schedule expires (if an until dateTime was given). This sort of schedule might be used if the device was to be applied consistently on particular days of the month (e.g. 1st and 15th of each month), a specific week of the month (e.g. the 2nd week of each month), and/or specific weekday occurences of the month (e.g. the last occurring Friday of each month). Note: Monthly schedules can recur by weekDay patterns or by monthDay patterns, but they can't have both, see example schema shapes for details.
Example Monthly Recurring Schedules
{
"id": "UniquePacSystemScheduleIdentifier1",
"scheduleType": "RECURRING",
"dtStart": "2024-04-01T15:00:00",
"recurrenceRule": {
"duration": 86399,
"rrule": {
"frequency": "MONTHLY",
"byWeekDay": [
{ "day": "FR", "nth": -1 }
],
"until": "2030-01-01T00:00:00"
}
}
},
{
"id": "UniquePacSystemScheduleIdentifier2",
"scheduleType": "RECURRING",
"dtStart": "2024-04-01T15:00:00",
"recurrenceRule": {
"duration": 86399,
"rrule": {
"frequency": "MONTHLY",
"byMonthDay": [
{ "day": 1 }
],
"until": "2030-01-01T00:00:00"
}
}
}Monthly Recurring Schedule Fields
Field Name | Description | Data Type | Required | Validation Info |
id | PAC System unique identifier allowing cross-system correlation | string! | true | Can be any unique, non-empty string |
startState | Lock state to be applied when schedule starts | enum string! | true | See startStateEnum table at bottom of this page for values. |
endState | Lock state to be applied when schedule ends | enum string! | true | See endStateEnum table at bottom of this page for values. |
scheduleType | Defines type of schedule which changes the validation requirements for additional schedule data fields | enum string! | true | "RECURRING" |
dtStart | Device local DateTime when schedule should go into effect. | string! | true | "YYYY-MM-DDThh:mm:ss.sss" local format dateTime value |
recurrenceRule | Object field nesting additional fields required for a recurring schedule | object! | true | |
recurrenceRule.duration | The duration in seconds that each occurrence should be active from the time of day matching that given in “dtStart”. | int! | true | 1 <= duration <= 86399 |
recurrenceRule.rrule | Object field nesting r-rule fields required for a recurring schedule | objectArray! | true | |
recurrenceRule.rrule.frequency | The frequency by which the r-rule pattern repeats | enum string! | true | "MONTHLY" |
recurrenceRule.rrule.byWeekDay | Array of objects that define which days of the week the schedule should be active. | objectArray! | true | |
recurrenceRule.rrule.byWeekDay.day | The day of week that a schedule occurrence should be active. | enum string! | true | “SU”, “MO”, “TU”, “WE”, “TH”, “FR”, “SA” |
recurrenceRule.rrule.byWeekDay.nth | Limits recurrence of the particular weekday to only the single instance that occurs within the nth week of the month. | int! | true | Where nth > 0, week count is from start of month (nth = 1 means first week of month), where nth < 0, week count is from end of month (nth = -1 means last week of the month). Note: All nth values must be the same for a single schedule. |
recurrenceRule.rrule.byMonthDay | Array of objects that define which days of the month the schedule should be active. | objectArray! | true | |
recurrenceRule.rrule.byMonthDay.day | Calendar day of the month that the schedule should be active. | int! | true | 1 to 31 |
recurrenceRule.rrule.until | Device local DateTime when schedule expires. | string! | false | "YYYY-MM-DDThh:mm:ss.sss" local format dateTime value |
Yearly Recurring Schedules
A yearly recurring schedule gives the control of a month recurring schedule, but it allows the occurences to occur only in specified months of the year. This sort of schedule might be used to schedule specific occurences that occur less frequently than monthly (e.g. December 25th). Note: Yearly schedules can recur by weekDay patterns or by monthDay patterns, but they can't have both, below details the difference.
Example Yearly Recurring Schedules
{
"id": "UniquePacSystemScheduleIdentifier1",
"scheduleType": "RECURRING",
"dtStart": "2024-04-01T15:00:00",
"recurrenceRule": {
"duration": 86399,
"rrule": {
"frequency": "YEARLY",
"byWeekDay": [
{ "day": "TH", "nth": -1 },
{ "day": "FR", "nth": -1 }
],
"byMonth": [
{ "month": "NOVEMBER" }
],
"until": "2030-01-01T00:00:00"
}
}
},
{
"id": "UniquePacSystemScheduleIdentifier2",
"scheduleType": "RECURRING",
"dtStart": "2024-04-01T15:00:00",
"recurrenceRule": {
"duration": 86399,
"rrule": {
"frequency": "YEARLY",
"byMonthDay": [
{ "day": 24 },
{ "day": 25 }
],
"byMonth": [
{ "month": "DECEMBER" }
],
"until": "2030-01-01T00:00:00"
}
}
}Yearly Recurring Schedule Fields
Field Name | Description | Data Type | Required | Validation Info |
id | PAC System unique identifier allowing cross-system correlation | string! | true | Can be any unique, non-empty string |
startState | Lock state to be applied when schedule starts | enum string! | true | See startStateEnum table at bottom of this page for values. |
endState | Lock state to be applied when schedule ends | enum string! | true | See endStateEnum table at bottom of this page for values. |
scheduleType | Defines type of schedule which changes the validation requirements for additional schedule data fields | enum string! | true | "RECURRING" |
dtStart | Device local DateTime when schedule should go into effect. | string! | true | "YYYY-MM-DDThh:mm:ss.sss" local format dateTime value |
recurrenceRule | Object field nesting additional fields required for a recurring schedule | object | true | |
recurrenceRule.duration | The duration in seconds that each occurrence should be active from the time of day matching that given in “dtStart”. | int! | true | 1 <= duration <= 86399 |
recurrenceRule.rrule | Object field nesting r-rule fields required for a recurring schedule | object | true | |
recurrenceRule.rrule.frequency | The frequency by which the r-rule pattern repeats | enum string! | true | "YEARLY" |
recurrenceRule.rrule.byWeekDay | Array of objects that define which days of the week the schedule should be active. | objectArray! | true | |
recurrenceRule.rrule.byWeekDay.day | The day of week that a schedule occurrence should be active. | enum string! | true | “SU”, “MO”, “TU”, “WE”, “TH”, “FR”, “SA” |
recurrenceRule.rrule.byWeekDay.nth | Limits recurrence of the particular weekday to only the single instance that occurs within the nth week of the month. | int! | true | Where nth > 0, week count is from start of month (nth = 1 means first week of month), where nth < 0, week count is from end of month (nth = -1 means last week of the month). Note: All nth values must be the same for a single schedule. |
recurrenceRule.rrule.byMonthDay | Array of objects that define which days of the month the schedule should be active. | objectArray! | true | |
recurrenceRule.rrule.byMonthDay.day | Calendar day of the month that the schedule should be active. | int! | true | 1 to 31 |
recurrenceRule.rrule.byMonth | Array of objects that define which months the schedule should be active. | objectArray! | true | |
recurrenceRule.rrule.byMonth.month | The name of the month that the schedule should be active | enum string! | true | "JANUARY", "FEBRUARY", "MARCH", "APRIL", "MAY", "JUNE", "JULY", "AUGUST", "SEPTEMBER", "OCTOBER", "NOVEMBER", "DECEMBER" |
recurrenceRule.rrule.until | Device local DateTime when schedule expires. | string! | false | "YYYY-MM-DDThh:mm:ss.sss" local format dateTime value |
startStateEnum Values
Value | Description |
“SECURED” | Device is secured against unauthorized entrance |
“PASSAGE” | Device is unlocked and allows public entrance. |
“FIRST_PERSON_IN” | Device remains secured against unauthorized entrance. Upon the first valid credential being presented, device will unlock and remain in passage state for remaining duration of the schedule occurance. |
endStateEnum Values
Value | Description |
“SECURED” | Device is secured against unauthorized entrance |
“PASSAGE” | Device is unlocked and allows public entrance. |
"NO_ACTION” | Device remains in secured/passage state that it is currently in and does not change states due to end of schedule occurence. |
What made this section unhelpful for you?
On this page
- Defining DeviceSchedules data objects