Get TrafficJunction Event information from offline Dahua Camera

RhaIri

n3wb
Joined
Jan 16, 2023
Messages
4
Reaction score
1
Location
Sweden
Hello there, first time poster so apologies if this is not the correct forum for the question.

I'm currently working on a system that will pull information of passing cars from a Dahua IPITC237-PW6M-IRLZF . It works great when there is a connection to the Camera. But I'm trying to just make a work around in case I lose connection to one of the IP Cameras, I can pull the information from the SD-card when connection is re-established.
Reading through the API docs. it seems this is possible.
I create a FileFinder with: . It returns the objectId of the "File Finder".
I then run: After this I run the "Get Next File"-call which can return up to 100 "entries" with the given parameters. This all works as described, but I noticed that some of the data I need for my system is not returned.
So this leads me to my actual question. Does anyone know if it is possible to get the information stored in the TrafficJunction Event through an API call. I'm specifically looking for TrafficJunction.Direction. Or if there is a workaround to get the Direction from somewhere else? I noticed in the Web GUI that under "Query/Capture Record Search" that it does have the Direction information stored as "Approaching/Departing/Unknown". So if it is not possible to get it through TrafficJunction, perhaps it is possible to pull this "Capture Record Search" information.
I added a snippit of the data returned in the Summary.
So here I hoped to see something akin to items[0].Summary.TrafficCar.Event.Direction=X/Y/Z


Code:
items[0].StartTime=START
items[0].Summary.TrafficCar.Category=X
items[0].Summary.TrafficCar.CountInGroup=X
items[0].Summary.TrafficCar.Country=X
items[0].Summary.TrafficCar.CustomParkNo=X
items[0].Summary.TrafficCar.Event=TrafficJunction
items[0].Summary.TrafficCar.GroupID=X
items[0].Summary.TrafficCar.IndexInGroup=X
items[0].Summary.TrafficCar.Lane=X
items[0].Summary.TrafficCar.PlateColor=X
items[0].Summary.TrafficCar.PlateNumber=X
items[0].Summary.TrafficCar.PlateType=X
items[0].Summary.TrafficCar.RecNo=X
items[0].Summary.TrafficCar.RecordBeginUTC=X
items[0].Summary.TrafficCar.RecordEndUTC=X
items[0].Summary.TrafficCar.RecordState=X
items[0].Summary.TrafficCar.Speed=X
items[0].Summary.TrafficCar.UTC=X
items[0].Summary.TrafficCar.VehicleColor=X
items[0].Summary.TrafficCar.VehicleSign=X
items[0].Summary.TrafficCar.VehicleSize=X
 

ludshed

Getting comfortable
Joined
Sep 14, 2022
Messages
505
Reaction score
632
Location
Us
Why wouldn’t you fix the connection to the camera?
 

RhaIri

n3wb
Joined
Jan 16, 2023
Messages
4
Reaction score
1
Location
Sweden
Why wouldn’t you fix the connection to the camera?
Unsure what you mean. My use case would be if for example my net cuts out for 5 minutes from 8:00 to 8:05, I'd like to be able to pull the information from those 5 minutes where I have not received data. I should probably have mentioned I'm getting data from the camera by "subscribing to snapshot stream" or whatever it is called. So if my internet goes down, I'll have to reconnect to the stream and I would've lost the data from the stream in the couple minutes/hours my network has been down. So I'm looking for a way to get the "lost" data from the internal storage on the Camera.
So basically I hook up to the stream, whenever an event fires it sends a bunch of data+image, I do what I do with the data and wait for the next event to fire. If my computer/server/net crashes for x amount of minutes I need to pull data from those x amount of minutes.

Edit: That is pull the information from those 5 minutes once I have established connection to the camera again :)
 

ludshed

Getting comfortable
Joined
Sep 14, 2022
Messages
505
Reaction score
632
Location
Us
So it’s not your cam? If that’s the case I’d think the provider would have all data to download in a more simple way. But good luck with your tinkering
 

VideoDad

Pulling my weight
Joined
Apr 13, 2022
Messages
162
Reaction score
216
Location
USA
Does anyone know if it is possible to get the information stored in the TrafficJunction Event through an API call.I'm specifically looking for TrafficJunction.Direction. Or if there is a workaround to get the Direction from somewhere else?
In the review thread for this camera, others noted they didn't get back Direction. So I think it isn't possible.

 

RhaIri

n3wb
Joined
Jan 16, 2023
Messages
4
Reaction score
1
Location
Sweden
In the review thread for this camera, others noted they didn't get back Direction. So I think it isn't possible.

Ah yeah, seems like that could be the case. Thanks for the reply :)

So far the work around I'm going with is using the ip/cgi-bin/trafficRecord.cgi API to get the traffic record in a CSV format, which does have the direction. Then I need to filter through it to find the timestamps for when I did not have connection with the camera and then use one of the other APIs to get the rest of the data and image. Feels like a clunky solution, but its the only one I could come up with so far :)
 
Top