How to use Home Assistant Relay 8 Channel
Install Home Assistant operating system
At first, we need a device equipped with Home Assistant system, and which we choose is DIY with Raspberry Pi.
1. Tools required
- Raspberry Pi 4 or Raspberry Pi 3 Model B（Model A does not have enough RAM）with power supply
- MicroSD card（32 GB or bigger card is recommended）
- Ethernet connection
2. Preparation of Raspberry Pi Imager
- Download and install the Raspberry Pi Imager on your computer
Open the Raspberry Pi Imager and select your Raspberry Pi device
Choose the operating system
3. Write the image to SD card
- Insert the SD card into the computer. Note: the contents of the card will be overwritten.
Select your SD card.
select Next, and wait for the Home Assistant OS to be written to the SD card.
4. Start up Raspberry Pi
- Insert the SD card into your Raspberry Pi.
- Plug in an Ethernet cable and make sure the Raspberry Pi is connected to the same network as your computer.
- Connect the power supply to start up the device.
Access Home Assistant and add ESPHome to your Add_on
Within a few minutes after connecting the Raspberry Pi, you will be able to reach your new Home Assistant.
you can access Home Assistant at homeassistant:8123 or http://X.X.X.X:8123 (replace X.X.X.X with your Raspberry Pi’s IP address).
select Create my smart home, and enter your name, username, and password.
Follow the instructions to complete the setup and finally select Finish.
Creat a new Relay8 device
Sign in your Home Assistant and go to ESPHome page, select NEW DEVICE.
Click CONTINUE, enter your new device name and click NEXT.
Select ESP32 and click SKIP, you will return to the ESPHome page, now ,you have created a new ESP32 device.
Select EDIT and copy the code relay8.yaml to the end of the file.
Click SAVE, and a new Relay8 device have been created.
Install code to Relay8
Click Install, select Manual Download and select Modern format, wait for the compilation to complete, then wait for the bin file download to finish
- After the connection is successful, click INSTALL, choose the bin file you just downloaded and click INSTALL.
- Wait for the installation to complete. when download success, click LOGS, find IP information.
Note if the connection is not successful, hold down the Flash key, then press the Reset key, and then click INSTALL again.
Go back to the ESPHome page, select EDIT for your device, and go to the YAML edit page, copy API: encryption: key, such as “jUqgQfRiHpESrBY0AW8lZWxYgv8C9nX/nqeoU8eim2E=”
Return to the HA page, select Configuration, and select devices and services
If HA automatically identifies the local device, click Configure to add the device automatically. If no, continue to add the device. This is related to the configuration of the HA router.
Search for ESPHome, and select it, enter the IP address you just obtained.
- Enter the API key and then submit. OK, now, the device has been added successfully!
HA UI Setup
Normally, HA recognizes this automatically, but if the home page has been manually modified, HA will never add any device display again.
Go to the HA home page, click the three dots in the upper right corner, select Edit dashboard.You can see the color of the interface changes.
Now, select the add card in the lower right corner, click on the "Entity" card, and find the relevant content of Relay8, add them and click SAVE.
The way to add cards is the same as the use of HA, you can arrange the page by yourself.Click Finish to exit editing The reference interface is as follows:
You can list your question here or contact firstname.lastname@example.org for technology support. Detailed descriptions of your question will be helped to solve your question.