Can't configure/upload ESPHome

I have a problem with OTA flashen of an esp with Esphome.yaml and Home assistant.
If I upload the standard code with a USB / serial converter, I can contact HA and the esp is visual .
After that I try to upload something with OTA and then I cannot connect anymore.
If I use an static IP in the configuration then is this the log output:

INFO Starting log output from 192.168.1.21 using esphome API
INFO Connecting to 192.168.1.21:6053 (192.168.1.21)
WARNING Initial connection failed. The ESP might not be connected to WiFi yet (Error connecting to 192.168.1.21: [Errno 113] No route to host). Re-Trying in 1 seconds

Even when I download the binary and serial flash, the esp no longer comes online.
The only option is to serial flash the original empty .bin file again or use the fallback hotspot.
Only the original .bin works but then I can’t do anything with it.
What is going wrong here or what am I doing wrong?

can you show us your yaml file in the correct format.

Schermafbeelding 2020-03-14 om 11.15.50

If I use the ESPHome flasher and I look in the logfile the I see:

[[12:21:20][W][wifi:374]: No matching network found!

It’s looks like my wifi configuration are disappear.

ok thanks

they only way I get esphome working is given them there own IP address

  manual_ip:
    static_ip: *out side the DHCP range of your router* ???.???.???.????
    gateway: *your router ip address*
    subnet: 255.255.255.0

compile it do a upload via usb

thinking …
does you phone see that wifi network and can your phone join that network
that the longest SSID wifi name i have seen

could that be the problem ???

[[12:21:20][W][wifi:374]: No matching network found!

is the esp software dropping some chars off your wifi name

I have make an site ip but I can’t connect with it.
The only way Is use the node fallback and then select the SSID what I used .
Then connect the esp to HA but then are the settings automatic save to the original setup.

Looks like you have a spare space character at the end of your wifi password.

Also, is mDNS working?

What happens if you add a domain to your wifi setup?

I’m looking to find where the files are for mDNS ,in the logfiles I can see that it is 192.168.1.1
And I don’t know how I must add a domain for my wifi setup.

Is it possible that the esp not completely erased is before I make a new flash?
Or maybe the wrong board select,I have an esp8266MOD compatible with nodeMCU and Huzzah

then why have you chosen esp12e?

I Have now the same configuration but then with nodemcuv2.
Same problem.

OK lets go back to square one.

What standard code are you referring to?

This sometimes happens to me, but it connects sooner or later, like it backs off 1 second and tries again, the 2 secs then 4 - you get the idea.

Can you please post the yaml that is working, and the yaml that isn’t. NOT a picture of your config, actually copy and paste it between the backticks.

I have take a code from the forum.
It works if I upload it with an USB to serial device.
The problem comes when I will upload the code over the air.

esphome:
  name: node1
  platform: ESP8266
  board: nodemcuv2

wifi:
  ssid: "TP-Link_2.4GHz_53D0C4"
  password: "password"
  manual_ip:
    static_ip: 192.168.1.21
    gateway: 192.168.1.1
    subnet: 255.255.255.0
    dns1: 192.168.1.1
  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Node1 Fallback Hotspot"
    password: "password"

captive_portal:

# Enable logging
logger:

# Enable Home Assistant API
api:
  password: "password"

ota:
  password: "password"
  
web_server:
  port: 80

binary_sensor:
  - platform: gpio
    name: "pin_D1"
    pin: D1                 #gpio 05

switch:
  - platform: gpio
    name: "D6 schakelaar"   #gpio 12
    pin: D6                 
  

You better give us the esphome log of uploading over ota then.

Strange but it is working now.
Before I flash did I flash an empty .bin , then the binary download from Esphome .
If I change something and I do OTA update then it works.
I think the esp was not completely erased.

1 Like