IP Camera API Webooks for AI Security Camera Alarms / Events

Home > CCTV Security Camera & Video Surveillance System Forums > Viewtron Security Camera Systems > IP Camera API > IP Camera API Webooks for AI Security Camera Alarms / Events

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #42551
    Mike Haldas
    Keymaster

    AI Security Camera AI Detection Webhooks

    Viewtron AI security cameras may be configured to send outbound HTTP Posts / webhooks when an AI detection alarm event occurs. Click here if you are looking for the Webhook API guide for Viewtron NVRs. The format is slightly different. Supported events include license plate recognition, face detection, human detection, vehicle detection, intrusion detection, and more. Please refer to the below API documentation for details on using the webhooks for your application. Please refer to these setup instructions to enable webbook APIs on your Viewtron security camera.


    Contents


    10.1 Intrusion Detection (Perimeter)

    GetSmartPerimeterConfig

    Retrieves the intrusion/perimeter detection configuration.

    Field Value
    URL POST or GET http://<host>[:port]/GetSmartPerimeterConfig[/channelId]
    Applicable Products IPC
    Channel ID Optional. Default is 1.
    Entity Data None

    Successful Response:

    <?xml version="1.0" encoding="utf-8"?>
    <config xmlns="http://www.ipc.com/ver10" version="2.0.0">
      <perimeter>
        <switch type="boolean">true</switch>
        <alarmHoldTime type="uint32">20</alarmHoldTime>
        <objectFilter>
          <car>
            <switch type="boolean">true</switch>
            <sensitivity type="uint32" max="100" min="1" default="50">50</sensitivity>
          </car>
          <person>
            <switch type="boolean">true</switch>
            <sensitivity type="uint32" max="100" min="1" default="50">50</sensitivity>
          </person>
          <motor>
            <switch type="boolean">true</switch>
            <sensitivity type="uint32" max="100" min="1" default="50">50</sensitivity>
          </motor>
        </objectFilter>
        <saveTargetPicture type="boolean">false</saveTargetPicture>
        <saveSourcePicture type="boolean">false</saveSourcePicture>
        <regionInfo type="list" maxCount="4" count="1">
          <item>
            <pointGroup type="list" maxCount="8" count="4">
              <item>
                <X type="uint32">4075</X>
                <Y type="uint32">2466</Y>
              </item>
              <!-- Additional points... -->
            </pointGroup>
          </item>
        </regionInfo>
      </perimeter>
    </config>

    [Back to Top]


    10.2 Line Crossing (Tripwire)

    GetSmartTripwireConfig

    Retrieves the line crossing/tripwire detection configuration.

    Field Value
    URL POST or GET http://<host>[:port]/GetSmartTripwireConfig[/channelId]
    Applicable Products IPC
    Channel ID Optional. Default is 1.
    Entity Data None

    Successful Response:

    <?xml version="1.0" encoding="utf-8"?>
    <config xmlns="http://www.ipc.com/ver10" version="2.0.0">
      <types>
        <tripwireDirection>
          <enum>none</enum>
          <enum>rightortop</enum>
          <enum>leftorbotton</enum>
        </tripwireDirection>
      </types>
      <tripwire>
        <switch type="boolean">false</switch>
        <alarmHoldTime type="uint32">20</alarmHoldTime>
        <objectFilter>
          <car>
            <switch type="boolean">true</switch>
            <sensitivity type="uint32" max="100" min="1" default="50">50</sensitivity>
          </car>
          <person>
            <switch type="boolean">true</switch>
            <sensitivity type="uint32" max="100" min="1" default="50">50</sensitivity>
          </person>
        </objectFilter>
        <lineInfo type="list" maxCount="4" count="1">
          <item>
            <direction type="tripwireDirection">rightortop</direction>
            <startPoint>
              <X type="uint32">10</X>
              <Y type="uint32">10</Y>
            </startPoint>
            <endPoint>
              <X type="uint32">1000</X>
              <Y type="uint32">1000</Y>
            </endPoint>
          </item>
        </lineInfo>
      </tripwire>
    </config>

    [Back to Top]


    10.3 Face Detection

    GetSmartVfdConfig

    Retrieves the face detection configuration.

    Field Value
    URL POST or GET http://<host>[:port]/GetSmartVfdConfig[/channelId]
    Applicable Products IPC
    Channel ID Optional. Default is 1.
    Entity Data None

    Notes:

    • Face detection events are sent via HTTP POST when configured in Alarm Server settings
    • Event type code: VFD (face detection) or VFD_MATCH (face match with database)
    • Events include face crop image and full scene image (Base64 encoded)

    [Back to Top]


    10.4 License Plate Recognition (LPR)

    GetSmartVehicleConfig

    Retrieves the license plate recognition configuration.

    Field Value
    URL POST or GET http://<host>[:port]/GetSmartVehicleConfig[/channelId]
    Applicable Products IPC (LPR cameras)
    Channel ID Optional. Default is 1.
    Entity Data None

    Successful Response:

    <?xml version="1.0" encoding="UTF-8"?>
    <config version="2.0.0" xmlns="http://www.ipc.com/ver10">
      <types>
        <plateAreaType>
          <enum continent="NorthAmerica">U.S.A</enum>
          <enum continent="NorthAmerica">Canada</enum>
          <enum continent="Europe">Germany</enum>
          <enum continent="Europe">Britain</enum>
          <!-- Additional regions... -->
        </plateAreaType>
        <alarmListType>
          <enum>blackList</enum>
          <enum>whiteList</enum>
          <enum>strangerList</enum>
        </alarmListType>
      </types>
      <vehicle>
        <switch type="boolean">true</switch>
        <plateSencitivity type="uint8">49</plateSencitivity>
        <plateSupportArea type="plateAreaType">U.S.A</plateSupportArea>
        <saveTargetPicture type="boolean">true</saveTargetPicture>
        <saveSourcePicture type="boolean">true</saveSourcePicture>
        <dedupMode>
          <switch type="boolean">false</switch>
          <intervalTime type="uint32" default="5">5</intervalTime>
        </dedupMode>
        <regionInfo type="list" maxCount="1" count="1">
          <item>
            <X1 type="uint32">375</X1>
            <Y1 type="uint32">2866</Y1>
            <X2 type="uint32">9625</X2>
            <Y2 type="uint32">8800</Y2>
          </item>
        </regionInfo>
      </vehicle>
    </config>

    AddVehiclePlate

    Adds license plates to the whitelist or blacklist.

    Field Value
    URL POST http://<host>[:port]/AddVehiclePlate
    Applicable Products IPC (LPR cameras)
    Entity Data License plate data (XML)

    Request Example:

    <?xml version="1.0" encoding="utf-8"?>
    <config>
      <vehiclePlates type="list" count="1">
        <item>
          <carPlateNumber type="string"><![CDATA[ABC1234]]></carPlateNumber>
          <beginTime type="string"><![CDATA[2024/01/01 00:00:00]]></beginTime>
          <endTime type="string"><![CDATA[2024/12/31 23:59:59]]></endTime>
          <carOwner type="string"><![CDATA[John Doe]]></carOwner>
          <plateItemType type="string">whiteList</plateItemType>
        </item>
      </vehiclePlates>
    </config>

    Notes:

    • plateItemType can be whiteList, blackList, or strangerList
    • beginTime and endTime set the validity period for the plate

    GetVehiclePlate

    Retrieves license plates from the database.

    Field Value
    URL POST or GET http://<host>[:port]/GetVehiclePlate
    Applicable Products IPC (LPR cameras)
    Entity Data Search filter (XML)

    Request Example:

    <config xmlns="http://www.ipc.com/ver10" version="2.0.0">
      <vehiclePlates type="list" maxCount="10000" count="1">
        <searchFilter>
          <item>
            <pageIndex type="uint32">0</pageIndex>
            <pageSize type="uint32">10</pageSize>
            <listType type="vehicleListTypes">allList</listType>
            <carPlateNum type="string"></carPlateNum>
          </item>
        </searchFilter>
      </vehiclePlates>
    </config>

    Notes:

    • LPR events are sent via HTTP POST when configured in Alarm Server settings
    • Event type code: VEHICLE or VEHICE (typo in some firmware)
    • Events include plate number, plate image, and overview image (Base64 encoded)
    • See Python API Server for parsing examples

    [Back to Top]


    10.5 Region Entry/Exit Detection

    GetSmartAoiEntryConfig

    Retrieves the region entry detection configuration.

    Field Value
    URL POST or GET http://<host>[:port]/GetSmartAoiEntryConfig[/channelId]
    Applicable Products IPC
    Channel ID Optional. Default is 1.

    GetSmartAoiLeaveConfig

    Retrieves the region exit detection configuration.

    Field Value
    URL POST or GET http://<host>[:port]/GetSmartAoiLeaveConfig[/channelId]
    Applicable Products IPC
    Channel ID Optional. Default is 1.

    Event Type Codes: AOIENTRY (region entry), AOILEAVE (region exit)

    [Back to Top]


    10.6 Target Counting

    GetSmartPassLineCountConfig

    Retrieves the target counting configuration.

    Field Value
    URL POST or GET http://<host>[:port]/GetPassLineCountConfig[/channelId]
    Applicable Products IPC
    Channel ID Optional. Default is 1.

    GetPassLineCountStatistics

    Gets current counting statistics.

    Field Value
    URL POST or GET http://<host>[:port]/GetPassLineCountStatistics[/channelId]
    Applicable Products IPC
    Channel ID Optional. Default is 1.

    Successful Response:

    <?xml version="1.0" encoding="utf-8"?>
    <config xmlns="http://www.ipc.com/ver10" version="2.0.0">
      <entranceCount>
        <person type="uint32">0</person>
        <car type="uint32">0</car>
        <bike type="uint32">0</bike>
      </entranceCount>
      <exitCount>
        <person type="uint32">0</person>
        <car type="uint32">0</car>
        <bike type="uint32">0</bike>
      </exitCount>
    </config>

    [Back to Top]


    10.7 Video Metadata Detection

    GetSmartVsdConfig

    Retrieves the video metadata detection configuration. Video metadata detection identifies humans and vehicles in the scene and provides bounding box coordinates.

    Field Value
    URL POST or GET http://<host>[:port]/GetSmartVsdConfig[/channelId]
    Applicable Products IPC
    Channel ID Optional. Default is 1.

    Event Type Code: VSD

    [Back to Top]


    10.8 Loitering Detection

    GetSmartLoiteringConfig

    Retrieves the loitering detection configuration. Triggers when a person remains in a defined area longer than the specified duration.

    Field Value
    URL POST or GET http://<host>[:port]/GetSmartLoiteringConfig[/channelId]
    Applicable Products IPC
    Channel ID Optional. Default is 1.

    Event Type Code: LOITER

    [Back to Top]


    10.9 Illegal Parking Detection

    GetSmartPvdConfig

    Retrieves the illegal parking detection configuration. Triggers when a vehicle is parked in a prohibited zone.

    Field Value
    URL POST or GET http://<host>[:port]/GetSmartPvdConfig[/channelId]
    Applicable Products IPC
    Channel ID Optional. Default is 1.

    Event Type Code: PVD

    [Back to Top]


    10.10 Thermal Imaging

    GetMeasureTemperatureConfig

    Retrieves the thermal imaging temperature measurement configuration (for thermal cameras only).

    Field Value
    URL POST or GET http://<host>[:port]/GetMeasureTemperatureConfig[/channelId]
    Applicable Products IPC (thermal cameras)
    Channel ID Optional. Default is 1.

    [Back to Top]


    Event Type Code Reference

    When receiving HTTP POST alarm events, use these codes to identify the event type:

    Code Detection Type
    VEHICLE or VEHICE License Plate Recognition
    VFD Face Detection
    VFD_MATCH Face Match (recognized face)
    PEA Intrusion / Perimeter
    TRIPWIRE Line Crossing
    AOIENTRY Region Entry
    AOILEAVE Region Exit
    LOITER Loitering
    VSD Video Metadata (human/vehicle detection)
    PVD Illegal Parking
    MOTION Motion Detection

    ← Back to API Documentation Index

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.