Cloud surveillance from a webcam and router

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

We will need:

  • TP-Link router TL-MR3020
  • webcam (with MJPEG support)
  • USB hub
  • USB stick

The webcam and 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 detector.

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 Functions:

  • motion detection in specified zones with recording 2 frames per second
  • saving frames at a given time interval
  • storing the archive on a USB stick
  • archive recording to the cloud (optional)

Of course, 2 frames per second is more likely not video surveillance, but video surveillance, but still for many tasks this is enough.

Why can I use this system:

  • Surveillance in an apartment, house, in the country
  • Babysitting
  • Pet friendly
  • Office staff control
  • Visual control of equipment (heating devices, gas equipment, etc.)

How to build and configure the system


  1. Download the latest version of WebGlazok firmware from the official website
  2. We go to the control panel of the router at 192.168.0.254
  3. We update the firmware 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 with the name WebGlazok.com_XXX

    Switch on the router
    image

  5. We are connected to this network, the password is the MAC address of the router (printed on the case)
  6. We go to the control panel of the router at the address 192.168.1.1 , login admin, password admin.
  7. In the control panel, we set the sensitivity of motion detection, motion zones and the interval for receiving frames:

    WebGlazok Router Control Panel
    image

  8. It is advisable to specify a Wi-Fi network for connecting 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, upon detecting movements, saves frames to the USB flash drive at a speed of 1-2 frames per second. In the absence of movements, frames are saved for a specified time interval.

The flash drive stores JPEG frames in folders with the following structure /cam1/date/hourminutes/file.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 frames 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 with movements in about 5% of the time. After the memory is full, old frames are deleted from the flash drive.

The system can work completely autonomously and without an internet connection.

However, this model of the router does not have a 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 practically not consumed. Even a weak 2G Internet is suitable. Outside the city, the Internet can be distributed through a 3G / 4G router or a regular router with a connected 3G / 4G modem.

Offline work


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

The power supply voltage of the router is 5 V, the measured current strength during camera operation is 0.6 A, and 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 pictures on a flash drive is not very convenient. To find an event of interest, you need to scroll through all the files on the computer.

A router with WebGlazok firmware has the ability to save frames to the cloud and glue them there in a video sequence. 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, and also register the camera on the WebGlazok.com website and get the device key.

In your personal account, the camera’s activity tape and the picture from the camera are displayed. Detected movements are marked in red on the tape.

From your personal account you can also configure the camera:

  • motion sensor sensitivity
  • motion detection zones
  • frame saving interval
  • Notification settings

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

The router sends low-resolution frames (preview) to the cloud, which occupy 5-20 Kb. Therefore, little traffic is consumed. Such a resolution is enough to see the situation, but for a detailed view you need a frame with full resolution.

Preview frame
image

In your personal account (in a browser or mobile application), when you stop on the 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 stick 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 personal account changes to full-size (HD). When you re-request, the HD frame already opens quickly, as it is already saved in the cloud.

HD frame
image

Table of the ratio of the resolution of the frame and the preview frame:

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

IP camera connection


The webcam is inexpensive and compact, easy to connect and install. However, if you need night shooting and installation on the street, then you can not do without an IP camera.

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

An IP camera only needs a JPEG image or MJPEG stream. Modern IP cameras that support the ONVIF protocol are able to give snapshots.

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

Final cost


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

Prices for April 2017:

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

Total 3200 rub.

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

  • 199 rub per month for cloud storage
  • Internet payment, about 2 GB a month

Many already have a USB hub and a USB flash drive, and this model of router and webcam is very popular and you can buy it 2 times cheaper than the market price.

Also popular now: