In this guide, we'll build a DIY wireless security camera and install it in a 3D printed case inspired by Google Nest Cam. You can install it anywhere with a decent Wi-Fi range. Additionally, you can increase the Wi-Fi gain by installing an external antenna, giving you more leverage to install it at a distant place.

It creates an IP link that you can browse in a web browser to watch the camera feed. Also, you can add it to a home automation server and integrate with MotionEye to automate the camera stream and capture photos or videos when motion is detected, and receive notifications on your smartphone.

Things You Need to Build a Wireless IP Security Camera

You will need the following to build a Google Nest lookalike security camera for under $10.

  • An ESP32-CAM module.
  • A USB to TTL or serial converter for flashing the firmware.
  • Any 5V DC power adapter. You can use your old phone charger with a micro USB cable.
  • Some DuPont or jumper wires.
  • A 3D printed case and a screw to install it at the desired location.

Step 1: Flash the Firmware

For this project, we will use the Tasmota firmware for ESP32.

So, download the Tasmotizer tool from GitHub and connect the USB to TTL converter to ESP32-CAM, as shown in the following diagram.

diagram showing connection between esp32 cam usb ttl module for flashing firmware
ESP32-CAM USB to TTL Module
U0R TX
U0T RX
5V VCC
GND GND
IO0 GND

Now, follow these simple steps:

  1. Connect the USB to the PC and launch the Tasmotizer tool.
  2. Select the COM port where USB to TTL is connected.
  3. Click Open to choose the tasmota32-webcam.binfirmware.
  4. Click Tasmotize. This will flash the tasmota32-webcam.bin firmware to ESP32-CAM.
flash tasmota webcam firmware esp32 cam

The next thing you need to do is to configure the camera module.

Step 2: Configure the ESP32-CAM

Configuring the ESP32-CAM module is slightly complicated, so follow the instructions below carefully.

  1. Disconnect the IO0 pin from GND to disable flash mode.
  2. Next, open Wi-Fi settings on your smartphone or PC and connect to Tasmota-xxx Access Point (AP).
  3. Open a web browser window and visit 192.168.4.1.
  4. Choose the Wi-Fi network and enter the password. Save the settings.

The ESP32-CAM will connect to the network and display an IP address. Note it down and visit the IP in your web browser.

Assign a permanent IP to your ESP32-CAM via your router's DHCP settings. This is important to keep the IP address of the ESP32-CAM same after the restart. Otherwise, you will have to scan your network to find the camera IP and change it every time if integrated with Home Assistant (HA).

Now, go to Configuration > Configure Other and paste the following under the Template field and then click on Save.

{"NAME":"AITHINKER CAM","GPIO":[4992,1,672,1,416,5088,1,1,1,6720,736,704,1,1,5089,5090,0,5091,5184,5152,0,5120,5024,5056,0,0,0,0,4928,576,5094,5095,5092,0,0,5093],"FLAG":0,"BASE":2}

enter the template code in the template field tasmota webcam

Next, click Configuration > Configure Module and choose the AI Thinker Cam from the options. Click Save.

choose the ai thinker cam from the available template

After the restart, the ESP32-CAM will start displaying the live camera feed with temperature and a slider to toggle and adjust the brightness of the LED flashlight on the ESP32-CAM.

You may now stream the live camera feed from any web browser by visiting ''—for instance, .

The default resolution is low, and you may see a blurred stream. However, you can easily change the resolution by using the wcresolution command. You can adjust the frame size or resolution between 96x96 to 1600x1200. However, in our testing, we found 480x320 and 640x480 to be more stable with frame rates and ESP32-CAM temperature.

To set the resolution, visit the Tasmota Webcam IP address, click Consoles> Console, and type wcresolution 7. Hit the Enter key. This will change the resolution to 480x320. Similarly, if you run the command wcresolution 8, the resolution will change to 640x480, and so on.

changing esp32 cam resolution

You may also mirror or flip the live stream and adjust the saturation, brightness, or contrast using the commands mentioned below:

wcbrightness -2 to 2
wccontrast -2 to 2
wcflip 1 or 0
wcmirror 1 or 0

Step 3: Print Case and Assemble ESP32-CAM

You may print any 3D case that fits the ESP32-CAM. However, we found an interesting Google Nest Cam-inspired 3D case on Cults 3D that has enough space to store a large battery for backup and a small power supply module. It's also adjustable, and you can easily screw it onto any wall or ceiling. It also looks good if printed with good quality PLA or PETG filament.

esp32 CAM in Google nest inspired 3d case

You may also use any old CCTV camera body and install the ESP32-CAM in it using hot glue or tapes.

Step 4: Add to Home Assistant

You may now add this ESP32-CAM security camera to the Home Assistant (HA) to automate the camera and turn it on only when motion is detected. It will also send you notifications on your phone. You may also enable voice notification via Alexa. You may follow our guide to set up Home Assistant Server on a Raspberry Pi.

If you already have the Home Assistant server installed and setup, follow these steps:

  1. Open and log in to your Home Assistant server.
  2. Install and configure Home Assistant's MQTT add-On.
    install and setup mqtt broker in home assistant
  3. After the configuration, open the Tasmota web interface, go to Configuration > Configure MQTT and enter the MQTT IP, username, and password. Click Save.
    enter mqtt broker details in tasmota webcam
  4. The device will automatically connect to the Home Assistant (HA). Now, in the HA dashboard, click three dots and select Edit dashboard.
  5. Click Add Card and select the Picture card from the options.
  6. Enter the name where the camera is installed or whatever you want to name it, and paste the Tasmota Webcam stream URL in the Image Path field. You may also add the camera light switch in the Entities section to control the light. Click Save.
add tasmota webcame in home assistant

You can now view the live stream, turn it on/off or adjust the flashlight brightness via the Picture Card in Home Assistant. However, this will only display the live stream. It won't record or capture anything. If you want to capture video or photos when motion is detected, you must install Home Assistant's MotionEye Add-on.

The camera can't see or detect motion in the dark. So, you may also build a smart motion-sensing light switch nearby the ESP32-CAM that will turn on the lamp or light source when motion is detected. This will help the camera detect the motion and start capturing the snapshots or record video based on the settings you apply.

With this add-on, you can set up motion capture and also add automation in the Home Assistant to send you notifications on your smartphone or via Alexa (requires Nabu Casa subscription).

View Camera Stream on Amazon Echo Show

Amazon Echo Show supports RSTP protocol to stream the camera feeds. Fortunately, you can enable the RSTP in the Tasmota webcam server by running the following command in the console.

wsrstp 1

Once done, you can stream the camera feed via RSTP at the following address:

rtsp://ESP32-CAM-IP:8554/mjpeg/1

To test if the RSTP is working, open the VLC player and go to Media > Open Network Stream. Now, paste the RSTP URL and click Play. If the stream starts playing, it's working.

add rstp camera feed to alexa echo show using monocle skills

You may now use this URL to display the camera stream on Echo Show devices by saying, 'Alexa, show terrace.' However, you will need to install and set up the Monocle RTSP/RTP IP Cameras skill in the Alexa app.

Secure Your Home on a Budget

Cameras are perfect for securing your homes or offices. However, installing multiple security cameras around may add up to the costs, including the DVR or NVR, cables, power supply, and maintenance fees charged by some companies.

By following this guide, you can build multiple $10 DIY security cameras and integrate them with Home Assistant to secure your home with motion-based captures and recordings. These are cheap and reliable cameras that you can install at multiple locations, connect to the router wirelessly and monitor them via the Home Assistant dashboard or Echo Show.