changeCameraPassword (X) API Functionality

Answered

Comments

1 comment

  • Official comment
    Avatar
    Tagir Gadelshin

    Hi, claire peters

    Thank you for reaching out to us!

    If you kindly elaborate a bit on your scenarios: what camera you use, what for, what user should see, and so on -- that would be helpful.

    Regarding setUserPasswordCapability. I doubt that you receive an error because of this flag. Nonetheless, as this is not covered in our API documentation, I'll explain it here. We will add it in API documentation in the future, thanks for pointing that out.

    This capability is stored in cameraCapabilities returned by es2/getCamerasEx

    It is returned as a number, but it's actually an enum with flags. And setUserPasswordCapability is 9th (starting from 0, of course).

    Full list of capabilities:

    enum CameraCapability {
            NoCapabilities = 0,
            // 1 << 0 is skipped.
            // 1 << 1 is skipped.
            PrimaryStreamSoftMotionCapability = 1 << 2,
            InputPortCapability = 1 << 3,
            OutputPortCapability = 1 << 4,
            ShareIpCapability = 1 << 5,
            AudioTransmitCapability = 1 << 6,
            // 1 << 7 is skipped.
            RemoteArchiveCapability = 1 << 8,
            SetUserPasswordCapability = 1 << 9, //< Can change password on a camera.
            IsDefaultPasswordCapability = 1 << 10, //< Camera has default password now.
            IsOldFirmwareCapability = 1 << 11, //< Camera has too old firmware.
            CustomMediaUrlCapability = 1 << 12, //< Camera's streams are editable.
            IsPlaybackSpeedSupported = 1 << 13, //< For NVR which support playback speed 1,2,4 e.t.c natively.
            DeviceBasedSync = 1 << 14, //< For NVR if channels are depend on each other and can play synchronously only.
            DualStreamingForLiveOnly = 1 << 15,
            CustomMediaPortCapability = 1 << 16, //< Camera's media streams port are editable.
            CameraTimeCapability = 1 << 17, //< Camera sends absolute timestamps in media stream
            FixedQualityCapability = 1 << 18, //< Camera does not allow to change stream quality/fps
            MulticastStreamCapability = 1 << 19, //< Camera supports multicast streaming.
            ServerBoundCapability = 1 << 20, //< Camera is bound to a particular server.
            DontAutoOpenCamera = 1 << 21, //< Server should not open video from camera at its will.
            NoAnalytics = 1 << 22, //< Analytics Engines should not bind to Device.
            IsOnvifDevice = 1 << 23, //< Camera is initialized as QnPlOnvifResource or its descendant.
        };

    Let me give you an example. So for me ec2/getCamerasEx (or GET rest/v1/devices from our new API available in early for developers preview) returns me this, among other information:

    {
    "name": "cameraCapabilities",
    "value": "721496"
    }
    721 496 = 0b10110000001001011000, and the number 9 (effectively 10th from the end) flag is 1, that means setUserPasswordCapability is TRUE for this camera.

    This SetUserPasswordCapability should be 1 for all cameras, that have "Edit Credentials" button in camera settings in Nx Meta Client UI (check Camera Settings). It should be so for all cameras, I haven't seen cameras without this.

    Please
    1. Check Camera Settings for that camera (find name field in ec2/getCamerasEx response and find it in the tree)
    2. Check that you're using the correct id
    3. Check that you're using an owner account when performing this API call
    4. Check if setUserPasswordCapability is 1 for this device (if it is a regular camera, then most likely it will be 1)

    Please, let me know the results!

    Comment actions Permalink

Please sign in to leave a comment.