1. API List

This section contains the APIs of PTZ control.

The API list is as the follows:

No. Function Description
1 Start PTZ control Start PTZ
2 Stop PTZ control Stop PTZ
3 Mirror Flip Mirror flip
4 Add preset Add preset
5 Call preset Call preset
6 Clear preset Clear preset

1.1 Start PTZ Control

  • API Function

    Start the PTZ control. For other operations, including pan and tilt, call Stop PTZ Control API to stop the PTZ control first.

  • Request Address

    {areaDomain}/api/lapp/device/ptz/start

  • Request Type

    POST

  • Request Parameters
Parameter Type Description Required
accessToken String The access_token during authentication. Y
deviceSerial String The device serial No.. Y
channelNo int Channel No. Y
direction int Operation Command: 0-Up, 1-Down, 2-Left, 3-Right, 4-Upper-left, 5-Lower-left, 6-Upper-right, 7-Lower-right, 8-Zoom in, 9-Zoom out, 10-Focus Near, 11-Focus Far Y
speed int PTZ speed:0-Slow,1-Medium,2-Fast Y
  • HTTP Request Message

    POST /api/lapp/device/ptz/start HTTP/1.1
    Host: isgpopen.ezvizlife.com
    Content-Type: application/x-www-form-urlencoded
    accessToken=at.4g01l53x0w22xbp30ov33q44app1ns9m&deviceSerial=502608888&channelNo=1&direction=2&speed=1
    

  • Return Data

    {
      "code": "200",
      "msg": "Operating succeeded!"
    }
    

  • Returned Code
Returned Code Returned Message Description
200 Operation succeeded. Requesting succeeded.
10001 Parameters error. Parameter is empty or the format is incorrect.
10002 accessToken exception or expired. Get accessToken again.
10005 appKey exception. appKey is frozen.
20002 Device does not exist.
20006 Network exception. Check the network status. Try again.
20007 The device is offline. Check whether the device is online.
20008 Device requesting timeout. No more operations. Try again.
20014 Network exception. Check the network status. Try again.
20032 The channel does not exist in this user. Check whether the device has this channel.
49999 Data exception. Calling the API exception.
60000 The device does not support PTZ control The device encryption is enabled.
60001 No PTZ control permission. The device encryption is enabled.
60002 Device PTZ reached upper limit.
60003 Device PTZ reached lower limit.
60004 Device PTZ reached left limit.
60005 Device PTZ reached right limit.
60006 PTZ operation failed. Try later.
60009 Calling the preset.
60020 This command is not supported. Confirm whether the device supports this operation.

1.2 Stop PTZ Control

  • API Function

    The device stopped PTZ control

  • Request Address

    {areaDomain}/api/lapp/device/ptz/stop

  • Request Type

    POST

  • Request Parameters

Parameter Type Description Required
accessToken String The access_token during authentication. Y
deviceSerial String The device serial No.. Y
channelNo int Channel No. Y
  • HTTP Request Message

    POST /api/lapp/device/ptz/stop HTTP/1.1
    Host: isgpopen.ezvizlife.com
    Content-Type: application/x-www-form-urlencoded
    accessToken=at.25ne3gkr6fa7coh34ys0fl1h9hryc2kr&deviceSerial=568261888&channelNo=1
    

  • Return Data

    {
      "code": "200",
      "msg": "Operating succeeded!"
    }
    

  • Returned Code
Returned Code Returned Message Description
200 Operation succeeded. Requesting succeeded.
10001 Parameters error. Parameter is empty or the format is incorrect.
10002 accessToken exception or expired. Get accessToken again.
10005 appKey exception. appKey is frozen.
20002 Device does not exist.
20006 Network exception. Check the network status. Try again.
20007 The device is offline. Check whether the device is online.
20008 Device requesting timeout. No more operations. Try again.
20014 Network exception. Check the network status. Try again.
20032 The channel does not exist in this user. Check whether the device has this channel.
49999 Data exception. Calling the API exception.
60000 The device does not support PTZ control The device encryption is enabled.
60001 No PTZ control permission. The device encryption is enabled.
60006 PTZ operation failed. Try later.
60009 Calling the preset.
60020 This command is not supported. Confirm whether the device supports this operation.

1.3 Mirror Filp

  • API Function:

    Operate the mirror flip (should be supported by device).

  • Request Address:

      `{areaDomain}/api/lapp/device/ptz/mirror`
    
  • Request Type

    `POST`
    
  • Request Parameters

Parameter Type Description Required
accessToken String The access_token during authentication. Y
deviceSerial String The device serial No.. Y
channelNo int Channel No. Y
command int Mirror direction:0-Up/Down, 1-Left/Right,2-Center Y
  • HTTP Request Message

    POST /api/lapp/device/ptz/mirror HTTP/1.1
    Host: isgpopen.ezvizlife.com
    Content-Type: application/x-www-form-urlencoded
    accessToken=at.9mqitppidgce4y8n54ranvyqc9fjtsrl&deviceSerial=427734888&channelNo=1&command=2
    

  • Return Data

    {
      "code": "200",
      "msg": "Operating succeeded!"
    }
    

  • Returned Code

Returned Code Returned Message Description
200 Operation succeeded. Requesting succeeded.
10001 Parameters error. Parameter is empty or the format is incorrect.
10002 accessToken exception or expired. Get accessToken again.
10005 appKey exception. appKey is frozen.
20002 Device does not exist.
20006 Network exception. Check the network status. Try again.
20007 The device is offline. Check whether the device is online.
20008 Device requesting timeout. No more operations. Try again.
20014 Network exception. Check the network status. Try again.
20032 The channel does not exist in this user. Check whether the device has this channel.
49999 Data exception. Calling the API exception.
60000 The device does not support PTZ control The device encryption is enabled.
60001 No PTZ control permission. The device encryption is enabled.
60006 PTZ operation failed. Try later.
60009 Calling the preset.
60020 This command is not supported. Confirm whether the device supports this operation.

1.4 Add Preset

  • API Function:

    Add preset (should be supported by device)

  • Request Address:

    {areaDomain}/api/lapp/device/preset/add

  • Request Type

    POST

  • Request Parameters
Parameter Type Description Required
accessToken String The access_token during authentication. Y
deviceSerial String The device serial No.. Y
channelNo int Channel No. Y
  • HTTP Request Message

    POST /api/lapp/device/preset/add HTTP/1.1
    Host: isgpopen.ezvizlife.com
    Content-Type: application/x-www-form-urlencoded
    accessToken=at.25ne3gkr6fa7coh34ys0fl1h9hryc2kr&deviceSerial=568261888&channelNo=1
    

  • Return Data

    {
      "data": {

      "index": 3
    

    }, "code": "200", "msg": "Operating succeeded!" } </pre>

  • Return Field
Field Name Type Description
index int Preset No.,for C6 device, the No.s is from 1 to 12.This parameters should be saved by the developer.
  • Returned Code
Returned Code Returned Message Description
200 Operation succeeded. Requesting succeeded.
10001 Parameters error. Parameter is empty or the format is incorrect.
10002 accessToken exception or expired. Get accessToken again.
10005 appKey exception. appKey is frozen.
20002 Device does not exist.
20006 Network exception. Check the network status. Try again.
20007 The device is offline. Check whether the device is online.
20008 Device requesting timeout. No more operations. Try again.
20014 Network exception. Check the network status. Try again.
20032 The channel does not exist in this user. Check whether the device has this channel.
49999 Data exception. Calling the API exception.
60000 The device does not support PTZ control The device encryption is enabled.
60001 No PTZ control permission. The device encryption is enabled.
60006 PTZ operation failed. Try later.
60007 No more preset can be set.
60008 No more C6 preset can be added. The maximum C6 preset number is 12.

1.5 Call Preset

  • API Function:

    Call the preset

  • Request Address:

    {areaDomain}/api/lapp/device/preset/move

  • Request Type

    POST

  • Request Parameters
Parameter Type Description Required
accessToken String The access_token during authentication. Y
deviceSerial String The device serial No.. Y
channelNo int Channel No. Y
index int Preset, the preset No.s of C6 device is from 1 to 12. Y
  • HTTP Request Message

    POST /api/lapp/device/preset/move HTTP/1.1
    Host: isgpopen.ezvizlife.com
    Content-Type: application/x-www-form-urlencoded
    accessToken=at.25ne3gkr6fa7coh34ys0fl1h9hryc2kr&deviceSerial=568261888&channelNo=1&index=3
    

  • Return Data

    {
      "code": "200",
      "msg": "Operating succeeded!"
    }
    

  • Returned Code
Returned Code Returned Message Description
200 Operation succeeded. Requesting succeeded.
10001 Parameters error. Parameter is empty or the format is incorrect.
10002 accessToken exception or expired. Get accessToken again.
10005 appKey exception. appKey is frozen.
20002 Device does not exist.
20006 Network exception. Check the network status. Try again.
20007 The device is offline. Check whether the device is online.
20008 Device response overtime. Too many operations. Try later.
20014 Illegal deviceSerial
20018 No this device. Chcek whether the device is belong to the current account.
20032 The channel does not exist. The channel does not exist.
49999 Data exception. API call exception.
60000 The device does not support PTZ control The device encryption is enabled.
60001 No PTZ control permission. The device encryption is enabled.
60006 The current PTZ operation failed. Try later.
60009 Calling preset.
60010 Preset called.
60011 The presst does not exist.
60020 This command is not supported. Confirm whether the device supports this operation.

1.6 Clear Preset

  • API Function:

    Clear preset

  • Request Address:

    {areaDomain}/api/lapp/device/preset/clear

  • Request Type

    POST

  • Request Parameters
Parameter Type Description Required
accessToken String The access_token during authentication. Y
deviceSerial String The device serial No.. Y
channelNo int Channel No. Y
index int Preset, the preset No.s of C6 device is from 1 to 12. Y
  • HTTP Request Message

    POST /api/lapp/device/preset/clear HTTP/1.1
    Host: isgpopen.ezvizlife.com
    Content-Type: application/x-www-form-urlencoded
    accessToken=at.25ne3gkr6fa7coh34ys0fl1h9hryc2kr&deviceSerial=568261888&channelNo=1&index=3
    

  • Return Data

    {
      "code": "200",
      "msg": "Operating succeeded!"
    }
    

  • Returned Code

Returned Code Returned Message Description
200 Operation succeeded. Requesting succeeded.
10001 Parameters error. Parameter is empty or the format is incorrect.
10002 accessToken exception or expired. Get accessToken again.
10005 appKey exception. appKey is frozen.
20002 Device does not exist.
20006 Network exception. Check the network status. Try again.
20007 The device is offline. Check whether the device is online.
20008 Device response overtime. Too many operations. Try later.
20014 Illegal deviceSerial
20018 No this device. Chcek whether the device is belong to the current account.
20032 The channel does not exist. The channel does not exist.
49999 Data exception. API call exception.
60000 The device does not support PTZ control The device encryption is enabled.
60001 No PTZ control permission. The device encryption is enabled.
60006 The current PTZ operation failed. Try later.
60020 This command is not supported. Confirm whether the device supports this operation.

results matching ""

    No results matching ""