Trigger alarm by CURL

TheDude69

n3wb
Joined
Oct 25, 2018
Messages
3
Reaction score
1
Location
Germany
Hello Community,

I have got a HIK DS-2CD2622FWD-IS camera. There is an alarm defined that triggers a mechanism to open and close a gate. This works fine so far when using the HIK Vison iVMS4200 client. But what I like to do ist to open and close the gate by a batch file using CURL.

I can do the following:
curl.exe -T test.xml http://user:pwd@ip-address:80/ISAPI/SYSTEM/IO/outputs/1/trigger

The content of the xml file is the following:
<IOPortData version="2.0" xmlns="http://www.isapi.org/ver20/XMLSchema">
<outputState>low</outputState>
</IOPortData>

When doing this I receive:
<?xml version="1.0" encoding="UTF-8"?>
<ResponseStatus version="2.0" xmlns="http://www.hikvision.com/ver20/XMLSchema">
<requestURL>/ISAPI/SYSTEM/IO/outputs/1/trigger</requestURL>
<statusCode>1</statusCode>
<statusString>OK</statusString>
<subStatusCode>ok</subStatusCode>
</ResponseStatus>

But from here I do not know how to do the next step. Here is a screenshot showing the configuration in the camera:

upload_2019-5-22_14-31-33.png

Has anyone an idea what I have to put into the xml file to open and close the gate?

Many thanks in advance,
best regards

TheDude
 

StewartM

Getting the hang of it
Joined
Dec 11, 2017
Messages
260
Reaction score
75
Location
Cape Town
I'm keen to follow your progress with this. I have no experience with what you are attempting but does anything happen when you change the outputState to high in your test.xml?
<outputState>high</outputState>
 

TheDude69

n3wb
Joined
Oct 25, 2018
Messages
3
Reaction score
1
Location
Germany
Hi StewartM,

... got it. The mistake was only to send a high or a low. But sending a high follwed by a low starts the alarm and obviousley resets the channel. Now it is perfect. :)

Thank you very much!

Best regards
TheDude
 
Top