> For the complete documentation index, see [llms.txt](https://kb.linknlink.com/kb/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kb.linknlink.com/kb/smart-home-devices/emotion-series/emotion2mqtt-ha.md).

# eMotion2MQTT (HA)

If you need to connect a device to Home Assistant, please follow the steps below to configure MQTT.

### 1. Prerequisites

Ensure that your MQTT broker is correctly configured on your gateway or server.

* For iSG HA users, the MQTT service and integration come pre-installed with default settings.
* For other existing HA instances, you must manually install the Mosquitto MQTT broker service from Add-Ons and add the MQTT integration. If you need guidance on how to install it, refer to this video: <https://youtu.be/dqTn-Gk4Qeo>
* For non-HA systems, set up a compatible MQTT broker.

### 2. eMotion MQTT Settings

&#x20;  1\) Enter the eMotion device interface, click on the top right corner “...”, and select “MQTT connection” from the drop-down menu to enter the MQTT settings page.

<figure><img src="https://3747235627-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcvOpEUD8lrOqQMMrU7u7%2Fuploads%2Ftzh0aIjPqdQyngCkszZm%2Femotion%E7%9A%84mqtt%E8%AE%BE%E7%BD%AE%E5%85%A5%E5%8F%A3.jpg?alt=media&amp;token=cc6d50a6-7da3-42e1-b60b-5d52f02c8b6c" alt="" width="188"><figcaption></figcaption></figure>

&#x20;  2\) MQTT Settings Interface Parameter Description：

&#x20;      ◼ IP Address(URL): Enter the IP address of your host, for instance 192.168.1.5&#x20;

&#x20;      ◼ Port Number: For MQTT Broker, the default port is 11883.&#x20;

&#x20;      ◼ Username & Password: Enter the username and password for your MQTT broker (only alphanumeric characters are allowed).&#x20;

&#x20;      *For iSG HA, both fields can be left blank if the default MQTT integration is used.*

<figure><img src="https://3747235627-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcvOpEUD8lrOqQMMrU7u7%2Fuploads%2Fvkxvr2iygVKDwzX9S1kE%2Fd6052f46bbfec5d8d5d0d81ecfa595f1_origin(1).jpg?alt=media&amp;token=3c0e66bc-2351-497a-ac20-dbd35c145f6f" alt="" width="188"><figcaption></figcaption></figure>

&#x20;  3\) Then click save at the top right corner.After saving, you can revisit this page to check whether the MQTT connection is successful.

### 3. For example

For example, to report our device to Home Assistant (HA) via MQTT, you can refer to the following steps:

* Ensure the MQTT integration is added to your HA.
* Navigate to the device page in the LinknLink app (click the "..." menu in the top-right corner of the device page, then select "MQTT Connection").
* Enter the account and password for your MQTT broker in Home Assistant. The default setting is port number 11883, with the account and password fields left blank.

<figure><img src="https://3747235627-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcvOpEUD8lrOqQMMrU7u7%2Fuploads%2F7UxIhmCcGQXoxmMGalis%2F%E4%BC%81%E4%B8%9A%E5%BE%AE%E4%BF%A1%E6%88%AA%E5%9B%BE_20240927141552.png?alt=media&amp;token=a405ec26-b13a-4db8-a4b3-e1baf4876b94" alt=""><figcaption></figcaption></figure>

* Once the "MQTT Connection Status" displays "Connected", the MQTT connection is successfully established.
* A new device will automatically be created in your HA instance, syncing the status directly from the device.

<figure><img src="https://3747235627-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcvOpEUD8lrOqQMMrU7u7%2Fuploads%2FyX2Kxm8Bu7E9kNUWttBp%2F%E4%BC%81%E4%B8%9A%E5%BE%AE%E4%BF%A1%E6%88%AA%E5%9B%BE_20240929093731.png?alt=media&amp;token=9805ec89-b4cc-4715-8b83-6e9a1f478ecb" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3747235627-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcvOpEUD8lrOqQMMrU7u7%2Fuploads%2FCikMh1GGMGKBKhO8JxVR%2F%E4%BC%81%E4%B8%9A%E5%BE%AE%E4%BF%A1%E6%88%AA%E5%9B%BE_20240929093840.png?alt=media&amp;token=2ea6ffe2-5dd2-45ac-85b0-fd54337b544c" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3747235627-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcvOpEUD8lrOqQMMrU7u7%2Fuploads%2F2wEWdsDOkabTjz7K1Xo0%2F%E4%BC%81%E4%B8%9A%E5%BE%AE%E4%BF%A1%E6%88%AA%E5%9B%BE_20240929094132.png?alt=media&amp;token=19b743c0-b722-4c56-92c7-ef31f5f62a49" alt=""><figcaption></figcaption></figure>

For motion sensors, you can adjust the "No-Person Delay" time on the device page in the LinknLink app to modify the delay time for status updates. ﻿

**Setup Video**

<https://www.youtube.com/watch?v=HM5N3zuJLmA>
