Hey Everyone,
I have a bunch of ESP8266 (D1 mini) devices on an off grid installation.
I’m getting a weird issues when the battery runs out, when the sun comes out again, and the battery starts providing power, none of my ESPHome devices come up automatically, maunally rebooting the ESPHome device works, (removing, reattaching power) It pops right up in the HA front end.
I think this is because the ESPHome devices boot almost immediately, but the router takes a minute to boot up, so the ESPHome devices are not ever “trying again” to reconnect to WiFi.
I have removed the ap config, specified a reboot_timout; 300s in the WiFi config, and done a clean install. But nothing seems to help.
Any pointers on how to force a D1mini to reboot after a period when it can’t connect to WiFI would be great, thanks!
Config:
esphome:
name: bedroom
friendly_name: Bedroom
esp8266:
board: esp01_1m
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "REMOVED"
ota:
- platform: esphome
password: "REMOVED"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
reboot_timeout: 300s
captive_portal:
light:
- platform: monochromatic
name: "Bedroom Lights"
output: output_component1
output:
- platform: esp8266_pwm
id: output_component1
pin: GPIO15
switch:
- platform: gpio
pin: GPIO0
name: "Relay 1"
- platform: gpio
pin: GPIO2
name: "Relay 2"
binary_sensor:
- platform: gpio
pin:
number: GPIO16
mode:
input: true
inverted: true
name: "Bedroom Button"
id: bedroom_button
on_multi_click:
- timing:
- ON for at most 400ms
then:
- homeassistant.event:
event: esphome.button_short_press
data:
id: bedroom
- timing:
- ON for at least 500ms
then:
- homeassistant.event:
event: esphome.button_hold
data:
id: bedroom
on_release:
then:
- homeassistant.event:
event: esphome.button_release
data:
id: bedroom
i2c:
sda: GPIO4
scl: GPIO5
scan: true
id: bus_a
sensor:
- platform: bme280_i2c
temperature:
name: "Bedroom Temperature"
id: bme280_temperature
pressure:
name: "Bedroom Pressure"
id: bme280_pressure
humidity:
name: "BedRoom Relative Humidity"
id: bme280_humidity
address: 0x76
update_interval: 15s