Esphome Edit on PC


Video what’s in this instruction

YouTube Video Thumbnail

Introduction

If you don’t have HA yet, you still can edit config of your boneIO ESP.

Editing Esphome without HA, just on your PC is also possible. Similar instruction is here: https://esphome.io/guides/getting_started_command_line

In your PC you’d need following software installed:

  • for Linux: Docker,
  • for Windows: Python 3.12 installed.

Windows

Installation Esphome with Python under Windows 10/11.

Prerequisites:

  • computer running Windows 10 with administrative privileges and an internet connection.

You might try also to install Python under WSL environment. It’s how Microsoft recommends it, but sometimes there are problem with Autodiscovery option.

  1. Download Python installer from Python download page for Windows Choose Windows installer according to your operating system version (most common is 64-bit).
Python download page
  1. Choose both options available in installer. “Use admin priviliges when installing py.exe” and “Add python.exe to PATH”. Click “Install now”.
Python installer options
  1. Verify Python installation Open Powershell or CMD and type:
python --version

If properly installed output would look like (with your Python version):

Python 3.12.7
  1. Prepare Esphome for Python. In Powershell prompt type:
mkdir $env:USERPROFILE\esphome
cd $env:USERPROFILE\esphome
pip3 install wheel esphome pillow==10.2.0

in CMD

mkdir %USERPROFILE%\esphome
cd %USERPROFILE%\esphome
pip3 install wheel esphome
  1. Test Esphome is working
esphome version

Output:

Version: 2024.10.1

Now you’re good to execute next steps.

Run Esphome dashboard

Powershell:

cd $env:USERPROFILE\esphome
esphome dashboard .

CMD

cd %USERPROFILE%\esphome
esphome dashboard .

Check it out opening page in your web browser http://127.0.0.1:6052 If it’s loaded then you can go to next section: Connect with Esphome Addon

or if you prefer USB installation go to:

Ugrade Esphome in Windows

pip3 install --upgrade esphome

Linux / Mac OS

Fetch Esphome docker image / Linux / Mac OS

Run following command in terminal (in Windows all commands are working in Powershell terminal, not tested under old CMD):

docker pull ghcr.io/esphome/esphome

Run Esphome dashboard

Now let’s start Esphome dashboard. Make directory where your config would be stored eg /home/me/esphome

In Linux based system:

docker run --rm --privileged --network host -v "/home/me/esphome":/config -it ghcr.io/esphome/esphome dashboard .

Now in Chrome open website:

Connect with Esphome Addon

Note: For this to work your home network must support mDNS. Your PC and boneIO is in same subnet (same VLAN) in most cases it’d work. boneIO has to be connected to your network and working.

  1. Find your new boneIO device in the dashboard.

    Discovered
  2. Click Adopt

  3. Choose name for our new device

    RenameStart
    Renamed
  4. Click Adopt

  5. Now it will prompt for install new software

    install
  6. After install there will be logs visible, you can click stop now

    afterinstall

It’s ready, you can edit your config by clicking Edit on your boneIO device.

Make boneIO work without Home Assistant

If you don’t have HA, then in config find line:

api:

and add reboot_timeout: 0s to it, so it’d look like:

Reboot timeout: 0s is default option in our precompiled binaries.

api:
  reboot_timeout: 0s

USB Only installation

If you don’t want to setup network in boneIO then go with those steps. You’d need to have Esphome dashboard running. For Esphome firmware installation you’d need internet connection on your PC!

  1. Go to https://boneio.eu/esp

  2. Choose your board and choose option “Download yaml for this firmware” in the end.

    Download yaml option
  3. In the top right corner choose Download raw file

    Download raw option
  4. Copy it to your Esphome directory eg C:/Users/me/esphome. After pasting it, it should appear in Esphome dashboard.

    Esphome dashbaord
  5. Now you can Edit and Install firmware using “Plug into this computer” option. If you’d need to install some drivers, then Esphome website should show what to download to get it work.