/*
Version: V1.0
Author: Vincent
Create Date: 2023/8/19
Note:
*/
- Controller: ESP32
Install the Home assistant firmware of Raspberry PI, or other platforms, and ensure that you can log in to the management page.
And install the ESPHome in the Add-on.
Version of this document:
ESPHome
Current version: 2023.5.1
Equipment Setup
- Open the HA management page and go to the ESPHome page.
- Select NEW DEVICE.
- Select Continue.
- Set a name, such as Button8.
- Select ESP32.
- Select SKIP, you will return to the ESPHome page, you will see the device you just created.
- Select EDIT to enter the yaml file editing page
- Copy the code button8.yaml provided by Makerfabs to the end of the file.
- Select SAVE, and select Install.
- Select Manual Download, select Modern format, the console page will be displayed, please wait patiently for compilation.
- After the bin file is downloaded, exit.
- Open https://web.esphome.io/?dashboard_install, go to the download page
- Select CONNECT. In the displayed page, select COM port.
- After the connection is successful, click INSTALL
- Select the bin file you just downloaded on the pop-up page. Click Install and wait for the installation to complete. If the connection is not successful, hold down the Flash key, then press the Reset key, and then click Download again.
- download success, click, LOGS pop-up terminal interface, find IP information
- Go back to the ESPHome page, select EDIT for your device, and go to the YAML edit page.
- Copy API: encryption key: the back of the content, such as “43 a0nyfb9py7aalga282lgikxkt5i7zhcmu8dhmjnea=”
- 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.
- Click on the bottom right corner to add integration, search for ESPHome, and select
- Enter the IP address you just obtained on the pop-up page, such as 192.168.1.57, and then submit.
- Enter the key.
- The device has been added successfully
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
- The color of the interface changes, select the add card in the lower right corner.
- In the physical page there are many cards to choose from, here select a dial, click
- In the dial card configuration page, select the entity, find the relevant content of LAN_test
- 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: