# MQTT

Skysens AgPM can be connect your MQTT broker and subscribes a topic to receive data.

For Adding A MQTT source, select MQTT on add new source menu.&#x20;

<figure><img src="/files/TuBBFcrtGk5AZC9NorQD" alt=""><figcaption><p>Add New Source</p></figcaption></figure>

Adding a MQTT source is three-step process: Source Information, Topic Information and Field Information.&#x20;

<figure><img src="/files/VfigXk8hPQF7ZwN4ql3x" alt=""><figcaption></figcaption></figure>

**Source Information**

To begin receiving device data, we must first establish a connection to an MQTT broker. This broker acts as the central hub, routing messages between the device and our system.

Name: Descriptive name for your MQTT device

Url: MQTT broker's public host name or IP address

Port: MQTT broker's port number

If your broker have some authentication method then select "Use Authentication" and enter the details.

<figure><img src="/files/rAN0aZGqJBaiTXNbqFlN" alt=""><figcaption></figcaption></figure>

**Topic Information**

Topic is a string-based address used by the broker to route messages between publishers and subscribers, enabling organized, decoupled communication via a hierarchical structure and optional wildcards.

<figure><img src="/files/E2ro8X4FjRdJDBw73yL8" alt=""><figcaption></figcaption></figure>

**Field Information**

Field Name: An identifier for MQTT data object

Field Key: Key name on MQTT data object

Unit: Reading data's unit&#x20;

Format: Data format. Such as: int32, float&#x20;


---

# 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.skysens.io/sources/connection-types/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.
