Privacy friendly ESP32 smart doorbell with Home Assistant local integration

Privacy focused “smart” doorbells seem to be few and far between so I decided to build one that integrates with Home Assistant via ESPHome and is easy to build.

This project is aimed at being simple while allowing a ton of customisation and flexibility. To get started, you’ll need an instance of Home Assistant running with the ESPHome add-on as well as the Home Assistant companion app on your mobile phone to receive notifications when someone presses the doorbell button.

I have used an 8 RGB LED ring light in my version but if you want to simplify things, you can skip this and use the ESP32-CAM’s built in LED as a flash – it’s surprisingly bright.

Update: I’ve received a lot of questions about the need for the pull-down resistor on GPIO-14 (the pin for the button). According to this github post, the ai-thinker version of the ESP32-CAM doesn’t have all of the usual ESP32 pull-up or pull-down resistors. I tried using the INPUT_PULLDOWN feature in esphone for GPIO14 but it didn’t work. Given the number of ESP32-CAM variants coming out of China, your mileage might vary on this one.

Parts list:

  • ESP32-CAM (Amazon – US, UK, DE) Make sure to get one with a “flash/download/io0” button to make your life easier when you flash ESPHome onto it for the first time. If you make the same mistake as me and buy the one without that button, follow this guide to flash the ESP32-CAM using an FTDI adapter.
  • Momentary push button (Amazon – US, UK, DE)
  • 10k resistor
  • 8  RGB LED ring light (Amazon – US, DE) Note: these aren’t the exact ones that I used but they are the closest ones that I could find. I used the Pi Supply PIS-1270 from RS Components.
  • 10m Micro USB cable (Amazon – US, UK, DE)
  • M2.5 brass inserts (Amazon – US, UK, DE)
  • M2.5 screws (Amazon – US, UK, DE)
  • eSUN white PETG filament (Amazon – US, UK, DE

You can find the .stl’s on Printables here and the home assistant config in my github repo: thatguy-za/esp32-cam-doorbell.

Build guide

Step 1 – Printing the enclosure

This step takes the longest so lets send the .stl’s to the printer while we crack on with the rest of the build. There are three pieces that you’ll need to print:
1. The main body
2. The ESP32-CAM retention plate
3. The back plate/wall mount

You’ll need to print the front and the back of the enclosure with supports. I printed it using PLA but you’ll want to use PETG or ABS filament so it is waterproof and use 20-30% infill. 

Once everything has printed, you’ll need to add two M2.5 threaded inserts:
1. Into the front cover so you can screw the ESP32-CAM retention bracket into it.
1. Into the bottom of the backplate so you can screw on the face plate with a 10mm M2.5 screw

Step 2 – Configuring the ESP32-CAM in ESPHome

Hold down the “flash/download/io0” button and connect your ESP32-CAM to your computer using a micro USB cable.  This will boot it into flashing mode.

Launch Google Chrome, go to your instance of Home Assistant and launch the ESPHome Add-on by clicking Settings -> Add-ons -> ESPHome -> Open Web UI. Chrome is important because it seems to be the most reliable browser for flashing firmware onto the ESP32-CAM.

Click + New Device to add a new device.Give it a name (“Doorbell” is probably a good starting point).

When asked to select the device type, select ESP32 and check the box “use recommended settings’.

Once the configuration has been created, you can skip installing it onto the device – we’ll do that later.

From your list of ESPHome devices, click Edit on the device that you have just created.

At the bottom of the yaml file (below captive_portal:), paste the configuration code from my github repository that is linked above. 

Click Save and Install.

Select Plug into this computer.

Click Open ESPHome Web, this will allow you to flash the firmware onto the device from the web browser. This is where it is important that you are using Google Chrome.

Once the firmware has compiled, you should be able to click Download Project – this could take a few minutes.

Head over to ESPHome Web and follow the prompts to flash the firmware onto your ESP32-CAM.

Home Assistant should discover the new device once the new firmware has been flashed onto it – yay! Now you can add whatever entities you want to your dashboard.

Screenshot: New device found in Home Assistant.
Step 3 –  Time for some automation & notifications

We want to create an Automation to take a snapshot from the doorbell’s camera and send it to your mobile phone when someone presses the doorbell button.

Click Settings -> Automations -> + Create Automation and then create a new automation from scratch.

Click on the three vertical dots in the top right hand corner of the screen and then click Edit in YAML

Paste the automation from my github repo (linked above) into the editor and update entity names for devices such as your mobile phone.

Save the automation and restart Home Assistant so the new automation becomes active.

Here is a summary of how the automation should behave.

Step 4 – Time to wire it up

Once the enclosure is printed, we can start the final assembly.

There are a few variants of the ESP32-CAM board, each with slightly different pinouts so double check the pinout on the board you get.

Follow the wiring guide below. I soldered everything onto the back of the lower PCB (the one with the micro USB port).  It’s important to add the 10k ohm pull down resistor between GPIO14 and ground because without it, I noticed GPIO14 was floating high on quite often. 

This is what it should look like when you’re done. Bonus points for covering the resistor in heatshrink tube.

Here are some pics of mine before it goes up next to the front door!

*The product links in this post may contain affiliate links. Any commission earned is used to keep the servers running and the gin cool.

Thanks for making it to the end of the post! Did this article help you or do you like my work?
Buy Me a Coffee

Note: This article have been indexed to our site. We do not claim legitimacy, ownership or copyright of any of the content above. To see the article at original source Click Here

Related Posts
“Poor”: Mark Zuckerberg falls behind Bill Gates after Facebook went down thumbnail

“Poor”: Mark Zuckerberg falls behind Bill Gates after Facebook went down

Pixabay/Pexels In Mark Zuckerbergs Haut möchte ich grundsätzlich, aber aktuell ganz besonders nicht stecken. Erst meldet sich Mitte September eine Whistleblowerin zu Wort, die dann auch noch vor dem amerikanischen Senat aussagt, fast zeitgleich sind auch noch die Server von Facebook, WhatsApp und Instagram für mehrere Stunden nicht zu erreichen. Dem Bloomberg Index der Milliardäre…
Read More
蓝斑蜥蜴迷宫图案背后的秘密:一个简单的数学公式 thumbnail

蓝斑蜥蜴迷宫图案背后的秘密:一个简单的数学公式

一个复杂的系统会由几个元素组成,它们的局部相互作用会导致难以预测的整体属性。一个复杂系统的结果不会是这些元素单独的总和,因为它们之间的相互作用会产生整体的意外行为。 遗传学和进化系教授Michel Milinkovitch和联合国大学理学院数学系教授Stanislav Smirnov的研究小组一直对蓝斑蜥蜴(ocellated lizard)皮肤上彩色鳞片的分布的复杂性感兴趣。鳞片上的迷宫图案蓝斑蜥蜴的单个鳞片在动物的一生中会改变颜色(从绿色到黑色,反之亦然),在其成年后会逐渐形成一个复杂的迷宫式图案。UNIGE的研究人员此前已经表明,由于鳞片网络构成了一个所谓的“细胞自动机”,迷宫出现在皮肤表面。Stanislav Smirnov指出:“这是数学家约翰·冯·诺依曼在1948年发明的一种计算系统,其中每个元素根据相邻元素的状态改变其状态。”在蓝斑蜥蜴的例子中,鳞片根据精确的数学规则--根据其相邻的颜色改变状态--变成绿色或黑色。Milinkovitch已经证明,这种细胞自动机机制一方面是由皮肤的几何形状的叠加产生,另一方面是皮肤的色素细胞之间的相互作用产生。通往简单的道路Michel Milinkovitch实验室的理论物理学家Szabolcs Zakany跟两位教授展开合作以确定鳞片颜色的这种变化是否可以服从一个更简单的数学规律。于是,研究人员转向了1920年代开发的伦茨-伊辛模型以描述拥有自发磁化的磁性粒子的行为。这些粒子可以处于两种不同的状态(+1或-1),并且只跟它们的第一邻居相互作用。“伦茨-伊辛模型的优雅之处在于,它用一个只有两个参数的单一方程来描述这些动力学:对齐或错位的邻居的能量,以及倾向于将所有粒子推向+1或-1状态的外部磁场的能量,”Szabolcs Zakany说道。为了更好地生存而产生的最大无序三位UNIGE的科学家确定,这个模型可以准确地描述蓝斑蜥蜴尺度颜色变化现象。更确切地说,他们将通常在方形晶格上组织的伦茨-伊辛模型改编为皮肤鳞片的六方晶格。在一个给定的平均能量下,伦茨-伊辛模型倾向于形成跟此相同能量相对应的所有磁粒子的状态配置。在蓝斑蜥蜴的例子中,颜色变化的过程有利于所有绿色和黑色鳞片分布的形成,每次都会形成迷宫式的图案。“这些为蓝斑蜥蜴提供了一个最佳伪装的迷宫式图案在进化过程中被选择出来。虽然这些图案是由一个复杂的系统产生,但可以简化为一个单一的方程式,其中重要的不是绿色和黑色鳞片的精确位置,而是最终图案的一般外观,”Michel Milinkovitch说道。每种动物都会有不同的绿色和黑色鳞片的精确位置,但所有这些替代图案都会有类似的外观从而使这些不同的动物有着同等的生存机会。
Read More
Apple’s new AirPods Pro are back on sale for $200 thumbnail

Apple’s new AirPods Pro are back on sale for $200

All products recommended by Engadget are selected by our editorial team, independent of our parent company. Some of our stories include affiliate links. If you buy something through one of these links, we may earn an affiliate commission. All prices are correct at the time of publishing.If you’ve been patiently waiting for Apple’s second-generation AirPods
Read More
Index Of News
Total
0
Share