How to Build a $10 Wireless IP Security Camera for Your Home

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 set it up 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 in a remote location.
It creates an IP link that you can browse in a web browser to watch the camera feed. Plus, you can add it to a home automation server and integrate with MotionEye to automate camera feed and capture photos or video when motion is detected, and receive notifications on your smartphone.
What You Need to Build a Wireless IP Security Camera
You’ll need the following to build a Google Nest-like security camera for under $10.
- An ESP32-CAM module.
- A USB to TTL or serial converter for flashing 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 in the desired place.
Step 1: Flash the firmware
For this project, we will use 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.
ESP32-CAM | USB to TTL module |
U0R | TX |
U0T | X-ray |
5V | VDC |
Earth | Earth |
IO0 | Earth |
Now follow these simple steps:
- Connect the USB to the PC and launch the Tasmotizer tool.
- Select the COM port to which USB to TTL is connected.
- Click on Open to choose the tasmota32-webcam.bin firmware.
- Click on Tasmotize. This will flash tasmota32-webcam.bin firmware to ESP32-CAM.
The next thing you need to do is configure the camera module.
Step 2: Configure the ESP32-CAM
Setting up the ESP32-CAM module is slightly complicated, so follow the instructions below carefully.
- Disconnect it IO0 brooch Earth to turn off flash mode.
- Next, open Wi-Fi settings on your smartphone or PC and connect to Tasmota-xxx Access Point (AP).
- Open a web browser window and visit 192.168.4.1.
- 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. Write it down and visit the IP address in your web browser.
Assign a permanent IP address to your ESP32-CAM through your router’s DHCP settings. This is important to keep the ESP32-CAM IP address after reboot. Otherwise, you will have to scan your network to find the IP address of the camera and change it each time if it is integrated with Home Assistant (HA).
Now go to Setup > Setup Other and paste the following under the Model field then click to safeguard.
{"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}
Then click on Setup > Configure Module and choose the AI Thinker Cam from the options. Click on to safeguard.
After restarting, the ESP32-CAM will start showing the live camera feed with temperature and a slider to toggle and adjust the brightness of the LED flashlight on the ESP32-CAM.
You can now stream the live camera feed from any web browser by visiting ‘http://
The default resolution is low and you may see blurry stream. However, you can easily change the resolution using the wc resolution ordered. You can adjust image size or resolution between 96×96 at 1600×1200. However, during our tests, we found 480×320 and 640×480 to be more stable with ESP32-CAM frame rates and temperature.
To set the resolution, visit the IP address of the Tasmota webcam, click Consoles > Consoleand type wc resolution 7. Hit it Walk in key. This will change the resolution to 480×320. Similarly, if you run the command wc 8 resolutionthe resolution will change to 640×480etc
You can also mirror or reverse the live stream and adjust saturation, brightness or contrast using the controls mentioned below:
wcbrightness -2 to 2
wccontrast -2 to 2
wcflip 1 or 0
wcmirror 1 or 0
Step 3: Print the case and assemble ESP32-CAM
You can print any 3D enclosure compatible with the ESP32-CAM. However, we found an interesting 3D case inspired by Google Nest Cam on 3D Cults which has enough space to store a large backup battery and a small power module. It is also adjustable and you can easily screw it to any wall or ceiling. It also looks great if printed with good quality PLA or PETG filament.
You can also use any old CCTV camera housing and install the ESP32-CAM in it using hot glue or tape.
Step 4: Add to Home Assistant
Now you can 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 to your phone. You can also enable voice notification via Alexa. You can follow our guide to configure Home Assistant Server on a Raspberry Pi.
If you have already installed and configured the Home Assistant server, follow these steps:
- Open and connect to your Home Assistant server.
- Install and configure Home Assistant MQTT add-on.
- After setup, open the Tasmota web interface, navigate to Setup > Configure MQTT and enter the MQTT IP, username and password. Click on to safeguard.
- The device will automatically connect to the Home Assistant (HA). Now in the HA dashboard click on three dots and select Edit Dashboard.
- Click on Add a map and select the Illustrated map among the options.
- Enter the name where the camera is installed or whatever name you want to give it, and paste the URL of the Tasmota webcam feed into the Image path field. You can also add the camera light switch in the Entities section to control the light. Click on to safeguard.
Now you can view live stream, turn it on/off or adjust flashlight brightness via memory card in Home Assistant. However, this will only display the live stream. It will not record or capture anything. If you want to capture videos or photos when motion is detected, you need to install Home Assistant MotionEye add-on.
The camera cannot see or detect motion in the dark. So you can also build a motion sensing smart switch near 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 recording the video depending on the settings you apply.
With this add-on you can configure motion capture and also add automation in the Home Assistant to send you notifications on your smartphone or via Alexa (requires a Nabu Casa subscription).
View camera feed on Amazon Echo Show
Amazon Echo Show supports RSTP protocol to broadcast camera feeds. Fortunately, you can enable RSTP on the Tasmota webcam server by running the following command in the console.
wsrstp 1
Once done, you can broadcast the camera feed via RSTP at:
rtsp:
To test if the RSTP is working, open the vlc player and go to Media > Open Network Streams. Now paste the RSTP URL and click To play. If the stream starts playing, it works.
You can now use this URL to view the camera feed on Echo Show devices by saying “Alexa, show the terrace.’ However, you will need to install and configure 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 can increase costs, including DVR or NVR, cables, power, and maintenance fees charged by some companies.
By following this guide, you can create several $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 in multiple locations, connect to the wireless router, and monitor them through the Home Assistant or Echo Show dashboard.