Comments

3 comments

  • Avatar
    Andrey Terentyev

    Hello Yaron Chermak,

    Could you please elaborate your objective? What are you trying to achieve with this API?

    0
    Comment actions Permalink
  • Avatar
    Yaron Chermak

    According to the API documentation the function /api/setCameraParam "Sets values of several camera parameters. These parameters are used on the Advanced tab in camera settings. For instance: brightness, contrast, etc.". We would like to know which paramValues could we use for this function in order to change the brightness and contast options for instance for the following camera.

    Thanks in advance.

     

    0
    Comment actions Permalink
  • Avatar
    Andrey Terentyev

    Hi Yaron Chermak,

    The procedure is the following:

    1. Call  /api/getCameraParamManifest?cameraId=[cameraId]

    You'll get a structure in what you could find an id of the parameter the value of which you want to change.

    2. Call /api/setCameraParam

    JSON object to be passed should have the structure

    {
    "cameraId":"<camera id>",
    "paramValues":{"<parameter id>":"<parameter value>"}
    }

    Here is an example.

    In my lab, I have a camera with these advanced parameters.

    I want to change "Max Exposure Time"

    Here is the quotation from the getCameraParamManifest output

    Here is the code changing the value of the parameter having the "ieMaxTime" id.

        payload = {
                "cameraId": "522007fa-1279-c117-2131-2071e3f28afd",
                "paramValues": {"ieMaxETime" : "1000"}
            }
     
        result = request_api(
           SERVER_URL,
           f'/api/setCameraParam',
           'POST',
           auth=HTTPDigestAuth(USERNAME, PASSWORD),
           json = payload,
           verify = False)
    0
    Comment actions Permalink

Please sign in to leave a comment.