I'm looking for ideas to explain why my smart plug won't reconnect to wifi when I reboot it or when an update is applied. Whenever I reboot the plug from Home Assistant, it won't reconnect and instead advertises it's own AP.
If I connect to the AP, it can see the network. I set the password and then it's all good. The plug shows up in ESP home and everything. If I reboot again however, the same thing happens.
I've tried extending the ap_timeout to 2mins, but no dice.
Here is my config:
substitutions:
name: "small-aquarium-smart-plug"
friendly_name: Small Aquarium Smart Plug
# Default Relay State
# Aka: `restore_mode` in documentation
# Options: `RESTORE_DEFAULT_OFF`, `RESTORE_DEFAULT_ON`, `ALWAYS_ON` & `ALWAYS_OFF`
default_state: "ALWAYS_ON"
main_icon: "power-socket-uk"
packages:
localbytes.plug-pm: github://LocalBytes/esphome-localbytes-plug/localbytes-plug-pm.yaml@main
esphome:
name: ${name}
name_add_mac_suffix: false
friendly_name: ${friendly_name}
esp8266:
board: esp01_1m
# early_pin_init specifies whether pins should be initialised as early as possible to known values.
# Recommended value is false where switches are involved, as these will toggle when updating the firmware or when restarting the device.
# Defaults to true.
early_pin_init: false
restore_from_flash: true
api:
encryption:
key: # removed for posting on forum.
wifi:
ap:
ap_timeout: 2min
ssid: !secret wifi_ssid
password: !secret wifi_password
power_save_mode: LIGHT
domain: .lan
My Google-fu seems to be failing me, so any help would be appreciated :-)