0

Setting Up Integration with Home Assistant

This guide is intended for beginner users and will help you integrate AlphaSE devices with the Home Assistant (HA) smart home system. As a result, you'll be able to control all your devices through a single interface.

Important: In YAML files, the number of spaces at the beginning of each line is very important. Pay close attention to the indentation examples provided.

1. Installing Software and Services on Raspberry Pi

1.1. Initial Raspberry Pi Setup

1.1.1. Download and install Raspberry Pi Imager from the official website (https://www.raspberrypi.com/software/).

1.1.2. Flash the Home Assistant OS image onto an SD card (in the Imager menu, select: Raspberry Pi Device → Your Model → Other specific-purpose OS → Home Automation → Home Assistant → Home Assistant OS).

1.1.3. Insert the SD card into the Raspberry Pi, connect the power cable, and the network cable.

1.1.4. Wait 10-15 minutes for the system to fully load for the first time.

1.1.5. Open a web browser and go to http://homeassistant.local:8123 or use the IP address assigned to your HA instance.

1.1.6. Complete the initial setup (create a user account, set your name, location, and time zone).

Be sure to save your login credentials. You will use these to log in to the HA web interface, the HA mobile app, and crucially, the AlphaSE Hub2 will use the same username and password to authenticate with the MQTT server.

1.2. Installing and Configuring the MQTT Service (via Web Interface)

1.2.1. In the left sidebar, go to Settings  Add-ons.

1.2.2. Click the "Add-on Store" button in the bottom right corner.

1.2.3. Search for Mosquitto broker and click on it.

1.2.4. Click the Install button, wait for the installation to finish, and then click Start.

1.2.5. Turn on the Watchdog option (optional but recommended to keep the add-on running).

1.2.6. Ensure the service is running – the "Stop" and "Restart" buttons should be visible.

1.3. (Optional) Installing MQTT Explorer on your PC

To view MQTT topics, you can install MQTT Explorer on your computer. During the connection setup, use the same username and password you created during the HA setup (step 1.1.6). This tool helps understand how data is published to the HA MQTT broker.

1.4. Installing the File Editor Add-on

1.4.1. Go back to Settings  Add-ons and click the "Add-on Store" button again.

1.4.2. Find File Editor and click on it.

1.4.3. Click Install.

1.4.4. After installation, click Start.

1.4.5. Turn on the Watchdog and "Show in sidebar" options.

1.4.6. The File Editor icon will now appear in the left sidebar, allowing you to access HA's configuration files.

2. Setting a Static IP Address for Home Assistant

2.1. In the left sidebar, go to Settings  System  Network.

2.2. Select your network interface (usually eth0 for wired connection).

2.3. Click on IPv4.

2.4. Choose Static.

2.5. Fill in the fields with details from your local network:
* IP address: e.g., 192.168.0.130 (choose an address not already used by another device on your network).
* Subnet mask: Usually 255.255.255.0.
* Gateway: Your router's IP address (e.g., 192.168.0.1).
* DNS server: 8.8.8.8 (Google DNS) or your router's IP address.

text
**Important:** Use an IP address from your actual network. Setting incorrect network parameters may cause you to lose access to HA.

2.6. Click Save and confirm to apply the network settings (HA might become temporarily unreachable).

2.7. After the settings are applied, write down this static IP address – you will use it to access HA reliably.

3. Obtaining the HA Configuration File from Your Personal Account

3.1. Open a browser and go to /en.

3.2. Log in to your personal account.

3.3. Go to the hub settings and find the Integrations section. Download the configuration file for Home Assistant.

3.4. Click the Download Configuration button.

3.5. Save the file to your computer (it will be named something like ha_asehaaaaaXXXX_devices.yaml).

3.6. Open this file in any text editor to view its contents. You'll see the configuration for all your AlphaSE devices, grouped by type.

4. Creating the packages Folder and Uploading the Configuration File

4.1. In the HA sidebar, click the File Editor icon (the one you enabled in step 1.4.5).

4.2. Click the Browse File System button in the top-left corner to see the files and folders in the /homeassistant/ directory.

4.3. Click the New Folder button in the top-right corner.

4.4. Name the folder packages and click OK.

4.5. Click on the newly created packages folder to enter it.

4.6. Click the Upload File button and select the configuration file you downloaded earlier (ha_asehaaaaaXXXX_devices.yaml).

4.7. Verify that the file has been uploaded and is listed. The full path should be /homeassistant/packages/ha_asehaaaaaXXXX_devices.yaml.

5. Modifying the /homeassistant/configuration.yaml File

5.1. In File Editor, navigate back to the root folder by clicking on /homeassistant at the top of the file browser.

5.2. Find the file named configuration.yaml and click on it to open it for editing.

5.3. Scroll to the very end of the file and add the following lines:

text
```yaml
homeassistant:
  packages:
    asehaaaaaXXXX: !include packages/ha_asehaaaaaXXXX_devices.yaml
```

**Replace `asehaaaaaXXXX` with the actual identifier from your downloaded filename.**

5.4. Check the indentation carefully:
* There should be 2 spaces before packages:.
* There should be 4 spaces before asehaaaaaXXXX: (the line with your hub's ID).
* Ensure no tabs are used; only spaces.

5.5. Click the Save button in the top-right corner to save the changes to configuration.yaml.

6. Checking Configuration and Restarting

6.1. In the left sidebar, go to Settings  System.

6.2. In the top-right corner, click Restart  Restart Home Assistant.

6.3. Wait 2-3 minutes for the system to fully load.

6.4. After the restart, go to Settings  Devices & services.

6.5. You should now see your new AlphaSE devices listed under the MQTT integration. Click on "x devices" or the integration tile to see them.

6.6. Click on any device to check its state and try controlling it.

7. Configuring the AlphaSE Hub2

7.1. From your computer, log back into your personal account at /en.

7.2. Verify that your hub has firmware version 14 or higher. Update the firmware if necessary.

7.3. Go into the hub's settings and note its IP address.

7.4. In your browser's address bar, type the IP address of the AlphaSE Hub2 (e.g., http://192.168.0.200).

7.5. Enter the username admin and the password. You can find the password in your personal account under the hub's settings, on the "Integrations" tab.

7.6. Once logged into the Hub2's web interface, navigate to the MQTT settings and configure the connection using:
* The static IP address of your Home Assistant server (from step 2).
* The username and password you created during the initial HA setup (step 1.1.6).
* Click Apply. If, within about 10 seconds, the connection status changes to "On", the hub has successfully connected to the MQTT broker.

Congratulations! You have successfully integrated your AlphaSE devices with Home Assistant. You can now control all your devices through the unified HA interface, create automations, and build advanced scenes.

For convenient control, install the Home Assistant app on any tablet or smartphone. Management will happen locally on your network without requiring internet access.

Troubleshooting Common Issues

Problem: Devices do not appear in Home Assistant.
Solutions:

Problem: Unable to connect to HA using homeassistant.local:8123.
Solutions: