Skip to main content

ONVIF Events Reference

Anava Detections emit ONVIF events for VMS integration. This reference documents event structure, topics, and integration patterns.

ONVIF Event Basics

What is ONVIF?

ONVIF (Open Network Video Interface Forum) is an industry standard for IP-based security products. Anava uses ONVIF for:

  • Emitting Detection events to VMS
  • Subscribing to camera events (triggers)
  • Standardized device discovery

Event Flow

ONVIF Event Flow - Camera to VMS Integration

Event Structure

Standard Fields

Every Anava ONVIF event contains:

FieldTypeDescription
TopicStringEvent namespace and type
SourceStringCamera serial number
KeyStringUnique event identifier
TimestampDateTimeWhen event occurred (UTC)
StateBooleanTrue (detected) or False (cleared)
IsPropertyBooleanTrue for stateful events

Example Event

<wsnt:NotificationMessage>
<wsnt:Topic>
tns1:RuleEngine/tnsaxis:AnavaAI/person_detected
</wsnt:Topic>
<wsnt:Message>
<tt:Message UtcTime="2024-01-15T14:32:15Z" PropertyOperation="Changed">
<tt:Source>
<tt:SimpleItem Name="device" Value="ACCC8E123456"/>
<tt:SimpleItem Name="profile" Value="security-entrance"/>
</tt:Source>
<tt:Key>
<tt:SimpleItem Name="object" Value="person_detected"/>
</tt:Key>
<tt:Data>
<tt:SimpleItem Name="State" Value="true"/>
<tt:SimpleItem Name="confidence" Value="95"/>
</tt:Data>
</tt:Message>
</wsnt:Message>
</wsnt:NotificationMessage>

Event Topics

Topic Namespace

Anava events use the namespace:

tns1:RuleEngine/tnsaxis:AnavaAI/{object_or_question}

Topic Structure

ComponentDescription
tns1:RuleEngineONVIF rule engine namespace
tnsaxis:AnavaAIAxis/Anava analytics namespace
{name}Object or question name from Skill

Topic Examples

Detection ResultTopic
Person detectedtns1:RuleEngine/tnsaxis:AnavaAI/person
Vehicle detectedtns1:RuleEngine/tnsaxis:AnavaAI/vehicle
Hard hat missingtns1:RuleEngine/tnsaxis:AnavaAI/no_hard_hat
Unauthorized accesstns1:RuleEngine/tnsaxis:AnavaAI/unauthorized

Stateful vs Stateless Events

Stateful Events

Configured with stateful: true in skill objects/questions.

StateMeaning
trueObject detected / Condition met
falseObject cleared / Condition ended

Use for:

  • VMS alarm acknowledgment
  • Recording start/stop
  • Output activation

Stateless Events

Objects/questions without stateful: true.

  • Single event per detection
  • No automatic clear
  • Use for logging, notifications

Event Lifecycle

Stateful Event Lifecycle - Alarm State Transitions

Event Data

Standard Data Fields

FieldTypeAlways PresentDescription
StateBooleanYesDetection state
confidenceIntegerYesDetection confidence (0-100)
timestampDateTimeYesEvent time

Object Detection Data

<tt:Data>
<tt:SimpleItem Name="State" Value="true"/>
<tt:SimpleItem Name="confidence" Value="95"/>
<tt:SimpleItem Name="object_type" Value="person"/>
</tt:Data>

Question Answer Data

<tt:Data>
<tt:SimpleItem Name="State" Value="true"/>
<tt:SimpleItem Name="confidence" Value="88"/>
<tt:SimpleItem Name="answer" Value="no"/>
<tt:SimpleItem Name="question_id" Value="authorized_access"/>
</tt:Data>

VMS Subscription

Subscription Methods

MethodDescriptionUse Case
BasicPull-based pollingSimple integrations
Real-timePush notificationsProduction VMS

Basic Subscription

VMS polls camera for events:

POST /onvif/events/pullpoint_subscription
<CreatePullPointSubscription>
<Filter>
<TopicExpression>
tns1:RuleEngine/tnsaxis:AnavaAI/*
</TopicExpression>
</Filter>
</CreatePullPointSubscription>

Topic Filtering

Subscribe to specific events:

FilterReceives
tnsaxis:AnavaAI/*All Anava events
tnsaxis:AnavaAI/personPerson detection only
tnsaxis:AnavaAI/no_*All "no_" prefix events

VMS Integration Examples

Milestone XProtect

Event Mapping:

Anava Event: person_detected
XProtect: Analytics Event → person_detected
Action: Start recording, send notification

Configuration:

  1. Add device → Events tab
  2. Find AnavaAI events
  3. Create action rule using event

Genetec Security Center

Event Mapping:

Anava Event: unauthorized
Genetec: Custom Event → unauthorized_access
Action: Display alarm, notify operators

Configuration:

  1. System → Custom Events
  2. Map ONVIF topic to Genetec event
  3. Create event-to-action in Alarm Management

Axis Camera Station

Native Integration:

  • ACS auto-discovers Anava events
  • Events appear in device event list
  • Direct action rule creation

Event Timing

Detection to Event Latency

PhaseTypical Duration
Trigger to capture100-500ms
Image upload100-300ms
AI analysis500-2000ms
Event emission50-100ms
Total750-2900ms

State Change Timing

For stateful events:

TransitionTiming
Detected → TrueImmediate on detection
Detected → FalseWhen object no longer detected
Timeout → FalseAfter consecutive non-detections

Troubleshooting

Events Not Reaching VMS

  1. Check VMS subscription

    • VMS subscribed to camera?
    • Correct topic filter?
  2. Check camera

    • ONVIF enabled?
    • User has event permissions?
  3. Check Anava Detection

    • Object/question is stateful?
    • Detection occurring?

Wrong Event Data

  1. Check Skill configuration

    • Object name matches expected
    • Stateful flag correct
  2. Check Detection

    • Confidence threshold not filtering
    • Schedule is active

Duplicate Events

  1. Check Detection frequency

    • Multiple rapid Detections normal
    • Consider talkdown buffer
  2. Check VMS de-duplication

    • Some VMS may show each event
    • Configure event grouping

Event Reference

Common Object Events

ObjectTopicState Meaning
person.../AnavaAI/personPerson in scene
vehicle.../AnavaAI/vehicleVehicle in scene
face.../AnavaAI/faceFace detected
weapon.../AnavaAI/weaponWeapon visible
fire.../AnavaAI/fireFire/smoke detected

Common Question Events

QuestionTopicState Meaning
authorized.../AnavaAI/authorizedAccess is authorized
hard_hat.../AnavaAI/hard_hatWearing hard hat
vest.../AnavaAI/vestWearing safety vest
badge.../AnavaAI/badgeBadge visible
loitering.../AnavaAI/loiteringPerson loitering

Special Events

EventDescription
system_onlineACAP started
system_offlineACAP stopping
analysis_errorAnalysis failed
connection_lostCloud connection lost