Troubleshooting ESP32 Memory Issues and Upgrading for Better Performance

Hi everyone, I wanted to share my recent experience with the ESP32 module and how I resolved a memory-related issue that was causing frequent crashes. I’ve been working on a project where I need to display a QR code on an LCD screen using ESPHome. Everything seemed to be working fine at first, but I noticed that the device would crash periodically, especially when trying to update the QR code image.

After some research, I realized that the issue was related to the limited RAM on the ESP32 module. The online_image component, which I was using to fetch the QR code image, was consuming a significant amount of memory. I tried adjusting the settings and optimizing the image size, but the problem persisted.

To address this, I decided to test the device in Safe Mode to see if the issue was related to the image loading. Interestingly, the sensor data from Home Assistant still displayed correctly on the screen in Safe Mode, which made me think that the problem was isolated to the image loading component.

After some further troubleshooting, I concluded that the ESP32 module simply didn’t have enough RAM to handle the image decoding process reliably. To resolve this, I’m planning to upgrade to a module with PSRAM, which should provide more than enough memory for my project. However, I still need the upgraded module to fit into the same form factor as my current setup, which is a standard 60mm wall socket.

In the meantime, I’ve been experimenting with different configurations to minimize the memory usage. For instance, I tried reducing the image resolution and using a static image instead of fetching it from the network. While these adjustments helped stabilize the device temporarily, they weren’t a long-term solution.

I’d love to hear if anyone else has encountered similar issues with the ESP32 module and how they resolved them. Additionally, if anyone has experience with ESP32 modules that include PSRAM, I’d appreciate any recommendations or tips on how to integrate them into my existing setup.

Another thing I’ve been exploring is the use of RGBIC strip lights and their rainbow scenes. I’ve noticed that the current rainbow effect on these lights only includes a few colors, and I wonder if there’s a way to enhance it to include all six colors, similar to the effect seen on Glide wall lights. If anyone has any suggestions or workarounds, I’d be happy to hear them!

Lastly, I’ve been looking into using Docker with Home Assistant on my Synology NAS. I’d be interested to know the community’s thoughts on this setup and if there are any technical challenges I should be aware of before diving in.

Thanks for reading, and I look forward to hearing your insights and experiences!