How to open control barrier using Hikvision Camera?

black1906

n3wb
Joined
Dec 9, 2021
Messages
25
Reaction score
1
Location
USA
First of all, sorry if i'm posting in the wrong place and sorry for my english (not my first language).
So, im using a Hikvision Camera (Hikvision DeepinView Series/IP Camera/ iDS-2CD7A26G0/P-IZHS).

I created my own server (using Node.JS) and redirected the camera to send the capture info to this server. When i receive it, i will check in my OWN DATABASE if the plate number i received from the camera can enter or not. It needs to be like this, because i need to check for a LOT of things to decide if a plate has free acess or not. So far,so good. Everything is working. The only part i'm missing is: opening the control barrier if the car has free access.

I have tried everything on Hikvision official guide page (Log In) with no success. I get error messages like "method not supported" or "device error" or even "404 not found" on all the URLs they tell me to use on this guide (i'm using Postman and i get this error using either GET,PUT or POST). In the final line of the guide,its written: "Call /ISAPI/ITC/Entrance/barrierGateCtrl by PUT method to control barrier gate status.". I was 100% sure that this would open the barrier but it does not... I get "device error" as response.

I have no idea what to do and i'm really lost. I need to finish this ASAP and every help is welcome.
PS.: I have done all steps in the guide. Yes, my camera does have access to barrier gate control functions and yes, my camera is connected to the barrier already.
Thank you so much for your time/answer.
 

trempa92

Pulling my weight
Joined
Mar 26, 2020
Messages
786
Reaction score
247
Location
Croatia,Zagreb
You need to trigger Alarm output 1 or 2

There is SDK for that.

If u really want PUT/POST/GET way, there is a button inside web interface that triggers alarmoutput manually by clicking it. Check what it does(inspect it) and recreate it :D

Cheers
 

black1906

n3wb
Joined
Dec 9, 2021
Messages
25
Reaction score
1
Location
USA
You need to trigger Alarm output 1 or 2

There is SDK for that.

If u really want PUT/POST/GET way, there is a button inside web interface that triggers alarmoutput manually by clicking it. Check what it does(inspect it) and recreate it :D

Cheers
Hi,Thanks for the answer!
"
You need to trigger Alarm output 1 or 2

There is SDK for that. "
Can you elaborate a little bit more on that please? Is this by using url " ISAPI/ System/IO/outputs/<ID>/trigger " ?
I have tried like this,using "1" instead of "<ID>" and i think it sort of worked (even tho my barrier did not open)
"
<?xml version="1.0" encoding="UTF-8"?>
<ResponseStatus version="2.0" xmlns="">
<requestURL>/ISAPI/System/IO/outputs/1/trigger</requestURL>
<statusCode>1</statusCode>
<statusString>OK</statusString>
<subStatusCode>ok</subStatusCode>
</ResponseStatus>
"
This is the response i get.

And second, the button you're refering to is the one inside "Events->Alarm Exit"?
Thank you so much for your answer.
 

trempa92

Pulling my weight
Joined
Mar 26, 2020
Messages
786
Reaction score
247
Location
Croatia,Zagreb
Entire hikvision product line work by their SDK.
It is public and free to use:


IVMS4200 is Windows Desktop APP that uses Hikvision SDK.

You can make your own with this SDK. But well, it is tad more difficult than using URL links and parsing responses :D
 

black1906

n3wb
Joined
Dec 9, 2021
Messages
25
Reaction score
1
Location
USA
Entire hikvision product line work by their SDK.
It is public and free to use:


IVMS4200 is Windows Desktop APP that uses Hikvision SDK.

You can make your own with this SDK. But well, it is tad more difficult than using URL links and parsing responses :D
Thanks,it helped me a lot. I managed to make it work. Thank you!!!!!!!!!
 
Joined
Nov 28, 2023
Messages
9
Reaction score
1
Location
Maroc
Hi sir , you can opening the control barrier by sdk or ISAPI.? because i have same prob with ds-tcg406-e.

great
 

trempa92

Pulling my weight
Joined
Mar 26, 2020
Messages
786
Reaction score
247
Location
Croatia,Zagreb
@driss.elalaoui Thats camera not barrier. It has alarm output and you can actually open it via isapi.BUT when you open it you also need to manually close it.

So Open,timer,close

I made an ASP.NET node /unlockGate that i call on image click at frontweb

1701178371936.png

And you have 2 methods that are being called, Unlock and Lock or Open/Close

1701178418229.png

1701178433880.png

Hope it helps, cheers
 
Joined
Nov 28, 2023
Messages
9
Reaction score
1
Location
Maroc
Yea you can do standard .netcore console app

Press O to open for example

handle user input and perform Open task, delay, close task
i try with console core it give this error :
{StatusCode: 403, ReasonPhrase: 'Forbidden', Version: 1.1, Content: System.Net.Http.StreamContent, Headers:
 

Attachments

trempa92

Pulling my weight
Joined
Mar 26, 2020
Messages
786
Reaction score
247
Location
Croatia,Zagreb
That means its not authorizing correctly for some reason. Do those credentials have admin access?
 

trempa92

Pulling my weight
Joined
Mar 26, 2020
Messages
786
Reaction score
247
Location
Croatia,Zagreb
If you got time today, i can hop in via teamviewer and take a look. im at gmt+1

Can you try this PUT in postman?Authorization Digest
 
Top