📜 ⬆️ ⬇️

Cloud video surveillance from a webcam and router

If you want to install a video surveillance system at home, but having studied the prices for cameras and DVRs, this idea disappears, then let's consider a budget option using a webcam and a router.

We will need:


A webcam and a USB flash drive are connected to the USB port of the router via a USB hub. WebGlazok firmware is installed on the router. The firmware is based on OpenWrt and uses the Motion Motion Detection program.
')
We get a simple video surveillance system with motion detection and cloud storage , which does not require a computer, a DVR and a white IP address.

Available features:


Of course, 2 frames per second is rather not video surveillance, but photo surveillance, but for many tasks this is enough.

For what you can use this system:


How to build and configure the system


  1. Download the latest version of the WebGlazok firmware from the official site.
  2. Go to the control panel of the router at 192.168.0.254
  3. We perform the firmware update of the router, indicating the downloaded firmware:

    Router software update
    image

  4. Move the switch on the router to the AP position, the router will create a Wi-Fi network named WebGlazok.com_XXX

    Switch on the router
    image

  5. Connect to this network, the password is the MAC address of the router (printed on the case)
  6. Go to the control panel of the router at 192.168.1.1 , login admin, password admin.
  7. In the control panel, we set the sensitivity of motion detection, motion zones and frame acquisition interval:

    Control panel of the router with firmware WebGlazok
    image

  8. It is advisable to specify a Wi-Fi network to connect to the Internet, it is necessary to synchronize time and send pictures to the cloud

How the system works


The router analyzes the image from the camera and, when it detects motion, saves frames to a USB flash drive at a speed of 1-2 frames per second. In the absence of motion, frames are saved over a specified time interval.

JPEG footage is stored on a flash drive in folders with the following structure /cam1/date/hours/filed.jpg

For example: /cam1/20170403/1540/20170403154400-00_s4_s.o.jpg

Images are stored in 2 copies - preview and full-size photo. You can view the recorded footage through the computer by inserting a USB flash drive into it.

In my experience using a 16 GB flash drive is enough for about 2 weeks of archive storage in the presence of movements in about 5% of cases of the total time. After the memory is full, old frames are deleted from the flash drive.

The system can work completely autonomously and without connecting to the Internet.

However, this model of the router has no built-in clock, so the time on the frames is set incorrectly. When the power is turned off, the time “stops”.

To solve this problem, the router must be connected to the Internet via Wi-Fi. Then time is synchronized via the Internet. Traffic is almost not consumed. Even a weak 2G internet will do. Outside the city, the Internet can be distributed via a 3G / 4G router or a regular router with a connected 3G / 4G modem.

Autonomous work


The router works from the USB power connector, so if there is no 220 V power outlet, it can be powered, for example, from a mobile battery (paverbank).

The power supply voltage of the router is 5 V, the measured current strength when the camera is running is 0.6 A, the power is 3 W. Thus, a USB paverbank with a capacity of 10,000 mAh (36 W / h) is enough for 12 hours of system operation.

You can also connect a car battery with a converter from 12 V to 5 V.

If you need online viewing


Watching footage on a flash drive is not very convenient. To find the event of interest, you need to scroll through all the files on your computer.

The router with the WebGlazok firmware has the ability to save frames to the cloud and glue them into the video sequence there. And you can view the camera through a browser or mobile application. However, this service is paid and costs 199 rubles per month (as of April 2017).

To store the archive of your camera in the cloud, you need to connect the router to the Internet via Wi-Fi, as well as register the camera on WebGlazok.com and get the device key.

In your account, the camera activity tape and the camera image are displayed. The detected movements are marked in red on the tape.

Camera settings are also made from the personal account:


Notifications about movements with attached frames, alerts about disconnection of the camera from the network and loss of the signal come to the mail.

The router sends to the cloud low-resolution frames (previews), which take 5-20 KB each. Therefore, little traffic is spent. This resolution is enough to view the situation, but for a detailed view you need a frame with full resolution.

Frame preview
image

In your personal account (in a browser or a mobile application), if you stop a preview frame for more than 2 seconds, a request is sent to the router to get a full-size high-resolution frame. The router searches for this frame on a USB flash drive and sends it to the cloud. The process takes 10-30 seconds depending on the speed of the Internet, after which the preview frame in your account changes to full-size (HD). When you re-request, the HD frame already opens quickly, as it is already stored in the cloud.

HD frame
image

Table of ratios of frame resolution and frame preview:

Camera Resolution / Preview Resolution
640x480 / 320x240
1280x720 / 320x180
1280x960 / 320x240
1920x1080 / 240x135
1600x1200 / 200x150

Connecting IP cameras


The webcam is inexpensive and compact, easy to connect and install. However, if you need night shooting and editing outdoors, then you can’t do without an IP camera.

The WebGlazok system also supports the connection of IP cameras that connect to the router via the LAN port or via Wi-Fi.

All that is required from the IP camera is a JPEG image or an MJPEG stream. Modern IP cameras that support the ONVIF protocol can give a snapshot.

All motion detection analytics also occur on the router. You can buy a cheap Chinese camera on Aliexpress for 1300-1800 rubles.

Final cost


So, how much does a kit of such video surveillance cost? As a webcam, we take the popular Logitech C270 model with a resolution of 1280x720.

Prices for April 2017:

  1. TP-Link TL-MR3020 router - 1200 rub.
  2. webcam Logitech C270 HD Webcam - 1300 rubles.
  3. USB hub - 300 rubles
  4. USB stick 16 GB - 400 rub.

Total 3200 rubles.

If you need to connect to the camera cloud service, then there will be additional costs:


Many people already have a USB hub and a USB flash drive, and this model of router and webcam is very popular and you can buy them with your hands 2 times cheaper than the market value.

Source: https://habr.com/ru/post/325722/


All Articles