Skip to main content

License Plate Recognition (LPR) Configuration

Application Guide

For a complete walkthrough with code examples, see the License Plate Recognition application guide.

This section covers LPR configuration and plate database management:

  • GetSmartVehicleConfig — read LPR detection settings
  • AddLicensePlates — add plates to the database
  • GetLicensePlates — query the plate database
  • ModifyLicensePlate — update plate details
  • DeleteLicensePlate — remove a plate from the database

GetSmartVehicleConfig

Retrieves license plate recognition configuration, including detection sensitivity, supported region, deduplication settings, and detection zone.

FieldValue
Endpoint/GetSmartVehicleConfig[/channelId]
MethodPOST or GET
ProductsIPC
Channel IDOptional (default 1)

Response Example (v2.0)

<?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">false</switch>
<plateSencitivity type="uint8">49</plateSencitivity>
<plateSupportArea type="plateAreaType">U.S.A</plateSupportArea>
<saveTargetPicture type="boolean">false</saveTargetPicture>
<saveSourcePicture type="boolean">false</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>
<plateMatch>
<alarmMode type="alarmModeType">plateOnly</alarmMode>
</plateMatch>
</vehicle>
</config>

Parameters

ParameterTypeRangeDescription
switchbooleantrue / falseEnable or disable LPR detection
plateSencitivityuint80–100Plate detection sensitivity (note firmware spelling)
plateSupportAreaplateAreaTypeSee enum listRegion/country for plate format recognition
saveTargetPicturebooleantrue / falseSave cropped plate image on detection
saveSourcePicturebooleantrue / falseSave full-frame source image on detection
dedupMode.switchbooleantrue / falseEnable plate deduplication
dedupMode.intervalTimeuint32default: 5Minimum seconds between duplicate plate reports
regionInfolistmaxCount: 1Detection zone (rectangular region)
regionInfo.item.X1uint32Left X coordinate of detection zone
regionInfo.item.Y1uint32Top Y coordinate of detection zone
regionInfo.item.X2uint32Right X coordinate of detection zone
regionInfo.item.Y2uint32Bottom Y coordinate of detection zone
plateMatch.alarmModealarmModeTypePlate matching alarm mode (e.g., plateOnly)

Supported Plate Regions

The plateAreaType enum includes regions grouped by continent:

ContinentRegions
North AmericaU.S.A, Canada
EuropeGermany, Britain, and others

Query your camera's GetSmartVehicleConfig response for the complete list of supported regions on your firmware version.

Notes

v2.0 Additions

API v2.0 adds dedupMode (deduplication with configurable interval) and plateMatch/alarmMode to the vehicle configuration. These fields are not present in v1.x responses.

  • The spelling plateSencitivity (not "sensitivity") matches the firmware's XML — use this exact spelling when setting configuration.
  • The detection zone uses a single rectangular region (maxCount: 1), unlike intrusion detection which supports polygon regions.
  • The corresponding Set command is SetSmartVehicleConfig using the same XML structure.

Plate Database Management

Manage the on-camera license plate database — add, query, update, and delete plates. All endpoints use Basic Authentication.

Plate Status in HTTP POST Events

When a plate is detected, the camera includes a vehicleListType field in the HTTP POST event indicating the plate's current database status. The camera validates date ranges internally for all list types.

Camera SettingvehicleListType ValueDescription
Allow list (valid dates)whiteListPlate is authorized
Block list (valid dates)blackListPlate is blocked
Temporary vehicle (valid dates)temporaryListPlate is temporarily authorized
Any list type (expired dates)(field absent)Treated the same as unknown
Not in database(field absent)Plate not recognized
Date Ranges Apply to All List Types

Date range validation is not limited to temporary plates — it applies to all list types including allow list and block list. Any plate with an expired end date will have vehicleListType omitted from the HTTP POST event, making it indistinguishable from an unknown plate. Use "Valid Forever" in the camera firmware or set a far-future end date to prevent plates from silently expiring.

note

The camera does not include start/end dates in the HTTP POST event. Date range validation happens entirely on-camera.

Python SDK

The viewtron Python SDK (pip install viewtron) handles all XML formatting automatically. See the License Plate Recognition application guide for code examples.


AddLicensePlates

Add one or more plates to the camera's database.

FieldValue
Endpoint/AddLicensePlates
MethodPOST
AuthBasic
ProductsIPC

Request

<?xml version="1.0" encoding="UTF-8"?>
<config version="2.1.0" xmlns="http://www.ipc.com/ver10">
<licensePlates type="list" maxCount="100" count="1">
<item>
<index>1</index>
<licensePlateNumber><![CDATA[ABC1234]]></licensePlateNumber>
<groupId><![CDATA[1]]></groupId>
</item>
</licensePlates>
</config>

Parameters

ParameterTypeDescription
indexintegerItem index (1-based)
licensePlateNumberstring (CDATA)License plate number
groupIdstring (CDATA)Group ID (1 = default group)

Response (Success)

<?xml version="1.0" encoding="UTF-8"?>
<config version="2.1.0" xmlns="http://www.ipc.com/ver10">
<licensePlatesReply>
<item>
<index type="uint32">1</index>
<errorCode type="uint32">0</errorCode>
</item>
</licensePlatesReply>
</config>

Notes

  • Multiple plates can be added in a single request — increase the count attribute and add additional <item> elements with incrementing index values.
  • The camera automatically assigns begin/end validity times. To control these, use ModifyLicensePlate after adding.

curl Example

curl -u admin:password -X POST http://CAMERA_IP/AddLicensePlates \
-H "Content-Type: application/xml" \
-d '<?xml version="1.0" encoding="UTF-8"?>
<config version="2.1.0" xmlns="http://www.ipc.com/ver10">
<licensePlates type="list" maxCount="100" count="1">
<item>
<index>1</index>
<licensePlateNumber><![CDATA[ABC1234]]></licensePlateNumber>
<groupId><![CDATA[1]]></groupId>
</item>
</licensePlates>
</config>'

GetLicensePlates

Query the plate database with pagination.

FieldValue
Endpoint/GetLicensePlates
MethodPOST
AuthBasic
ProductsIPC

Request

<?xml version="1.0" encoding="UTF-8"?>
<config version="2.1.0" xmlns="http://www.ipc.com/ver10">
<searchFilter>
<maxResult>10</maxResult>
<resultOffset>1</resultOffset>
<groupId><![CDATA[1]]></groupId>
</searchFilter>
</config>

Parameters

ParameterTypeDescription
maxResultintegerMaximum number of results to return
resultOffsetintegerStarting position (1-based — first plate is offset 1)
groupIdstring (CDATA)Group ID to query (1 = default group)

Response

<?xml version="1.0" encoding="UTF-8"?>
<config version="2.1.0" xmlns="http://www.ipc.com/ver10">
<licensePlates type="list" total="2" count="2">
<item>
<licensePlateNumber type="string"><![CDATA[ABC1234]]></licensePlateNumber>
<groupId type="string"><![CDATA[1]]></groupId>
<beginTime type="string"><![CDATA[2026-04-07 09:28:45]]></beginTime>
<endTime type="string"><![CDATA[2037-12-30 10:59:59]]></endTime>
<licensePlateType type="string"><![CDATA[]]></licensePlateType>
<carOwner type="string"><![CDATA[Mike]]></carOwner>
<cardNumber type="string"><![CDATA[]]></cardNumber>
<telephone type="string"><![CDATA[]]></telephone>
</item>
</licensePlates>
</config>

Response Fields

FieldDescription
licensePlateNumberPlate number
groupIdGroup this plate belongs to
beginTimeStart of validity period
endTimeEnd of validity period
carOwnerVehicle owner name
telephoneOwner phone number
cardNumberAssociated card number
licensePlateTypePlate type

Notes

  • resultOffset is 1-based. Using 0 returns a Range Error.
  • If no plates exist, the response returns errorCode="20" with errorDesc="Resources Not Exist".

ModifyLicensePlate

Update an existing plate's details (owner, phone, validity dates).

FieldValue
Endpoint/ModifyLicensePlate
MethodPOST
AuthBasic
ProductsIPC

Request

<?xml version="1.0" encoding="UTF-8"?>
<config version="2.1.0" xmlns="http://www.ipc.com/ver10">
<licensePlate>
<licensePlateNumber><![CDATA[ABC1234]]></licensePlateNumber>
<groupId><![CDATA[1]]></groupId>
<carOwner type="string"><![CDATA[John Doe]]></carOwner>
<telephone type="string"><![CDATA[555-123-4567]]></telephone>
</licensePlate>
</config>

Parameters

ParameterTypeRequiredDescription
licensePlateNumberstring (CDATA)YesPlate number to modify (must already exist)
groupIdstring (CDATA)YesGroup the plate belongs to
carOwnerstring (CDATA)NoUpdated owner name
telephonestring (CDATA)NoUpdated phone number

Response (Success)

<?xml version="1.0" encoding="UTF-8"?>
<config version="2.1.0" xmlns="http://www.ipc.com/ver10" status="success" errorCode="0" errorDesc="No Error"/>

Notes

  • Fields being modified must include the type="string" attribute or the camera returns a Range Error.
  • The plate is identified by licensePlateNumber + groupId — both are required.

DeleteLicensePlate

Delete a plate from the database.

FieldValue
Endpoint/DeleteLicensePlate
MethodPOST
AuthBasic
ProductsIPC

Request

<?xml version="1.0" encoding="UTF-8"?>
<config version="2.1.0" xmlns="http://www.ipc.com/ver10">
<deleteAction>
<licensePlateNumber><![CDATA[ABC1234]]></licensePlateNumber>
<groupId><![CDATA[1]]></groupId>
</deleteAction>
</config>

Parameters

ParameterTypeDescription
licensePlateNumberstring (CDATA)Plate number to delete
groupIdstring (CDATA)Group the plate belongs to

Response (Success)

<?xml version="1.0" encoding="UTF-8"?>
<config version="2.1.0" xmlns="http://www.ipc.com/ver10" status="success" errorCode="0" errorDesc="No Error"/>

EndpointPurpose
SetHttpPostConfigConfigure webhook destination for LPR alerts
GetAlarmStatusPoll current alarm state