How to Add and Control a Wi-Fi CCTV Camera in Home Assistant

You can integrate, control and monitor your generic or branded Wi-Fi-based CCTV cameras from brands like TP-Link, Ezviz, etc., in Home Assistant without using their cloud services.

Sign up forfree

Forgot your password?

Create an account

*Required: 8 chars, 1 capital letter, 1 number

By continuing, you agree to thePrivacy PolicyandTerms of Use.You also agree to receive our newsletters, you can opt-out any time.

4

This guide will teach you how to integrate or add a Wi-Fi-based CCTV camera to Home Assistant and use it as a network video recorder (NVR) to store the captured footage.

Adding Wi-Fi Security Camera to Home Assistant

First things first; what is Home Assistant exactly, andwhat can you do with it?

Home Assistant is a free and open-source home automation software that it’s possible to deploy on a Raspberry Pi or old laptop to build a localized and completely private smart home. It supports over 1900 devices and services, allowing you to integrate and control smart devices from various manufacturers or developers.

netflix logo with popcorn and film board

With Home Assistant, you can add and control single or multiple Wi-Fi or IP cameras from various manufacturers in one dashboard. Thus, you don’t need to install and use different apps to access or monitor your security cameras.

Step 1: Find the Camera RTSP Stream URL

Every IP or Wi-Fi-based security camera has a stream URL that it’s possible to add to Home Assistant to view the live stream without having to sign up or using any third-party cloud services.

you could find theHTTPstream URL forMotion JPEGcameras orRTSPstream forH.264cameras in their apps.

Mint Mobile SIM Protection Number Lock with SIM cards on table

However, in some generic CCTV cameras—for example, cameras that use the V360 Pro app—you need to enable theRTSPstream by flashing a code via an SD card.

The following table lists popular Wi-Fi CCTV camera models with their URLs. You must replace thepart in the stream URL.

A photo of a television displaying the McMillions home page on HBO Max

rtsp://username:pwd@/cam/realmonitor?channel=1&subtype=0

TP-Link (Tapo)

add and control wi-fi cctv camera in home-assistant

rtsp://username:pwd@/videoMain

rtsp:///live/ch00_0

rtsp://username:DeviceVerification@/H264

rtsp://admin:password@//h264Preview_01_main

rtsp://username:pwd@/videoMain

rtsp:///Streaming/Channels/101

The stream URLs may vary based on the specific or newer models introduced by the manufacturers. You can refer to the user manual that came with the camera or the manufacturer’s website to learn more about how to find the RTSP stream URL for that particular model.

You can get the camera’s IP from your router DHCP settings or use theFing app(network scanner) on your Android or iOS smartphone to discover the Wi-Fi CCTV cameras connected to your network.

Once you have the IP, use the table to edit the IP address and keep the port 554 (default for RTSP). To check if the stream is working, open the VLC player and clickMedia > Open Network Stream.

Paste the RTSP stream URL and clickPlay.

The VLC should start displaying the live camera feed.

Step 2: Install Frigate NVR Add-On

Frigate is an open-source NVR that you’re able to install as an add-on in Home Assistant for real-time AI object detection, recording videos, or taking snapshots based on events. All feeds are processed within your local system to detect motion, person, or object. Thus, it’s completely private and secure.

Once you have the RTSP stream URL, install the Frigate add-on by following the below instructions:

Note that Frigate records an event with the date and timestamp for future reference.

Step 3: Edit Motion Mask

To avoid false motion detection, you can mask the area where you want to detect motion by following these steps.

Feel free to remove themotionpart from thefrigate.yamlfile if you wish to enable continuous recording.

If you are using a Raspberry Pi for Home Assistant, you may run out of storage space after some time as events are recorded. You can increase the storage and performance of Raspberry Pi by installing Home Assistant andbooting Raspberry Pi via SSDinstead of the micro SD card.​​​​​​​

DIY NVR With Continuous or Motion-Based Recording

As you can see, with the help of Home Assistant and Frigate add-on, you can add any Wi-Fi-based CCTV camera and secure your home or office with automatic event-based recording. You may also enable continuous recording for 24x7 footage.

However, that will require more storage. Nonetheless, all the footage and recordings are processed and saved locally on your system drive. Alternatively, you may also use the MotionEye NVR add-on in Home Assistant to add Wi-Fi cameras for motion-based recordings and snapshots.

Don’t have the money to buy a security camera? Make one instead.

OneDrive is one of the best, but it has a catch.

Lose your laptop without this feature, and you’ll wish you had turned it on.

These films will leave you questioning humanity, but also wanting more.

It saves me hours and keeps my sanity intact.

I gripped my chair the entire time—and then kept thinking about it when the screen turned off.

Technology Explained

PC & Mobile