# MQTT

MQTT is a lightweight publish/subscribe messaging protocol designed for IoT applications.&#x20;

Qubitro supports both MQTT v3.1.1 and MQTT v5.0, enabling secure and efficient data transmission from devices.

### Specifications

| Parameter      | Description                        |
| -------------- | ---------------------------------- |
| Broker Address | broker.qubitro.com                 |
| Port (SSL/TLS) | 8883 (encrypted)                   |
| Port (TCP)     | 1883 (unencrypted)                 |
| Topic          | Device ID (provided by Qubitro)    |
| Client ID      | Device ID (provided by Qubitro)    |
| QoS            | Quality of Service Levels          |
| QoS Level 2    | Exactly once                       |
| QoS Level 1    | At least once                      |
| QoS Level 0    | At most once                       |
| Password       | Device Token (provided by Qubitro) |
| Username       | Device ID (provided by Qubitro)    |

{% hint style="danger" %}
Both the **Client ID** and the **Topic** must be set to the **Device ID**; otherwise, even if the connection and authentication succeed, Qubitro will not automatically store or display the published data.
{% endhint %}

### Create an MQTT Source

{% stepper %}
{% step %}
**Navigate to the Project Detail Page**

Go to the project where you want to create an MQTT source.
{% endstep %}

{% step %}
**Create a New Source**

Click **New Source**, then select **MQTT** from the available options.
{% endstep %}

{% step %}
**Fill Out the Required Information**

Enter details according to your configuration needs.
{% endstep %}

{% step %}
**Create & Verify**

Click **Create**. Qubitro automatically generates the **Device ID** and **Device Token**. You can find these credentials in the **Device Overview** or **Device Settings** under the **Unique IDs** card.
{% endstep %}
{% endstepper %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.qubitro.com/data-sources/mqtt.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
