Cloud video surveillance from a web camera and router

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

We will need:

the
    the
  • router TP-Link TL-MR3020
  • the
  • webcam (with MJPEG support)
  • the
  • USB hub
  • the
  • USB flash drive

Webcam and USB flash drive plug into a USB port on the router via a USB hub. The router is set firmware WebGlazok. Firmware created on the basis of OpenWrt and use the software motion detector Motion.

Get a simple video surveillance system with the function of motion detection and cloud storage, which does not require the computer, the DVR and white IP address.

Available functions:

the
    the
  • motion detection in specified areas with recording 2 frames per second
  • the
  • and save frames in the given time interval
  • the
  • storage of files on a USB flash drive
  • the
  • record files to the cloud (optional)

Of course, 2 frames per second — this is more surveillance, and fotooblucheniya, but for many tasks this is sufficient.

Why would you use such a system:

the
    the
  • surveillance in the apartment, house, dacha
  • the
  • childcare
  • the
  • pet sitting
  • the
  • control over the staff in the office
  • the
  • Visual inspection of the equipment (heating appliances, gas equipment, etc.)

How to assemble and configure the system


    the
  1. Download the latest firmware WebGlazok with official website
  2. the
  3. Go to the control panel of the router at 192.168.0.254
  4. the
  5. Perform a firmware upgrade of the router, putting the downloaded firmware file:

    Upgrade FOR router
    image

  6. the
  7. Move the switch on the router in the AP position, the router will create a Wi-Fi network with the name WebGlazok.com_XXX

    Switch to router
    image

  8. the
  9. Connect to the network, the password is the MAC address of the router (printed on casing)
  10. the
  11. Go to the control panel of the router at 192.168.1.1, username admin, password admin.
  12. the
  13. In control panel, set the sensitivity of motion detection zone of motion and the interval of shots:

    control Panel router firmware WebGlazok
    image

  14. the
  15. it is Desirable to provide Wi-Fi network to connect to the Internet, it is necessary for time synchronization and send the pictures to the cloud

How it works


The router analyzes the camera image and the detection of movements keeps footage on a flash drive with a speed of 1-2 frames per second. In the absence of movements of the frames stored for a given time interval.

On the flash drive JPEG frames are stored in folders with the following structure /сам1/дата/часыминуты/файл.јрд

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

Images are stored in 2 copies — preview and full resolution photos. To view the recorded footage through a computer, inserting a USB flash drive.

In my experience of using the stick 16 GB is enough for about 2 weeks archive storage in the presence of the movements in about 5% cases of all time. After the memory is full, old frames removed from the stick.

The system can work completely offline, without Internet connection.

However, this model router has no internal clock, so the time the footage is exposed correctly. At power off time "stops".

To solve this problem, the router must be connected to the Internet via Wi-Fi. Then the time is synchronized via the Internet. The traffic is almost not consumed. Suitable even weak 2G Internet. Over the Internet can be distributed via 3G/4G router or a regular router with a connected 3G/4G modem.
the

Standalone operation


The router works from the USB power connector, so when no power outlets are 220 V it can be powered, for example, from mobile battery (powerbank).

Power to the router 5, the measured current intensity at the camera — 0.6 A power of 3 watts. Thus USB powerbank capacity 10000 mAh (36 WH) will last for 12 hours.br>
You can also connect a car battery with a Converter from 12 V To 5 V.

the

If you need online viewing


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

Router firmware WebGlazok has the ability to save footage to the cloud and there to glue them in the video. And you will be able to view the camera through a browser or mobile app. However, this service is paid and costs 199 rubles per month (April 2017).

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

In a personal account shows the activity feed of the camera and the camera. Detected motion are marked red on the ribbon.

From the personal account is also used to configure the camera:

the
    the
  • sensitivity of motion sensor
  • the
  • zone motion detection
  • the
  • spacing retention
  • the
  • notification settings

In the mail notification about the movements with the attached frames, the alert camera is disconnected from the network and loss of signal.

The router sends to the cloud frames with low resolution (preview), which is at 5-20 KB. So traffic consumes little. This resolution is sufficient to see the situation, but to enlarge the desired picture in full-resolution.

Frame preview
image

In personal account (in the browser or mobile app) when you stop on the frame of the preview more than 2 seconds, the router sends a request to get a full-size frame high resolution. The router looks for the frame on a USB flash drive and sends it to the cloud. The process takes 10-30 seconds depending on Internet speed, then the preview frame in a personal account is changed to full (HD). When prompted again, the HD frame is a fast as it is already saved in the cloud.

HD frame
image

The table of ratios between picture resolution and frame preview:

camera Resolution / Resolution preview
640x480 / 320x240
1280x720 / 320х180
1280x960 / 320x240
1920x1080 / 240x135
1600x1200 / 200x150

the

Connecting IP cameras


Webcam cheap and compact, easy to connect and install. However, if you need night photography and installation on the street, without an IP camera is not necessary.

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

The IP camera requires only the image format is JPEG or MJPEG stream. Modern IP cameras that support ONVIF Protocol, can give a snapshot.

All Analytics motion detection also occurs on the router. You can buy cheap Chinese camera on Aliexpress for 1300-1800 RUB.

the

Final value


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

Rates for April 2017:

    the
  1. router TP-Link TL-MR3020 1200 RUB
  2. the
  3. webcam Logitech C270 HD Webcam 1300 RUB
  4. the
  5. USB hub 300 RUB
  6. the
  7. USB stick 16 GB 400 RUB

total 3200 RUB

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

the

    199 RUB a month for cloud storage the

  • payment Internet, about 2 GB a month

USB hub and USB drive many are already available, and the model of the router and the webcam are very popular and you can buy them with in 2 times cheaper than its market value.
Article based on information from habrahabr.ru

Комментарии

Популярные сообщения из этого блога

Briefly on how to make your Qt geoservice plugin

Database replication PostgreSQL-based SymmetricDS

Developing for Sailfish OS: notifications for example apps for taking notes