Building a video doorbell using an ESP32-CAM with ESPHome

Disclosure: This post contains affiliate links. If you click through and make a purchase, I will earn a commission, at no additional cost to you. Read my full disclosure here.

A green front door and a 3D-printed doorbell powered by an ESP32-CAM and running ESPHome

Buckle up, folks! Today, we're diving into an ingenious project from the ESPHome and Home Assistant community – a video doorbell that plays nicely with Home Assistant and doesn't give two hoots about cloud services, external servers, or entities that might remotely shut down a perfectly sound device. The star of this project is the ESP32-CAM, a unique ESP32 board that comes with a camera attachment – because who doesn't love a good two-for-one deal? Like its ESP board siblings, the ESP32-CAM is as affordable as a cup of coffee, making it an excellent choice for DIY security camera projects or, in our case, video doorbells. And the cherry on top? ESPHome supports these boards right out of the box. No messing around with mods here!

A 3D printed doorbell powered by the ESP32-CAM and running ESPHome

What you need to build your own ESP32-CAM doorbell

This project calls for a specific ESP32 board – the LILYGO TTGO T-Camera ESP32. Why this board, you ask? Well, here are three solid reasons:

Now, you might think the screen is just for show, but it has its uses. Beyond displaying your name, it can also inform your mail carrier or unexpected visitors that you're not home, saving them a knock or two.

But where's the doorbell itself?

Working with the TTGO T-Camera ESP32 board is a breeze, since it has almost all the vital components for a video doorbell. The one piece of the puzzle that's missing is a push button, but that's a quick fix. The button acts as a GPIO binary sensor that toggles state when pressed. You can use the built-in pull-up resistor for the button, eliminating the need to solder a physical resistor to any wires. The creator of this project chose an illuminated button for easy spotting in the dark.

No power, no smart doorbell

Additionally, you'll require a 3.3V or Micro-USB power supply for the ESP32-CAM board. If you opt for an LED button, you'll also need a power supply for it. The project's creator used a 12V button. Alternatively, you can use a 12V power supply connected to a DC to DC step-down converter to power the ESP32 board.

Besides these specific components, you'll need the usual suspects for electronics projects: a 3D-printed case for both the ESP32-CAM and button, and some soldering skills to connect everything.

How the ESP32-CAM doorbell works

In an open-source spirit, the project creator has generously made their YAML code for the ESPHome available for everyone. This code serves as a testament to why ESPHome is a delight for tech enthusiasts. It's quite impressive that you only require 118 lines of YAML to whip up the firmware for a DIY video doorbell from scratch. And with ESPHome, you have the flexibility to tweak the YAML to your heart's content.

The ESP32-CAM, the brain behind the operation, handles many of the doorbell's functions. When someone pushes the button, the display switches from the visitor's name to a playful “DING DONG”. Simultaneously, it triggers a Home Assistant script through a homeassistant.service action.

The project creator didn't stop there. They also shared their Home Assistant script, which springs into action when the doorbell rings. The script will ping a notification to your phone, flash your lights, announce the visitor on your Nest speakers, and even snap a picture for the album.

Setting up the camera is a breeze. However, bear in mind that depending on your specific board, the pin configuration might vary from the one in the provided YAML.

Room for improvements in the project

Let's face it, no project is flawless, and this one is no exception. Suppose your Wi-Fi decides to take a break and at that very moment, someone pushes the doorbell. You wouldn't have the slightest clue that someone's waiting at your doorstep. Since Home Assistant is the nerve centre for all notifications, the ESP32-CAM's Wi-Fi connection becomes the Achilles heel of this project.

One way to potentially circumvent this single point of failure is by integrating the existing doorbell into the new one. For instance, using a relay to activate the old bell could work. This way, even if your Wi-Fi decides to play hide and seek, the ESP32-CAM can still signal you about your visitor's arrival.

A portrait photo oif Liam Alexander Colman, the author, creator, and owner of Home Assistant Guide wearing a suit.

About Liam Alexander Colman

is an experienced Home Assistant user who has been utilizing the platform for a variety of projects over an extended period. His journey began with a Raspberry Pi, which quickly grew to three Raspberry Pis and eventually a full-fledged server. Liam's current operating system of choice is Unraid, with Home Assistant comfortably running in a Docker container.
With a deep understanding of the intricacies of Home Assistant, Liam has an impressive setup, consisting of various Zigbee devices, and seamless integrations with existing products such as his Android TV box. For those interested in learning more about Liam's experience with Home Assistant, he shares his insights on how he first started using the platform and his subsequent journey.

Comments

  1. Dear Liam,

    Thanks for sharing your project.

    I was planning to give it a try.
    My knowledge it at medium level.

    If I start the project and I have difficulties, would you accept my money if I ask for help?

    maybe I will just need some answers via email, I will not bother you.

    Reply
    • Hello there. This isn’t my project, I’m just featuring it on this site to help others get inspired. The creator’s repository is linked in the article. You might find some help there. You are welcome to use the contact form to send me a message – although I can’t guarantee I’ll be able to help.

      Reply

Leave a Reply to Lorenzo De Luca Cancel reply

Share to...