Problem Creating New Device Using ESPHome

I have HA running in Docker on a (headless) Dell Wyse 5070 with 16GB RAM and a 1TB (M.2) SSD. I created a separate container (esphome) to contain ESPHome. I can access HA (port 8123) and ESPHome (port 6052) remotely using my (Win-10/Linux Mint) dual boot desktop. I seem to be able to initiate a ‘new device’ when logged into Windows, but the same process fails under Linux (in my hands).
No matter which protocol I use my ESP device winds up throwing an error ‘port 3232’ failed.

========================= [SUCCESS] Took 67.22 seconds =========================
INFO Build Info: config_hash=0xdde17dc7 build_time_str=2026-08-06 15:24:52 -0500
INFO Successfully compiled program.
INFO Connecting to 192.168.2.30 port 3232...
ERROR Connecting to 192.168.2.30 port 3232 failed: [Errno 111] Connection refused
ERROR Connection failed.
WARNING Failed to upload to ['192.168.2.30']

My YAML below…

esphome:
  name: oled-display
  friendly_name: oled_display

esp32:
  board: esp32dev
  framework:
    type: esp-idf

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "p19xqslhhQbEMoKLMrJDpOgMVloLBj2qq8GxN/V6CWw="

ota:
  - platform: esphome
    password: "dc77bcfb2776c7705a399bc92144a006"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  manual_ip: 
    static_ip: 192.168.2.30
    gateway: 192.168.2.1
    subnet: 255.255.255.0

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Oled-Display Fallback Hotspot"
    password: "hBEEIOk53Z8Y"

captive_portal:

i2c:
  - sda: GPIO21
    scl: GPIO22

display:
  - platform: ssd1306_i2c
    model: SSD1306_128X64
    address: 0x3C
    rotation: 180
    update_interval: 3000ms
    lambda: |-
      it.print(0, 0, id(font_roboto), "Hello World!");

font:
  - file: "gfonts://Roboto"
    id: font_roboto
    size: 16

New device creation steps are…

  1. bootup Windows (or Linux)
  2. open Google Chrome
  3. connect to ESPHome
  4. select ‘+ New Device’
  5. provide new device name
  6. select ESP32
  7. select install
  8. select plug into this computer (my desktop)
  9. wait for download to complete
  10. open ESPHome Web
  11. connect
  12. select CP2102 USB to UART… (port)
  13. connect
  14. prepare for first use
  15. install (holding down ‘boot’ button)
    At this point Windows appears to install and displays progress bar. Linux fails to install and shows no activity.
    In the next steps (under Windows) there is no indication that wifi has been established. I have added manual_ip to the yaml. Devices show (in ESPHome) as ‘online’. Files can be edited and pass validation. However the fail installation with the above error.
    So several questions come to mind.
    Is there an known issue with ESPHome functioning in Linux? In Docker?
    Am I missing a step in preparation of device for first use?
    I do not recall having to declare port 3232 in the past. How might I remedy the error?

First are you sure you are selecting the correct port for communication?

I not sure about “At this point Windows appears to install and displays progress bar. Linux fails to install and shows no activity.
In the next steps (under Windows) there is no indication that wifi has been established.”

Is this dual boot? or running Windows on Linux VM?, or Linux on Windows VM?

When you plug the device into your computer did you check windows device manger (Ports) to see if it was recognized and the comm port # for it?

You can do the same thing in Linux using USBView

Next would be Firewall issue both Windows and Linux needs to be checked. Allowing ESPHome and Python access.

Thanks for the reply lordwizzard. My background is not in computers. I’m more of a hobbiest. Please provide detailed instruction for pathways that need to be checked.
My desktop is dual boot. Operating systems are not VM. So, I boot up on Windows and proceed with the established protocol, or I boot up on Linux Mint and proceed with the established protocol.
Recall, HA, ESPHome & other related software are physically located in Docker containers on a headless Dell Wyse 5070. I am attempting to initiate new devices by connecting the new ESP32 board to my desktop and accessing ESPHome through my browser.
I am currently in Windows. I have checked ‘device manager (Ports)’ in Windows. Two ports are listed, a ‘communications port’ (COM1), and the Silicon Labs CP2102 USB to UART bridge controller (COM3). During protocol execution the second port (Silicon Labs) is selected.
In Windows, I do not see Python or ESPHome listed in allowed apps for the Windows firewall.
I’ll log out of Windows, start Linux Mint and report back findings for that OS.

So after flashing the plug while in windows, what do you do next with the device? What is the device exactly?

Not sure what port 3232 is being called out. Okay after looking up, it is the OTA for updates after flashing and unplugging the cable used for flashing. Then plugging in the device into the network (either by ethernet cable or wifi). That is when OTA becomes accessible to do updates of firmware for devices.

So if it successfully flashed, you unplug the cable from the device. This will most likely reboot the device, because you plugging in the power supply or network cable using PoE. If a battery device you most likely need to power it up. Put the device on network (either by ethernet cable or using the wifi done after powering up the device). Next get into to you home router and look to see if it is on network. Look for the IP address assigned. Then check ESPhome it should also say online.

Let me know what steps. Screen captures can be put in using Ctrl V or the graphics icon in the tool bar (2 icons to the left of the smile emoji)

The devices are ESP32 boards. Intended use of one board will be to manage an AHT20 (temperature/humidity) sensor. Intended use of the second board will be to present data on an oled screen.

Less familiar with Linux Mint. But, firewall is ‘on’, and appears to not have pass thru permissions for Python and ESPHome.
I confirm the Silicon CP2102 port in my Linux Mint distribution.

dr_whalon@Mike:~$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 008 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 008 Device 002: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 009 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 010 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 011 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 011 Device 002: ID 0bda:0321 Realtek Semiconductor Corp. USB3.0 Card Reader
Bus 012 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 012 Device 002: ID 0781:5575 SanDisk Corp. Cruzer Glide
Bus 012 Device 003: ID 2109:2817 VIA Labs, Inc. USB2.0 Hub             
Bus 012 Device 004: ID 0bda:8179 Realtek Semiconductor Corp. RTL8188EUS 802.11n Wireless Network Adapter
Bus 012 Device 005: ID 10c4:ea60 Silicon Labs CP210x UART Bridge
Bus 012 Device 006: ID 2109:8817 VIA Labs, Inc. USB Billboard Device   
Bus 013 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 013 Device 002: ID 2109:0817 VIA Labs, Inc. USB3.0 Hub             
dr_whalon@Mike:~$ 

For both windows and LinuxMint, you will also need to give the web browsers permission to allow the the ESPHome GUI flasher site ( https://web.esphome.io/ ) to work with the usb uart flasher.

This is the web ESPHome version:

Do you have TeamViewer?

Negative. No Team Viewer. Guide me, please.

this error

ERROR Connecting to 192.168.2.30 port 3232 failed

Says you are trying to do this Via OTA (over the air) this will not work for a new device, only a device already running esphome with OTA setup will work OTA.

If your device is running esphome and connected to wifi you will need the OTA password to be the same on the device as it is in the yaml you are trying to load.

Thanks Arh. Not sure why the app is directing this via OTA. I am selecting “plug into this computer”. This should provide a direct USB connection to my ESP32 device.
In frustration, I removed the esphome docker container, and reestablished esphome (from scratch). Built a new docker compose YAML (below)…

services:
  esphome:
    container_name: esphome
    image: ghcr.io/esphome/esphome
    volumes:
      - ./config:/config
      - /etc/localtime:/etc/localtime:ro
    restart: always
    privileged: true
    network_mode: host

still no joy. The process stalls at request to connect to port…


According to posted protocol, this should find & join to Silicon Labs CP2102 USB to UART bridge. This should be included in Linux Mint. lsusb lists this port.

Dummy :woozy_face: Last couple posts, I’ve been trying to execute esphome web using Firefox. Switched back to Google Chrome. Now I find the Silicon Labs CP2102 again, but cannot proceed further.

Try this command in terminal changing the port to the port you are using. By default Linux does not give you permission to access the ports.

sudo chmod a+rw /dev/ttyACM0

Thanks Arh. This was a ‘no go’.
Interestingly, after long struggles with this, I finally got ESPHome to install on (one of my two original) ESP32 boards. Same steps as always. Attempts to install on the second ‘original’ ESP board continues to fail (as before).
I have been using the same two ESP Devices throughout this adventure. Occurred to me that I might have a corrupted device. So, broke out a new ESP32 board. The new board initalized fine. Re-tried the original board. Still ‘Installation failed’. I do have a small supply of ESP32’s. I’ll try one more ‘new’ board before I blame a corrupted ESP32 board, and declare this solved.

Nope.
Tried to flash new (#4) ESP32 device. ‘Installation Failed’. I’ve got to be missing something simple.
ESPHome Web loads fine. Select ‘connect’ (for ESP Device). Select CP2101 USB to UART Bridge Controller (ttyUSB0). Connection confirmed. Select ‘Prepare for first use’. Select ‘Install’ while depressing ‘boot’ button. ‘Installation Failed’.
At best (in my hands) this installation process seems to be hit or miss (mostly miss). Additional suggestions appreciated.