# Camera monitoring

> How to bring a site's CCTV cameras into Vigil. A gateway on site connects the cameras, and the control room watches live video and frames beside patrols.

Source: https://vigilsecure.net/docs/examples/camera-monitoring/

**The scenario.** A client's site already has network cameras. The control room wants to
look at them from the same place it follows patrols and talks to guards, and to be able to
send the guard on site to check what a camera shows.

> **Rolling out:** [Cameras](https://vigilsecure.net/docs/concepts/cameras.md) is being rolled out and is switched on for each
> organization by Vigil. Check **Organization → Features**, and
> [contact us](mailto:admin@vigilsecure.net) to have it enabled.

## How Vigil represents it

| The real world                      | In Vigil                                                         |
| ----------------------------------- | ---------------------------------------------------------------- |
| The site's camera network           | A **gateway**: a small program on a computer at the site         |
| Each camera                         | A **camera**, discovered by the gateway                          |
| Looking at a camera now             | A **live stream**, started when somebody opens the camera        |
| What the camera saw recently        | **Frames**: stills sent by the gateway                           |
| "There is a person in this picture" | **Labels** from object detection on a frame                      |
| Sending somebody to look            | A message or a patrol request to the guard signed in at the site |

## Set it up

1. In the console, open **Infrastructure → Cameras** and choose **Link gateway**. The
   dialog has the gateway downloads for Windows, macOS and Linux.
2. Unzip and start the gateway on a computer at the site that can reach the cameras. It
   writes its **Gateway ID** to `data/README.md` in its folder. Enter that ID in the
   **Link gateway** dialog.
3. Add each camera's username and password to the gateway's credentials file, on that
   computer. The credentials stay on site.
4. The cameras the gateway finds appear in the console by themselves. Each shows **Live**
   or **No signal**.

Steps 2 and 3 are a job for whoever looks after the site's cameras or computers. The
computer and the cameras must be on the same network. Nothing has to be opened on the
site's firewall, because the gateway only connects out to Vigil.

## What the control room does

1. An operator opens **Cameras** and sees a card for each camera with its latest frame.
2. They open the camera at the back fence. Live video starts. If the camera can move, they
   pan and tilt it.
3. They scroll back through the frames and turn on **Labels** to see what was detected in
   each still.
4. Something looks wrong. In **Communication** they message the guard signed in at the
   site, or ask an agent: "Ask whoever is at the depot to check the back fence now." (Asking
   an agent who is at a site needs **See device locations**.) The
   guard gets a one-beacon patrol and scans the checkpoint when they are there.

The camera, the request and the guard's scan are then on record together.

## What to know

- **Video is not recorded.** A live stream runs only while somebody is watching. Vigil
  keeps recent frames, not footage. Keep your existing recorder for evidence.
- **Bandwidth.** A stream uses the site's upload connection only while it is being watched,
  and everyone watching shares one stream.
- **Privacy.** Cameras are visible to the members of your organization. Decide who needs
  them, and tell the client which cameras you connect.

## Related

- [Cameras](https://vigilsecure.net/docs/concepts/cameras.md)
- [Guard patrols](https://vigilsecure.net/docs/examples/guard-patrols.md)
