Dahua DH-SD1A404XB-GNR-W, need help with realtime People Counting HTTP-request.

rlinos

n3wb
Joined
Jul 12, 2021
Messages
1
Reaction score
0
Location
Russia
Hello!
I want to receive a number of standing people in area using http connection.
My camera is Dahua DH-SD1A404XB-GNR-W, system version V2.810.0000025.1.R.P9.4a8, Build Date: 2021-04-07.
The camera uses API v. 2.84. Have no pdf with the API though.
I created a preset and a rule for the preset with following parameters:
Code:
  table.VideoAnalyseRule[0][8].Class=NumberStat
  table.VideoAnalyseRule[0][8].Config.AreaID=1
  ...
  table.VideoAnalyseRule[0][8].EventHandler.VoiceEnable=false
  table.VideoAnalyseRule[0][8].Id=7
  table.VideoAnalyseRule[0][8].Name=PepCoPr7
  table.VideoAnalyseRule[0][8].ObjectTypes[0]=Human
  table.VideoAnalyseRule[0][8].PtzPresetId=7
  table.VideoAnalyseRule[0][8].TrackEnable=false
  table.VideoAnalyseRule[0][8].Type=ManNumDetection
I can successfully subscribe to "People Count Information" using the request: http://<server>/cgi-bin/videoStatServer.cgi?action=attach&heartbeat=5
But I only receive people in area count if it changes. Only when people count in area changes I receive:
Code:
--myboundary
Content-Type: text/plain
Content-Length: 452
summary.AreaID=1
summary.Channel=0
summary.EnteredSubtotal.Hour=0
summary.EnteredSubtotal.Today=0
summary.EnteredSubtotal.Total=0
summary.EnteredSubtotal.TotalInTimeSection=0
summary.ExitedSubtotal.Hour=0
summary.ExitedSubtotal.Today=0
summary.ExitedSubtotal.Total=0
summary.ExitedSubtotal.TotalInTimeSection=0
summary.InsideSubtotal.Total=1
summary.PlanId=7
summary.PtzPresetId=7
summary.RuleName=ManNumDetection
summary.UTC=1632755263

I see summary.InsideSubtotal.Total=1 and that's exactly what i need to know.
When I try to get current people count by "getSummary request" (http://<server>/cgi-bin/videoStatServer.cgi?action=getSummary') i receive summary.InsideSubtotal.Total=0.
Full result of the request is:
Code:
summary.Channel=0
summary.EnteredSubtotal.Hour=0
summary.EnteredSubtotal.Today=0
summary.EnteredSubtotal.Total=0
summary.EnteredSubtotal.TotalInTimeSection=0
summary.ExitedSubtotal.Hour=0
summary.ExitedSubtotal.Today=0
summary.ExitedSubtotal.Total=0
summary.ExitedSubtotal.TotalInTimeSection=0
summary.InsideSubtotal.Total=0
summary.RuleName=NumberStat
summary.UTC=1632755368
I suppose i receive '0' because summary.RuleName=NumberStat, not ManNumDetection. Different rule types.
But how to get the summary for RuleName=ManNumDetection?
I have only pdf for API 2.78, there are no any request parameters for selecting RuleName, i can choose only a channel. Are there any additional parameters in API 2.84?
Please help to find right request for me.
Temporary solution is sending "Goto Preset" request first:
http://<server>/cgi-bin/ptz.cgi?action=start&channel=1&code=GotoPreset&arg1=0&arg2=7&arg3=0
After that I can receive current people count with "People Count Information" subscription.
But I think there are more elegant solution exists.
 
Top