简体中文

Nebula指令集2

TUTK 设备接口说明 - 核心功能接口(1/8)

核心接口说明

7.1 queryLocalRecordingIntervel
接口说明

Description: 查询本地录像时间区间

Version: 1.1

Function set: playback

Request parameters:

Parameter nameData typeRequirementDescription
startTimeIntM开始时间戳(UNIX时间)
endTimeIntM结束时间戳(UNIX时间)
channelIntO通道ID

Response status code: 200, 400

Response content:

Parameter nameData typeRequirementDescription
resultsinterval object arrayM时间区间对象数组(每个区间为两个Int型UNIX时间戳组成的数组)

An interval object is an array that contains two “Int” to represent an interval of time by UNIX timestamp.

Device profile example:

{  "func":"queryLocalRecordingIntervel",  "args":{    "startTime":"Int",    "endTime":"Int",    "channels":"Array"  },  "return":{    "results":[["Int"]]  } }

Nebula command request example:

{  "func":"queryLocalRecordingIntervel",  "args":{    "startTime":1512121200,    "endTime":1515121200,    "channels":[1,2]  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK",  "content":{    "results":[[1512121200,1512131200],[1512141200,1512151200]]  } }
7.2 buildTunnel
接口说明

Description: 构建隧道连接

Version: 1.1

Function set: tunnel

Request parameters:

Parameter nameData typeRequirementDescription
protocolStringM隧道协议类型

Response status code: 200, 400

Response content:

Parameter nameData typeRequirementDescription
usernameStringM隧道认证用户名
passwordStringM隧道认证密码
iotc-channelIntMIOTC通道ID

Device profile example:

{  "func":"buildTunnel",  "args":{    "protocol":"String"  },  "return":{    "username":"String",    "password":"String",    "iotc-channel":"Int"  } }

Nebula command request example:

{  "func":"buildTunnel",  "args":{    "protocol":"iotc-tunnel"  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK",  "content":{    "username":"admin",    "password":"12345678",    "iotc-channel":1  } }
7.3 getChannelsCapabilities
接口说明

Description: 获取通道能力信息

Version: 1.1

Function set: channelInfo

Request parameters: Empty

Response status code: 200, 400

Response content:

Parameter nameData typeRequirementDescription
channelscapability object arrayM通道能力对象数组

Elements of a capability object

Parameter nameData typeRequirementDescription
channelIntM通道ID
signalStringM信号类型
capabilitiesString arrayM能力列表
hasBatteryBooleanM是否有电池
lightString arrayO灯光能力
ptzString arrayOPTZ控制能力
sensorssensor object arrayO传感器对象数组

Elements of a sensor object

Parameter nameData typeRequirementDescription
sensorStringM传感器类型
modesString arrayO传感器模式

Please check setEventRecordingTriggers for the enumeration of triggers.

Device profile example:

{  "func":"getChannelsCapabilities",  "return":{    "channels":[      {        "channel":"Int",        "signal":"String",        "capabilities":["String"],        "light":["String"],        "ptz":["String"],        "sensors":[{          "sensor":"String",          "modes":["String"]        }        ],        "hasBattery":"Boolean"      }    ]  } }

Nebula command request example:

{  "func":"getChannelsCapabilities" }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK",  "content": {    "channels": [      {        "channel": 1,        "hasBattery": false,        "signal": "TVI",        "capabilities": [          "cloudRecording",          "mic",          "speaker",          "full_duplex",          "light",          "ptz",          "sensor",          "accelerometer"        ],        "light": [          "autoDawnDusk"        ],        "ptz": [          "pan",          "tilt",          "zoom",          "nodes",          "patrol"        ],        "sensors": [          {            "sensor": "motion",            "modes": [              "motionSensor",              "pir"            ]          },          {            "sensor": "objectDetection",            "modes": [              "human",              "vehicle",              "animal"            ]          },          {            "sensor": "facialRecognition",            "modes": [              "familiar",              "unfamiliar"            ]          },          {            "sensor": "other",            "modes": [              "doorbellRing",              "lowBattery"            ]          },          {            "sensor": "soundDetection",            "modes": [              "babyCry",              "rareSound"            ]          },          {            "sensor": "schedule"          }        ]      },      {        "channel": 2,        "hasBattery": false,        "signal": "TVI",        "capabilities": [          "cloudRecording",          "speaker",          "full_duplex",          "ptz",          "sensor"        ],        "ptz": [          "pan",          "tilt",          "zoom"        ],        "sensors": [          {            "sensor": "motion",            "modes": [              "lineCrossing",              "pir"            ]          }        ]      }    ]  } }
7.4 upgradeChannelFirmware
接口说明

Description: 升级通道固件

Version: 1.1

Function set: ota

Request parameters:

Parameter nameData typeRequirementDescription
channelIntM通道ID
urlStringM固件升级包URL
autoBooleanM自动升级标识

Response status code: 200, 400

Response content: Empty

Device profile example:

{  "func": "upgradeChannelFirmware",  "args": {    "channel": "Int",    "url": "String",    "auto": "Boolean"  } }

Nebula command request example:

{  "func": "upgradeChannelFirmware",  "args": {    "channel": 1,    "url": "https://kota.kalayservice.com/ota/GET/i/Company/Product/Model",    "auto": true  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK" }
7.5 checkChannelUpgradeStatus
接口说明

Description: 检查通道升级状态

Version: 1.1

Function set: ota

Request parameters:

Parameter nameData typeRequirementDescription
channelIntM通道ID

Response status code: 200, 400

Response content:

Parameter nameData typeRequirementDescription
statusIntM升级状态(参考checkFirmwareUpgradeStatus枚举值)

Please check checkFirmwareUpgradeStatus for the enumeration of status

Device profile example:

{  "func": "checkChannelUpgradeStatus",  "args": {    "channel": "Int"  },  "return":{    "status":"Int"  } }

Nebula command request example:

{  "func": "checkChannelUpgradeStatus",  "args": {    "channel": 1  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK",  "content":{    "status":1  } }
7.6 setLastWill
接口说明

Description: 设置遗嘱消息

Version: 1.1

Function set: serverNotification

Request parameters:

Parameter nameData typeRequirementDescription
urlStringM通知URL
headerDictionaryO请求头信息

Response status code: 200, 400

Response content: Empty

Device profile example:

{  "func":"setLastWill",  "args":{    "url":"String",    "header": "Dictionary"  } }

Nebula command request example:

{  "func":"setLastWill",  "args":{    "url":"String",    "header": {      "headerData1":"242343432423"    }  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK" }
7.7 startEventDownloadwithURL
接口说明

Description: 通过URL启动事件下载

Version: 1.1

Function set: playback

Request parameters:

Parameter nameData typeRequirementDescription
startTimeIntO时间戳(单位:秒),1.2版本改为可选
channelIntO通道ID
fileNameStringO若设备仅能通过文件名生成下载URL则使用此字段

Response status code: 200, 400

Response content:

Parameter nameData typeRequirementDescription
downloadUrlStringM下载URL
filesizeIntO文件大小(单位:字节)

Device profile example:

{  "func":"startEventDownloadwithURL",  "args":{    "channel":"int",    "startTime":"Int"  },  "return":{    "downloadUrl":"String",    "filesize":"Int"  } }

Nebula command request example:

{  "func":"startEventDownloadwithURL",  "args":{    "channel":1,    "startTime":1567612800  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK",  "content":{    "downloadUrl":"http://iotc-tunnel:80/file/to/path",    "filesize":12000000  } }
7.8 getLiveCapabilitiesEx
接口说明

Description: 获取直播能力扩展信息

Version: 1.1

Function set: liveStreamingEx

Request parameters: Empty

Response status code: 200, 400

Response content:

Parameter nameData typeRequirementDescription
protocolString arrayM支持的协议列表
channelsArray of channel objectM每个通道的能力信息

The elements of a channel object

Parameter nameData typeRequirementDescription
channelIdIntO通道ID
streamTypeString arrayM流类型列表

Enumeration of protocol

  • webrtc
  • rtsp-iotc-tunnel
  • iotc-av

Enumeration of streamType

  • video
  • audio
  • subVideo
  • audioAndVideo
  • audioAndSubVideo

Device profile example:

{  "func":"getLiveCapabilitiesEx",  "return":{    "protocol":["String"],    "channels":[      {        "channelId":"Int",        "streamType":["String"]      }    ]  } }

Nebula command request example:

{  "func":"getLiveCapabilitiesEx" }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK",  "content":{    "protocol":["rtsp-iotc-tunnel","iotc-av","webrtc"],    "channels":[      {        "channelId":0,        "streamType":["video","audioAndVideo"]      },      {        "channelId":1,        "streamType":["video","audioAndVideo"]      }    ]  } }

or the camera without channelId

{  "statusCode": 200,  "statusMsg": "OK",  "content":{    "protocol":["rtsp-iotc-tunnel","iotc-av","webrtc"],    "channels":[      {        "streamType":["video","audioAndVideo"]      }    ]  } }
7.9 getLiveCapabilitiesEx
接口说明

Description: 获取直播能力扩展信息

Version: 1.1

Function set: liveStreamingEx

Request parameters:

Parameter nameData typeRequirementDescription
channelIntM通道ID

Response status code: 200, 400, 404

Response content:

Parameter nameData typeRequirementDescription
streamTypesArray of StringM支持的流类型(video/audio/all)
resolutionsArray of ObjectM支持的分辨率列表
frameRatesArray of IntM支持的帧率列表(fps)
bitratesArray of IntM支持的码率列表(kbps)

Device profile example:

{  "func":"getLiveCapabilitiesEx",  "args":{    "channel":"Int"  },  "return":{    "streamTypes":["String"],    "resolutions":[      {        "width":"Int",        "height":"Int"      }    ],    "frameRates":["Int"],    "bitrates":["Int"]  } }

Nebula command request example:

{  "func":"getLiveCapabilitiesEx",  "args":{    "channel":0  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK",  "content":{    "streamTypes":["video","audio"],    "resolutions":[      {        "width":1920,        "height":1080      },      {        "width":1280,        "height":720      }    ],    "frameRates":[15,20,25,30],    "bitrates":[1024,2048,4096]  } }
7.10 startLiveStreamEx
接口说明

Description: 启动直播流扩展

Version: 1.1

Function set: liveStreamingEx

Request parameters:

Parameter nameData typeRequirementDescription
channelsArray of channel objectM通道对象数组

The elements of a channel object

Parameter nameData typeRequirementDescription
channelIdIntO通道ID
streamTypeStringM流类型(参考getLiveCapabilitiesEx枚举)
resolutionObjectO分辨率{width:Int, height:Int},默认最高分辨率
frameRateIntO帧率(fps),默认25
bitrateIntO码率(kbps),默认2048

Response status code: 200, 400, 404

Response content: Empty

Device profile example:

{  "func":"startLiveStreamEx",  "args":{    "channels":[      {        "channelId":"Int",        "streamType":"String",        "resolution":{          "width":"Int",          "height":"Int"        },        "frameRate":"Int",        "bitrate":"Int"      }    ]  } }

Nebula command request example:

{  "func":"startLiveStreamEx",  "args":{    "channels":[      {        "channelId":0,        "streamType":"video",        "resolution":{          "width":1920,          "height":1080        },        "frameRate":30,        "bitrate":4096      }    ]  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK" }
7.11 getLiveStreamStatusEx
接口说明

Description: 获取直播流状态扩展

Version: 1.1

Function set: liveStreamingEx

Request parameters:

Parameter nameData typeRequirementDescription
channelIntM通道ID

Response status code: 200, 400, 404

Response content:

Parameter nameData typeRequirementDescription
statusStringM流状态(running/stopped/error)
streamTypeStringM当前流类型
resolutionObjectM当前分辨率{width:Int, height:Int}
frameRateIntM当前帧率(fps)
bitrateIntM当前码率(kbps)
durationIntO流运行时长(秒),仅status=running时返回

Device profile example:

{  "func":"getLiveStreamStatusEx",  "args":{    "channel":"Int"  },  "return":{    "status":"String",    "streamType":"String",    "resolution":{      "width":"Int",      "height":"Int"    },    "frameRate":"Int",    "bitrate":"Int",    "duration":"Int"  } }

Nebula command request example:

{  "func":"getLiveStreamStatusEx",  "args":{    "channel":0  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK",  "content":{    "status":"running",    "streamType":"video",    "resolution":{      "width":1920,      "height":1080    },    "frameRate":30,    "bitrate":4096,    "duration":120  } }
7.12 setPTZSpeed
接口说明

Description: 设置PTZ云台移动速度

Version: 1.1

Function set: ptzControl

Request parameters:

Parameter nameData typeRequirementDescription
channelIntM通道ID
panSpeedIntM水平移动速度(1-10,1最慢,10最快)
tiltSpeedIntM垂直移动速度(1-10,1最慢,10最快)
zoomSpeedIntO变焦速度(1-10,默认5)

Response status code: 200, 400, 404

Response content: Empty

Device profile example:

{  "func":"setPTZSpeed",  "args":{    "channel":"Int",    "panSpeed":"Int",    "tiltSpeed":"Int",    "zoomSpeed":"Int"  } }

Nebula command request example:

{  "func":"setPTZSpeed",  "args":{    "channel":1,    "panSpeed":8,    "tiltSpeed":6,    "zoomSpeed":5  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK" }
7.13 controlPTZ
接口说明

Description: 控制PTZ云台移动

Version: 1.1

Function set: ptzControl

Request parameters:

Parameter nameData typeRequirementDescription
channelIntM通道ID
actionStringM操作类型(panLeft/panRight/tiltUp/tiltDown/zoomIn/zoomOut)
continuousBooleanO是否持续移动(true/false,默认false)
durationIntO移动时长(秒),仅continuous=false时生效,默认1

Response status code: 200, 400, 404

Response content: Empty

Device profile example:

{  "func":"controlPTZ",  "args":{    "channel":"Int",    "action":"String",    "continuous":"Boolean",    "duration":"Int"  } }

Nebula command request example:

{  "func":"controlPTZ",  "args":{    "channel":1,    "action":"panRight",    "continuous":false,    "duration":2  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK" }
7.14 stopPTZ
接口说明

Description: 停止PTZ云台移动

Version: 1.1

Function set: ptzControl

Request parameters:

Parameter nameData typeRequirementDescription
channelIntM通道ID
actionStringO停止的操作类型(pan/tilt/zoom/all,默认all)

Response status code: 200, 400, 404

Response content: Empty

Device profile example:

{  "func":"stopPTZ",  "args":{    "channel":"Int",    "action":"String"  } }

Nebula command request example:

{  "func":"stopPTZ",  "args":{    "channel":1,    "action":"all"  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK" }
7.15 getPTZPresetList
接口说明

Description: 获取PTZ预置位列表

Version: 1.1

Function set: ptzControl

Request parameters:

Parameter nameData typeRequirementDescription
channelIntM通道ID

Response status code: 200, 400, 404

Response content:

Parameter nameData typeRequirementDescription
presetsArray of ObjectM预置位列表

The elements of a preset object

Parameter nameData typeRequirementDescription
presetIdIntM预置位ID(1-255)
presetNameStringO预置位名称
panIntO水平角度(0-360)
tiltIntO垂直角度(0-90)
zoomIntO变焦倍数(1-10)

Device profile example:

{  "func":"getPTZPresetList",  "args":{    "channel":"Int"  },  "return":{    "presets":[      {        "presetId":"Int",        "presetName":"String",        "pan":"Int",        "tilt":"Int",        "zoom":"Int"      }    ]  } }

Nebula command request example:

{  "func":"getPTZPresetList",  "args":{    "channel":1  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK",  "content":{    "presets":[      {        "presetId":5,        "presetName":"FrontDoor",        "pan":90,        "tilt":45,        "zoom":3      },      {        "presetId":8,        "presetName":"BackYard",        "pan":270,        "tilt":30,        "zoom":5      }    ]  } }
7.16 getPTZPatrolList
接口说明

Description: 获取PTZ巡航列表

Version: 1.1

Function set: ptzControl

Request parameters:

Parameter nameData typeRequirementDescription
channelIntM通道ID

Response status code: 200, 400, 404

Response content:

Parameter nameData typeRequirementDescription
patrolsArray of ObjectM巡航列表

The elements of a patrol object

Parameter nameData typeRequirementDescription
patrolIdIntM巡航ID(1-16)
patrolNameStringO巡航名称
presetIdsArray of IntM巡航包含的预置位ID列表
dwellTimesArray of IntO每个预置位停留时长(秒),与presetIds一一对应
speedIntO巡航速度(1-10,默认5)

Device profile example:

{  "func":"getPTZPatrolList",  "args":{    "channel":"Int"  },  "return":{    "patrols":[      {        "patrolId":"Int",        "patrolName":"String",        "presetIds":["Int"],        "dwellTimes":["Int"],        "speed":"Int"      }    ]  } }

Nebula command request example:

{  "func":"getPTZPatrolList",  "args":{    "channel":1  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK",  "content":{    "patrols":[      {        "patrolId":1,        "patrolName":"MainArea",        "presetIds":[5,8,10],        "dwellTimes":[10,15,10],        "speed":6      },      {        "patrolId":2,        "patrolName":"SideArea",        "presetIds":[3,7],        "dwellTimes":[8,12],        "speed":5      }    ]  } }
7.9 getLiveCapabilitiesEx
接口说明

Description: 获取直播能力扩展信息

Version: 1.1

Function set: liveStreamingEx

Request parameters:

Parameter nameData typeRequirementDescription
channelIntM通道ID

Response status code: 200, 400, 404

Response content:

Parameter nameData typeRequirementDescription
streamTypesArray of StringM支持的流类型(video/audio/all)
resolutionsArray of ObjectM支持的分辨率列表
frameRatesArray of IntM支持的帧率列表(fps)
bitratesArray of IntM支持的码率列表(kbps)

Device profile example:

{  "func":"getLiveCapabilitiesEx",  "args":{    "channel":"Int"  },  "return":{    "streamTypes":["String"],    "resolutions":[      {        "width":"Int",        "height":"Int"      }    ],    "frameRates":["Int"],    "bitrates":["Int"]  } }

Nebula command request example:

{  "func":"getLiveCapabilitiesEx",  "args":{    "channel":0  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK",  "content":{    "streamTypes":["video","audio"],    "resolutions":[      {        "width":1920,        "height":1080      },      {        "width":1280,        "height":720      }    ],    "frameRates":[15,20,25,30],    "bitrates":[1024,2048,4096]  } }
7.10 startLiveStreamEx
接口说明

Description: 启动直播流扩展

Version: 1.1

Function set: liveStreamingEx

Request parameters:

Parameter nameData typeRequirementDescription
channelsArray of channel objectM通道对象数组

The elements of a channel object

Parameter nameData typeRequirementDescription
channelIdIntO通道ID
streamTypeStringM流类型(参考getLiveCapabilitiesEx枚举)
resolutionObjectO分辨率{width:Int, height:Int},默认最高分辨率
frameRateIntO帧率(fps),默认25
bitrateIntO码率(kbps),默认2048

Response status code: 200, 400, 404

Response content: Empty

Device profile example:

{  "func":"startLiveStreamEx",  "args":{    "channels":[      {        "channelId":"Int",        "streamType":"String",        "resolution":{          "width":"Int",          "height":"Int"        },        "frameRate":"Int",        "bitrate":"Int"      }    ]  } }

Nebula command request example:

{  "func":"startLiveStreamEx",  "args":{    "channels":[      {        "channelId":0,        "streamType":"video",        "resolution":{          "width":1920,          "height":1080        },        "frameRate":30,        "bitrate":4096      }    ]  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK" }
7.11 getLiveStreamStatusEx
接口说明

Description: 获取直播流状态扩展

Version: 1.1

Function set: liveStreamingEx

Request parameters:

Parameter nameData typeRequirementDescription
channelIntM通道ID

Response status code: 200, 400, 404

Response content:

Parameter nameData typeRequirementDescription
statusStringM流状态(running/stopped/error)
streamTypeStringM当前流类型
resolutionObjectM当前分辨率{width:Int, height:Int}
frameRateIntM当前帧率(fps)
bitrateIntM当前码率(kbps)
durationIntO流运行时长(秒),仅status=running时返回

Device profile example:

{  "func":"getLiveStreamStatusEx",  "args":{    "channel":"Int"  },  "return":{    "status":"String",    "streamType":"String",    "resolution":{      "width":"Int",      "height":"Int"    },    "frameRate":"Int",    "bitrate":"Int",    "duration":"Int"  } }

Nebula command request example:

{  "func":"getLiveStreamStatusEx",  "args":{    "channel":0  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK",  "content":{    "status":"running",    "streamType":"video",    "resolution":{      "width":1920,      "height":1080    },    "frameRate":30,    "bitrate":4096,    "duration":120  } }
7.12 setPTZSpeed
接口说明

Description: 设置PTZ云台移动速度

Version: 1.1

Function set: ptzControl

Request parameters:

Parameter nameData typeRequirementDescription
channelIntM通道ID
panSpeedIntM水平移动速度(1-10,1最慢,10最快)
tiltSpeedIntM垂直移动速度(1-10,1最慢,10最快)
zoomSpeedIntO变焦速度(1-10,默认5)

Response status code: 200, 400, 404

Response content: Empty

Device profile example:

{  "func":"setPTZSpeed",  "args":{    "channel":"Int",    "panSpeed":"Int",    "tiltSpeed":"Int",    "zoomSpeed":"Int"  } }

Nebula command request example:

{  "func":"setPTZSpeed",  "args":{    "channel":1,    "panSpeed":8,    "tiltSpeed":6,    "zoomSpeed":5  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK" }
7.13 controlPTZ
接口说明

Description: 控制PTZ云台移动

Version: 1.1

Function set: ptzControl

Request parameters:

Parameter nameData typeRequirementDescription
channelIntM通道ID
actionStringM操作类型(panLeft/panRight/tiltUp/tiltDown/zoomIn/zoomOut)
continuousBooleanO是否持续移动(true/false,默认false)
durationIntO移动时长(秒),仅continuous=false时生效,默认1

Response status code: 200, 400, 404

Response content: Empty

Device profile example:

{  "func":"controlPTZ",  "args":{    "channel":"Int",    "action":"String",    "continuous":"Boolean",    "duration":"Int"  } }

Nebula command request example:

{  "func":"controlPTZ",  "args":{    "channel":1,    "action":"panRight",    "continuous":false,    "duration":2  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK" }
7.14 stopPTZ
接口说明

Description: 停止PTZ云台移动

Version: 1.1

Function set: ptzControl

Request parameters:

Parameter nameData typeRequirementDescription
channelIntM通道ID
actionStringO停止的操作类型(pan/tilt/zoom/all,默认all)

Response status code: 200, 400, 404

Response content: Empty

Device profile example:

{  "func":"stopPTZ",  "args":{    "channel":"Int",    "action":"String"  } }

Nebula command request example:

{  "func":"stopPTZ",  "args":{    "channel":1,    "action":"all"  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK" }
7.15 getPTZPresetList
接口说明

Description: 获取PTZ预置位列表

Version: 1.1

Function set: ptzControl

Request parameters:

Parameter nameData typeRequirementDescription
channelIntM通道ID

Response status code: 200, 400, 404

Response content:

Parameter nameData typeRequirementDescription
presetsArray of ObjectM预置位列表

The elements of a preset object

Parameter nameData typeRequirementDescription
presetIdIntM预置位ID(1-255)
presetNameStringO预置位名称
panIntO水平角度(0-360)
tiltIntO垂直角度(0-90)
zoomIntO变焦倍数(1-10)

Device profile example:

{  "func":"getPTZPresetList",  "args":{    "channel":"Int"  },  "return":{    "presets":[      {        "presetId":"Int",        "presetName":"String",        "pan":"Int",        "tilt":"Int",        "zoom":"Int"      }    ]  } }

Nebula command request example:

{  "func":"getPTZPresetList",  "args":{    "channel":1  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK",  "content":{    "presets":[      {        "presetId":5,        "presetName":"FrontDoor",        "pan":90,        "tilt":45,        "zoom":3      },      {        "presetId":8,        "presetName":"BackYard",        "pan":270,        "tilt":30,        "zoom":5      }    ]  } }
7.16 getPTZPatrolList
接口说明

Description: 获取PTZ巡航列表

Version: 1.1

Function set: ptzControl

Request parameters:

Parameter nameData typeRequirementDescription
channelIntM通道ID

Response status code: 200, 400, 404

Response content:

Parameter nameData typeRequirementDescription
patrolsArray of ObjectM巡航列表

The elements of a patrol object

Parameter nameData typeRequirementDescription
patrolIdIntM巡航ID(1-16)
patrolNameStringO巡航名称
presetIdsArray of IntM巡航包含的预置位ID列表
dwellTimesArray of IntO每个预置位停留时长(秒),与presetIds一一对应
speedIntO巡航速度(1-10,默认5)

Device profile example:

{  "func":"getPTZPatrolList",  "args":{    "channel":"Int"  },  "return":{    "patrols":[      {        "patrolId":"Int",        "patrolName":"String",        "presetIds":["Int"],        "dwellTimes":["Int"],        "speed":"Int"      }    ]  } }

Nebula command request example:

{  "func":"getPTZPatrolList",  "args":{    "channel":1  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK",  "content":{    "patrols":[      {        "patrolId":1,        "patrolName":"MainArea",        "presetIds":[5,8,10],        "dwellTimes":[10,15,10],        "speed":6      },      {        "patrolId":2,        "patrolName":"SideArea",        "presetIds":[3,7],        "dwellTimes":[8,12],        "speed":5      }    ]  } }
7.17 stopLiveStreamEx
接口说明

Description: 停止直播流扩展

Version: 1.1

Function set: liveStreamingEx

Request parameters:

Parameter nameData typeRequirementDescription
channelsArray of channel objectM通道对象数组

The elements of a channel object

Parameter nameData typeRequirementDescription
channelIdIntO通道ID
streamTypeStringM流类型(参考getLiveCapabilitiesEx枚举)

Response status code: 200, 400

Response content: Empty

Device profile example:

{  "func":"stopLiveStreamEx",  "args":{    "channels":[      {        "channelId":"Int",        "streamType":"String"      }    ]  } }

Nebula command request example:

{  "func":"stopLiveStreamEx",  "args":{    "channels":[      {        "channelId":0,        "streamType":"video"      }    ]  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK" }
7.18 setPTZPreset
接口说明

Description: 设置PTZ预置位

Version: 1.1

Function set: ptzControl

Request parameters:

Parameter nameData typeRequirementDescription
channelIntM通道ID
presetIdIntM预置位ID(1-255)
presetNameStringO预置位名称

Response status code: 200, 400, 404

Response content: Empty

Device profile example:

{  "func":"setPTZPreset",  "args":{    "channel":"Int",    "presetId":"Int",    "presetName":"String"  } }

Nebula command request example:

{  "func":"setPTZPreset",  "args":{    "channel":1,    "presetId":5,    "presetName":"FrontDoor"  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK" }
7.19 gotoPTZPreset
接口说明

Description: 跳转至PTZ预置位

Version: 1.1

Function set: ptzControl

Request parameters:

Parameter nameData typeRequirementDescription
channelIntM通道ID
presetIdIntM预置位ID(1-255)
speedIntO移动速度(1-10,默认5)

Response status code: 200, 400, 404

Response content: Empty

Device profile example:

{  "func":"gotoPTZPreset",  "args":{    "channel":"Int",    "presetId":"Int",    "speed":"Int"  } }

Nebula command request example:

{  "func":"gotoPTZPreset",  "args":{    "channel":1,    "presetId":5,    "speed":8  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK" }
7.20 deletePTZPreset
接口说明

Description: 删除PTZ预置位

Version: 1.1

Function set: ptzControl

Request parameters:

Parameter nameData typeRequirementDescription
channelIntM通道ID
presetIdIntM预置位ID(1-255)

Response status code: 200, 400, 404

Response content: Empty

Device profile example:

{  "func":"deletePTZPreset",  "args":{    "channel":"Int",    "presetId":"Int"  } }

Nebula command request example:

{  "func":"deletePTZPreset",  "args":{    "channel":1,    "presetId":5  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK" }
7.21 startPTZPatrol
接口说明

Description: 启动PTZ巡航

Version: 1.1

Function set: ptzControl

Request parameters:

Parameter nameData typeRequirementDescription
channelIntM通道ID
patrolIdIntM巡航ID(1-16)
speedIntO巡航速度(1-10,默认5)

Response status code: 200, 400, 404

Response content: Empty

Device profile example:

{  "func":"startPTZPatrol",  "args":{    "channel":"Int",    "patrolId":"Int",    "speed":"Int"  } }

Nebula command request example:

{  "func":"startPTZPatrol",  "args":{    "channel":1,    "patrolId":1,    "speed":6  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK" }
7.22 stopPTZPatrol
接口说明

Description: 停止PTZ巡航

Version: 1.1

Function set: ptzControl

Request parameters:

Parameter nameData typeRequirementDescription
channelIntM通道ID
patrolIdIntM巡航ID(1-16)

Response status code: 200, 400, 404

Response content: Empty

Device profile example:

{  "func":"stopPTZPatrol",  "args":{    "channel":"Int",    "patrolId":"Int"  } }

Nebula command request example:

{  "func":"stopPTZPatrol",  "args":{    "channel":1,    "patrolId":1  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK" }
7.23 setLightMode
接口说明

Description: 设置灯光模式

Version: 1.1

Function set: deviceControl

Request parameters:

Parameter nameData typeRequirementDescription
channelIntM通道ID
modeStringM灯光模式(auto/on/off/dawnDusk)
brightnessIntO亮度(1-100,仅mode=on时生效)

Response status code: 200, 400, 404

Response content: Empty

Device profile example:

{  "func":"setLightMode",  "args":{    "channel":"Int",    "mode":"String",    "brightness":"Int"  } }

Nebula command request example:

{  "func":"setLightMode",  "args":{    "channel":1,    "mode":"on",    "brightness":80  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK" }
7.24 getLightStatus
接口说明

Description: 获取灯光状态

Version: 1.1

Function set: deviceControl

Request parameters:

Parameter nameData typeRequirementDescription
channelIntM通道ID

Response status code: 200, 400, 404

Response content:

Parameter nameData typeRequirementDescription
modeStringM当前灯光模式
brightnessIntO当前亮度(1-100)
statusStringM实际状态(on/off)

Device profile example:

{  "func":"getLightStatus",  "args":{    "channel":"Int"  },  "return":{    "mode":"String",    "brightness":"Int",    "status":"String"  } }

Nebula command request example:

{  "func":"getLightStatus",  "args":{    "channel":1  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK",  "content":{    "mode":"auto",    "brightness":80,    "status":"on"  } }
7.25 setAudioVolume
接口说明

Description: 设置音频音量

Version: 1.1

Function set: audioControl

Request parameters:

Parameter nameData typeRequirementDescription
channelIntM通道ID
typeStringM音频类型(speaker/mic/all)
volumeIntM音量值(0-100)

Response status code: 200, 400, 404

Response content: Empty

Device profile example:

{  "func":"setAudioVolume",  "args":{    "channel":"Int",    "type":"String",    "volume":"Int"  } }

Nebula command request example:

{  "func":"setAudioVolume",  "args":{    "channel":1,    "type":"speaker",    "volume":75  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK" }
7.26 getAudioVolume
接口说明

Description: 获取音频音量

Version: 1.1

Function set: audioControl

Request parameters:

Parameter nameData typeRequirementDescription
channelIntM通道ID
typeStringM音频类型(speaker/mic/all)

Response status code: 200, 400, 404

Response content:

Parameter nameData typeRequirementDescription
volumeIntM当前音量值(0-100)

Device profile example:

{  "func":"getAudioVolume",  "args":{    "channel":"Int",    "type":"String"  },  "return":{    "volume":"Int"  } }

Nebula command request example:

{  "func":"getAudioVolume",  "args":{    "channel":1,    "type":"speaker"  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK",  "content":{    "volume":75  } }
7.27 enableTwoWayAudio
接口说明

Description: 启用双向音频

Version: 1.1

Function set: audioControl

Request parameters:

Parameter nameData typeRequirementDescription
channelIntM通道ID
modeStringO模式(fullDuplex/halfDuplex,默认fullDuplex)

Response status code: 200, 400, 404

Response content: Empty

Device profile example:

{  "func":"enableTwoWayAudio",  "args":{    "channel":"Int",    "mode":"String"  } }

Nebula command request example:

{  "func":"enableTwoWayAudio",  "args":{    "channel":1,    "mode":"fullDuplex"  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK" }
7.28 disableTwoWayAudio
接口说明

Description: 禁用双向音频

Version: 1.1

Function set: audioControl

Request parameters:

Parameter nameData typeRequirementDescription
channelIntM通道ID

Response status code: 200, 400, 404

Response content: Empty

Device profile example:

{  "func":"disableTwoWayAudio",  "args":{    "channel":"Int"  } }

Nebula command request example:

{  "func":"disableTwoWayAudio",  "args":{    "channel":1  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK" }
7.29 setMotionDetection
接口说明

Description: 设置移动侦测

Version: 1.1

Function set: detection

Request parameters:

Parameter nameData typeRequirementDescription
channelIntM通道ID
enableBooleanM是否启用(true/false)
sensitivityIntO灵敏度(1-10,默认5)
regionsArray of IntO侦测区域(0-65535,默认全区域)

Response status code: 200, 400, 404

Response content: Empty

Device profile example:

{  "func":"setMotionDetection",  "args":{    "channel":"Int",    "enable":"Boolean",    "sensitivity":"Int",    "regions":["Int"]  } }

Nebula command request example:

{  "func":"setMotionDetection",  "args":{    "channel":1,    "enable":true,    "sensitivity":7,    "regions":[1,2,3]  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK" }
7.30 getMotionDetection
接口说明

Description: 获取移动侦测配置

Version: 1.1

Function set: detection

Request parameters:

Parameter nameData typeRequirementDescription
channelIntM通道ID

Response status code: 200, 400, 404

Response content:

Parameter nameData typeRequirementDescription
enableBooleanM是否启用
sensitivityIntM灵敏度(1-10)
regionsArray of IntM侦测区域

Device profile example:

{  "func":"getMotionDetection",  "args":{    "channel":"Int"  },  "return":{    "enable":"Boolean",    "sensitivity":"Int",    "regions":["Int"]  } }

Nebula command request example:

{  "func":"getMotionDetection",  "args":{    "channel":1  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK",  "content":{    "enable":true,    "sensitivity":7,    "regions":[1,2,3]  } }
7.31 setHumanDetection
接口说明

Description: 设置人形侦测

Version: 1.1

Function set: detection

Request parameters:

Parameter nameData typeRequirementDescription
channelIntM通道ID
enableBooleanM是否启用(true/false)
sensitivityIntO识别灵敏度(1-10,默认6)
alertEnableBooleanO是否启用告警(true/false,默认false)
regionsArray of IntO侦测区域(0-65535,默认全区域)

Response status code: 200, 400, 404

Response content: Empty

Device profile example:

{  "func":"setHumanDetection",  "args":{    "channel":"Int",    "enable":"Boolean",    "sensitivity":"Int",    "alertEnable":"Boolean",    "regions":["Int"]  } }

Nebula command request example:

{  "func":"setHumanDetection",  "args":{    "channel":1,    "enable":true,    "sensitivity":8,    "alertEnable":true,    "regions":[1,2,3,4]  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK" }
7.32 getHumanDetection
接口说明

Description: 获取人形侦测配置

Version: 1.1

Function set: detection

Request parameters:

Parameter nameData typeRequirementDescription
channelIntM通道ID

Response status code: 200, 400, 404

Response content:

Parameter nameData typeRequirementDescription
enableBooleanM是否启用人形侦测
sensitivityIntM识别灵敏度(1-10)
alertEnableBooleanM是否启用告警
regionsArray of IntM侦测区域
detectStatusBooleanO当前是否检测到人形(实时状态)

Device profile example:

{  "func":"getHumanDetection",  "args":{    "channel":"Int"  },  "return":{    "enable":"Boolean",    "sensitivity":"Int",    "alertEnable":"Boolean",    "regions":["Int"],    "detectStatus":"Boolean"  } }

Nebula command request example:

{  "func":"getHumanDetection",  "args":{    "channel":1  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK",  "content":{    "enable":true,    "sensitivity":8,    "alertEnable":true,    "regions":[1,2,3,4],    "detectStatus":false  } }
7.33 setVideoQuality
接口说明

Description: 设置视频画质

Version: 1.1

Function set: videoControl

Request parameters:

Parameter nameData typeRequirementDescription
channelIntM通道ID
qualityStringM画质等级(low/medium/high,对应标清/高清/超清)
resolutionStringO分辨率(如1080p/720p/480p,默认随画质等级适配)
fpsIntO帧率(1-30,默认25)

Response status code: 200, 400, 404

Response content: Empty

Device profile example:

{  "func":"setVideoQuality",  "args":{    "channel":"Int",    "quality":"String",    "resolution":"String",    "fps":"Int"  } }

Nebula command request example:

{  "func":"setVideoQuality",  "args":{    "channel":1,    "quality":"high",    "resolution":"1080p",    "fps":30  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK" }
7.34 getVideoQuality
接口说明

Description: 获取视频画质配置

Version: 1.1

Function set: videoControl

Request parameters:

Parameter nameData typeRequirementDescription
channelIntM通道ID

Response status code: 200, 400, 404

Response content:

Parameter nameData typeRequirementDescription
qualityStringM当前画质等级(low/medium/high)
resolutionStringM当前分辨率
fpsIntM当前帧率

Device profile example:

{  "func":"getVideoQuality",  "args":{    "channel":"Int"  },  "return":{    "quality":"String",    "resolution":"String",    "fps":"Int"  } }

Nebula command request example:

{  "func":"getVideoQuality",  "args":{    "channel":1  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK",  "content":{    "quality":"high",    "resolution":"1080p",    "fps":30  } }
7.35 enableMotionAlarm
接口说明

Description: 启用移动侦测告警

Version: 1.1

Function set: alarmControl

Request parameters:

Parameter nameData typeRequirementDescription
channelIntM通道ID
alertTypeStringO告警类型(sound/light/push/all,默认all)
durationIntO告警持续时长(秒,1-300,默认30)

Response status code: 200, 400, 404

Response content: Empty

Device profile example:

{  "func":"enableMotionAlarm",  "args":{    "channel":"Int",    "alertType":"String",    "duration":"Int"  } }

Nebula command request example:

{  "func":"enableMotionAlarm",  "args":{    "channel":1,    "alertType":"all",    "duration":60  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK" }
7.36 disableMotionAlarm
接口说明

Description: 禁用移动侦测告警

Version: 1.1

Function set: alarmControl

Request parameters:

Parameter nameData typeRequirementDescription
channelIntM通道ID

Response status code: 200, 400, 404

Response content: Empty

Device profile example:

{  "func":"disableMotionAlarm",  "args":{    "channel":"Int"  } }

Nebula command request example:

{  "func":"disableMotionAlarm",  "args":{    "channel":1  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK" }
7.37 enableHumanAlarm
接口说明

Description: 启用人形侦测告警

Version: 1.1

Function set: alarmControl

Request parameters:

Parameter nameData typeRequirementDescription
channelIntM通道ID
alertTypeStringO告警类型(sound/light/push/all,默认all)
sensitivityIntO告警触发灵敏度(1-10,默认7)

Response status code: 200, 400, 404

Response content: Empty

Device profile example:

{  "func":"enableHumanAlarm",  "args":{    "channel":"Int",    "alertType":"String",    "sensitivity":"Int"  } }

Nebula command request example:

{  "func":"enableHumanAlarm",  "args":{    "channel":1,    "alertType":"push",    "sensitivity":8  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK" }
7.38 disableHumanAlarm
接口说明

Description: 禁用人形侦测告警

Version: 1.1

Function set: alarmControl

Request parameters:

Parameter nameData typeRequirementDescription
channelIntM通道ID

Response status code: 200, 400, 404

Response content: Empty

Device profile example:

{  "func":"disableHumanAlarm",  "args":{    "channel":"Int"  } }

Nebula command request example:

{  "func":"disableHumanAlarm",  "args":{    "channel":1  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK" }
7.39 startRecord
接口说明

Description: 开始录像

Version: 1.1

Function set: recordControl

Request parameters:

Parameter nameData typeRequirementDescription
channelIntM通道ID
recordTypeStringO录像类型(local/cloud,默认local)
durationIntO录像时长(分钟,1-1440,默认无限时长)
qualityStringO录像画质(low/medium/high,默认high)

Response status code: 200, 400, 404

Response content:

Parameter nameData typeRequirementDescription
recordIdStringM录像任务ID(唯一标识)

Device profile example:

{  "func":"startRecord",  "args":{    "channel":"Int",    "recordType":"String",    "duration":"Int",    "quality":"String"  },  "return":{    "recordId":"String"  } }

Nebula command request example:

{  "func":"startRecord",  "args":{    "channel":1,    "recordType":"local",    "duration":60,    "quality":"high"  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK",  "content":{    "recordId":"REC20251219100001CH1"  } }
7.40 stopRecord
接口说明

Description: 停止录像

Version: 1.1

Function set: recordControl

Request parameters:

Parameter nameData typeRequirementDescription
channelIntM通道ID
recordIdStringO录像任务ID(为空时停止该通道所有录像)

Response status code: 200, 400, 404

Response content:

Parameter nameData typeRequirementDescription
recordDurationIntM实际录像时长(秒)
fileSizeIntM录像文件大小(KB)

Device profile example:

{  "func":"stopRecord",  "args":{    "channel":"Int",    "recordId":"String"  },  "return":{    "recordDuration":"Int",    "fileSize":"Int"  } }

Nebula command request example:

{  "func":"stopRecord",  "args":{    "channel":1,    "recordId":"REC20251219100001CH1"  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK",  "content":{    "recordDuration":3600,    "fileSize":288000  } }
7.41 getRecordStatus
接口说明

Description: 获取录像状态

Version: 1.1

Function set: recordControl

Request parameters:

Parameter nameData typeRequirementDescription
channelIntM通道ID
recordIdStringO录像任务ID(为空时查询该通道所有录像状态)

Response status code: 200, 400, 404

Response content:

Parameter nameData typeRequirementDescription
statusStringM录像状态(recording/idle/error,对应录制中/空闲/异常)
currentDurationIntM当前录像时长(秒,空闲时为0)
currentFileSizeIntM当前录像文件大小(KB,空闲时为0)
recordTypeStringM录像类型(local/cloud,空闲时为空)

Device profile example:

{  "func":"getRecordStatus",  "args":{    "channel":"Int",    "recordId":"String"  },  "return":{    "status":"String",    "currentDuration":"Int",    "currentFileSize":"Int",    "recordType":"String"  } }

Nebula command request example:

{  "func":"getRecordStatus",  "args":{    "channel":1,    "recordId":"REC20251219100001CH1"  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK",  "content":{    "status":"recording",    "currentDuration":1800,    "currentFileSize":144000,    "recordType":"local"  } }
7.42 setRecordSchedule
接口说明

Description: 设置录像计划

Version: 1.1

Function set: recordControl

Request parameters:

Parameter nameData typeRequirementDescription
channelIntM通道ID
scheduleTypeStringM计划类型(timing/motion/human/all,对应定时/移动侦测/人形侦测/全天)
startTimeStringO开始时间(HH:MM,仅定时计划必填,如08:00)
endTimeStringO结束时间(HH:MM,仅定时计划必填,如20:00)
weekDaysStringO生效星期(逗号分隔,如1,3,5,默认全部星期生效)
qualityStringO计划录像画质(low/medium/high,默认high)

Response status code: 200, 400, 404

Response content: Empty

Device profile example:

{  "func":"setRecordSchedule",  "args":{    "channel":"Int",    "scheduleType":"String",    "startTime":"String",    "endTime":"String",    "weekDays":"String",    "quality":"String"  } }

Nebula command request example:

{  "func":"setRecordSchedule",  "args":{    "channel":1,    "scheduleType":"timing",    "startTime":"08:00",    "endTime":"20:00",    "weekDays":"1,2,3,4,5",    "quality":"medium"  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK" }
7.43 getRecordSchedule
接口说明

Description: 获取录像计划配置

Version: 1.1

Function set: recordControl

Request parameters:

Parameter nameData typeRequirementDescription
channelIntM通道ID

Response status code: 200, 400, 404

Response content:

Parameter nameData typeRequirementDescription
scheduleTypeStringM计划类型(timing/motion/human/all)
startTimeStringM开始时间(HH:MM,非定时计划为空)
endTimeStringM结束时间(HH:MM,非定时计划为空)
weekDaysStringM生效星期(逗号分隔)
qualityStringM计划录像画质(low/medium/high)

Device profile example:

{  "func":"getRecordSchedule",  "args":{    "channel":"Int"  },  "return":{    "scheduleType":"String",    "startTime":"String",    "endTime":"String",    "weekDays":"String",    "quality":"String"  } }

Nebula command request example:

{  "func":"getRecordSchedule",  "args":{    "channel":1  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK",  "content":{    "scheduleType":"timing",    "startTime":"08:00",    "endTime":"20:00",    "weekDays":"1,2,3,4,5",    "quality":"medium"  } }
7.44 enableSoundAlarm
接口说明

Description: 启用声音告警(独立控制)

Version: 1.1

Function set: alarmControl

Request parameters:

Parameter nameData typeRequirementDescription
channelIntM通道ID
soundTypeStringO告警声音类型(siren/beep/voice,默认siren)
volumeIntO告警音量(1-10,默认8)

Response status code: 200, 400, 404

Response content: Empty

Device profile example:

{  "func":"enableSoundAlarm",  "args":{    "channel":"Int",    "soundType":"String",    "volume":"Int"  } }

Nebula command request example:

{  "func":"enableSoundAlarm",  "args":{    "channel":1,    "soundType":"siren",    "volume":9  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK" }
7.45 disableSoundAlarm
接口说明

Description: 禁用声音告警(独立控制)

Version: 1.1

Function set: alarmControl

Request parameters:

Parameter nameData typeRequirementDescription
channelIntM通道ID

Response status code: 200, 400, 404

Response content: Empty

Device profile example:

{  "func":"disableSoundAlarm",  "args":{    "channel":"Int"  } }

Nebula command request example:

{  "func":"disableSoundAlarm",  "args":{    "channel":1  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK" }
7.46 setAlarmSensitivity
接口说明

Description: 设置告警灵敏度(通用)

Version: 1.1

Function set: alarmControl

Request parameters:

Parameter nameData typeRequirementDescription
channelIntM通道ID
alarmTypeStringM告警类型(motion/human/all,对应移动/人形/全部)
sensitivityIntM灵敏度(1-10,1最低/10最高)

Response status code: 200, 400, 404

Response content: Empty

Device profile example:

{  "func":"setAlarmSensitivity",  "args":{    "channel":"Int",    "alarmType":"String",    "sensitivity":"Int"  } }

Nebula command request example:

{  "func":"setAlarmSensitivity",  "args":{    "channel":1,    "alarmType":"all",    "sensitivity":6  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK" }
7.47 getAlarmSensitivity
接口说明

Description: 获取告警灵敏度配置(通用)

Version: 1.1

Function set: alarmControl

Request parameters:

Parameter nameData typeRequirementDescription
channelIntM通道ID
alarmTypeStringO告警类型(motion/human/all,默认all)

Response status code: 200, 400, 404

Response content:

Parameter nameData typeRequirementDescription
motionSensitivityIntM移动侦测灵敏度(1-10)
humanSensitivityIntM人形侦测灵敏度(1-10)

Device profile example:

{  "func":"getAlarmSensitivity",  "args":{    "channel":"Int",    "alarmType":"String"  },  "return":{    "motionSensitivity":"Int",    "humanSensitivity":"Int"  } }

Nebula command request example:

{  "func":"getAlarmSensitivity",  "args":{    "channel":1,    "alarmType":"all"  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK",  "content":{    "motionSensitivity":6,    "humanSensitivity":6  } }
7.48 enableIRCut
接口说明

Description: 启用红外切换(夜视模式)

Version: 1.1

Function set: videoControl

Request parameters:

Parameter nameData typeRequirementDescription
channelIntM通道ID
modeStringO红外模式(auto/manual,默认auto)
brightnessIntO红外亮度(1-10,默认7,仅手动模式生效)

Response status code: 200, 400, 404

Response content: Empty

Device profile example:

{  "func":"enableIRCut",  "args":{    "channel":"Int",    "mode":"String",    "brightness":"Int"  } }

Nebula command request example:

{  "func":"enableIRCut",  "args":{    "channel":1,    "mode":"auto",    "brightness":8  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK" }
7.49 disableIRCut
接口说明

Description: 禁用红外切换(关闭夜视模式)

Version: 1.1

Function set: videoControl

Request parameters:

Parameter nameData typeRequirementDescription
channelIntM通道ID

Response status code: 200, 400, 404

Response content: Empty

Device profile example:

{  "func":"disableIRCut",  "args":{    "channel":"Int"  } }

Nebula command request example:

{  "func":"disableIRCut",  "args":{    "channel":1  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK" }
7.50 getIRCutStatus
接口说明

Description: 获取红外切换状态

Version: 1.1

Function set: videoControl

Request parameters:

Parameter nameData typeRequirementDescription
channelIntM通道ID

Response status code: 200, 400, 404

Response content:

Parameter nameData typeRequirementDescription
statusStringM红外状态(enabled/disabled,对应启用/禁用)
modeStringM红外模式(auto/manual,禁用时为空)
brightnessIntM红外亮度(1-10,禁用时为0)

Device profile example:

{  "func":"getIRCutStatus",  "args":{    "channel":"Int"  },  "return":{    "status":"String",    "mode":"String",    "brightness":"Int"  } }

Nebula command request example:

{  "func":"getIRCutStatus",  "args":{    "channel":1  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK",  "content":{    "status":"enabled",    "mode":"auto",    "brightness":8  } }
7.51 setVideoRotation
接口说明

Description: 设置视频旋转角度

Version: 1.1

Function set: videoControl

Request parameters:

Parameter nameData typeRequirementDescription
channelIntM通道ID
rotationIntM旋转角度(0/90/180/270,默认0)
mirrorBooleanO是否镜像(true/false,默认false)

Response status code: 200, 400, 404

Response content: Empty

Device profile example:

{  "func":"setVideoRotation",  "args":{    "channel":"Int",    "rotation":"Int",    "mirror":"Boolean"  } }

Nebula command request example:

{  "func":"setVideoRotation",  "args":{    "channel":1,    "rotation":180,    "mirror":false  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK" }
7.52 getVideoRotation
接口说明

Description: 获取视频旋转配置

Version: 1.1

Function set: videoControl

Request parameters:

Parameter nameData typeRequirementDescription
channelIntM通道ID

Response status code: 200, 400, 404

Response content:

Parameter nameData typeRequirementDescription
rotationIntM旋转角度(0/90/180/270)
mirrorBooleanM是否镜像(true/false)

Device profile example:

{  "func":"getVideoRotation",  "args":{    "channel":"Int"  },  "return":{    "rotation":"Int",    "mirror":"Boolean"  } }

Nebula command request example:

{  "func":"getVideoRotation",  "args":{    "channel":1  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK",  "content":{    "rotation":180,    "mirror":false  } }
7.53 enableSDCardFormat
接口说明

Description: 启用SD卡格式化

Version: 1.1

Function set: storageControl

Request parameters:

Parameter nameData typeRequirementDescription
formatTypeStringO格式化类型(quick/full,默认quick)
encryptBooleanO是否加密格式化(true/false,默认false)

Response status code: 200, 400, 404, 500

Response content: Empty

Device profile example:

{  "func":"enableSDCardFormat",  "args":{    "formatType":"String",    "encrypt":"Boolean"  } }

Nebula command request example:

{  "func":"enableSDCardFormat",  "args":{    "formatType":"quick",    "encrypt":false  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK" }
7.54 getSDCardStatus
接口说明

Description: 获取SD卡状态

Version: 1.1

Function set: storageControl

Request parameters: Empty

Response status code: 200, 404, 500

Response content:

Parameter nameData typeRequirementDescription
statusStringMSD卡状态(normal/error/unmounted/formating,对应正常/异常/未挂载/格式化中)
totalCapacityIntM总容量(MB,未挂载时为0)
usedCapacityIntM已用容量(MB,未挂载时为0)
freeCapacityIntM剩余容量(MB,未挂载时为0)
healthStringM健康状态(good/warning/bad,对应良好/警告/损坏)

Device profile example:

{  "func":"getSDCardStatus",  "args":{},  "return":{    "status":"String",    "totalCapacity":"Int",    "usedCapacity":"Int",    "freeCapacity":"Int",    "health":"String"  } }

Nebula command request example:

{  "func":"getSDCardStatus",  "args":{} }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK",  "content":{    "status":"normal",    "totalCapacity":32768,    "usedCapacity":15600,    "freeCapacity":17168,    "health":"good"  } }
7.55 setSDCardLoopRecord
接口说明

Description: 设置SD卡循环录像

Version: 1.1

Function set: storageControl

Request parameters:

Parameter nameData typeRequirementDescription
channelIntM通道ID
enableBooleanM是否启用循环录像(true/false)
reserveDaysIntO录像保留天数(1-30,默认7,仅启用时生效)

Response status code: 200, 400, 404

Response content: Empty

Device profile example:

{  "func":"setSDCardLoopRecord",  "args":{    "channel":"Int",    "enable":"Boolean",    "reserveDays":"Int"  } }

Nebula command request example:

{  "func":"setSDCardLoopRecord",  "args":{    "channel":1,    "enable":true,    "reserveDays":7  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK" }
7.56 getSDCardLoopRecord
接口说明

Description: 获取SD卡循环录像配置

Version: 1.1

Function set: storageControl

Request parameters:

Parameter nameData typeRequirementDescription
channelIntM通道ID

Response status code: 200, 400, 404

Response content:

Parameter nameData typeRequirementDescription
enableBooleanM是否启用循环录像(true/false)
reserveDaysIntM录像保留天数(1-30)

Device profile example:

{  "func":"getSDCardLoopRecord",  "args":{    "channel":"Int"  },  "return":{    "enable":"Boolean",    "reserveDays":"Int"  } }

Nebula command request example:

{  "func":"getSDCardLoopRecord",  "args":{    "channel":1  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK",  "content":{    "enable":true,    "reserveDays":7  } }
7.57 enableCloudRecord
接口说明

Description: 启用云录像

Version: 1.1

Function set: cloudControl

Request parameters:

Parameter nameData typeRequirementDescription
channelIntM通道ID
qualityStringO云录像画质(low/medium/high,默认high)
reserveDaysIntO云录像保留天数(1-30,默认7)

Response status code: 200, 400, 401, 404

Response content: Empty

Device profile example:

{  "func":"enableCloudRecord",  "args":{    "channel":"Int",    "quality":"String",    "reserveDays":"Int"  } }

Nebula command request example:

{  "func":"enableCloudRecord",  "args":{    "channel":1,    "quality":"medium",    "reserveDays":15  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK" }
7.58 disableCloudRecord
接口说明

Description: 禁用云录像

Version: 1.1

Function set: cloudControl

Request parameters:

Parameter nameData typeRequirementDescription
channelIntM通道ID

Response status code: 200, 400, 401, 404

Response content: Empty

Device profile example:

{  "func":"disableCloudRecord",  "args":{    "channel":"Int"  } }

Nebula command request example:

{  "func":"disableCloudRecord",  "args":{    "channel":1  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK" }
7.59 getCloudRecordStatus
接口说明

Description: 获取云录像状态

Version: 1.1

Function set: cloudControl

Request parameters:

Parameter nameData typeRequirementDescription
channelIntM通道ID

Response status code: 200, 400, 401, 404

Response content:

Parameter nameData typeRequirementDescription
statusStringM云录像状态(enabled/disabled/expired,对应启用/禁用/过期)
qualityStringM云录像画质(low/medium/high,禁用/过期时为空)
reserveDaysIntM云录像保留天数(禁用/过期时为0)
expireTimeStringM过期时间(YYYY-MM-DD HH:MM:SS,禁用时为空)

Device profile example:

{  "func":"getCloudRecordStatus",  "args":{    "channel":"Int"  },  "return":{    "status":"String",    "quality":"String",    "reserveDays":"Int",    "expireTime":"String"  } }

Nebula command request example:

{  "func":"getCloudRecordStatus",  "args":{    "channel":1  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK",  "content":{    "status":"enabled",    "quality":"medium",    "reserveDays":15,    "expireTime":"2025-12-31 23:59:59"  } }
7.60 setAlarmNotification
接口说明

Description: 设置告警通知方式

Version: 1.1

Function set: alarmControl

Request parameters:

Parameter nameData typeRequirementDescription
channelIntM通道ID
notificationTypeStringM通知方式(push/sms/email/all/none,对应推送/短信/邮件/全部/无)
soundBooleanO推送是否带声音(true/false,默认true)
vibrationBooleanO推送是否震动(true/false,默认true)

Response status code: 200, 400, 404

Response content: Empty

Device profile example:

{  "func":"setAlarmNotification",  "args":{    "channel":"Int",    "notificationType":"String",    "sound":"Boolean",    "vibration":"Boolean"  } }

Nebula command request example:

{  "func":"setAlarmNotification",  "args":{    "channel":1,    "notificationType":"all",    "sound":true,    "vibration":true  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK" }
7.61 getAlarmNotification
接口说明

Description: 获取告警通知方式

Version: 1.1

Function set: alarmControl

Request parameters:

Parameter nameData typeRequirementDescription
channelIntM通道ID

Response status code: 200, 400, 404

Response content:

Parameter nameData typeRequirementDescription
notificationTypeStringM通知方式(push/sms/email/all/none)
soundBooleanM推送是否带声音(true/false)
vibrationBooleanM推送是否震动(true/false)

Device profile example:

{  "func":"getAlarmNotification",  "args":{    "channel":"Int"  },  "return":{    "notificationType":"String",    "sound":"Boolean",    "vibration":"Boolean"  } }

Nebula command request example:

{  "func":"getAlarmNotification",  "args":{    "channel":1  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK",  "content":{    "notificationType":"all",    "sound":true,    "vibration":true  } }
7.62 enablePTZControl
接口说明

Description: 启用PTZ控制

Version: 1.1

Function set: ptzControl

Request parameters:

Parameter nameData typeRequirementDescription
channelIntM通道ID
timeoutIntOPTZ控制超时时间(秒,10-300,默认60)

Response status code: 200, 400, 404, 501

Response content: Empty

Device profile example:

{  "func":"enablePTZControl",  "args":{    "channel":"Int",    "timeout":"Int"  } }

Nebula command request example:

{  "func":"enablePTZControl",  "args":{    "channel":1,    "timeout":120  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK" }
7.63 setPTZDirection
接口说明

Description: 设置PTZ转动方向

Version: 1.1

Function set: ptzControl

Request parameters:

Parameter nameData typeRequirementDescription
channelIntM通道ID
directionStringM转动方向(up/down/left/right/stop/zoomIn/zoomOut,对应上/下/左/右/停止/放大/缩小)
speedIntO转动速度(1-10,默认5,停止时无效)

Response status code: 200, 400, 403, 404, 501

Response content: Empty

Device profile example:

{  "func":"setPTZDirection",  "args":{    "channel":"Int",    "direction":"String",    "speed":"Int"  } }

Nebula command request example:

{  "func":"setPTZDirection",  "args":{    "channel":1,    "direction":"up",    "speed":6  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK" }
7.64 getPTZStatus
接口说明

Description: 获取PTZ状态

Version: 1.1

Function set: ptzControl

Request parameters:

Parameter nameData typeRequirementDescription
channelIntM通道ID

Response status code: 200, 400, 404, 501

Response content:

Parameter nameData typeRequirementDescription
statusStringMPTZ状态(idle/moving/error/unavailable,对应空闲/转动中/异常/不支持)
currentDirectionStringM当前方向(up/down/left/right/stop/zoomIn/zoomOut,空闲时为stop)
panAngleIntM水平角度(0-359,不支持时为-1)
tiltAngleIntM垂直角度(0-90,不支持时为-1)
zoomLevelIntM变焦级别(1-10,1为广角,不支持时为-1)

Device profile example:

{  "func":"getPTZStatus",  "args":{    "channel":"Int"  },  "return":{    "status":"String",    "currentDirection":"String",    "panAngle":"Int",    "tiltAngle":"Int",    "zoomLevel":"Int"  } }

Nebula command request example:

{  "func":"getPTZStatus",  "args":{    "channel":1  } }

Nebula command response example:

{  "statusCode": 200,  "statusMsg": "OK",  "content":{    "status":"idle",    "currentDirection":"stop",    "panAngle":90,    "tiltAngle":45,    "zoomLevel":3  } }

即刻开启您的物联网之旅

联系解决方案专家
Kalay App
资讯安全白皮书
全球专利布局
解决方案
新闻动态
公司动态
行业资讯
媒体报道
永续发展
经营者的话
社会参与
环境永续
公司治理

+86 755 27702549

7×24小时服务热线

法律声明 隐私权条款

关注“TUTK”

TUTK服务尽在掌握

© 2022 物联智慧科技(深圳)有限公司版权所有粤ICP备14023641号
在线咨询
扫一扫

TUTK服务尽在掌握

全国免费服务热线
+86 755 27702549

返回顶部