ESPhome with Esp8266 toggling by itself every 5 minutes

I have one esp8266 connected to ESPhome 1.15.0 dev branch (the prod version does the same thing) and it toggles on/off exactly every 5 minutes by itself. There are no scripts or automations connected to this device in ant way. I’ve tried a different chip and it does exactly the same thing.
The chips are CP2102 ESP-12E.

I’m starting a new thread on this because I’ve definitively eliminated random disconnects and configuration issues that are being discussed In other topics. It’s very consistent in this behavior and never looses its connection.

The first lines are me toggling the binary sensor in lovelace, and then it does it all by itself exactly every 5 minutes.

Config:

INFO Reading configuration /config/esphome/coop.yaml...
INFO Configuration is valid!
esphome:
  name: coop
  platform: ESP8266
  board: nodemcuv2
  includes: []
  platformio_options: {}
  build_path: coop
  board_flash_mode: dout
  esp8266_restore_from_flash: false
  arduino_version: [email protected]
  libraries: []
sensor:
- platform: uptime
  name: ESP8266 Uptime Sensor
  unit_of_measurement: s
  accuracy_decimals: 0
  update_interval: 60s
  force_update: false
  icon: mdi:timer
wifi:
  power_save_mode: NONE
  manual_ip:
    static_ip: 192.168.1.145
    gateway: 192.168.1.1
    subnet: 255.255.255.0
    dns1: 192.168.1.250
    dns2: 0.0.0.0
  ap:
    ssid: Mbr 
    password: xxxxx
    ap_timeout: 1min
  output_power: 20.0
  reboot_timeout: 15min
  fast_connect: false
  domain: .local
  networks:
  - ssid: Shop Wifi
    password: Xxxxx
    priority: 0.0
  use_address: 192.168.1.145
captive_portal: {}
logger:
  level: DEBUG
  esp8266_store_log_strings_in_flash: true
  logs: {}
  tx_buffer_size: 512
  hardware_uart: UART0
  baud_rate: 115200
api:
  password: ''
  port: 6053
  reboot_timeout: 15min
ota:
  password: ''
  port: 8266
  safe_mode: true
switch:
- platform: gpio
  name: Relay 1
  inverted: true
  pin:
    number: 5
    mode: OUTPUT
    inverted: false
  restore_mode: RESTORE_DEFAULT_OFF
  interlock_wait_time: 0ms
binary_sensor:
- platform: gpio
  name: Switch 1
  pin:
    number: 4
    inverted: true
    mode: INPUT_PULLUP

The log is littered with these events.

I have debug turned on for logger and cannot see any event that would be causing it. Hoping someone can point me in the right direction to stop this!

Jeff

1 Like

Ok so nobody experiences the same thing.

Interestingly, I added a dht11 sensor and no change, same 5 min toggle behavior on the only defined gpio pin. But, when i defined a second gpio output, the first one suddenly behaves correctly. The 5 min repeated toggling stopped. This is very odd behavior and I’ll do a little more digging to see if I can nail down where the bug is. Perhaps remove the old gpio and see if it happens on the new one. Or is it just happening on one gpio pin with only one output defined?

Regardless, there is a bug in there somewhere.

Hello Jeff,
do you control the device from external source?
Try to configure 8 Minutes. if it trigger after 5 minutes it is not your esp

No. This is simply configuring the port. No automations, nothing.
As I stated above, simply configuring a second gpio port stopped the 5min toggling bug. It’s working as it should now.

don’t know if it’s related but long time ago I had an interesting issue related to a particular GPIO.

I just had an ESP32 device that latched one GPIO up HIGH at power-on. It was controlling my fireplace gas control valve. :astonished: That’s when I added the default setting to that GPIO: ALWAYS_OFF I’m not certain if this may help you, but give it a shot.

switch:
  - platform: gpio
    id: relay01
    pin: 25
    restore_mode: ALWAYS_OFF 

Do you know this?
Warning

When enabling MQTT and you do not use the “native API” for Home Assistant, you must remove the api: line from your ESPHome configuration, otherwise the ESP will reboot every 5 minutes because no client connected to the native API.
MQTT Config

Possibly good reason.
I didn’t think about that because only switched to ESPHome when they implemented native API so I never had their MQTT part enabled.

I understand, if the connection to the api fails -what ever the reason is- the esp reboot.
MQTT is not the reason

Quote:
“… the ESP will reboot every 5 minutes because no client connected to the native API.”

I’m not using MQTT on the ESP. and it isnt rebooting. My uptime sensor stays up unless I upload a new config:

2020-01-27 17_04_32-Home Assistant

So, that’s not it… The mystery continues.

Increase log level to very verbose