This document is deprecated, please go to Tuya Developer Documentation Center to view the latest version: Tuya Smart Doc - Android SDK

1.1. PTZ control

Tuya PTZ camera can be remotely controlled to rotate in the specified direction through Tuya Smart IPC SDK.

When the SDK controls the pan / tilt head to rotate, it is not a unit angle rotation. After the SDK issues a rotation start command, the device will rotate uniformly in the specified direction until it fails to rotate or receives a command to stop rotation.

Before starting to control the PTZ camera rotation, you need to determine whether the current device supports PTZ control.


mTuyaCameraDevice.registorTuyaCameraDeviceControlCallback(DpPTZControl.ID, new ITuyaCameraDeviceControlCallback<String>() {
  public void onSuccess(String s, DpNotifyModel.ACTION action, DpNotifyModel.SUB_ACTION sub_action, String o) {
    showPublishTxt.setText("LAN/Cloud query result: " + o);

  public void onFailure(String s, DpNotifyModel.ACTION action, DpNotifyModel.SUB_ACTION sub_action, String s1, String s2) {

mTuyaCameraDevice.publishCameraDps(DpPTZControl.ID, PTZDirection.LEFT);//rotate left
mTuyaCameraDevice.publishCameraDps(DpPTZStop.ID, null); // stop rotate

results matching ""

    No results matching ""