ARM / DISARM through API
AnsweredWhen user presses the soft trigger and sends a HTTP command to AI BOX to disarm a function, the function is not disarmed.
Please refer to the images attached.

-
Hello Jimmy,
there could be multiple reasons for this:
1) Does AI box supports Basic Authentication? It is possible AI box may work only with digest authentication, so you can try to switch authentication type to auto.
2) Check VMS server log file. Make sure that server log level is set at WARNING or higher and look for messages with QMessageLogContext prefix related to your software rule. You can check our log related article to learn how to find log files or set proper log level - https://support.networkoptix.com/hc/en-us/articles/236033688-How-to-change-software-logging-level-and-how-to-get-logs
3) Try to trigger ARM/DISARM feature with curl command to make sure that the provided example in user manual works properly:
curl -v -X POST https://ADMIN:<PASSWORD>@192.168.2.50/api/rule/es/disarm/ -H 'Content-Type: application/json' -d '{"is_disarm_req":true}'0 -
Thank you for the detail information.
I received more information from our customers.
Please refer to the information below and image attached.
Info. #1
I did some test with CURL and found following issue:
When I send the URL like you descriped, I receive a SSL error on the selfsigned certificate.

When I add the option in the command to ignore the SSL error (-k) , it is working:

Info. #2
I’ve searched a little further because I ran into problems with older programs I made with V3 and V4.0 of NX server but it did not work anymore on V4.1.
It seems the SSL authentication was the issue in V4.1 that was rejection the CURL connection.
I had to disable :
- CURL_SSL_VERIFYPEER , 0L
- CURL_SSL_VERIFYHOST, 0
When I added these lines into my CURL initialisation, it worked again on V4.1.
0
Please sign in to leave a comment.
Comments
2 comments