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

# MDAS

> Connect MDAS to KODE OS for controller data

> Connect MDAS to KODE OS for controller data integration

## Overview

Use this integration to connect MDAS to KODE OS. You can discover devices and points, collect sensor data through REST, and receive webhook payloads with file validation when your workflow requires it.

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

## Supported Capabilities

* Discover Devices & Points
* Collect Sensor Data
* Receive Webhook Data
* File Validation

## Prerequisites

* An active account with MDAS and access to their API or developer portal
* KODE OS environment with access to Data Sources

## Configure Connector in KODE OS

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

| Field               | Required | Type     | Description                                                               |
| ------------------- | -------- | -------- | ------------------------------------------------------------------------- |
| **Room**            | No       | text     | The specific room this connector is associated with                       |
| **Modbus Instance** | Yes      | dropdown | The Modbus device instance number                                         |
| **File**            | Yes      | file     | An upload file used during discovery (e.g., device whitelist spreadsheet) |

## Discover Devices and Points

After configuring the connector, click **Discover** on the connector detail page. KODE OS will query the MDAS 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 MDAS, KODE OS maps them to the following device types and data points:

### IO Reader / Controller

Canonical Type: `IOREADER`

| # | Point    | Description                                                                                   | Unit | Writable | Collection |
| - | -------- | --------------------------------------------------------------------------------------------- | ---- | -------- | ---------- |
| 1 | `Normal` | **Normal** -- operating within expected parameters / **Alarm** -- abnormal condition detected | --   | No       | Polling    |

## What Data You Get

### Point History

Time-series readings including Normal, collected at regular intervals from connected devices

### Polling Schedule

* **Point History**

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:

* Monitor real-time HVAC, lighting, and building automation data from a single dashboard
* Set up automated alerts when equipment deviates from normal operating parameters
* Track energy consumption and optimize building performance with historical trend data

## 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. Double-check all credential fields match the values from the MDAS platform.
  </Accordion>

  <Accordion title="Discovery returns no devices">
    Verify the connector credentials have sufficient permissions in the MDAS 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 MDAS API.
  </Accordion>
</AccordionGroup>
