Can't seem to add a camera or make the search work

Answered

Comments

3 comments

  • Avatar
    Andrey Terentyev

    Hello Ron,

    What version are you using?

    It's very complicated to help you without having your code. Could you share your code please?

    You can use this example python/examples/add_camera_digest.py in our github repo.

    https://github.com/networkoptix/nx_open_integrations/

     

    0
    Comment actions Permalink
  • Avatar
    Ron

    Hi, I am not clear about the usage of the given code that you provided.

    What I am trying to do is quite simple (At least in the GUI).

    I have a camera from an unknown manufacturor, I know the RTSP stream full address . ( I tried 3100 as others don't work as it's not recognized, I am also not clear about how should I know what to use here...)

    I am trying (with correct credential of course) the following:

    My RTSP is not password protected, I am not sure that I am clear about the uniqueId and using a MAC address of any generated unique ID is fine.

    When I try it, the response is the following: {"error":"0","errorString":"","reply":null}, but nothing is added.

    Requested URL:

    curl "http://****:*****@***.***.***.***:7001/api/manualCamera/add" --data @doda.json -sv 

    Curl output:

    POST /api/manualCamera/add HTTP/1.1
    > Host: ***.***.***.***:7001
    > Authorization: Basic YWRtaW46SnVnYW51MTIz
    > User-Agent: curl/7.68.0
    > Accept: */*
    > Content-Length: 224
    > Content-Type: application/x-www-form-urlencoded

    * upload completely sent off: 224 out of 224 bytes
    * Mark bundle as not supporting multiuse
    < HTTP/1.1 200 OK
    < Date: Thu, 19 May 2022 14:26:12 +0300
    < Pragma: no-cache
    < Server: Nx Witness/4.2.0.32840 (Network Optix) Apache/2.4.16 (Unix)
    < Connection: Keep-Alive
    < Keep-Alive: timeout=5
    < Content-Type: application/json
    < Cache-Control: post-check=0, pre-check=0
    < Cache-Control: no-store, no-cache, must-revalidate, max-age=0
    < Content-Length: 43
    < Access-Control-Allow-Origin: *

    * Connection #0 to host 192.168.10.21 left intact
    {"error":"0","errorString":"","reply":null

     

    JSON file:

    {
        "user": "",
        "password": "",
        "cameras":
        [
            {
                "uniqueId": "00-1A-07-00-FF-FA",
                "url": "rtsp://10.1.0.111:8555/my_stream_path",
                "manufacturer": "3100"
            }
        ]
    }

    Thanks for supporting.

     

     

    0
    Comment actions Permalink
  • Avatar
    Andrey Terentyev

    Hello Ron,

    Here is the detailed article on the topic in question.

    https://support.networkoptix.com/hc/en-us/articles/360026015473-Adding-a-Camera-or-RTSP-Stream-Using-API

     

    0
    Comment actions Permalink

Please sign in to leave a comment.