Hi everyone,
I have an ESP8266 with a 128x64 OLED display, flashed using ESPHome (2025.8.3).
The problem is:
[09:38:36][I][wifi:329]: Connecting to 'MIJN-SSID'
[09:38:39][W][wifi_esp8266:513]: Disconnected ssid='MIJN-SSID' bssid=[redacted] xx:xx:xx:xx:xx:xx reason='Auth Expired'
[09:38:39][W][wifi:716]: Connecting to network failed
[09:38:39][D][wifi:771]: Retrying with hidden networks
If I remove the display configuration, the ESP connects to WiFi reliably every time. But when I include the display configuration, I get the above error, and it can take several minutes before the connection is finally established.
Does anyone know what could be causing this?
My code:
esphome:
name: esp8266-test
esp8266:
board: nodemcuv2
logger:
level: DEBUG
api:
encryption:
key: !secret ekey
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
ap:
ssid: "ESP8266-Fallback"
password: "fallback123"
on_connect:
then:
- logger.log: "Wi-Fi succesvol verbonden!"
# Trigger bij disconnect
on_disconnect:
then:
- logger.log: "Wi-Fi verbroken, probeer opnieuw..."
captive_portal:
i2c:
sda: D2
scl: D1
scan: true
font:
- file: "gfonts://Roboto"
id: font1
size: 10
- file: "gfonts://Roboto"
id: font2
size: 19
- file: "gfonts://Roboto"
id: font3
size: 45
display:
- platform: ssd1306_i2c
model: "SSD1306 128x64"
reset_pin: D0
address: 0x3C
lambda: |-
it.print(0, 0, id(font2), "Hello World!");