Port 6053 not listening

I’ve install ESPHome to my Synology NAS via container esphome/esphome.
Added first device (ESP8266+AM2320). Configuration:

esphome:
  name: node1
  platform: ESP8266
  board: d1_mini

wifi:
  ssid: "MikroTik"
  password: "wifipassword"

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Node1 Fallback Hotspot"
    password: "ZhEguJSj7JY3"

captive_portal:

# Enable logging
logger:

# Enable Home Assistant API
api:
   password: 'welcome'
   port: 6053

ota:

sensor:
  - platform: dht
    pin: D2
    temperature:
      name: "Living room temperature"
    humidity:
      name: "Living room humidity"
    model: AM2302
#    model: AUTO_DETECT
    update_interval: 15s
 
#sensor:
#  - platform: dht
#    model: AUTO_DETECT
#    pin: D2
#    temperature:
#      name: "Living Room Temperature"
#    humidity:
#      name: "Living Room Humidity"
#    update_interval: 30s

#remote_receiver:
#  pin: D2
#  dump: all

Now I’m experiencing troubles to add esphome to my HA.
When I trying to add HA write message:
Can’t connect to ESP. Please make sure your YAML file contains an ‘api:’ line.

I checked netstat in container:

root@esphome-esphome1:/config# netstat -ln
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 0.0.0.0:6052            0.0.0.0:*               LISTEN
tcp6       0      0 :::6052                 :::*                    LISTEN
udp        0      0 0.0.0.0:8472            0.0.0.0:*
udp     1536      0 0.0.0.0:5353            0.0.0.0:*
udp     1536      0 0.0.0.0:5353            0.0.0.0:*
udp        0      0 0.0.0.0:5353            0.0.0.0:*
Active UNIX domain sockets (only servers)
Proto RefCnt Flags       Type       State         I-Node   Path

HA looking for 192.168.1.5:6053, but nothing listening port.

Howto start api interface of ESPHome?
Or, maybe, I dont understand mechanism? Or doing something wrong?

Thanks for any help.

It is the esp device (once flashed with esphome firmware) that has port 6053 open.

OH!! So in my HA interface, I should add IP of my device, not ESPHome server.
Thank you! It is working!
Now everything clear to me!

1 Like