PTZ Control

Last Updated on : 2023-06-15 05:28:58

Control the rotation of the camera, such as pan, tilt, stop, and other operations.

API address

POST: /v1.0/cameras/{device_id}/configs/ptz

Request parameter

Parameter nameTypeINRequiredDescription
device_idStringuritrueThe ID of a Tuya device.

Description of body

Parameter nameTypeINRequiredDescription
valueString trueThe direction. Valid values:
  • UP: Rotate upwards.
  • RIGHT_UP: Rotate toward the top right.
  • RIGHT: Rotate toward the right.
  • RIGHT_DOWN: Rotate toward the lower right.
  • DOWN: Rotate downwards.
  • LEFT_DOWN: Rotate toward the lower left.
  • LEFT: Rotate toward the left.
  • LEFT_UP: Rotate toward the top left.
  • STOP: Stop the rotation.

Return parameter

Parameter nameTypeDescription
resultCmdIssueResultResponseThe returned result.

Description of result

Parameter nameTypeDescription
snStringThe ID of a specified command record.

Request example

POST: /v1.0/cameras/6ce****/configs/ptz
{
  "value": "UP"
}

Return example

{
    "result": {
        "sn": "133****"
    },
    "t": 1561456817168,
    "success": true
}

Error code

For more information, see error code.