Help with HTTP REST API for ANPR

van_rea

n3wb
Joined
Jun 30, 2024
Messages
1
Reaction score
0
Location
Bulgaria
Hello,
I have Java software that previously interfaced with standard Dahua cameras. Recently, I purchased an ANPR camera and now I want to receive not only the image but also the license plate number when a vehicle is recognized. Unfortunately, the Dahua SDK does not work on Linux due to some issue/error. Since I have been using HTTP requests for all other camera brands, I want to continue with that approach here as well.
Unfortunately, the event subscription request is not a simple GET request. It requires waiting and manually closing the connection, which complicates the implementation for me. Has anyone encountered a similar issue and can suggest an alternative method to obtain the camera number in text format?
So far, I have tried the following command:
Code:
curl -X GET "http://192.168.1.108/cgi-bin/snapManager.cgi?action=attachFileProc&Flags\[0\]=Event&Events=\[All\]&heartbeat=5" -o picture-test-data.txt --user "admin:admin" --digest -v

curl -X GET "http://192.168.1.108/cgi-bin/snapManager.cgi?action=attachFileProc&Flags\[0\]=Event&Events=\[TrafficManualSnap\]&heartbeat=5" -o picture-test.jpg --user "admin:admin" --digest -v
which returns:

Code:
.......
Events[0].TrafficCar.PhysicalLane=0
Events[0].TrafficCar.PlateColor=Unknown
Events[0].TrafficCar.PlateNumber=A1234AA
Events[0].TrafficCar.RoadwayNo=
.......
Unfortunately, this works only with curl, and using the Apache Java API, I cannot leave the socket open and wait for the snapshot to be taken.
If anyone has tackled something similar or knows of another method to obtain the camera number in text format, I would greatly appreciate your advice.
 
Top