Esp8266 won't update wirelessly

The esp8266 is on the network but I’m not able to upload to it wirelessly. I’m brand new to this so anything stand out as possibly being an issue? I’m also using Home Assistant 6.1 and I can ping the device.

Here is my error:

========================= [SUCCESS] Took 7.28 seconds =========================
INFO Successfully compiled program.
INFO Connecting to 192.168.86.95
ERROR Connecting to 192.168.86.95:8266 failed: timed out

Here is its yaml:

esphome:
  name: esp8266
  platform: ESP8266
  board: nodemcuv2

# Enable logging
logger:

# Enable Home Assistant API
api:

ota:
  password: "bdbc98dadee61a2b746c1912707f2f79"

wifi:
  manual_ip:
    # Set this to the IP of the ESP
    static_ip: 192.168.86.95
    # Set this to the IP address of the router. Often ends with .1
    gateway: 192.168.86.1
    # The subnet of the network. 255.255.255.0 works for most home networks.
    subnet: 255.255.255.0

  ssid: "...searching"
  password: !secret wifi_password

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

captive_portal:

first time to flash, if no working ota like tasmota , only wire connection is available.

Every type of firmware has its own interface of ota

I think you’re suggesting I use tasmota for ota? But I should be able to use esphome ota, correct?

What device are you trying to flash?

Is it a D1 mini, or similar, or a device such as a light switch with ESP8266?

It’s a NodeMcu ESP8266. I haven’t hooked anything up to it yet. Just trying to update it wirelessly.

Until you plug it in and flash it manually, you cannot flash wirelessly. This board had no built-in intelligence really, lots of capability, but comes with 4M of emptieness.

Have you done an initial firmware upload?

I flashed it already with the .bin file that contains the .yaml configuration shown above. It’s showing on the network and I’m able to ping it.

I believe so.

What does the log say?

I can’t see the log because it requires me to connect wirelessly for some reason.
image

Plug it back in to the computer running esphome and view the logs.

Plug it back in to the computer running esphome and view the logs.

It is.

If it is pugged into the computer esphome should give you an option to view the log over serial.

That’s what I would have thought. It gives me those types of options when I’m trying to Install the .yaml file on the device. Though I’m not able to upload to the device using the top 3 options. I have to manually download then use a flashing program to update the device.

image

Completely clear your browser cache.

Completely clear your browser cache.

I’ve tried Incognito Mode, which should do the same, but to no avail. That should be sufficient, correct?

Hi dhust. Welcome to the community.
I’ve only been here a few weeks myself.
The NodeMCU devices are my favourite IoT :slight_smile:

First, please re-upload your code with these extras on the end.
This will help rule out a few things.

esphome:
  name: esp8266
  platform: ESP8266
  board: nodemcuv2

# Enable logging
logger:

# Enable Home Assistant API
api:

ota:
  password: "bdbc98dadee61a2b746c1912707f2f79"

wifi:
  manual_ip:
    # Set this to the IP of the ESP
    static_ip: 192.168.86.95
    # Set this to the IP address of the router. Often ends with .1
    gateway: 192.168.86.1
    # The subnet of the network. 255.255.255.0 works for most home networks.
    subnet: 255.255.255.0

  ssid: "...searching"
  password: !secret wifi_password

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

captive_portal:


status_led:
  pin:
    number: GPIO2
    inverted: yes
    
switch:
  - platform: gpio
    name: "dhust_output"
    pin: 5
    inverted: false
    id: dhust

status_led, we can get some visual information via that blue built in LED on your 8266.
Once you’ve uploaded this, the indicator will now flash while its trying to connect to HA. It will eventually stop once it has achieved this.

go into overview, add a button, and add the entity ‘switch.dhust_output’ to it.
Even though you won’t see anything, just check that you can switch it off and on.

If that’s all good, please tell me what message your getting when you try to upload ota when clicking “Plug into the computer running ESPHome dashboard” ?

The indicator light never turns off. Am I missing something obvious?

The only time I ever see the onboard indicator on permanently is when running programmable LED strips on pin D4 (GPIO2).

Did you paste in all your code, or was it just the start?
Also, did you try to add the switch.dhust_output in the UI?

Kind regards,
Ian.