Event Engine Use Cases & Templates
User Manual GitHub

Use Cases & Templates

Ready-to-import rule templates demonstrating what Event Engine can do. Download a template, import it into the web UI, customise the placeholders, and you're running.

How to import: Open the Event Engine web UI → Rules tab → click Import → select the downloaded .json file. You can also POST directly to the API: POST /local/acap_event_engine/rules?action=import

1 — Notifications & Data Transmission

Push alerts to people and push data to systems. The camera becomes an edge sensor node that detects, formats, and delivers — over HTTP, MQTT, SMTP, or directly into time-series databases.

1.1 Environmental Sensor Data Transmission

An Axis environmental sensor periodically reads sensor values and transmits them to external systems. Three templates cover the main approaches.

1.1a — Power BI Real-Time Dashboard

schedule (interval) vapix_query http_request

Push sensor data directly to a Power BI streaming dataset via its REST API — the camera feeds the dashboard with no gateway in between.

  1. A schedule trigger fires every 60 seconds
  2. A Device Event Query action fetches cached sensor data (temperature, humidity, CO₂) and injects them as {{trigger.FIELD}} variables
  3. An HTTP Request action POSTs a JSON array to the Power BI streaming dataset endpoint
Setup: In Power BI, create a Streaming dataset (API type) with columns: timestamp (DateTime), camera_serial (Text), camera_model (Text), temperature (Number), humidity (Number), co2 (Number). Copy the push URL into the template.

1.1b — Direct InfluxDB Ingestion (Grafana)

schedule (interval) vapix_query influxdb_write

Write time-series data points directly into InfluxDB — the camera is the data pipeline, ready to query in Grafana.

  1. A schedule trigger fires every 60 seconds
  2. A Device Event Query fetches cached sensor data
  3. An InfluxDB Write action writes a data point with temperature, humidity, CO₂ as fields and the camera serial as a tag

1.1c — MQTT to Home Assistant

schedule (interval) vapix_query mqtt_publish retain

Publish sensor data over MQTT using Home Assistant topic conventions — sensors appear in HA with retained state updates every 60 seconds.

  1. A schedule trigger fires every 60 seconds
  2. A Device Event Query fetches cached sensor data
  3. An MQTT Publish action sends a retained JSON payload to homeassistant/sensor/<serial>/environment/state

1.2 Multi-Platform Motion Alerts

When motion is detected during office hours, send an alert with a camera snapshot to Slack, Microsoft Teams, and email simultaneously.

vapix_event (Motion) time_window slack_webhook teams_webhook email cooldown 30s attach_snapshot
  1. A Device Event trigger subscribes to Motion Detection (active = true)
  2. A Time Window condition restricts to weekdays 08:00–18:00
  3. Three actions run in sequence: Slack webhook, Teams webhook, and Email — each with snapshot attachment

1.3 Daily Activity Digest

Buffer all motion events throughout the day and send a single summary email at 18:00 — a daily activity report for facility managers.

vapix_event (Motion) schedule (daily_time) digest event buffering
  1. A Device Event trigger fires on motion detection
  2. A Notification Digest action buffers each event as one line with timestamp
  3. A second schedule trigger at 18:00 ensures the digest flushes daily

2 — Device Control

Automate camera hardware: imaging, PTZ, overlays, privacy masks, illumination, audio, wiper — in response to events, schedules, or external commands.

2.1 Sunrise / Sunset IR & Light Management

At sunset, switch to night mode and turn on the IR illuminator. At sunrise, switch back to day mode. Times follow the sun — no fixed schedule.

schedule (astronomical) ir_cut_filter light_control max_executions 1/day
  1. Two rules use astronomical schedule triggers (sunset and sunrise)
  2. The sunset rule sets IR Cut Filter to night and Light Control on at 80% intensity
  3. The sunrise rule mirrors it: IR to day, light off

2.2 Event-Driven Privacy Zones

Privacy masks follow a GDPR schedule but can be overridden instantly during emergencies via MQTT or webhook.

2.2a/b — Scheduled Privacy (Business Hours)

schedule (daily_time) variable_compare privacy_mask max_executions 1/day
  1. Two rules with daily schedule triggers — 08:00 and 18:00 weekdays
  2. A Variable Compare condition skips if emergency override is active
  3. Privacy Mask actions enable or disable the named mask

2.2c/d — Emergency Override

mqtt_message http_webhook set_variable privacy_mask overlay_text cooldown 10s
  1. An MQTT Message trigger on building/emergency/+ with an HTTP Webhook fallback
  2. The emergency rule sets system.privacy_mode = override, disables the mask, and shows a warning overlay
  3. The clear rule restores system.privacy_mode = normal — scheduled rules resume

2.3 PTZ Auto-Tracking with Guard Tour Resume

A PTZ camera runs a guard tour. On human detection, pause the tour, go to a close-up preset, hold 30 seconds, then resume.

aoa_scenario guard_tour ptz_preset delay cooldown 60s
  1. An AOA Scenario trigger fires on human detection
  2. Guard Tour stop → PTZ Preset go to close-up → Delay 30s → Guard Tour start

2.4 Motion → Audio Clip

Play a pre-uploaded audio clip through the camera speaker when motion is detected — deterrent or staff alert.

vapix_event (Motion) audio_clip cooldown 10s
  1. A Device Event trigger subscribes to Motion Detection
  2. An Audio Clip action plays the selected clip

2.5 Scheduled Wiper

Run the camera wiper every morning at 07:00 to clear overnight condensation or debris.

schedule (daily_time) wiper
  1. A schedule trigger fires daily at 07:00
  2. A Wiper action starts the primary wiper

3 — Security & Surveillance Automation

Combine detection triggers with conditions and multi-step action chains for intrusion response, access control, and occupancy monitoring — entirely on the edge.

3.1 Perimeter Intrusion Response

Person detected in a restricted zone after hours while armed → full response: recording, siren, I/O alarm, Telegram snapshot, live-stream overlay.

aoa_scenario time_window variable_compare recording siren_light io_output telegram overlay_text cooldown 120s max_executions 10/hr attach_snapshot
  1. An AOA Scenario trigger detects humans in the perimeter
  2. Time Window (19:00–06:00) + Variable Compare (system.armed = true) must both pass
  3. Five actions: Recording → Siren/Light → IO Output (30s) → Telegram (snapshot) → Overlay Text (60s)

3.2 Smart Access Control

I/O input from a card reader. Business hours: release door, record, count. After hours: alert only.

io_input time_window io_output recording increment_counter telegram cooldown 3s attach_snapshot
  1. An I/O Input trigger on port 1 (rising edge) from the card reader
  2. Business hours rule: Time Window 08:00–18:00 → IO Output (door strike 5s) + Recording + Increment Counter
  3. After-hours rule: Time Window 18:00–08:00 → Recording + Telegram alert with snapshot

3.3 Occupancy Monitoring with Escalation

AOA counts people. Warning overlay at 20, Slack alert + I/O indicator at 30.

schedule (interval) aoa_occupancy aoa_get_counts overlay_text slack_webhook io_output cooldown 25s
  1. Schedule triggers every 30 seconds poll AOA counts via AOA Get Counts
  2. Warning rule: occupancy ≥ 20 → Overlay Text
  3. Critical rule: occupancy ≥ 30 → Slack webhook + IO Output

4 — Speaker Display

Drive the screen on Axis speaker-display devices (e.g. C1710). Data can come from MQTT messages, HTTP webhooks, or direct polling of another Axis device.

4.1 Live Queue Ticket Display

Ticketing system publishes MQTT updates → display shows current ticket number and queue length instantly.

mqtt_message speaker_display
  1. An MQTT Message trigger on queue/reception/update
  2. A Speaker Display action renders ticket number and wait count on a dark-blue background
Setup: Configure your ticketing system to publish {"current":"A047","waiting":3} to the topic. Adjust the topic in the template.

4.2 Air Quality Monitor (MQTT)

Three rules work together: live dashboard on green, critical alert override in red, all-clear to resume.

4.2a — Live Data Dashboard

mqtt_message variable_compare speaker_display

MQTT trigger on sensors/airquality/data → display CO₂, PM2.5, temp, humidity on green background. Suppressed when alert is active.

4.2b — Critical Alert Override

mqtt_message set_variable speaker_display while_active cooldown 60s

MQTT payload critical → set system.airquality_alert = active → red scrolling alert that persists until cleared.

4.2c — All Clear

mqtt_message set_variable speaker_display

MQTT payload clear → reset variable → brief green confirmation → live dashboard resumes.

Setup: Configure your air quality gateway to publish JSON readings to sensors/airquality/data and threshold status to sensors/airquality/status.

4.3 Direct Axis Sensor → Speaker Display

The display polls an Axis air quality sensor directly every 60 seconds — no MQTT broker, no gateway, no middleware.

schedule (interval) vapix_query (remote) speaker_display format specifier |N
  1. A schedule trigger fires every 60 seconds
  2. A Device Event Query targets the remote sensor and queries Environment / AirQuality
  3. A Speaker Display action renders {{trigger.CO2|0}}, {{trigger.Temperature|1}}, {{trigger.Humidity|0}}
Setup: Replace remote_host, remote_user, remote_pass with the sensor's IP and credentials.

4.4 Webhook-Driven Speaker Display

A BMS or automation platform POSTs air quality data over HTTP — no MQTT broker required. Each POST instantly updates the screen.

http_webhook speaker_display
  1. An HTTP Webhook trigger receives POSTs with a JSON payload
  2. A Speaker Display action renders the values, held for 5 minutes or until the next POST
Setup: POST to http://<ip>/local/acap_event_engine/fire?token=airquality-display-update with body {"payload":{"co2":750,"pm25":8,"temperature":21.5,"humidity":45}}

5 — System Management

Control the engine's operational mode, maintain counters and variables, and provide observability — the building blocks that other rules depend on.

5.1 Arm / Disarm via MQTT

A single MQTT publish arms or disarms all rules that gate on system.armed.

mqtt_message set_variable send_syslog payload filter
  1. Two rules listen on cameras/{{camera.serial}}/arm — payload arm or disarm
  2. Each sets system.armed and logs to syslog

5.2 Daily Counter Reset

Reset daily counters (door_access, motion_count) to zero at midnight.

schedule (daily_time) set_variable send_syslog

5.3 MQTT Heartbeat

Publish a status payload every 60 seconds so monitoring systems can detect device silence.

schedule (interval) mqtt_publish

5.4 Maintenance Mode via MQTT

MQTT enable/disable maintenance mode — suppresses alert rules and shows an overlay on the live stream.

mqtt_message set_variable overlay_text send_syslog payload filter

5.5 Remote Rule Control via MQTT

Dynamically enable or disable any rule by ID from a central automation system.

mqtt_message set_rule_enabled send_syslog payload filter
Setup: Replace REPLACE_WITH_TARGET_RULE_ID with the UUID from the target rule's settings panel.

6 — Cross-Device Automation

Detect on camera A, check state on camera B, act on device C. A single Event Engine instance orchestrates a multi-device workflow.

6.1 I/O Input → Remote I/O State → Speaker Display

Door sensor opens on camera A. Only alarm if camera B's sensor is also active — then show alert on a remote speaker display.

io_input io_state (remote) speaker_display (remote) cooldown 30s cross-device

6.2 AOA → Remote Occupancy Condition → Alert

Camera A detects a person, but only alerts if camera B also counts occupancy > 0 — confirming it's not a false positive.

aoa_scenario aoa_occupancy (remote) speaker_display (remote) mqtt_publish cooldown 60s cross-device

6.3 Remote Sensor Data Relay

Poll environmental data from a remote Axis sensor every 60 seconds and publish over MQTT with decimal formatting.

schedule (interval) vapix_query (remote) mqtt_publish format specifier |N retain cross-device

7 — Advanced Patterns

Templates demonstrating the full depth of the engine: compound triggers, counter-driven escalation, cron scheduling, evidence failover, ACAP lifecycle management, VMS integration, and network-aware conditions.

7.1 Counter-Driven Escalation

Count every motion event during the day. When the count hits 50, escalate once — Slack alert, variable update, and optional rule chain.

7.1a — Increment the Counter

vapix_event (Motion) increment_counter cooldown 5s

Every motion event increments motion_count by 1. Pair with 5.2 (midnight counter reset) to keep it daily.

7.1b — Escalate at Threshold

counter_threshold counter set_variable slack_webhook run_rule send_syslog max_executions 1/day

When motion_count >= 50, the counter_threshold trigger fires. A counter condition double-checks, then escalates via Slack and optionally chains to another rule.

Setup: Replace REPLACE_WITH_TARGET_RULE_ID with the UUID of a rule to chain to. Remove the run_rule action if chaining is not needed.

7.2 Compound Trigger — Tailgate Detection

A door sensor and motion detection each fire independently on legitimate events. A tailgate occurs when both happen within 8 seconds of each other.

io_input vapix_event (Motion) time_window recording telegram io_output trigger_logic AND trigger_window 8s attach_snapshot cooldown 30s
  1. trigger_logic: "AND" + trigger_window: 8 — both I/O input and motion must fire within 8 seconds
  2. Time Window restricts to after-hours (18:00–08:00)
  3. Recording (30s) → Telegram snapshot alert → IO Output (alarm relay 5s)

7.3 Night-Only Recording

Record motion only during darkness. No fixed time window — adapts to actual sunrise/sunset at the camera's location across the year.

vapix_event (Motion) day_night (night) recording overlay_text cooldown 30s
  1. Device Event trigger on motion detection
  2. Day/Night condition passes only when the sun is below the horizon
  3. Recording (30s) + overlay text showing detection time

7.4 Snapshot Evidence with FTP Fallback

POST a snapshot to the primary evidence server. If the upload fails, the on_failure chain automatically reroutes to FTP backup storage.

aoa_scenario variable_compare time_window http_request ftp_upload send_syslog on_failure chain attach_snapshot
  1. AOA human detection, armed + after-hours
  2. HTTP Request with attach_snapshot: true POSTs the base64 image to the evidence server
  3. If HTTP fails (any error) → on_failure runs: FTP Upload to backup + Send Syslog warning

7.5 ACAP Service Watchdog

A critical ACAP must stay running. Poll its state every 10 minutes; if it's inactive, restart it, restore a device parameter, and publish an alert.

schedule (cron) vapix_event_state acap_control set_device_param send_syslog mqtt_publish cron schedule cooldown 300s
  1. Cron trigger */10 * * * * fires every 10 minutes
  2. Device Event State condition checks the ACAP's running event — passes only when the ACAP is NOT active
  3. ACAP Control start → Set Device Parameter restore → syslog warning → MQTT alert
Setup: Replace event_key with your ACAP's running event path, and package with its package name.

7.6 Paging Console Scheduled Announcement

Broadcast a pre-configured announcement on an Axis C6110 paging console at the top of every business hour.

schedule (cron) paging_console_execute send_syslog cron schedule
  1. Cron trigger 0 8-17 * * 1-5 — top of every hour, 08:00–17:00, Mon–Fri
  2. Paging Console Execute triggers the pre-configured paging action by UUID
Setup: Replace REPLACE_WITH_PAGING_ACTION_UUID with the action UUID from the C6110 web interface.

7.7 VMS Event Bridge

Trigger from the UI or any external system to emit a VAPIX event that your VMS (ACS, Milestone) is subscribed to — bridging Event Engine automation into VMS workflows.

manual http_webhook fire_vapix_event mqtt_publish send_syslog
  1. Manual trigger (UI "Fire Now" or POST /fire) or HTTP Webhook from any system
  2. Fire VAPIX Event emits RuleFired — the VMS subscribes to this and triggers its own workflow
  3. MQTT Publish + Syslog provide parallel paths

7.8 Security Event Audit Logger

Whenever a critical security rule fires, log it — with condition_logic: OR, only when the system is armed OR any motion activity has been seen today.

rule_fired variable_compare counter send_syslog mqtt_publish condition_logic OR
  1. Rule Fired trigger watches a security rule by UUID
  2. condition_logic: "OR" — logs if system.armed = true or motion_count > 0
  3. Syslog (warning) + MQTT audit topic with variable interpolation
Setup: Replace REPLACE_WITH_SECURITY_RULE_ID with the UUID of the rule to audit.

7.9 Network-Gated Motion Alert

Confirm the notification endpoint is reachable before acting. Silently skip when connectivity is lost — prevents dead-queue flooding in isolated or occasionally-connected deployments.

vapix_event (Motion) http_check time_window slack_webhook attach_snapshot cooldown 30s
  1. Motion detection trigger fires
  2. HTTP Check condition GETs the health endpoint — passes only if HTTP 200 + body ok within 5 seconds
  3. Time Window + endpoint check both pass → Slack alert with snapshot fires
Setup: Replace url and expected_body in the condition with your actual health endpoint.

7.10 Raw Binary Snapshot Upload

POST a raw JPEG snapshot directly to an evidence archive. Unlike http_request with attach_snapshot (which encodes to base64 inside JSON), snapshot_upload sends an RFC-compliant binary image/jpeg body — smaller wire size, no decode step on the server.

vapix_event (Motion) variable_compare (armed) time_window snapshot_upload send_syslog lifetime max_executions cap cooldown 10s
  1. Motion trigger fires; armed + after-hours conditions must both pass
  2. Snapshot Upload GETs a warm JPEG from channel 1 and POSTs it as raw binary with authorization header
  3. max_executions: 500, max_exec_period: "" — hard lifetime cap to prevent storage flooding
Setup: Replace the url and REPLACE_WITH_API_TOKEN in the headers. The receiver must accept Content-Type: image/jpeg binary bodies.

7.11 Paging Console Context Button

Dynamically swap a paging console panel button between an Emergency All-Call action and normal operations — driven by MQTT alarm state. The button a security officer presses always reflects the current posture of the site.

7.11a — Arm: Assign Emergency Action to Slot 1

mqtt_message (armed) paging_console_button send_syslog

On site/alarm/state payload armed: GET the page layout, patch slot 1 to the emergency action UUID, PUT it back.

7.11b — Disarm: Restore Normal Action to Slot 1

mqtt_message (disarmed) paging_console_button send_syslog

On site/alarm/state payload disarmed: patch slot 1 back to the standard operations action UUID.

Setup: In both templates replace REPLACE_WITH_PAGE_UUID with the C6110 page UUID and the action UUIDs with those from your paging console configuration.

7.12 Dual-Zone Breach — AND_ACTIVE

A door sensor and motion detection must be simultaneously active to trigger a breach alert. A door that briefly opens with no concurrent motion (delivery, false latch) is ignored. Motion with the door closed (cleaning staff, animals) is ignored. Only genuine co-occurrence raises the alarm.

io_input (door sensor) vapix_event (Motion) time_window recording mqtt_publish telegram trigger_logic AND_ACTIVE mqtt on_failure → syslog attach_snapshot cooldown 30s
  1. trigger_logic: "AND_ACTIVE" — rule only fires while both triggers are simultaneously in their active state
  2. After-hours Time Window condition passes
  3. Recording (45s) starts; MQTT breach alert publishes (QoS 1)
  4. If MQTT broker is unreachable, on_failure logs a syslog error — so the alert is never silently lost
  5. Telegram snapshot notification sent in parallel
AND_ACTIVE vs AND: AND + trigger_window fires if both triggers fire within N seconds of each other (sequential OK). AND_ACTIVE requires genuine simultaneous presence — both trigger states must be active at the same moment.

7.13 Sparkplug B Telemetry to a SCADA Host

An industrial or building-automation platform (Ignition, Honeywell EBI, Cirrus Link) expects MQTT Sparkplug B. The usual answer is an industrial gateway between the Axis device and the Sparkplug network — here the device is the edge node itself.

schedule (30s) vapix_query sparkplug_publish protobuf NDATA no gateway
  1. A schedule trigger fires every 30 seconds
  2. Device Event Query fetches the latest cached sensor values
  3. Sparkplug B Publish emits them as a protobuf NDATA on spBv1.0/{group}/NDATA/{edge_node}, using the aliases from the birth certificate
Setup: Enable MQTT, then Settings → Sparkplug B Edge Node: set a Group ID and declare the metrics Camera/Temperature, Camera/Humidity and Camera/CO2 as Double. The host discovers them from the NBIRTH automatically.

7.14 Sparkplug B Command Handler

The SCADA host needs to control the device, not just read from it — for example triggering an announcement on a speaker from the operator console.

sparkplug_command audio_clip set_variable sparkplug_publish bidirectional
  1. The host writes the metric Speaker/Play via NCMD
  2. An Audio Clip action plays the clip named in {{trigger.value}}
  3. A Set Variable action records the command
  4. Sparkplug B Publish acknowledges by writing the result back as telemetry, so the host sees the command was carried out
Setup: Declare a Camera/LastCommand (String) metric in Settings. Any metric name works for the trigger — inbound commands do not need to be declared, since only metrics the device publishes appear in the birth certificate.

8 — License Plate Verification (ALPV)

AXIS License Plate Verifier publishes a device event for every plate it reads. Combine it with digital inputs or audio detection so only the plate reads that matter reach a back-end system: either Event Engine sends the push itself (8.1, 8.2), or it switches ALPV's own push on and off so ALPV keeps its native formats such as UTMC (8.3).

Before you start: Use 1.9.18 or later: in 1.9.17 and earlier, two subscriptions to ALPV.AllPlates (two rules, or a trigger plus a Device Event Query) make each rule fire once per subscription. ALPV events appear in the Device Event dropdown as CameraApplicationPlatform / ALPV.AllPlates. ALPV raises this event up to three times per vehicle (carState = new, update, lost); add a text Value Condition carState = new for one event per vehicle (the templates do). Useful fields (ALPV 3.1.7): text (the plate), country, region, carState, carMoveDirection, lpConfidence, capture_timestamp, vehicleType/Make/Model/Color, listName, listMode and lpImage (the plate crop as a base64 JPEG), each available as {{trigger.KEY}}. listName vs. listMode: listName is the list the plate matched and the right field to match on, but current ALPV versions leave it empty on lost events (an ALPV bug, to be fixed in an upcoming version). listMode is not a property of the list: it comes from the Barrier mode settings in ALPV's Access control (allow or block per list, none when the plate is on no list), so block is only the Block list if Access control is set up that way. Templates 8.4 and 8.5 match listMode = block as a workaround until then; check Access control, or change the condition to listName = your list's name. Testing without traffic: /local/fflprapp/api.cgi?api=events_generate&profile=1&plate=TEST123 (ALPV's push Test button) raises the normal ALPV events, and also sends the test to that push profile even when it is disabled. Don't use ACAP Control to stop/start ALPV as a gate (it misses plates while stopped).

8.1 Plate Reads While an I/O Alarm Is Active

An external detector (for example a GNSS jammer/spoofing detector) closes a relay wired to the camera's digital input while its alarm is on. Every plate read during the alarm is pushed; plate reads at other times are ignored.

vapix_event (ALPV.AllPlates, carState=new) io_state http_request trigger_json
  1. A Device Event trigger fires on ALPV.AllPlates with carState = new
  2. An I/O State condition checks that input port 1 is currently active
  3. An HTTP Request POSTs the plate data ({{trigger_json}}) to the receiver
Setup: Set the input's normal state in the camera's I/O settings so that "active" means "alarm on". The input must stay active for the whole alarm. If the detector only pulses its relay, use the correlation pattern from 8.2 with an I/O Input trigger instead of audio. Leave ALPV's own push to the same receiver disabled to avoid duplicates.

8.2 Plate Read Correlated with a Loud Vehicle

A plate is only pushed when audio detection flags a loud vehicle at roughly the same time. The sound and the plate read are both short events and can arrive in either order.

vapix_event (ALPV.AllPlates, carState=new) vapix_event (Audio detection) vapix_query http_request trigger_logic AND trigger_window 10s
  1. trigger_logic: "AND" + trigger_window: 10 (AND → Correlation window in the UI): the plate read and audio detection (triggered = true) must both fire within 10 seconds
  2. Device Event Query reloads the latest ALPV.AllPlates data, because actions receive the data of whichever trigger fired last
  3. An HTTP Request POSTs the plate data to the receiver
Setup: Enable audio and audio detection on the camera and set the trigger level (Alarm level) so a loud vehicle exceeds it. Keep the value filter on the audio trigger: without it the trigger also fires when the sound ends. After the rule fires, both events are needed again before it fires the next time.

8.3 Switch ALPV's Native Push (UTMC) On During an I/O Alarm

The back-end expects ALPV's own message format, for example UTMC-1 or UTMC-2, but plates should only be sent while an external alarm is active. ALPV's push conditions cover lists, regions and direction, not inputs.

io_input (rising / falling) http_request ALPV native push UTMC
  1. 8.3a: input 1 rising → HTTP Request POSTs <cloud_config><enable>true</enable></cloud_config> to http://127.0.0.1/local/fflprapp/cloud.cgi (ALPV push profile 1)
  2. 8.3b: input 1 falling → the same with false
  3. ALPV only updates the fields sent; the rest of the profile is unchanged
Setup: In ALPV, configure push profile 1 (protocol, server, sensor provider ID, location) and leave it disabled. Profiles 2 and 3 are cloud2.cgi and cloud3.cgi. Replace ADMIN_USER/ADMIN_PASSWORD with an administrator account on the device. Plates read in the moment the input changes may be sent or missed, so this suits alarms lasting seconds or longer; for short signals use 8.2.

8.4 Block List Plate to a Milestone XProtect Alarm

Plate lists are managed with AXIS Optimizer and block-list hits must raise a Milestone alarm that shows the plate. ALPV.Block_list carries no plate data, and Milestone's Axis driver raises device events with the topic only, so the alarm's Tag and Object columns stay empty.

vapix_event (ALPV.AllPlates) trigger_data (listMode = block) trigger_data (carID ≠ last blocked car) http_request Milestone Analytics Event snapshots
  1. A Device Event trigger on ALPV.AllPlates, a Trigger Data condition listMode = block (the plate is on a list whose Barrier mode in ALPV's Access control is block; see below), and a second one carID ≠ {{var.alpv_last_blocked_car}} with a Set Variable action storing the carID: one alarm per vehicle, at its first block-list match (the correct plate often only arrives in an update, so filtering on new would miss hits)
  2. An HTTP Request POSTs a Milestone Analytics Event (XML) to the Event Server: the plate goes to the Object column, the country to Tag, vehicle details to the description, and the image ALPV saved for the car (Attach ALPV image: vehicle crop recommended, set in ALPV Settings > Storage > Save full frame) plus ALPV's plate crop as snapshots; text fields use |xml
  3. Source/Name is {{camera.ip}}, so Milestone links the alarm to the camera
Setup: Requires 1.9.19 or later. Alarms can arrive up to about 15 s after the plate read while ALPV saves the vehicle image. In Management Client: enable Tools > Options > Analytics Events (port 9090) and allow the cameras' addresses; add an analytics event named BlockedList (must match <Message>); add an alarm definition on it with the camera(s) as source; add the Object and Tag columns under Alarm Data Settings. In the template replace MILESTONE_EVENT_SERVER; if cameras are added on a port other than 80 use {{camera.ip}}:PORT. Milestone answers Warning: Device not known or Warning: Event message not known on a mismatch.

8.5 Block List Alert on the Video

An operator watching live video should see at once when a block-listed vehicle is in view: a full-screen alert and the plate, shown while the vehicle is in the picture and cleared when it has gone. Often the alert belongs on another camera, for example the overview camera the operator watches.

vapix_event (ALPV.AllPlates) trigger_data (listMode = block) trigger_data (carID vs. shown car) overlay_image overlay_text named overlay remote device
  1. 8.5a: listMode = block, carState ≠ lost and carID ≠ {{var.alpv_alert_car}} → Set Variable stores the carID, Overlay Image shows the alert image and Overlay Text the plate (110 px white on red, black outline), both named alpv_blocklist_alert (keep the name unique to these rules: same name, same overlay). One alert per vehicle at its first block-list match; another block-listed vehicle takes over and the overlays update in place
  2. 8.5b: carState = lost and carID = {{var.alpv_alert_car}} → Clear text and image. Only the vehicle being shown clears the alert
  3. alpv_alert_car needs no initial value and is separate from 8.4's variable, so both templates can run together
Setup: Requires 1.9.28 or later. Upload the alert image that matches the camera's full resolution (1920×1080 or 3840×2160; scale the PNG for other resolutions) under Video > Overlays with scaling to the stream resolution turned on, and keep its transparency; without scaling it is cropped in lower-resolution streams. Import both templates, select the uploaded image in 8.5a's Overlay Image action (the web UI names it e.g. 8.5-blocklist-alert-1080p(1920x1080).ovl, the template default) and enable both. On another camera: set Target Device to it in all four overlay actions, use a dedicated account there, and upload the image to that camera.

9 — GPS / NMEA

Event Engine reads NMEA 0183 data from a GPS receiver on the camera's serial port, or over UDP or TCP, and makes the position available to rules as {{gps.*}} variables and GPS triggers. Requires 1.9.31 or later and GPS enabled under Settings → GPS / NMEA Input.

9.1 Live GPS Position and Speed Overlay

A camera on a vehicle or a moving asset should show where it is and how fast it is moving on the live video and in recordings. The overlay should disappear when the GPS data stops being valid, rather than showing an old position.

gps_update (1 s) gps_fix (lost / stale) overlay_text named overlay {{gps.*}}
  1. 9.1: a GPS Update trigger fires at most once per second on a fresh fix and refreshes the Overlay Text named gps_live_position with {{gps.speed_kmh}}, {{gps.latitude}}, {{gps.longitude}} and {{gps.heading_cardinal}}
  2. 9.1b: two GPS Fix triggers (Lost, Stale) clear the same overlay when the receiver reports no fix or no valid update arrives within the stale timeout
  3. Coordinates show 6 decimals and speed 1; append |N to a variable to change the precision
Setup: Requires 1.9.31 or later. Under Settings → GPS / NMEA Input choose the source (for the serial port, device auto and the receiver's baud rate, often 4800 or 9600), save, and check that the status shows parsed sentences and a fix. Do not share the serial port with Modbus RTU or another application. Import and enable both templates; keep the overlay name and channel the same in both if you change them.

Template Summary

#TemplateCategoryDescription
1.1asensor-data-powerbiDataSensor → Power BI streaming dataset
1.1bsensor-data-influxdbDataSensor → InfluxDB for Grafana
1.1csensor-data-mqtt-homeassistantDataSensor → MQTT to Home Assistant
1.2multi-platform-motion-alertsNotificationsMotion → Slack + Teams + Email with snapshot
1.3daily-activity-digestNotificationsBuffer events → daily email summary
2.1asunset-night-modeControlSunset → IR night + illuminator on
2.1bsunrise-day-modeControlSunrise → IR day + illuminator off
2.2aprivacy-mask-enableControl08:00 → enable privacy mask
2.2bprivacy-mask-disableControl18:00 → disable privacy mask
2.2cprivacy-mask-emergency-overrideControlEmergency → disable masks + override
2.2dprivacy-mask-emergency-clearControlEmergency cleared → restore masks
2.3ptz-track-and-resume-tourControlAOA → stop tour → PTZ → resume
2.4motion-audio-clipControlMotion → play audio deterrent
2.5schedule-wiperControlDaily 07:00 → camera wiper
3.1perimeter-intrusion-responseSecurityHuman + armed + after-hours → full response
3.2aaccess-control-business-hoursSecurityCard reader → door release + recording
3.2baccess-control-after-hours-alertSecurityCard reader after hours → Telegram alert
3.3aoccupancy-warningSecurityOccupancy ≥ 20 → warning overlay
3.3boccupancy-criticalSecurityOccupancy ≥ 30 → Slack + IO output
4.1queue-ticket-displayDisplayMQTT ticket → live queue number
4.2aair-quality-displayDisplayMQTT sensor → live dashboard
4.2bair-quality-alertDisplayMQTT critical → red scrolling alert
4.2cair-quality-clearDisplayMQTT clear → resume dashboard
4.3direct-sensor-air-quality-displayDisplayDirect vapix_query → speaker display
4.4webhook-air-quality-displayDisplayHTTP webhook → speaker display
5.1aarm-system-via-mqttSystemMQTT arm → set system.armed = true
5.1bdisarm-system-via-mqttSystemMQTT disarm → set system.armed = false
5.2daily-counter-resetSystemMidnight → reset counters to zero
5.3mqtt-heartbeatSystemEvery 60s → publish status heartbeat
5.4amaintenance-mode-enableSystemMQTT → activate maintenance mode
5.4bmaintenance-mode-disableSystemMQTT → deactivate maintenance mode
5.5aenable-rule-via-mqttSystemMQTT → enable target rule by ID
5.5bdisable-rule-via-mqttSystemMQTT → disable target rule by ID
6.1cross-device-io-condition-speaker-displayCross-DeviceI/O → remote I/O condition → display
6.2cross-device-aoa-condition-alertCross-DeviceAOA → remote occupancy → display + MQTT
6.3remote-sensor-data-relayCross-DeviceSchedule → remote query → MQTT with |N
4.3direct-sensor-displayDisplaysVAPIX query → overlay text + MQTT
4.4webhook-displayDisplaysHTTP Webhook → overlay text + MQTT
7.1amotion-count-incrementAdvancedMotion → increment_counter (+1)
7.1bmotion-count-escalateAdvancedcounter_threshold → Slack + run_rule, 1/day
7.2compound-trigger-tailgateAdvancedI/O AND Motion (8s window) → recording + Telegram
7.3night-only-recordingAdvancedMotion + day_night(night) → recording
7.4snapshot-upload-ftp-fallbackAdvancedAOA → http_request + on_failure → ftp_upload
7.5acap-watchdog-cronAdvancedCron + vapix_event_state → acap_control + set_device_param
7.6paging-scheduled-announcementAdvancedCron → paging_console_execute
7.7vms-event-bridgeAdvancedManual/Webhook → fire_vapix_event + MQTT
7.8security-audit-loggerAdvancedrule_fired → condition_logic OR → syslog + MQTT
7.9network-gated-alertAdvancedMotion + http_check → Slack with snapshot
7.10raw-snapshot-uploadAdvancedMotion + armed → snapshot_upload (binary JPEG), lifetime cap
7.11apaging-button-armAdvancedMQTT armed → paging_console_button (set emergency slot)
7.11bpaging-button-disarmAdvancedMQTT disarmed → paging_console_button (restore normal slot)
7.12dual-zone-and-activeAdvancedDoor + Motion AND_ACTIVE → recording + MQTT (on_failure → syslog)
7.13sparkplug-telemetryAdvancedSchedule + vapix_query → sparkplug_publish (protobuf NDATA)
7.14sparkplug-command-handlerAdvancedsparkplug_command → audio_clip + set_variable + sparkplug_publish
8.1alpv-plate-io-alarm-pushALPVPlate read + I/O input active → HTTP push
8.2alpv-plate-loud-vehicle-pushALPVPlate read AND audio detection within 10 s → vapix_query + HTTP push
8.3aalpv-push-enable-on-io-alarmALPVI/O input active → enable ALPV push profile 1 (e.g. UTMC)
8.3balpv-push-disable-on-io-clearALPVI/O input inactive → disable ALPV push profile 1
8.4alpv-blocklist-to-milestone-alarmALPVBlock-list plate → Milestone Analytics Event (plate, country, vehicle, snapshots)
8.5aalpv-blocklist-alert-showALPVBlock-list plate → full-screen alert image + plate text on the video (this or another camera)
8.5balpv-blocklist-alert-clearALPVThat vehicle lost → clear the alert
9.1gps-live-video-overlayGPSFresh GPS fix → overlay with position, speed and heading
9.1bgps-live-video-overlay-clearGPSGPS fix lost or stale → clear the overlay

Customisation Guide

Every template is designed to be imported and then customised in the web UI:

What to changeWhere
Webhook URLs (Slack, Teams)Replace placeholder URLs with your actual endpoints
MQTT topicsAdjust the topic hierarchy to match your broker structure
InfluxDBSet server URL, database/bucket, and credentials
TelegramInsert your bot token and chat ID
Email (SMTP)Configure SMTP in Settings tab; only recipients need changing per rule
I/O portsMatch port numbers to your camera's physical wiring
AOA scenariosMatch scenario IDs to your configured analytics scenarios
PTZ presets / Guard tours / Privacy masksUse names matching your camera configuration
Thresholds and timingsAdjust cooldowns, hold durations, and value thresholds
Remote device credentialsSet IP, username, and password for cross-device rules
Decimal formattingAppend |N to numeric variables for precision (e.g. {{trigger.Temperature|2}})