ONVIF

ONVIF

ID: uniflow.plugin.onvif Category: Security & Video Version: v1.4.0 Min Uniflow Version: Uniflow ≥ v1.4.0

ONVIF Plugin Reference Manual

1. Overview

Plugin Name: ONVIF

Type: Security & Video

Identifier: uniflow.plugin.onvif

Description

Integration with ONVIF-compatible cameras for snapshots, PTZ, and streams.


2. Technical Architecture

The ONVIF plugin implements SOAP XML client communication with IP cameras compliant with ONVIF Profile S, Profile G, and Profile T standards. It supports WS-Discovery on local IP subnets, digest and UsernameToken authentication, RTSP media stream URI retrieval, PTZ continuous/absolute control commands, snapshot HTTP fetches, and PullPoint event notification subscriptions.

System Interaction & Exposed Catalog Routes

The ONVIF plugin manages Profile S/G/T IP cameras. It handles WS-Discovery, WS-Security authentication, RTSP video URI retrieval, PTZ continuous/absolute movements, and WS-BaseNotification event processing.

Catalog Routes & Node Integration

Input Event Triggers (Input Nodes):

  • onvif.event_notified - Fired on camera WS-BaseNotification event.
  • onvif.motion_alarm - Motion alarm notification.
  • onvif.device_discovered - WS-Discovery camera found event.
  • Executable Actions (Action Nodes):

  • onvif.ptz_move - Moves PTZ camera pan/tilt/zoom.
  • onvif.ptz_stop - Stops active PTZ motion.
  • onvif.goto_preset - Moves PTZ to pre-configured preset.
  • onvif.trigger_digital_output - Toggles camera digital output.
  • Architecture Diagram

    VISUAL ARCHITECTURE FLOW DIAGRAM
    Rendering Flow Architecture Diagram...

    3. Configuration Parameters

    The following configuration fields are available in the User Interface for this plugin:

    Configuration SettingDescription
    Camera IP/Hostname:Specifies the camera ip/hostname.
    Username:Specifies the username.
    Password:Specifies the password (secure).

    4. Exposed Routes & Data Types

    This plugin exposes catalog fields across the following rule graph nodes:

    Event Input

    The Event Input node listens for real-time PullPoint motion detection and sensor events from ONVIF IP cameras.

    Human-Readable Field NameData TypeExposed Event Fields & Data TypesDescription
    ONVIF Motion & Sensor Event  Event Object
    Topic (String)
    Source (String)
    State (Bool)
    Timestamp (DateTime)
    Real-time event emitted upon motion alarm or digital input sensor change.

    Output Target

    The Output Target node acts as an action sink node to execute camera control, media recording, and PTZ positioning operations.

    Target NameData TypeAssociated ParametersParameter Data TypeRequiredDescription
    Take Snapshot  Json
    NoneN/AN/ACapture JPEG image snapshot from camera media profile.
    Save Snapshot to Folder  Json
    Destination Folder (DestinationFolder)StringTrueLocal or network target folder path for saving image.
    File Name (FileName)StringFalseCustom file name override.
    Start Edge Recording (SD Card)  Json
    NoneN/AN/ATrigger onboard SD card video recording.
    Stop Edge Recording (SD Card)  Json
    NoneN/AN/AStop onboard SD card video recording.
    Start Local Recording (Server)  Json
    Destination Folder (DestinationFolder)StringTrueLocal server directory path for recording RTSP stream.
    File Name (FileName)StringFalseCustom video recording file name override.
    Stop Local Recording (Server)  Json
    NoneN/AN/ATerminate local server RTSP stream recording.
    Reboot Camera  Json
    NoneN/AN/AIssue remote system reboot command to IP camera.
    Disable Media Profile  Json
    NoneN/AN/ADisable active RTSP media stream profile.
    Enable Media Profile  Json
    NoneN/AN/AEnable RTSP media stream profile.
    Absolute Move  Json
    Pan (Pan)DoubleFalseAbsolute Pan coordinate (-1.0 to +1.0).
    Tilt (Tilt)DoubleFalseAbsolute Tilt coordinate (-1.0 to +1.0).
    Zoom (Zoom)DoubleFalseAbsolute Zoom scale (0.0 to 1.0).
    Relative Move  Json
    Pan (Pan)DoubleFalseRelative Pan translation delta.
    Tilt (Tilt)DoubleFalseRelative Tilt translation delta.
    Zoom (Zoom)DoubleFalseRelative Zoom translation delta.
    Go to Preset  Json
    Preset Token / Name (PresetToken)StringTrueToken or name of camera PTZ preset position.

    5. Usage Examples

    Scenario A: ONVIF Camera Motion Alarm Event Saves Snapshot to Local Disk & Triggers Modbus Relay

    Workflow Overview:

    When an ONVIF IP camera emits a WS-BaseNotification motion alarm (Topic == "RuleEngine/CellMotionDetector/Motion", State == True), Uniflow intercepts the PullPoint XML notification, saves a JPEG snapshot image to C:\Uniflow\Snapshots\, and writes a Modbus TCP coil (Coil 2 = True).

    Rule Node Configuration:

    1. Event Input Node: ONVIF Motion Listener

  • Filter Event: ONVIF Motion & Sensor Event
  • Exposed Fields: Topic (String), State (Bool), Timestamp (DateTime)
  • 2. Logic Condition Node: And Condition

  • Expression: Topic.Contains("Motion") AND State == True
  • 3. Output Target Node A: ONVIF Action Writer

  • Action Target: Save Snapshot to Folder
  • Destination Folder: C:\Uniflow\Snapshots\
  • File Name: Motion_${Timestamp}.jpg
  • 4. Output Target Node B: Modbus Client Writer

  • Action Target: Direct Access
  • Type: Coils
  • Address: 2
  • Value: True
  • Logic Flow Diagram:

    VISUAL ARCHITECTURE FLOW DIAGRAM
    Rendering Flow Architecture Diagram...

    Scenario B: External Webhook Security Alert Moves ONVIF PTZ Camera to Preset Position

    Workflow Overview:

    When an external Webhook receives a security alert payload (/api/alerts), Uniflow issues an ONVIF PTZ command (Go to Preset with PresetToken = "PRESET_GATE") to immediately focus the ONVIF PTZ dome camera on the entrance gate.

    Rule Node Configuration:

    1. Event Input Node: Webhook Listener

  • Route Endpoint: /api/alerts
  • Exposed Fields: Payload (String), EventName (String)
  • 2. Logic Condition Node: Equal

  • Expression: EventName == "GATE_BREACH"
  • 3. Output Target Node: ONVIF PTZ Action

  • Action Target: Go to Preset
  • PresetToken: PRESET_GATE
  • Logic Flow Diagram:

    VISUAL ARCHITECTURE FLOW DIAGRAM
    Rendering Flow Architecture Diagram...
    Architecture Flow Diagram — Full Preview