Automation
Connect your cameras' detection events to notifications, announcements, and smart home. One rule = trigger + condition + action.
What is an automation rule
One rule = trigger (which event wakes it) + condition (whether the current environment qualifies) + action (what to do). Example: "a stranger is recognized at the front door, and it's currently night → push to my phone + make an announcement on the living-room camera".
Web admin → Automation → New rule. There are 13 built-in preset templates (stranger visit, known-face welcome, fall alert, fall + HA light, baby-cry reminder, gesture SOS alert, gesture-triggered scene, vehicle-arrival HA device, auto-disarm HA on leaving, loitering webhook, etc.); pick one, tweak the parameters, and you're ready; or build from a blank rule.
Trigger: which event wakes the rule
Automation is triggered only by camera detection events — there's no "scheduled / cron" trigger and no "MQTT message received" trigger. The trigger has two layers: event type + subject filter.
Event type
- Motion, objects (person / vehicle / cat / dog, etc.)
- Face recognition, license plate recognition
- Fall, baby cry, gesture
- Enter zone / leave zone / zone empty / loitering
- Frame brightness change
Subject filter
On top of the event type, pick "who":
- Any — don't filter by subject
- Person — any person / family only / strangers only (for family, you can also specify a name)
- Vehicle — any vehicle / a specific plate number
- Gesture — a specific gesture (e.g. SOS, OK, heart)
You can also constrain: the range of triggering cameras, the sensitive-zone range, a minimum confidence, and a cooldown / throttle time (to prevent repeated triggering in a short window).
Condition: re-check the environment after waking
After a rule is woken by an event and before it runs the action, you can add extra conditions (multiple conditions are ANDed and all must hold to execute). There are currently two:
- Time window — daily
HH:MM~HH:MM+ restricted to certain weekdays, supporting crossing midnight and negation ("don't disturb during work hours"). Note it's a time window, not a cron expression. - Frame brightness — passes only when the frame is "dark" or "bright". Typical use: "someone enters + it's dark right now" before turning on a light.
Action: what the rule does
A rule can have multiple actions, executed in order. There are 5 types:
| Action | Description |
|---|---|
| Push notification | Pushed to the mobile app + web admin (no email / SMS) |
| TTS announcement | Synthesized speech, played through the camera speaker |
| Webhook | An HTTP request to any URL (connect a Feishu/Lark bot / IFTTT / your own service) |
| MQTT publish | Publish a message to an MQTT broker |
| Home Assistant service call | Call HA directly: turn on a light / toggle a switch / run a scene; see 〈Home Assistant〉 below |
Text variables
You can use {{variable}} in the notification text, TTS text, webhook body, MQTT payload, and HA parameters; SkyView substitutes the event's actual values at execution time. Common variables:
| Variable | Meaning |
|---|---|
{{camera_name}} | The name of the camera that triggered the event |
{{event_type}} | Event type (person / fall / gesture …) |
{{face_name}} | The recognized person's name (face events) |
{{zone_name}} | The triggered sensitive zone's name |
{{gesture_label}} | The recognized gesture (gesture events) |
{{event_time_iso}} | When the event occurred |
{{confidence}} | Recognition confidence |
{{camera_name}}. Single braces {camera} or a wrong name (e.g. {name}) won't be substituted and will appear literally in the text.TTS announcement
SkyView has built-in speech synthesis; the whole flow runs inside SkyView and depends on no external service.
- 1
Choose a voice
6 Chinese voices: Xiaoxiao / Yunxi / Yunyang / Xiaoyi / Yunjian / Xiaobei (Northeastern dialect), with adjustable rate and pitch; you can preview directly in the browser while editing a rule.
- 2
Write the text
Supports
{{variable}}(see the previous section), e.g. "{{camera_name}} recognized {{face_name}}". - 3
Pick the target camera
The announcing camera need not be the one that triggered the event (the front door detects a person, and the living-room camera can announce); the target camera must support the ONVIF backchannel.
- 4
Test
After saving, click "Test" on the rule to run it once and see the result.
Collision protection
Webhook example
Push to a Feishu/Lark bot: choose the Webhook action, set the URL to the Feishu bot's webhook address, and fill the body template:
{"msg_type":"text","content":{"text":"{{camera_name}} detected {{event_type}}"}}SkyView substitutes {{camera_name}}, {{event_type}}, etc. with actual values before sending.
Home Assistant
SkyView and Home Assistant have two integration methods, independent of each other — use just one, or both.
Method 1: SkyView controls HA directly (recommended)
Have SkyView turn on a light / toggle a switch / trigger a scene directly after detecting an event. No MQTT needed.
- 1
Generate a long-lived access token in HA
Home Assistant → click your username at the bottom left → Security → Long-lived access tokens → Create, and copy that token.
- 2
Enter the HA connection in SkyView
Web admin → Settings → Automation → the "Home Assistant" panel, fill in the HA address (e.g.
http://homeassistant.local:8123) and the token you just created, and save. - 3
Add a "Home Assistant service call" action to the rule
SkyView automatically pulls the entity and service lists from HA, so you select from a dropdown (e.g. "turn on living-room light" =
light.turn_on+ the matching light entity) without typing entity_id by hand.
Method 2: SkyView as a sensor in HA (MQTT)
If you want the reverse — see SkyView's zone-occupancy sensors in HA and write automations on the HA side — go through MQTT discovery.
- 1
Install Mosquitto in HA
HA → Settings → Add-ons → Mosquitto broker, install with defaults, and note the username and password.
- 2
Configure MQTT in SkyView
Web admin → Settings → Automation → the "MQTT" panel, fill in the broker address / port / username / password and enable it.
- 3
Auto-registration
SkyView registers each sensitive zone's occupancy status as a binary_sensor in HA, visible on the HA side immediately.