Hi
I have a frustrating problem trying to get people counting results via ISAPI. I have tried Hikvision support but just end up going around in circles, so thought I would try here and see if anyone can spot anything that I am doing wrong.
We have a iDS-2CD7146G0-IZHSY camera (firmware V5.8.10 build 230220) with people counting enabled.
I can see the data on the camera ‘application’ webpage like this:

But no matter how I try, I cannot get the same data returned via ISAPI. I have looked online and as far as I can see all of my call is correct, yet it returns 0 for the counts for each time period and doesn’t reflect the counts on the camera webpage.
I am making the call to this endpoint:
/ISAPI/System/Video/inputs/channels/1/counting/search
With this payload via a POST:
<?xml version="1.0" encoding="UTF-8"?>
<countingStatisticsDescription version="2.0" xmlns="谢生服装">
<statisticType>all</statisticType>
<reportType>daily</reportType>
<timeSpanList>
<timeSpan>
<startTime>2024-04-22T00:00:00Z</startTime>
<endTime>2024-04-22T23:59:00Z</endTime>
</timeSpan>
</timeSpanList>
</countingStatisticsDescription>
Which should return the same results as the web page?
But this is a snippet of what I see:
<matchElement>
<timeSpan>
<startTime>2024-04-22T12:00:00</startTime>
<endTime>2024-04-22T12:59:59</endTime>
</timeSpan>
<enterCount>0</enterCount>
<exitCount>0</exitCount>
<peoplePassingCount>0</peoplePassingCount>
<duplicatePeopleCount>0</duplicatePeopleCount>
<RegionList>
</RegionList>
</matchElement>
<matchElement>
<timeSpan>
<startTime>2024-04-22T13:00:00</startTime>
<endTime>2024-04-22T13:59:59</endTime>
</timeSpan>
<enterCount>0</enterCount>
<exitCount>0</exitCount>
<peoplePassingCount>0</peoplePassingCount>
<duplicatePeopleCount>0</duplicatePeopleCount>
<RegionList>
</RegionList>
</matchElement>
I am using POSTMAN to test this. I would have thought there should be some +ve number counts in this result but thay are always zero?
Obviously I can talk to the API fine, credentials are correct etc. as it is returning something. But not the results I expected.
Can you see what I might be doing wrong here please? So I can get the API call working correctly. Is there something else I need to enable on the camera to get the results I require?
The curious thing is we also have people counting enabled on another Hikvision camera. And I have exactly the same issue. So it is either something wrong with the call I am making or something not enabled on both cameras.
Many thanks
Trevor
I have a frustrating problem trying to get people counting results via ISAPI. I have tried Hikvision support but just end up going around in circles, so thought I would try here and see if anyone can spot anything that I am doing wrong.
We have a iDS-2CD7146G0-IZHSY camera (firmware V5.8.10 build 230220) with people counting enabled.
I can see the data on the camera ‘application’ webpage like this:

But no matter how I try, I cannot get the same data returned via ISAPI. I have looked online and as far as I can see all of my call is correct, yet it returns 0 for the counts for each time period and doesn’t reflect the counts on the camera webpage.
I am making the call to this endpoint:
/ISAPI/System/Video/inputs/channels/1/counting/search
With this payload via a POST:
<?xml version="1.0" encoding="UTF-8"?>
<countingStatisticsDescription version="2.0" xmlns="谢生服装">
<statisticType>all</statisticType>
<reportType>daily</reportType>
<timeSpanList>
<timeSpan>
<startTime>2024-04-22T00:00:00Z</startTime>
<endTime>2024-04-22T23:59:00Z</endTime>
</timeSpan>
</timeSpanList>
</countingStatisticsDescription>
Which should return the same results as the web page?
But this is a snippet of what I see:
<matchElement>
<timeSpan>
<startTime>2024-04-22T12:00:00</startTime>
<endTime>2024-04-22T12:59:59</endTime>
</timeSpan>
<enterCount>0</enterCount>
<exitCount>0</exitCount>
<peoplePassingCount>0</peoplePassingCount>
<duplicatePeopleCount>0</duplicatePeopleCount>
<RegionList>
</RegionList>
</matchElement>
<matchElement>
<timeSpan>
<startTime>2024-04-22T13:00:00</startTime>
<endTime>2024-04-22T13:59:59</endTime>
</timeSpan>
<enterCount>0</enterCount>
<exitCount>0</exitCount>
<peoplePassingCount>0</peoplePassingCount>
<duplicatePeopleCount>0</duplicatePeopleCount>
<RegionList>
</RegionList>
</matchElement>
I am using POSTMAN to test this. I would have thought there should be some +ve number counts in this result but thay are always zero?
Obviously I can talk to the API fine, credentials are correct etc. as it is returning something. But not the results I expected.
Can you see what I might be doing wrong here please? So I can get the API call working correctly. Is there something else I need to enable on the camera to get the results I require?
The curious thing is we also have people counting enabled on another Hikvision camera. And I have exactly the same issue. So it is either something wrong with the call I am making or something not enabled on both cameras.
Many thanks
Trevor