Troubleshooting WiFi Connectivity Issues with ESP32

Hello everyone, I’m currently working on integrating an ESP32 device into my Home Assistant setup, and I’ve encountered a puzzling issue with WiFi connectivity. I wanted to share my experience and see if anyone might have insights or solutions.

A few days ago, I set up an ESP32 to monitor various environmental factors like temperature, humidity, and battery levels. The device communicates with Home Assistant via MQTT, and everything seemed to be working smoothly at first. However, after a day or two, I noticed that the ESP32 was periodically disconnecting from the WiFi network. The logs indicated an ‘Auth Expired’ error, which was perplexing because the credentials hadn’t changed.

I decided to troubleshoot systematically. First, I checked the WiFi network settings and confirmed that the SSID and password were correct. Then, I tried switching the ESP32 to different Wi-Fi channels, but the issue persisted. I also considered the possibility of interference from other devices, but moving the router didn’t resolve the problem.

What’s intriguing is that when I removed the Dallas sensors from the configuration, the ESP32 connected without any issues. This led me to suspect that the sensors might be causing some unexpected load on the system, but I’m not entirely sure how that would affect the WiFi connection.

I’ve since tried several workarounds, including resetting the ESP32, updating the firmware, and even trying a different board configuration. Unfortunately, none of these steps have consistently resolved the problem. It’s frustrating because the device works perfectly without the Dallas sensors, but I really need those readings for my setup.

I’d love to hear if anyone else has encountered similar issues or has any suggestions on how to diagnose or fix this. Maybe there’s a configuration setting I’m missing or a bug in the ESP32 firmware that needs addressing. Your insights would be invaluable!

Thanks in advance for your help and support. It’s amazing how this community comes together to solve challenges, and I’m hopeful we can figure this out together.

Best regards,
Costa