> ## Documentation Index
> Fetch the complete documentation index at: https://documentation.kodelabs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Schedules

> Discover and manage time-based schedules in connected building systems

> Discover and manage time-based schedules in connected building systems

Schedules define how devices behave over time -- when HVAC systems turn on, when lights dim, and when access doors lock. For integrations that support schedule management, KODE OS lets you discover, create, update, and delete schedules directly in the external system.

## Schedule Types

KODE OS supports two types of schedules, each designed for a different use case.

### Weekly Schedules

Weekly schedules define recurring routines for each day of the week. They are the foundation for regular building operations.

**Example**: An HVAC system runs in "Occupied" mode Monday through Friday from 6 AM to 8 PM, and switches to "Unoccupied" mode during evenings and weekends.

Weekly schedules can contain:

* A single value per time slot (e.g., a temperature setpoint or an on/off state)
* Different values for each day of the week
* Special event overrides that temporarily change the normal pattern

### Calendar Schedules

Calendar schedules handle exceptions and one-time events that override the regular weekly pattern.

**Use cases**:

* **Holidays**: Building closes on December 25th -- all systems switch to holiday mode
* **Maintenance windows**: HVAC zone 3 shuts down Saturday 2-4 PM for filter replacement
* **Temporary overrides**: Conference room stays at 20°C for a special event on March 15th

Calendar schedules use:

* Specific dates (e.g., "December 25, 2026")
* Date ranges (e.g., "December 23-27, 2026")
* Week and day patterns (e.g., "Every third Monday")

## Schedule Values

Each schedule entry can hold a value of one of these types:

| Type        | Example                       | Use Case                          |
| ----------- | ----------------------------- | --------------------------------- |
| **Number**  | `22.0`                        | Temperature setpoints, fan speeds |
| **Boolean** | `true` / `false`              | On/off states, enable/disable     |
| **String**  | `"Occupied"`                  | Named operating modes             |
| **Enum**    | `COMFORT` / `STANDBY` / `OFF` | Predefined mode selections        |

Schedules can also include **point references**, linking the schedule's values directly to device points. When the schedule activates, the linked point automatically receives the scheduled value.

## Schedule Operations

### Discover Schedules

For integrations that support it, you can discover existing schedules configured in the external system. This is similar to device discovery -- KODE OS queries the controller or system and retrieves all available schedules.

### Create Schedule

Create a new schedule in the external system from KODE OS. Specify the schedule type (weekly or calendar), set values for each time slot, and optionally link it to device points.

### Update Schedule

Modify an existing schedule's time slots, values, or point references. Changes are pushed to the external system immediately.

### Delete Schedule

Remove a schedule from the external system. This action cannot be undone.

### Sync Schedules

Synchronize schedule states between KODE OS and the external system. This ensures that any changes made directly in the external system's interface are reflected in KODE OS, and vice versa.

## Schedule Workflow

```mermaid theme={null}
flowchart TD
    A["Discover existing schedules"] --> B["Review discovered schedules"]
    B --> C{"Need new schedule?"}
    C -->|Yes| D["Create new schedule"]
    C -->|No| E["Select existing schedule"]
    D --> F["Configure time slots and values"]
    E --> F
    F --> G["Link to device points"]
    G --> H["Schedule active in external system"]
    H --> I["Periodic sync keeps KODE OS updated"]
```

## Supported Integrations

Schedule management is available for integrations that expose schedule APIs. Common integrations with full schedule support include:

* **Tridium Niagara** -- Weekly and calendar schedules with full CRUD operations
* **Distech BACnet** -- Schedule discovery and management via BACnet objects
* Other BMS controllers that expose schedule endpoints

Check the specific integration's page to see if schedule management is supported. The integration's capabilities will list "Discover Schedules", "Create Schedules", etc., if available.

## Troubleshooting

<AccordionGroup>
  <Accordion title="Schedule changes are not reflected in the device">
    Verify that the schedule is linked to the correct device points. If the schedule has point references, ensure those points exist and are active in the external system. Some controllers may also have priority arrays where manual overrides take precedence over scheduled values.
  </Accordion>

  <Accordion title="Schedule discovery returns no results">
    Not all controller configurations expose schedules via their API. Verify that the controller has schedules configured and that the API credentials have permission to read schedule objects. For BACnet systems, ensure the schedule objects are accessible at the configured BACnet device address.
  </Accordion>

  <Accordion title="Cannot create or update schedules">
    Write operations require elevated permissions in the external system. Verify that the connector's credentials have read-write access. Some integrations may support schedule discovery (read-only) without supporting schedule creation or modification.
  </Accordion>
</AccordionGroup>
