I’m exeriencing a very strange issue with ESPHome-powered ESP32-cam modules.
I bought two unbranded modules which look like the AiThinker modules. I’ve got both running properly with Home Assistant, configuration is good, everything appears to work. Can view the camera stream and control the on-board LED from Lovelace.
However, after a few minutes of operation, one of the two modules stops providing images from the camera. The logs don’t say anything is wrong, and the light to control the on-board white LED still responds. Everything appears to be working, but I don’t see any logs about getting an image the way it does when it first starts up.
But here’s where it gets weird: this only happens on one of the two boards. I’m using the exact same config on each, one named cam_1 while the other is named cam_2. I’ve swapped power supplies and power cables, but for some reason, cam_1 is unstable while cam_2 works fine. I even tried putting a heatsink on the ESP32 for cam_1, but that made no difference, and even without one, the module doesn’t get beyond warm even when streaming video.
I wouldn’t trust the sourcing, could be a clone of a clone, faulty or cheap parts, etc. I have mine programmed tor reboot once an hour to keep them up.
The RSSI appears okay (-79 dB). Can anyone share their lambda or config that will reboot the device regularly?
I’ve also seen some strange issues on reboot of the problematic device warning that setup failed. Looks like in intermittent fault with the camera module itself, which is kind of annoying. I’m wondering if that might be the culprit.
If I reboot the device within the first minute or two of operation, it reboots fine. However, if the camera feed has been interrupted, it won’t complete the reboot.
Here are the logs:
[14:39:19][I][app:133]: Rebooting safely…
[14:39:19]ets Jun 8 2016 00:22:57
[14:39:19]
[14:39:19]rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
[14:39:19]configsip: 0, SPIWP:0xee
[14:39:19]clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[14:39:19]mode:DIO, clock div:2
[14:39:19]load:0x3fff0018,len:4
[14:39:19]load:0x3fff001c,len:952
[14:39:19]load:0x40078000,len:6084
[14:39:19]load:0x40080000,len:7944
[14:39:19]entry 0x40080310
[14:39:21][I][logger:116]: Log initialized
[14:39:21][C][status_led:014]: Setting up Status LED…
[14:39:21][C][ota:364]: There have been 0 suspected unsuccessful boot attempts.
[14:39:21][I][app:028]: Running through setup()…
[14:39:21][C][light:094]: Setting up light ‘Cam 1’…
[14:39:21][D][light:261]: ‘Cam 1’ Setting:
And that’s as far as it gets. A successful reboot shows the same message, but continues on…
[14:41:41][I][restart:015]: Restarting device…
[14:41:41][I][app:133]: Rebooting safely…
[14:41:41]ets Jun 8 2016 00:22:57
[14:41:41]
[14:41:41]rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
[14:41:41]configsip: 0, SPIWP:0xee
[14:41:41]clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[14:41:41]mode:DIO, clock div:2
[14:41:41]load:0x3fff0018,len:4
[14:41:41]load:0x3fff001c,len:952
[14:41:41]load:0x40078000,len:6084
[14:41:41]load:0x40080000,len:7944
[14:41:41]entry 0x40080310
[14:41:43][I][logger:116]: Log initialized
[14:41:43][C][status_led:014]: Setting up Status LED…
[14:41:43][C][ota:364]: There have been 0 suspected unsuccessful boot attempts.
[14:41:43][I][app:028]: Running through setup()…
[14:41:43][C][light:094]: Setting up light ‘Cam 1’…
[14:41:43][D][light:261]: ‘Cam 1’ Setting:
[14:41:43][C][wifi:029]: Setting up WiFi…
[14:41:43][D][wifi:272]: Starting scan…
[14:41:43][D][sensor:092]: ‘Cam 1 Uptime’: Sending state 1.86500 s with 0 decimals of accuracy
[14:41:46][D][wifi:287]: Found networks:
I have a similar module. If I power it from a USB port it fails after a while but if I power from the same USB cable and plug it in to a wall socket it appears more reliable.
I have also noticed that the chip gets quite warm so I’m going to add a heatsink on it once they arrive.
I’ve tried different power supplies, including ones that work with my second module. I’m doing most of my testing on a power bank that delivers up to 2 amps, so I don’t think it’s due to brownouts, as I’m also not seeing anything like that in the logs (viewed over USB, not OTA).