# Zones & Tripwires

By the end of this page your camera will watch the yard and ignore people walking past on the road, and you will be able to tell "coming home" from "leaving". Drawing a zone is the single most effective way to cut false alarms — usually far more effective than tuning thresholds over and over.

> **ℹ️ Before you start**
>
> Detection zones and tripwires are a **Pro feature** and need a Pro license. The camera has to be enabled — the editor uses the current picture as its backdrop, and a disabled camera has no snapshot, so the button does nothing. Where: Cameras → find that camera → "Detection zones" on its card.

## 1. Pick the right zone type first

The same editor holds four kinds of zone. They do completely different things, and if you pick the wrong one no amount of tuning will help.

| Type | What it does | When to use it |
| --- | --- | --- |
| **Alert zone** | Fires "Zone Enter", "Loitering" and "Overspeed" events when a target comes in | You want "tell me when someone comes into the yard" |
| **Detection zone** | Only targets inside the zone count; anything outside is not looked at | The camera also sees the road, and you only care about your own yard |
| **Ignore zone** | Targets inside are dropped outright and produce no events at all | There is a tree that keeps swaying, or a TV that is always playing |
| **Fall-ignore area** | No fall alerts inside, while people are still detected and faces still recognized | Somewhere people lie down to rest, such as the sofa |

> **ℹ️ What happens when several are drawn**
>
> Several detection zones are unioned — being inside any one of them counts. When a detection zone and an ignore zone both exist, the **ignore zone wins**: once something is dropped by the ignore zone, no detection zone brings it back.

## 2. Drawing a zone

1. **Open the editor**

   **Where**: Cameras → that camera → click "Detection zones".
   **How you know it worked**: the camera's current picture appears, with the "Existing zones" list underneath.

2. **Draw a polygon on the picture**

   **What to do**: click the picture to drop vertices one at a time, at least 3. Press Enter or click "Finish" to end; double-clicking, or clicking back on the first point, closes the shape too. Backspace undoes a point, right-click removes one, and dragging a vertex fine-tunes it. To cover the entire picture you do not have to draw at all — just click "Whole frame".
   **How you know it worked**: with 3 or more vertices the shape locks and the hint turns into "Locked · drag vertices to fine-tune".

3. **Name it and choose the type**

   **What to do**: put something recognizable in "Name" ("Front door", say), and choose "Zone type" from the table in the previous section.

4. **Limit the target types (optional)**

   **What to do**: tick People / Vehicles / Animals under "Target types". Nothing ticked = every type counts.
   **How to use it**: tick only People for the detection zone over the yard and a passing cat stops triggering it.

5. **Save**

   **What to do**: click "Create".
   **How you know it worked**: it shows up in the "Existing zones" list. **It takes effect immediately, no restart needed**.

> **💡 Changing resolution will not shift it**
>
> Vertex coordinates are stored normalized, so they work on the main stream and the substream alike and survive a change of camera resolution — no redrawing needed.

## 3. The three parameters actually worth tuning

- **Inertia (frames before counted as entered)** — raise it and a brief flicker no longer counts, which cuts false triggers. For an **ignore zone it works the other way round**: the target has to be outside for N consecutive frames before the ignore is released, so nothing leaks when it jitters back and forth along the boundary.
- **Min confidence** — raise it and only targets the system is quite sure about take part in this zone's judgment. Note that an **ignore zone does not use this parameter**: the less certain a target is, the more it ought to be ignored, so there is no score floor there.
- **Ignore match mode** — "Foot point" (the default) = ignored only when the feet are inside the zone, so someone standing outside whose box merely clips the zone is kept; "Overlap" = ignored as soon as the box touches the zone, which is more aggressive and suits "never report anyone near the doorway", at the cost of also catching close foreground targets standing outside.

## 4. Only alert when someone has been there a while (loitering)

1. **Create an alert zone**

   **What to do**: draw a zone as above and set the type to "Alert zone".

2. **Enter the loitering seconds**

   **What to do**: put a number of seconds in "Alert after staying this long", 0 = off.
   **How you know it worked**: someone standing in the zone that long produces a "Loitering" event.

3. **Turn on "Skip people you know"**

   **Why**: family members stand at the door for a moment every day, and without this nobody reads the alerts for long. People already in the People Library and recognized on the spot do not trigger it; **strangers still do**.

> **💡 Covering the whole living room**
>
> For a whole-frame judgment like "someone is lingering in the living room", just click "Whole frame" instead of clicking vertices along the skirting board.

## 5. Draw a tripwire to tell coming home from leaving

A tripwire has nothing to do with detection zones and is configured separately. It does not judge whether something is inside an area, but which way it crossed a line.

1. **Switch to tripwires**

   **Where**: "Entry/Exit Direction (Tripwire)" on the same page.

2. **Draw the line and set the direction**

   **What to do**: click twice on the picture to place endpoints A and B. The green arrow marks the forward direction; if it points the wrong way, click "Flip direction". Dragging an endpoint fine-tunes it.

3. **Name both directions**

   **What to do**: put "Front Door" in "Name", "Coming home" in "Forward label" and "Leaving" in "Reverse label"; the From / To sides default to Outside and Inside.
   **How you know it worked**: the line underneath reads "Forward: Outside → Inside".

4. **Choose the target type**

   **What to do**: the default is Person. Judging only people at a doorway avoids false triggers from the big boxes cars and scooters produce; for a garage, pick Vehicle.

5. **Save and verify**

   **What to do**: save, then walk across and back again.
   **How you know it worked**: two events with opposite directions appear in the Event Center, and their "Direction" field shows the two names you entered.

> **⚠️ "Suppress object-detection alert on crossing" comes as a pair**
>
> With it on, a target crossing this tripwire **only sends the direction alert and no longer sends a separate "someone is here"**. That assumes you have already set up a direction notification rule for this tripwire — without one, such a target produces no notification at all from then on. Build the rule in [Automation](/docs/automation) first, then come back and turn this switch on.

## 6. Common questions

- **I drew a zone and it still reports people on the road** — first check that its type is "Detection zone" and not "Alert zone"; then check whether "Target types" has other types ticked but not People.
- **Tree shadows and lights keep triggering false alarms** — cover that patch with an ignore zone. Start with the default "Foot point" match mode, and switch to "Overlap" if things still slip through.
- **Lying on the sofa watching TV gets reported as a fall** — cover the sofa with a "Fall-ignore area". Careful about using it on a bed: if someone falls into the gap between the bed and the wall, their lower body is hidden by the bed and they may be taken for still lying in bed, so nothing is reported.
- **Do I have to restart after changing a zone** — no, saving is enough.
- **"Detection zones" will not open** — the camera is disabled (the editor needs the picture as a backdrop), or you are not currently on a Pro license.

## Related guides

- [AI Detection](/docs/detection) — detection order, thresholds and cooldowns
- [Automation](/docs/automation) — letting zone and tripwire events trigger notifications, announcements and lights
- [Event Center](/docs/events) — reviewing zone events and marking false positives

---

Source:https://yun-kan.com/en/docs/zones
