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

# Home Assistant

> T3 Gemstone O1 Smart Home Hub Management System

<Frame>
  <img noZoom src="https://mintcdn.com/t3gemstone-754bcb96/yQ7WXGzO8sZiYJoI/images/homeassistant/homeassistant.png?fit=max&auto=format&n=yQ7WXGzO8sZiYJoI&q=85&s=1e66846c6a8614c48b7d51c3e6e2f9f9" alt="Home Assistant" width="1674" height="525" data-path="images/homeassistant/homeassistant.png" />
</Frame>

<Tip>
  By the end of this section, you will have knowledge about the following topics:

  * **Home Assistant** smart home system installation on the T3 Gemstone O1 development board
  * Connecting sensors using the Deneyap Kart and providing home automation to develop smart home applications with this project
</Tip>

## 1. Introduction

Today, controlling home automation data and securing smart devices is more important than ever.
You might want to manage your lighting, security cameras, smart plugs, and sensors in a centralized system
without depending on major cloud providers like Amazon, Google, Xiaomi, or Tuya.
To do this, you need to host your own smart home server on your own device and control your devices over your local network.
However, running such a hub in your home brings technical challenges: enabling communication between devices from different brands,
providing secure remote access from outside the world, and keeping the system continuously operational.
These problems are often solved with complex configurations and high-cost hardware.
The T3 Gemstone O1 development board, with its Home Assistant integration, provides an easy, cost-effective, and secure solution to these problems.

## 2. Home Assistant Installation

Home Assistant is an open-source smart home and automation platform. It offers features such as monitoring sensor data, controlling lights, plugs, and other devices, creating automated scenarios, and providing mobile access—all in a single system.

<Warning>
  The Home Assistant installation only works on **Debian** images. Images of other distributions
  such as Ubuntu are not supported, because the Home Assistant Supervisor service does not work properly on them.
  Therefore, make sure you select a Debian image when writing the image to the board, as explained in the
  [Select the operating system to install on the board](/en/quickstart#1-2-4-select-the-operating-system-to-install-on-the-board) section.
</Warning>

After establishing a [terminal connection](/en/quickstart/#2-explore-gemstone) to the T3 Gemstone O1 development board, start the Docker installation with the following command:

```bash theme={"system"}
sudo curl -fsSL https://get.docker.com | sudo sh
```

After the Docker installation is complete, you can install **Home Assistant**.

```bash theme={"system"}
sudo apt install homeassistant-supervised
```

After the installation is complete, you need to reboot the development board so that the Home Assistant services
can start properly.

```bash theme={"system"}
sudo reboot
```

After the board restarts, it may take 5-10 minutes for the Supervisor to download and start all services, depending on your internet speed.
You can monitor the status with the following command:

```bash theme={"system"}
sudo docker logs -f hassio_supervisor
```

When you see that the `hassio_supervisor` and `homeassistant` services are in the `Up` (Running) state on the screen, you can access the interface from your browser:

`http://gemstone.local:8123` or `http://<your-gemstone-ip-address>:8123`

To access from outside your home, you can use the [Tailscale](/en/projects/cloud#3-external-access) network for which an installation guide is available, and securely connect to your system via your Tailscale IP address (`http://<tailscale-ip>:8123`).

## 3. Accessing the Home Assistant Interface and Initial Setup

Once the system services are active, when you first access the interface via your browser at `http://gemstone.local:8123` or
`http://<your-gemstone-ip-address>:8123`, Home Assistant will greet you with a setup wizard.
At this stage, you can create your administrator account and complete the basic configuration of your smart home.
You can easily complete the interface setup by following the images below:

<Note>
  If you encounter an error connecting to the interface, you can resolve it by changing `https://` in the address bar to `http://`.
</Note>

<Frame caption="Home Assistant Preparing Screen">
  <img src="https://mintcdn.com/t3gemstone-754bcb96/DIpfuN0ZgS7XxcJW/images/homeassistant/en/preparation.png?fit=max&auto=format&n=DIpfuN0ZgS7XxcJW&q=85&s=73321aafc682ecb221123f055bcb6b22" alt="Preparing Screen" width="2536" height="1828" data-path="images/homeassistant/en/preparation.png" />
</Frame>

When you enter the address, you will see the Home Assistant preparing screen. The screen displays an estimated time.

<Frame caption="Home Assistant Welcome Screen">
  <img src="https://mintcdn.com/t3gemstone-754bcb96/yQ7WXGzO8sZiYJoI/images/homeassistant/en/welcome.png?fit=max&auto=format&n=yQ7WXGzO8sZiYJoI&q=85&s=e136c13846c86201ed91eb6e5d7daaf3" alt="Welcome Screen" width="2540" height="1824" data-path="images/homeassistant/en/welcome.png" />
</Frame>

If you are setting up for the first time, you can proceed with the setup from the **Create my smart home** section.
If you have installed before and have backups, you can proceed with the options at the bottom.

<Frame caption="Home Assistant User Creation Screen">
  <img src="https://mintcdn.com/t3gemstone-754bcb96/yQ7WXGzO8sZiYJoI/images/homeassistant/en/user-creation.png?fit=max&auto=format&n=yQ7WXGzO8sZiYJoI&q=85&s=4b70fae084b259623a2b4086e89d5e97" alt="User Creation" width="2536" height="1822" data-path="images/homeassistant/en/user-creation.png" />
</Frame>

After entering your name, username, and password, click the **Create Account** button to create your account.

<Frame caption="Home Assistant Home Location Selection Screen">
  <img src="https://mintcdn.com/t3gemstone-754bcb96/DIpfuN0ZgS7XxcJW/images/homeassistant/en/home-location.png?fit=max&auto=format&n=DIpfuN0ZgS7XxcJW&q=85&s=6ceae8a262cd50f1a2376a2c1972dc78" alt="Home Location" width="2524" height="1816" data-path="images/homeassistant/en/home-location.png" />
</Frame>

You can select the location of your device, i.e., your **Home Location**.

<Frame caption="Home Assistant Data Sharing Selection Screen">
  <img src="https://mintcdn.com/t3gemstone-754bcb96/DIpfuN0ZgS7XxcJW/images/homeassistant/en/data-sharing.png?fit=max&auto=format&n=DIpfuN0ZgS7XxcJW&q=85&s=ad6211cf86978a69e799240bd0341f26" alt="Data Sharing" width="2542" height="1822" data-path="images/homeassistant/en/data-sharing.png" />
</Frame>

You need to give your consent for Home Assistant to use your data. You can continue with these settings enabled or disabled.

<Frame caption="Home Assistant Main Screen">
  <img src="https://mintcdn.com/t3gemstone-754bcb96/DIpfuN0ZgS7XxcJW/images/homeassistant/en/main.png?fit=max&auto=format&n=DIpfuN0ZgS7XxcJW&q=85&s=db58e71c553c6592ae38c4f8530fa3ba" alt="Main Screen" width="2538" height="1822" data-path="images/homeassistant/en/main.png" />
</Frame>

Congratulations! You have successfully completed the setup steps and are now on the Home Assistant main screen. You can now freely configure the hub of your smart home on the T3 Gemstone O1 and start managing your devices.

## 4. Sensor Integration with Deneyap Kart

This section covers the steps for connecting a motion sensor to the Deneyap Kart 1A V2 development board and integrating this sensor into the Home Assistant platform.

### 4.1 Installing ESPHome in Home Assistant

<Frame caption="Home Assistant Main Screen">
  <img src="https://mintcdn.com/t3gemstone-754bcb96/DIpfuN0ZgS7XxcJW/images/homeassistant/en/main.png?fit=max&auto=format&n=DIpfuN0ZgS7XxcJW&q=85&s=db58e71c553c6592ae38c4f8530fa3ba" alt="Home Assistant Main Screen" width="2538" height="1822" data-path="images/homeassistant/en/main.png" />
</Frame>

After opening the menu on the left side, click on the Settings option.

<Frame caption="Home Assistant Settings Section">
  <img src="https://mintcdn.com/t3gemstone-754bcb96/yQ7WXGzO8sZiYJoI/images/homeassistant/en/settings.png?fit=max&auto=format&n=yQ7WXGzO8sZiYJoI&q=85&s=e57159f8916eb865fb37edb7e38b32bc" alt="Home Assistant Settings Section" width="2530" height="1824" data-path="images/homeassistant/en/settings.png" />
</Frame>

From the opened menu, select the Add-ons option.

<Frame caption="Home Assistant Settings Section">
  <img src="https://mintcdn.com/t3gemstone-754bcb96/DIpfuN0ZgS7XxcJW/images/homeassistant/en/settings-2.png?fit=max&auto=format&n=DIpfuN0ZgS7XxcJW&q=85&s=95f33bca669c59f8c473fc13a4b2c044" alt="Home Assistant Add-ons Section" width="2538" height="1818" data-path="images/homeassistant/en/settings-2.png" />
</Frame>

Click the "Install Add-on" button located in the bottom right corner.

<Frame caption="Home Assistant Add-on Store">
  <img src="https://mintcdn.com/t3gemstone-754bcb96/DIpfuN0ZgS7XxcJW/images/homeassistant/en/app-store.png?fit=max&auto=format&n=DIpfuN0ZgS7XxcJW&q=85&s=f191186d86cae56bcfd05ba15474796c" alt="Home Assistant Add-on Store" width="2526" height="1824" data-path="images/homeassistant/en/app-store.png" />
</Frame>

Type "esphome" in the search field in the opened menu.

<Frame caption="Home Assistant Add-on Store Search Result">
  <img src="https://mintcdn.com/t3gemstone-754bcb96/DIpfuN0ZgS7XxcJW/images/homeassistant/en/app-store-search.png?fit=max&auto=format&n=DIpfuN0ZgS7XxcJW&q=85&s=6cc8de3416494e784e0b4c2fe312d49b" alt="Home Assistant Add-on Store Search Result" width="2536" height="1826" data-path="images/homeassistant/en/app-store-search.png" />
</Frame>

Click on the ESPHome option displayed in the search results.

<Frame caption="Home Assistant ESPHome">
  <img src="https://mintcdn.com/t3gemstone-754bcb96/DIpfuN0ZgS7XxcJW/images/homeassistant/en/esphome.png?fit=max&auto=format&n=DIpfuN0ZgS7XxcJW&q=85&s=60bb04bc8774b913d1f64bad69f7edda" alt="Home Assistant ESPHome" width="2530" height="1824" data-path="images/homeassistant/en/esphome.png" />
</Frame>

In the opened menu, click on the Install option and wait for the installation to complete.

<Frame caption="Home Assistant ESPHome After Installation">
  <img src="https://mintcdn.com/t3gemstone-754bcb96/DIpfuN0ZgS7XxcJW/images/homeassistant/en/esphome-installed.png?fit=max&auto=format&n=DIpfuN0ZgS7XxcJW&q=85&s=7523f6893f50cb8e22e49ffb93829bbe" alt="Home Assistant ESPHome After Installation" width="2530" height="1824" data-path="images/homeassistant/en/esphome-installed.png" />
</Frame>

After the installation is complete, click on the Start button in the displayed menu.

<Frame caption="Home Assistant ESPHome After Installation">
  <img src="https://mintcdn.com/t3gemstone-754bcb96/DIpfuN0ZgS7XxcJW/images/homeassistant/en/esphome-installed-2.png?fit=max&auto=format&n=DIpfuN0ZgS7XxcJW&q=85&s=1cc49375c39f46cb75d40b0aad24c221" alt="Home Assistant ESPHome After Installation" width="2530" height="1824" data-path="images/homeassistant/en/esphome-installed-2.png" />
</Frame>

Click on the "Open Web UI" button.

<Frame caption="ESPHome Welcome Screen">
  <img src="https://mintcdn.com/t3gemstone-754bcb96/DIpfuN0ZgS7XxcJW/images/homeassistant/en/esphome-welcome.png?fit=max&auto=format&n=DIpfuN0ZgS7XxcJW&q=85&s=f4442de3299a686061d10f053fbe8cd8" alt="ESPHome Welcome Screen" width="2538" height="1824" data-path="images/homeassistant/en/esphome-welcome.png" />
</Frame>

### 4.2 Configuring ESPHome for Deneyap Kart

In the opened menu, click on the "Create Device" option.

<Frame caption="ESPHome New Device Addition Screen">
  <img src="https://mintcdn.com/t3gemstone-754bcb96/DIpfuN0ZgS7XxcJW/images/homeassistant/en/esphome-add-device.png?fit=max&auto=format&n=DIpfuN0ZgS7XxcJW&q=85&s=948a077c4c8e3e40448b36088699ee0e" alt="ESPHome New Device Addition Screen" width="2536" height="1822" data-path="images/homeassistant/en/esphome-add-device.png" />
</Frame>

Click the "Create new project" button to continue.

<Frame caption="ESPHome Device Configuration Screen">
  <img src="https://mintcdn.com/t3gemstone-754bcb96/DIpfuN0ZgS7XxcJW/images/homeassistant/en/esphome-device-config.png?fit=max&auto=format&n=DIpfuN0ZgS7XxcJW&q=85&s=3a4c54e924b0fc6c5efc10ef0beba32d" alt="ESPHome Device Configuration Screen" width="2530" height="1828" data-path="images/homeassistant/en/esphome-device-config.png" />
</Frame>

On the opened page, search according to the MCU model you will use.

<Frame caption="ESPHome Device Configuration Screen">
  <img src="https://mintcdn.com/t3gemstone-754bcb96/DIpfuN0ZgS7XxcJW/images/homeassistant/en/esphome-device-config-2.png?fit=max&auto=format&n=DIpfuN0ZgS7XxcJW&q=85&s=7bc4b5754166eb80739d9f6124350b29" alt="ESPHome Device Configuration Screen" width="2532" height="1826" data-path="images/homeassistant/en/esphome-device-config-2.png" />
</Frame>

At this step, select the appropriate model.

<Frame caption="ESPHome Device Type Selection Screen">
  <img src="https://mintcdn.com/t3gemstone-754bcb96/DIpfuN0ZgS7XxcJW/images/homeassistant/en/esphome-device-name.png?fit=max&auto=format&n=DIpfuN0ZgS7XxcJW&q=85&s=f7b5d83dc383776488f9cc9174a13a18" alt="ESPHome Device Type Selection Screen" width="2538" height="1820" data-path="images/homeassistant/en/esphome-device-name.png" />
</Frame>

At this step, you need to assign a name to the board.

<Frame caption="ESPHome Completing Device Configuration">
  <img src="https://mintcdn.com/t3gemstone-754bcb96/DIpfuN0ZgS7XxcJW/images/homeassistant/en/esphome-device-wifi.png?fit=max&auto=format&n=DIpfuN0ZgS7XxcJW&q=85&s=c1d326474f494b5a7806350f73e4d179" alt="ESPHome Completing Device Configuration" width="2536" height="1826" data-path="images/homeassistant/en/esphome-device-wifi.png" />
</Frame>

At this step, enter your modem's SSID and password in the "Network Name" and "Password" fields.

```yaml theme={"system"}
substitutions:
  LED_PIN: GPIO48      # Onboard RGB LED
  BUTTON_PIN: GPIO0    # Boot Button
  
  # Pin Mappings
  D0: GPIO1
  D1: GPIO2
  D4: GPIO42
  D8: GPIO38
  D9: GPIO48
  D12: GPIO10
  D13: GPIO3
  D14: GPIO8
  # I2C
  SDA_PIN: GPIO47
  SCL_PIN: GPIO21
```

Then, copy the **pin definitions** made in this section to the bottom of the YAML file.

<Frame caption="Adding Sensor to ESPHome YAML File">
  <img src="https://mintcdn.com/t3gemstone-754bcb96/DIpfuN0ZgS7XxcJW/images/homeassistant/en/esphome-add-sensor.png?fit=max&auto=format&n=DIpfuN0ZgS7XxcJW&q=85&s=ce3322fe81f8539e24855823a88f086a" alt="Adding Sensor to ESPHome YAML File" width="2538" height="1824" data-path="images/homeassistant/en/esphome-add-sensor.png" />
</Frame>

Since a motion sensor will be connected in this example, paste the following definitions at the bottom of the YAML file as shown above.

```yaml theme={"system"}
binary_sensor:
  - platform: gpio
    pin: 
      number: GPIO42
      mode: INPUT
      inverted: false
    name: "PIR Sensor"
    device_class: motion
    filters:
      - delayed_on: 1s
```

<Note>
  The motion sensor is connected to the **D4 pin (GPIO42)**. If you connected it to a different pin, you need to update the **`number`** field accordingly.
  For the required pin assignments, you can refer to the [Deneyap Kart Pin Guide](https://docs.deneyapkart.org/en/Development_Boards) page.
</Note>

Click the "Install" button in the bottom right corner. This step completes the configuration.

### 4.3 Uploading Software to Deneyap Kart for ESPHome

<Frame caption="ESPHome Software Upload Options">
  <img src="https://mintcdn.com/t3gemstone-754bcb96/DIpfuN0ZgS7XxcJW/images/homeassistant/en/esphome-flash-options.png?fit=max&auto=format&n=DIpfuN0ZgS7XxcJW&q=85&s=db0f689e922a65a787d5868b2f2d2711" alt="ESPHome Software Upload Options" width="2530" height="1828" data-path="images/homeassistant/en/esphome-flash-options.png" />
</Frame>

First, connect the **Deneyap Kart** to any USB port of your **T3 Gemstone O1** development board.
Various upload options will be displayed in the opened menu, but for the initial upload, you should select **"Plug into the computer running ESPHome Device Builder"**.
For subsequent uploads, you can perform wireless uploads.

<Frame caption="ESPHome Software Upload">
  <img src="https://mintcdn.com/t3gemstone-754bcb96/DIpfuN0ZgS7XxcJW/images/homeassistant/en/esphome-flashing.png?fit=max&auto=format&n=DIpfuN0ZgS7XxcJW&q=85&s=8bfaba2e0b83c85299c4668ad236e511" alt="ESPHome Software Upload" width="2530" height="1828" data-path="images/homeassistant/en/esphome-flashing.png" />
</Frame>

In the **Port selection** section, select the appropriate option from the list. If multiple ports are visible, the port that disappears and reappears when you unplug and replug the Deneyap Kart is the correct port.

<Frame caption="ESPHome Software Upload Log Screen">
  <img src="https://mintcdn.com/t3gemstone-754bcb96/DIpfuN0ZgS7XxcJW/images/homeassistant/en/esphome-flash-log.png?fit=max&auto=format&n=DIpfuN0ZgS7XxcJW&q=85&s=fc39e15bd5d313627dabc337d345ebb5" alt="ESPHome Software Upload Log Screen" width="2534" height="1826" data-path="images/homeassistant/en/esphome-flash-log.png" />
</Frame>

Start the upload process. The first upload may take some time, so patience is recommended.

<Frame caption="ESPHome Software Upload Log Screen">
  <img src="https://mintcdn.com/t3gemstone-754bcb96/DIpfuN0ZgS7XxcJW/images/homeassistant/en/esphome-flash-log-2.png?fit=max&auto=format&n=DIpfuN0ZgS7XxcJW&q=85&s=9ab94400fb621a8d3b38f59bcd0fd70a" alt="ESPHome Software Upload Log Screen" width="2540" height="1820" data-path="images/homeassistant/en/esphome-flash-log-2.png" />
</Frame>

After the upload is complete, go to the ESPHome main screen and click on the "Logs" section.
In the opened menu, the "Wirelessly" option is now available.

<Frame caption="Adding ESPHome Device">
  <img src="https://mintcdn.com/t3gemstone-754bcb96/DIpfuN0ZgS7XxcJW/images/homeassistant/en/esphome-find.png?fit=max&auto=format&n=DIpfuN0ZgS7XxcJW&q=85&s=61c584e5bf364d360d17a86009f0688d" alt="Adding ESPHome Device" width="2532" height="1826" data-path="images/homeassistant/en/esphome-find.png" />
</Frame>

On **Home Assistant**, go to **Settings > Devices & Services > Add Integration** and click the "Add" button on the ESPHome device found there.

<Frame caption="Adding ESPHome Device">
  <img src="https://mintcdn.com/t3gemstone-754bcb96/DIpfuN0ZgS7XxcJW/images/homeassistant/en/esphome-add-device-homeassistant.png?fit=max&auto=format&n=DIpfuN0ZgS7XxcJW&q=85&s=2e15a579aeebefca2d311c21f0a55a84" alt="Adding ESPHome Device" width="2526" height="1818" data-path="images/homeassistant/en/esphome-add-device-homeassistant.png" />
</Frame>

At this stage, click the **Send** button that appears.

<Frame caption="Adding ESPHome Device">
  <img src="https://mintcdn.com/t3gemstone-754bcb96/DIpfuN0ZgS7XxcJW/images/homeassistant/en/esphome-homeassistant-name.png?fit=max&auto=format&n=DIpfuN0ZgS7XxcJW&q=85&s=430211b31e0389d4c30bdddddf83deee" alt="Adding ESPHome Device" width="2528" height="1820" data-path="images/homeassistant/en/esphome-homeassistant-name.png" />
</Frame>

At this step, give the board a name for Home Assistant. Then click the **Skip and Finish** button to continue.

<Frame caption="ESPHome Devices">
  <img src="https://mintcdn.com/t3gemstone-754bcb96/DIpfuN0ZgS7XxcJW/images/homeassistant/en/esphome-devices.png?fit=max&auto=format&n=DIpfuN0ZgS7XxcJW&q=85&s=5c0ac626fbf4d69e5d618c77e3a40034" alt="ESPHome Devices" width="2536" height="1822" data-path="images/homeassistant/en/esphome-devices.png" />
</Frame>

Click on the **"1 device"** option under **ESPHome**.

<Frame caption="ESPHome Device Details">
  <img src="https://mintcdn.com/t3gemstone-754bcb96/DIpfuN0ZgS7XxcJW/images/homeassistant/en/esphome-device-details.png?fit=max&auto=format&n=DIpfuN0ZgS7XxcJW&q=85&s=6f21cb5271b0d528df1f2b07cfcd3cbf" alt="ESPHome Device Details" width="2530" height="1826" data-path="images/homeassistant/en/esphome-device-details.png" />
</Frame>

Congratulations! A motion sensor has been successfully integrated into the **Home Assistant** platform. The status of the added sensor can be viewed in real-time.

## 5. Frequently Asked Questions

**I get an "Unsupported System" warning after installation, why?**

> This warning may appear when using an operating system other than Home Assistant OS or when there are other manually running services on the system (such as Nextcloud or Tailscale). It is not an obstacle to the stable operation of the smart home system; it is only for informational purposes.

**When will the Add-on store appear?**

> If you access the interface immediately after installation, the Add-ons menu may not be visible. The "Settings -> Add-ons" tab will automatically become active after the system completes the necessary configurations in the background (usually within 5-10 minutes).
