> For the complete documentation index, see [llms.txt](https://docs.skysens.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.skysens.io/sources/connection-types/mqtt.md).

# 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="https://803875272-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsUGOLnOOPZHTcQBNC5GI%2Fuploads%2FaIigm63YzurCgxdx99Hb%2Fimage.png?alt=media&amp;token=60d2ec41-7066-4755-8753-c227a29682d8" 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="https://803875272-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsUGOLnOOPZHTcQBNC5GI%2Fuploads%2FRx0w6HO9qJcRU5rgTHZr%2Fimage.png?alt=media&amp;token=fe14596a-356f-4d77-8b7b-3bb1a8e4c43a" 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="https://803875272-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsUGOLnOOPZHTcQBNC5GI%2Fuploads%2FFU9eFTzPa3VS0PinYlAT%2Fimage.png?alt=media&amp;token=5c9f3604-a8ef-418c-a0ac-69c716db4a72" 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="https://803875272-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsUGOLnOOPZHTcQBNC5GI%2Fuploads%2FfLBe5LtpheZGE2XvoerE%2Fimage.png?alt=media&amp;token=02565026-b0da-4509-ac20-b25edcb57cf1" 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;
