WARNING Initial connection failed. The ESP might not be connected to WiFi yet (Timeout while waiting for message response!)

Hassio on a RPI 3 B+
ESPhome installed
Connected an ESP32 to the USB port, then created a new item in esphome dashboard, it uploaded fine and shows “online”. I had to keep “boot” button pushed down while uploading firmware
Added a BME280 (I2C, temp/humidity/pressure), works fine, Hass shows temp hum and press.

Then in EspHome dashboard I’ve started to create new items with different ESP32 cards models, uploaded it on the ESP32 using USB and then :

  1. At the end of upload the serial waits forever

  2. via Wifi, “Show Logs” shows :

    INFO Reading configuration…
    INFO Starting log output from klsesp1.local using esphome API
    INFO Connecting to klsesp1.local:6053 (172.16.0.165)
    WARNING Initial connection failed. The ESP might not be connected to WiFi yet (Timeout while waiting for message response!). Re-Trying in 1 seconds

and at the same time from another host on the same network :

root@bolwerk:~# tcpcheck 1 172.16.0.165:6053
172.16.0.165:6053 is alive

Even without BME280 and the original file that was working, I can’t get it back working, what is happening ?

Do you have a local resolver in your LAN ? as it’s often the problem when using ESPHome in hassio for upload ! May you try to put IP instead of local name in your ESP config file ? problem should disappear then ! I always strongly advise to use IP and not names as these last ones depend of a local resolver so it’s a failure point !

How can you put IP in ESP config file since dots “.” are not allowed…?

1 Like

As you can see, it resolves correctly the IP address between parenthesis.

Hi did you ever get this working i am in the same spot?

3 Likes