> ## 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.

# Open Options Flex

> Connect Open Options Flex to KODE OS for access control data

> Connect Open Options Flex to KODE OS for access control data integration

## Overview

Use this integration to connect your Open Options Flex access control system to KODE OS. You can discover devices and points and collect sensor and non-sensor access data through REST.

| Property            | Value          |
| ------------------- | -------------- |
| **System Type**     | Access Control |
| **Communication**   | REST           |
| **Collection**      | Pull           |
| **Collection Mode** | SNAPSHOT       |

## Supported Capabilities

* Discover Devices & Points
* Collect Sensor Data
* Collect Non-Sensor Data

## Prerequisites

* An active account with Open Options Flex and access to their API or developer portal
* OAuth client credentials (Client ID and Client Secret) from the Open Options Flex developer portal
* KODE OS environment with access to Data Sources

## Generate API Credentials

1. Log in to the Open Options Flex developer portal or admin console
2. Navigate to the API or developer settings section
3. Create a new API application or client
4. Note the **Client ID** and **Client Secret** -- you will need these when configuring the connector in KODE OS
5. Note the **Auth URL** for OAuth token exchange

## Configure Connector in KODE OS

1. Navigate to **Data Sources** in your building
2. Click **API Catalog** and search for **Open Options Flex**
3. Click **+ Add Datasource**
4. Fill in the fields below and complete the three-page setup flow

| Field             | Required | Type     | Description                                                |
| ----------------- | -------- | -------- | ---------------------------------------------------------- |
| **URL**           | Yes      | text     | The base URL or IP address of the external system          |
| **Auth URL**      | Yes      | text     | The OAuth authorization URL for token exchange             |
| **Client ID**     | Yes      | password | The OAuth client ID from the vendor's developer portal     |
| **Client Secret** | Yes      | password | The OAuth client secret from the vendor's developer portal |

## Discover Devices and Points

After configuring the connector, click **Discover** on the connector detail page. KODE OS will query the Open Options Flex system and return a list of available devices and their data points.

Review the discovered items and select the devices you want to register in KODE OS.

For more details on the discovery process, see the [Discovery guide](/products/integrations/capabilities/discovery).

## Devices and Points

When you discover devices from Open Options Flex, KODE OS maps them to the following device types and data points:

### Access Controller

Canonical Type: `default`

| # | Point         | Description                                                                           | Unit | Writable | Ontology Field          | Collection |
| - | ------------- | ------------------------------------------------------------------------------------- | ---- | -------- | ----------------------- | ---------- |
| 1 | `isMasked`    | **True** -- alarm is masked/suppressed / **False** -- alarm is not masked             | --   | No       | `medium_priority_alarm` | Polling    |
| 2 | `mode`        | Current operating mode                                                                | --   | No       | --                      | Polling    |
| 3 | `active`      | **True** -- door is currently open / **False** -- door is closed                      | --   | No       | `door_status`           | Polling    |
| 4 | `forcedOpen`  | **True** -- door has been forced open / **False** -- no forced entry detected         | --   | No       | `high_priority_alarm`   | Polling    |
| 5 | `forceMasked` | **True** -- forced-open alarm is masked / **False** -- forced-open alarm is active    | --   | No       | `high_priority_alarm`   | Polling    |
| 6 | `heldOpen`    | **True** -- door is being held open / **False** -- door is not held open              | --   | No       | `low_priority_alarm`    | Polling    |
| 7 | `heldMasked`  | **True** -- held-open alarm is masked / **False** -- held-open alarm is active        | --   | No       | `low_priority_alarm`    | Polling    |
| 8 | `fault`       | **True** -- fault condition detected / **False** -- no fault                          | --   | No       | `medium_priority_alarm` | Polling    |
| 9 | `online`      | **True** -- device is connected and reporting / **False** -- device is not responding | --   | No       | --                      | Polling    |

## What Data You Get

### Point History

Time-series readings including isMasked, mode, active, forcedOpen, forceMasked, heldOpen, heldMasked, fault, and 1 more, collected at regular intervals from connected devices

### Alarms

Alert and fault notifications including alarm name, priority, status, timestamps, device association, and acknowledgment state

KODE OS maps Open Options Flex data to these standard fields:

| KODE Field      | Source Field          | Notes       |
| --------------- | --------------------- | ----------- |
| **id**          | `uniqueId`            | --          |
| **name**        | `hardwareType`        | --          |
| **description** | `alarmDescription`    | --          |
| **priority**    | `priority`            | --          |
| **status**      | `status`              | --          |
| **deviceId**    | `hardwareUniqueKey`   | --          |
| **deviceName**  | `hardwareDescription` | --          |
| **location**    | `hardwareAddress`     | --          |
| **createdAt**   | `transaction`         | transformed |

### Polling Schedule

* **Point History** -- Default polling: 1 minutes (min: 1 minutes, max: 1 hours)
* **Alarm** -- Default polling: 1 days (min: 1 days, max: 1 days)

For more details on collection modes, see the [Data Collection guide](/products/integrations/capabilities/data-collection).

## Use Cases

Once connected, this integration enables you to:

* Centralize access event monitoring across all entry points and zones
* Generate audit trails for security compliance and investigation
* Correlate access patterns with occupancy and energy data for building optimization

## Troubleshooting

<AccordionGroup>
  <Accordion title="Authentication or connection error">
    Verify that the credentials are correct and have not expired. Check that the URL is reachable from the KODE OS environment. Ensure the Client ID and Client Secret match the values from the Open Options Flex developer portal.
  </Accordion>

  <Accordion title="Discovery returns no devices">
    Verify the connector credentials have sufficient permissions in the Open Options Flex system to list devices. Run a test connection first to confirm connectivity. Some systems require specific API scopes or roles for device enumeration.
  </Accordion>

  <Accordion title="Data collection stops or gaps appear">
    Check the connector status on the Data Sources page. If the status shows an error, review the error logs on the connector detail page. Common causes include expired credentials, network changes, or rate limiting by the Open Options Flex API.
  </Accordion>
</AccordionGroup>
