How to get snapshot infos on a Dahua camera ITC413 with a restapi?

fergant

n3wb
Jan 15, 2025
3
0
Italy
Hi everyone, first post here. My company is about to start a project that relies on dahua cameras for license plate recognition. I can successfully make tests and tried to take a snapshot through the api given in the documentation. The api is this one: "http://{camera_ip}/cgi-bin/snapshot.cgi".
Im wondering, is there an api that can give the infos about my last snapshot(not the snapshot itself) like plate number, vehicle color/type etc? I also saw on the camera client that snapshot are ordered with an id. In the documentation I'm using there's a guide n how to configure camera for sending to an FTP server the snapshot, but I should develop a web application that gets the information on the last snapshot i made. is there an api to get these info or another way to do this?
 
Don't know the camera or if you are using NVR but something to try
/cgi-bin/eventManager.cgi?action=getEventIndexes&code=ANPR

Also if the camera or NVR keeps a buffer you might try
/cgi-bin/snapshot.cgi?lastEventImage=1

I can't say they will work but something to try?
 
Don't know the camera or if you are using NVR but something to try
/cgi-bin/eventManager.cgi?action=getEventIndexes&code=ANPR

Also if the camera or NVR keeps a buffer you might try
/cgi-bin/snapshot.cgi?lastEventImage=1

I can't say they will work but something to try?
I tried both the apis and from the first one i get the message "Error: No events" tough the test snapshot I did is marked as "Event Type : ANPR" and from the second i get a snapshot of the camera like it did with "/cgi-bin/snapshot.cgi".
I would like the camera to send me an event whenever it catches something, so I presume i need to develop an application that is listening for events on the camera i guess? Or should i configure the camera to send event on a server/dispatcher? Sorry for these questions but its my first time working with an iP Cameras and I dont know how should I approach the problem
 
I would personally setup for Snapshot to go to your email. Then when it takes the snapshot you would get an email of the event with the added image.. Another option as you already mentioned was FTP but email if you have your own server anyway is the fastest way. FTP can work but always seems to have some setup drama. But once setup works great then on.. The codes used are not for all devices just what came to mind to try and see if it might work for your needs. Sorry wasn't more helpful.
 
I would personally setup for Snapshot to go to your email. Then when it takes the snapshot you would get an email of the event with the added image.. Another option as you already mentioned was FTP but email if you have your own server anyway is the fastest way. FTP can work but always seems to have some setup drama. But once setup works great then on.. The codes used are not for all devices just what came to mind to try and see if it might work for your needs. Sorry wasn't more helpful.
Yeah I thought the same thing about the FTP way, the problem here is that I found some apis and implementation on github that uses a rest api to get the snapshot itself, not the infos linked. I need something like a json, an xml or something that contains the data about the snapshot to save it on a local DB, so they could log the accesses and exits of the vehicle into the structure, so when the vehicle with the same plate number tries to access again the user can see every log related to that vehicle and decide to open the gate manually.
On the user manual and on the web interface of the camera I cant find a way to get only these informations whenever the event triggers, maybe with a cache system like Redis or Kafka, any other way... I'm really losing my head on it