Hikvision get data of leave and enter fields

Discussion in 'Hikvision' started by Сергей БордÑ￾, May 30, 2016.

Share This Page

  1. Сергей БордÑ￾

    Сергей БордÑ￾ n3wb

    Joined:
    May 30, 2016
    Messages:
    3
    Likes Received:
    0
    Hello!
    I am using Hikvision model ids-2cd6412fwd/c.
    I want to get data of fields leave and enter in any time through an api or whatever else. These data is in the upper right corner of the camera's video.
    The problem is that I haven't found the way to do it in documentation.
    Does anybody know or has the idea how to do it?
     
  2. wzhick

    wzhick Pulling my weight

    Joined:
    Dec 29, 2014
    Messages:
    60
    Likes Received:
    137
    /isapi
     

    Attached Files:

    • sc1.PNG
      sc1.PNG
      File size:
      140.7 KB
      Views:
      94
    • sc2.PNG
      sc2.PNG
      File size:
      188.3 KB
      Views:
      89
  3. Сергей БордÑ￾

    Сергей БордÑ￾ n3wb

    Joined:
    May 30, 2016
    Messages:
    3
    Likes Received:
    0
    Thanks a lot for answer!
    It helped, but this number of people entered and left is updated in that report not immediately.
    What I was interested if I can take the values that are shown in the video. They are updated immediately.
    Or maybe not exactly that numbers, but notification about the event of people entered or left.
     
  4. wzhick

    wzhick Pulling my weight

    Joined:
    Dec 29, 2014
    Messages:
    60
    Likes Received:
    137
    use "Data statistics cycle" value to set period for request.
     
  5. Сергей БордÑ￾

    Сергей БордÑ￾ n3wb

    Joined:
    May 30, 2016
    Messages:
    3
    Likes Received:
    0
    Thank you for your answer!
    Data statistics cycle minimum value is 1 minute.
    So there is no possibility to get data about new people entered or left immediately?
     
  6. Adnand

    Adnand n3wb

    Joined:
    Dec 13, 2016
    Messages:
    2
    Likes Received:
    0
    Hi,
    am getting this xml content for the same problem


    <?xml version="1.0" encoding="UTF-8" ?>
    <ResponseStatus version="2.0">
    <requestURL>
    /ISAPI/System/Video/inputs/channels/101/counting/search
    </requestURL>
    <statusCode>
    3
    </statusCode>
    <statusString>
    Device Error
    </statusString>
    <subStatusCode>
    deviceError
    </subStatusCode> </ResponseStatus>
     
  7. BenskiBoy

    BenskiBoy n3wb

    Joined:
    Dec 12, 2018
    Messages:
    1
    Likes Received:
    0
    Location:
    Melbourne Australia
    @Adnand has probably been solved his issue but I'll leave this here for anyone else who has this problem in the future as I just spent half a day trying to get it working.

    It's not made to clear elsewhere but you REALLY need to have a payload specifying the time range for the data you want otherwise you get the statusCode 3 error.

    See below python 3 code snipet.
    Note that the username and password fields needs to be URL encoded (URL Decoder/Encoder)

    just remember to chang all instances of <ip_address> to the ip address of your camera.

    ---------------------------
    import requests

    url = "http://<user>:<password>@<ip_address>/ISAPI/System/Video/inputs/channels/1/counting/search"

    payload = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><CountingStatisticsDescription><reportType>daily</reportType><timeSpanList><timeSpan><startTime>2018-12-13T00:00:00</startTime><endTime>2018-12-13T23:59:59</endTime></timeSpan></timeSpanList></CountingStatisticsDescription>"
    headers = {
    'accept': "*/*",
    'origin': "<ip_address>",
    'x-requested-with': "XMLHttpRequest",
    'if-modified-since': "0",
    'user-agent': "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36",
    'content-type': "application/x-www-form-urlencoded; charset=UTF-8",
    'referer': "http://<ip_address>/doc/page/application.asp",
    'accept-encoding': "gzip, deflate",
    'accept-language': "en-AU,en;q=0.9",
    'cookie': "language=en; language=en",
    'cache-control': "no-cache"
    }

    response = requests.request("POST", url, data=payload, headers=headers)

    print(response.text)
    ---------------------------
     
  8. Tolting Colt Acres

    Tolting Colt Acres Pulling my weight

    Joined:
    Jun 7, 2016
    Messages:
    324
    Likes Received:
    123
  9. MrSman

    MrSman n3wb

    Joined:
    Jan 9, 2019
    Messages:
    7
    Likes Received:
    0
    Location:
    Spain
    Hi guys.
    I have today a similar interest about this issue and I would like to know if someone have been able to invoque the ISAPI protocol calls using a Java Aplication. Is that possible to get a Hikvision Ip Camera data using Java? Thank you very much.