ESP32 Cam - working!

For those that want a howto, here goes. It’ll be pretty brief as most the actual setup in esphome is covered by @OttoWinter in the esphome docs.

As said above my device is this https://www.aliexpress.com/item/1pcs-ESP32-CAM-WiFi-WiFi-Module-ESP32-serial-to-WiFi-ESP32-CAM-Development-Board-5V-Bluetooth/32955484091.html?spm=a2g0s.9042311.0.0.79984c4dNbGPlZ

These things are all over aliexpress. This particular one is around US$10 and seems to be identical to the Ai-Thinker design.

These particular boards have no usb port attached (unlike many esp32 dev boards). Therefore to join it to your esphome computer you need a USB to Serial programmer. The best ones seem to have the CP2102 chip. Again there are plenty of places to buy these. They have four pins to connect to the ESP32-Cam board.

CP2102                  ESP32-CAM
  3v3                     3v3
  GND                     GND
  RXD                     UOT
  TXD                     UOR      

Also you need to short GPIO0 to GND when doing the initial serial flash to put it in programming mode. Don’t forget to unshort it when restarting. Once we have done the initial USB flash, all future flashing can be done OTA, so make sure you include OTA in your esphome yaml file. Thanks to the author of this page for those wiring details: https://robotzero.one/esp32-cam-arduino-ide/

After that is all done, write a yaml file including the camera setup from here - I copied and pasted the AI-Thinker example and it worked perfectly. https://esphome.io/components/esp32_camera.html

After you have flashed and restarted (not forgetting to unshort GPOI0) you should get a device appearing in home assistant via Integrations. Once you add the new device, there will be a camera entity.

Hope this helps someone.

17 Likes