Random crashes every 5-20 minutes

I’m still working on figuring all this out, this is the first time I’ve worked with an ESP32 and the first time I’ve worked with something like ESPHome. I have been having crashes that seem to happen every 5-30 minutes randomly. I’ve tried reloading the firmware, tweaking options, even flashed a different ESP32 board just in case the first one I started testing with was the problem, but I’m seeing the same thing. I have nothing hooked up to the ESP32, it’s just plugged into my computer using the cable I flashed it with. It’ll report to MQTT just fine for a few minutes and then it dumps this and restarts. Sometimes it’s just a couple minutes, sometimes it runs for 20 minutes before it dumps. Config is below as well as the error image. I can provide whatever info is needed and I can open a github issue, I just wanted to ask here first in case it’s just me doing something dumb.

The main thing I’m seeing errorwise is the CPU watchdog triggers, then continues to do so for several seconds before it just reboots.

esphomeyaml:
  name: utilityroom
  platform: ESP32
  board: esp32doit-devkit-v1
  #board: nodemcu-32s

wifi:
  ssid: 'wifi'
  password: 'wifipass'
  hostname: 'utilityroom'
  domain: '.home.com'
  fast_connect: on
  manual_ip:
    static_ip: 192.168.1.231
    gateway: 192.168.1.1
    subnet: 255.255.255.0

# Enable logging
logger:

ota:
  password: 'pass'

mqtt:
  broker: 192.168.1.20
  username: mqttuser
  password: mqttpass
  discovery: false
  topic_prefix: testing
  
esp32_ble_tracker:
  scan_interval: 10s
  
sensor:
  - platform: ble_rssi
    mac_address: FA:63:17:C7:1B:C8
    name: Test Beacon

I can’t be 100% where I heard/saw this but the WiFi get shutdown to perform a Bluetooth scan, as they share the same antenna.

Try increasing the scan interval, to 60 seconds and see if you get the same watchdog errors.

Just tried changing it back to 300, no good :frowning: It crashed within 3 minutes.

Going to try taking the BLE stuff out altogether just to see what happens.

Well, it has to be related to the RSSI or BLE settings because it hasn’t crashed since I took those out an hour ago. Going to just turn on the ble_tracker part and see what that does. Figured out how to turn on the debugger too, so I can hopefully get more info from teh crash this time.

Yeah, that seems to be it, about 15 minutes in and it dropped. Unfortunately not seeing anything that wasn’t already in the log :-/ I’ll keep poking around, maybe I can figure out what is causing the issue or find someone else with the issue that resolved it.

Might be worth pulling the testing version see if the problem still happens. If it does you can log a issue in GitHub with the project maintainer.
Always helps to have extra people testing.

I can try that. Just to double check my assumption, last night I took the BLE tracker off and left it. Didn’t go down a single time last night.

How would I run the latest version, or know that I am? I installed the ESPHomeYAML beta, but it appears to have loaded the same version onto the ESP32.

Well, found this thread searching more specifically for BLE instead of the RSSI feature and tried the config options he did in the last entry there. Been running an hour and a half and it’s had one MQTT disconnect/reconnect happen, but no crashes. I’m not really concerned about the MQTT disconnect since it jumped right back on, so I’m pretty happy with it now. Time to start adding in my other sensors and such and see how it handles the full load of it’s future responsibilities :slight_smile:

Thanks for the help @cooljimy84. Pointed me in the right direction.

https://github.com/esphome/ESPHome/issues/365#issuecomment-456169614

1 Like