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

# KODE MQTT

> Connect KODE MQTT to KODE OS for other data

> Connect KODE MQTT to KODE OS for other data integration

## Overview

Use this integration to publish and subscribe to MQTT topics through KODE OS. You map devices from broker metadata topics, collect delta sensor streams, and use schedules and actions where your broker and topic layout allow.

| Property            | Value     |
| ------------------- | --------- |
| **System Type**     | Other     |
| **Communication**   | MQTT      |
| **Collection**      | Push      |
| **Collection Mode** | DELTA     |
| **Schedules**       | Supported |
| **Actions**         | Supported |

See [KODE MQTT](https://kodelabs.com/integration/kode/) on the KODE Labs Integrations Library.

## Supported Capabilities

* Discover Devices & Points
* Collect Sensor Data
* Discover Schedules
* Create Schedules
* Update Schedules
* Delete Schedules

## Prerequisites

* Access to the MQTT broker used by KODE MQTT
* Broker hostname, port, and credentials
* KODE OS environment with access to Data Sources

## Broker credentials

1. Log in to the MQTT broker admin console or identity provider used by KODE MQTT
2. Create or locate a broker user with subscribe (and publish, if actions or schedules are required) permissions
3. Note the username, password, and any TLS certificate material
4. Store these values securely -- you will need them when configuring the connector in Cloud BMS

## Configure Connector in Cloud BMS

1. Navigate to **Data Sources** in your building
2. Click **API Catalog** and search for **KODE MQTT**
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 MQTT broker hostname or URL                                       |
| **API Key**                      | Yes         | password | The broker credential or API key used to authenticate the MQTT client |
| **Metadata Topic**               | Yes         | text     | The MQTT topic for device metadata                                    |
| **Telemetry Topic**              | Yes         | text     | The MQTT topic for telemetry data                                     |
| **Command Topic**                | Yes         | text     | The MQTT topic for sending commands to devices                        |
| **Schedule Configuration Topic** | No          | text     | The MQTT topic for schedule configuration messages                    |
| **Schedule State Topic**         | Conditional | text     | The MQTT topic for schedule state messages                            |
| **Schedule Command Topic**       | Conditional | text     | The MQTT topic for schedule command messages                          |
| **Response Command Topic**       | Conditional | text     | The MQTT topic for command response messages                          |

## Device and point mapping

MQTT connectors usually receive data as it arrives and often do not use a REST-style discovery step. Configure the metadata and telemetry topics so KODE OS can map devices from published messages. If your deployment exposes a Discover action, review mapped devices and register the ones you want in KODE OS.

For more details on discovery behavior by protocol, see the [Discovery guide](/products/integrations/capabilities/discovery) and [MQTT integrations](/products/integrations/capabilities/mqtt).

## What Data You Get

### Point History

Time-series sensor readings such as temperature, humidity, CO2, occupancy counts, energy consumption, light levels, and other measurable values from physical sensors

### Schedule Sync

Schedule state synchronization data between KODE OS and the external system's controller schedules

### Schedule Sync (Partial)

Partial schedule synchronization for incremental schedule updates

### Polling Schedule

* **Point History** -- Default interval: 30 seconds (min: 30 seconds, max: 10 minutes)

MQTT delivers telemetry as messages arrive. Interval values apply only if a pull fallback is configured for your deployment.

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

## Available Actions

This integration supports actions that allow you to send commands to the KODE MQTT system. Available actions are displayed on the device or entity detail page in KODE OS.

#### Example Request

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "action": "ActionName",
  "target": "entity-or-device-id",
  "parameters": {}
}
```

#### Expected Result

* KODE OS publishes the action to the configured command topic using the MQTT client credentials
* Devices or services subscribed to that topic process the command and may reply on the response topic

For more details on how actions work, see the [Actions guide](/products/integrations/capabilities/actions).

## Schedule Management

This integration supports discovering and managing schedules in the KODE MQTT system. You can discover existing schedules, create new ones, and sync schedule states between KODE OS and the external system.

For more details, see the [Schedules guide](/products/integrations/capabilities/schedules).

## Use Cases

Once connected, this integration enables you to:

* Centralize KODE MQTT data in your building operations dashboard
* Correlate data from this system with other building systems for comprehensive analytics

## Troubleshooting

<AccordionGroup>
  <Accordion title="No data arriving from MQTT broker">
    Verify the MQTT broker hostname, port, and credentials. Check that the topic patterns match the topics being published by the KODE MQTT devices. Ensure the MQTT client has subscribe permissions.
  </Accordion>

  <Accordion title="Discovery returns no devices">
    Confirm the metadata topic matches what devices publish and that the MQTT client has subscribe permissions on that topic. MQTT connectors often map devices from metadata messages rather than querying a REST catalog.
  </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 broker credentials, network changes, or broker ACL restrictions.
  </Accordion>
</AccordionGroup>
