ESPHome - Hasatio/esphome GitHub Wiki
-
Windows
- Download Python from the official site.
- Make sure you check “Add Python to PATH”, and go all the way through the installer. Log out and back in, or restart your computer. Whichever is easiest. Open the start menu and type cmd. Press the enter key. In the terminal that comes up, check that Python is installed: Note: Do not copy the command containing ">". It shows that this is a command output from the console
python --version > Python 3.10.1
- Looks good? You can go ahead and install ESPHome:
pip3 install wheel pip3 install esphome
- And you should be good to go! You can test that things are properly installed with the following:
esphome version > Version: 2021.12.3
Mac
- There are no tested installation instructions for Mac. ESPHome does support Mac & will run with no problem. Contributions are welcome!
- The process will likely be similar to Windows. You can install Python from the official site, and then install ESPHome with pip3 install esphome. You can then test that things are properly installed with the following:
esphome version > Version: 2021.12.3
Linux
- Your distribution probably already has Python installed. Confirm that it is at least version 3.9:
python3 --version > Python 3.9.15
- Looks good? Now create a virtual environment to contain ESPHome and it’s dependencies.
python3 -m venv venv source venv/bin/activate
- You may or may not see (venv) at the beginning of your prompt depending on your shell configuration. This indicates that you are in the virtual environment.
- You can go ahead and install ESPHome:
pip3 install esphome
Caution: - Don’t use sudo with pip. If you do, you’ll run into trouble updating your OS down the road. - For details, see DontBreakDebian. pip install is equivalent to make install in this context. The advice in the article applies to all Linux distributions, not just Debian. - Some people install ESPHome without the virtual environment, which can lead to issues with PATHs etc. Non virtual environment installations are considered not “supported” as people end up having to know your exact system setup.
- At this point, you should be able confirm that ESPHome has been successfully installed:
esphome version > Version: 2022.11.4
If you get an error like “Command not found”, you need to add the binary to your PATH using export PATH=$PATH:$HOME/.local/bin. To set this permanently, you can run echo 'export PATH=$PATH:$HOME/.local/bin' >> $HOME/.bashrc, then log out and back in.
- Open terminal by typing "cmd" on run or start
- Run the command below and write where you want the file to be created in the "folder path" section.
cd /d "folder path"
- Run the code below. "test" can be replaced with the name of the file and anything optional.
esphome wizard test.yaml
You can give any name
Choose your esp model
Choose your board, example: esp32dev
Type the wifi name
Type the wifi password
Optional, encryption for connection is possible.
Yaml file has been created
- Open git terminal by typing "cmd" on start or run
- Using the command below, enter the location of the yaml file to be created or used in the "folder path" section.
cd /d "folder path"
- It can be loaded into esp by typing the command below.
esphome run test.yaml
- When the compile process is completed, if the device is connected to both usb and wifi, it asks which one to use to install the program. preference is personal, desired can be chosen. The first program needs to be via the USB option. if it is not connected to usb or wifi connection, it will automatically install using the other option, it does not ask for selection.
-
- Download Git from the official site and install the program by clicking next, next, as if you were installing a standard program.
-
1. Setup ESPHome (Homeassistant required)
- Click for add-on link and click "OPEN LINK"
- Click "INSTALL" and wait for it to end
- Open all features as an option and click start
- Open Home Assistant - ESPHome and Click "NEW DEVICE"
- Click one of the 2 options
Click "OPEN ESPHOME WEB"
- Go to link and click "CONNECT"
- Select device
- Click "PREPARE FOR FIRST USE"
- Click "INSTALL"
- Wait for end
- Click "CLOSE"
- Click "CONNECT TO WIFI"
- Select the network, type its password and click "CONNECT"
- Click "CLOSE" and go back to homeassistant-esphome
- Click "ADOPT"
- Click "ADOPT"
- Change name or stay with default name and click "INSTALL"
- Wait for it to end
- Click "STOP" and finish
Click "CONTINUE"
- Any name and click "NEXT"
- Select device type and click "NEXT"
- Click the Encription Key, copy it and click "INSTALL"
- Click on one of the 4 options
<details> <summary>Click "Wirelessly" and wait for it to end</summary>  </details> <details> <summary>Click "Plug into this computer"</summary> - Click "Download project" and click "Open ESPHome Web" to go to https://web.esphome.io/?dashboard_install  - Select device  - Wait for it to end  - Click "CLOSE"  </details> <details> <summary>Click "Plug into the computer running ESPHome Dashboard"</summary> - Select device  - Click "INSTALL"  - Select the downloaded file and click "INSTALL"  - Wait for it to end  - Click "CLOSE"  </details> <details> <summary>Click "Manual download"</summary> - Click "Open ESPHome Web" to go to https://web.esphome.io/?dashboard_install and go back and click one of the two options to download the file  - Select device  - Click "INSTALL"  - Select the downloaded file and click "INSTALL"  - Wait for it to end  - Click "CLOSE"  </details>