Note: This function requires an API license.

Returns the last scanned licenseplate for the requested device. When this function is called without the timeout parameter it will try to find a scanned licenseplate within the time (in ms) set in the skiplicensetimeout parameter. This parameter is configured in the HTTP Server plugin Advanced menu. A value of 1000 milliseconds means that when calling this function it will search for scanned license plates in the past 1000 ms. As soon as one or more license plates are found the functions returns a result.

The parameter timeout is the number of milliseconds the function will look for license plates. As soon as the duration of the function is longer than the timeout, the function will return and there will be no license plates found.

Note!: The maximum process time for license plate detection per image is adjustable in the software per device with the parameter CarR Max Process Time. This setting could influence the results, especially if timeout is smaller.

Triggered mode: If the device profile parameter Activate CarR is set to Macro this function works in triggered mode. In this mode only images are scanned when the call to this function is made. This allows for fast response times.

Continuous mode: If the device profile parameter Activate CarR is set to Recorded Images then license plate detection is continuously performed on images with motion. This allows to return license plates that are read between calls to this function.


It could be possible that the system is still scanning an image when the timeout occurs and the function returns without a result. If a licenseplate is found in this last image and stored in the Database, it can be retrieved with a call to the function getEvents with proper parameters.

The result lastsampletime is about the time stamp of the last image that is processed.

The resulting message contains the last scanned license plate.

If the CarR options is not available, this function returns error “not implemented”.

If the Sense database is not running, this function will not return results.


parameter type remarks
deviceid [UID] Unique device id
serverid [UID] Unique server id
timeout [0..3600000] Maximum number of milliseconds to wait until a licenseplate is found. Defaults to 1000


<result errorcode="0">
  <licenseplates count="&#91;number&#93;">
node value remarks
@errorcode [number] See error codes below
lastsampletime [timestamp] The UTC timestamp the last image was taken
licenseplates List of licenseplates
@count [number] The number of licenseplates
registration [string] The license plate registration number
confidence [1..100] Percentage of the reliability of the license plate
country [abbreviation] Abbreviation of the country to which the license plate belongs
time [timestamp] The UTC timestamp the image was take
serverid [UID] Unique id of the server
deviceid [UID] Unique id of the device
error code description remarks
0 Ok Ok, no error
-1 Not implemented Function not implemented
-2 No device No device found for the supplied cameraid/deviceid
-20 No CarR System or device not set for license plate recognition
-21 Device not active The device is not active in the current profile and cannot produce any results

See Also


  • 1.12.3 – Documented if timestamps are local or UTC timestamps
  • 1.11.3 – Added