ESP32 Cam - working!

I will do a write-up, maybe not till the weekend.

1 Like

that would be great, thanks in advance

Hello everybody. I also wanted t to flash the board with esphome. I initially used the example sketch of the arduino library and arduino IDE ,just to test the image quality since i’m still using HA 0.90.2, and it worked perfectly. Then i erased the flash memory and using espTool, I installed the bin file createted with esphome, with no luck. The board got stuck in a bootloop. The only solution that I found is to first flash the sketch example with the arduino IDE then, without erasing the memory, flash the esphome bin file using esptool with these parameters:

esptool.py --port /dev/tty.usbserial-A50285BI --chip esp32 write_flash --flash_size 4MB 0x00010000 esp32_cam1.bin

But, unfortunately, the ota update doesn’t work.

Ps
I used the FT232RL FTDI USB To TTL to flash the board.
If you have some advice on how to fix the ota, I would be really grateful

1 Like

Excellent, thanks.

any good enclosure? How would you place around the house (or externally) such type of cams?

what is that, could you make a photo or maybe a link, thanks

It is not clear to me how you flashed it with ESPHome. I flashed it directly from HA.

First Installed the ESPHome add-on, hooked up the ESP32 Cam to the USB of my Raspberry Pi (that runs HA) using the FT232RL . Then flashed it. From that moment I was able to update OTA via the add on without a problem.

Did the inital flashing with Hassio 0.90.1 and ESPHome 1.12.1.
(btw, started off with that Arduino/Espressif sketch too when I received the board a few weeks ago)

Are there any free GPIO-pins available on the ESP32-CAM module?

I am afraid that they are all used by the camera.

1 Like

I use a USB adapter to flash Sonoffs/Wemos boards - do you know if it works with these ESP32 boards?

@Webberk I tried to flash the bord directly from HA as you suggested and it worked perfectly. the problem with the OTA seams to be fixed, thank you for the advice.

1 Like

As I said, use a CP2102. See https://robotzero.one/esp32-cam-arduino-ide/

Yes there are.

This guy had a brilliant idea to use a fake camera as an enclosure.
https://www.youtube.com/watch?v=36p9To2hfak

[EDIT]
I just discovered that the board has also a small red led (GPIO33 inverted) that can be usefull as a status led. The main led is controlled by GPIO4

1 Like

Yes there are pins available for sure. Check this page for the pin details.https://esphome.io/components/esp32_camera.html?highlight=camera

The ones that are not in use can be used for sensors. (like OI16, 4,2,12,13). Plan to test it this weekend

As @marco9446 states OI4 is used for the main LED and may not be generally available

2 Likes

Is it possible to use this with a Wyze camera? No idea what the brain of one of those is…

I think one can use the ports for the SD-Card. I would like to add a camera to this ESPHOME and a Hörmann Garage door

I’ll order one :slight_smile:

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

I have one also and got it to work but it is not stable, after a couple of hours it needs to be reset.
Which board did you select when setting it up under esphome? I chose esp-wrover-kit but I’m unsure if that is the correct one.

esp32dev, but I am by no means sure what is right.

1 Like

Thank you, seems to work, I will let you know tomorrow if it needed to be reset.

Thanks you, choosing esp32dev did the trick, it’s been on since last night.