Nebula Functions v1.2a - page 2_2
Nebula Functions v1.2a - page 2/2
Functions
queryLocalRecordingIntervel
Description:
Version: 1.1
Function set: playback
Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| startTime | Int | M | |
| endTime | Int | M | |
| channel | Int | O |
Response status code: 200, 400
Response content:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| results | interval object array | M |
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]]
}
}buildTunnel
Description:
Version: 1.1
Function set: tunnel
Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| protocol | String | M |
Response status code: 200, 400
Response content:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| username | String | M | |
| password | String | M | |
| iotc-channel | Int | M |
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
}
}getChannelsCapabilities
Description:
Version: 1.1
Function set: channelInfo
Request parameters: Empty
Response status code: 200, 400
Response content:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| channels | capability object array | M |
Elements of a capability object
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| channel | Int | M | |
| signal | String | M | |
| capabilities | String array | M | |
| hasBattery | Boolean | M | |
| light | String array | O | |
| ptz | String array | O | |
| sensors | sensor object array | O |
Elements of a sensor object
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| sensor | String | M | |
| modes | String array | O |
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"
]
}
]
}
]
}
}upgradeChannelFirmware
Description:
Version: 1.1
Function set: ota
Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| channel | Int | M | |
| url | String | M | |
| auto | Boolean | M |
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"
}checkChannelUpgradeStatus
Description:
Version: 1.1
Function set: ota
Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| channel | Int | M |
Response status code: 200, 400
Response content:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| status | Int | M |
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
}
}setLastWill
Description:
Version: 1.1
Function set: serverNotification
Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| url | String | M | |
| header | Dictionary | O |
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"
}startEventDownloadwithURL
Description:
Version: 1.1
Function set: playback
Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| startTime | Int | O | timestamp (unit: sec), modify to optional in version 1.2 |
| channel | Int | O | |
| fileName | String | O | use fileName in function startEventDownloadwithURL if the device can only reproduce the download url from the fileName |
Response status code: 200, 400
Response content:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| downloadUrl | String | M | |
| filesize | Int | O | Unit: byte |
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
}
}getLiveCapabilitiesEx
Description:
Version: 1.1
Function set: liveStreamingEx
Request parameters: Empty
Response status code: 200, 400
Response content:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| protocol | String array | M | |
| channels | Array of channel object | M | Capabilities for each channel |
| The elements of a channel object | Data type | Requirement |
|---|---|---|
| channelId | Int | O |
| streamType | String array | M |
| 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"]
}
]
}
}startLiveStreamEx
Description:
Version: 1.1
Function set: liveStreamingEx
Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| preferProtocol | String Array | M | You could input multiple protocols here, and the leftmost one will have the highest priority. |
| channels | Array of channel object | M |
please check getLiveCapabilitiesEx for the enumeration of preferProtocol and streamType
| The elements of a channel object | Data type | Requirement |
|---|---|---|
| channelId | Int | O |
| streamType | String | M |
Response status code: 200, 400
Response content:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| channels | Array of channel object | M |
| The elements of a channel object | Data type | Requirement | Note |
|---|---|---|---|
| channelId | Int | O | |
| url | String | M | |
| direction | Array of direction object | M | |
| iotc-channel | Int | O | default value should be 0 |
| protocol | url definition |
|---|---|
| rtsp-iotc-tunnel | rtsp://iotc-tunnel:<remote port>/<rtsp path> |
| iotc-av | iotc-av://<UDID or *>/<iotc channel id>/<audio or video> |
| webrtc | webrtc://<UDID or *>/<stream id> |
| webrtc (when using TUTK agent) | please fill in the URL with the original RTSP stream URL |
| The elements of a direction object | Data type | Requirement |
|---|---|---|
| video | String | Alternative |
| audio | String | Alternative |
| Enumeration of direction |
|---|
| sendonly |
| recvonly |
| sendrecv |
Device profile example:
{
"func":"startLiveStreamEx",
"args":{
"preferProtocol":["String"],
"channels":[
{
"channelId":"Int",
"streamType":"String"
}
]
},
"return":{
"channels":[
{
"channelId":"Int",
"url":"String",
"iotc-channel":"Int",
"direction":[
{"video":"String"},
{"audio":"String"}
]
}
]
}
}Nebula command request example for rtsp:
{
"func":"startLiveStreamEx",
"args":{
"preferProtocol":["rtsp-iotc-tunnel"],
"channels":[
{
"channelId":1,
"streamType":"video"
}
]
}
}Nebula command response example for rtsp:
{
"statusCode": 200,
"statusMsg": "OK",
"content":{
"channels":[
{
"channelId":1,
"url":"rtsp://iotc-tunnel:80/path/to/stream",
"direction":[
{"video":"sendonly"}
]
}
]
}
}Nebula command request example for iotc-av:
{
"func":"startLiveStreamEx",
"args":{
"preferProtocol":["iotc-av"],
"channels":[
{
"channelId":1,
"streamType":"audio"
}
]
}
}Nebula command response example for iotc-av:
{
"statusCode": 200,
"statusMsg": "OK",
"content":{
"channels":[
{
"channelId":1,
"url":"iotc-av://*/0/audio",
"direction":[
{"audio":"sendonly"}
]
}
]
}
}Nebula command request example for webrtc:
{
"func":"startLiveStreamEx",
"args":{
"preferProtocol":["webrtc"],
"channels":[
{
"channelId":1,
"streamType":"audioAndVideo"
}
]
}
}Nebula command response example for webrtc:
{
"statusCode": 200,
"statusMsg": "OK",
"content":{
"channels":[
{
"channelId":1,
"url":"webrtc://*/stream_id",
"direction":[
{"video":"sendonly"},
{"audio":"sendrecv"}
]
}
]
}
}answerDoorBell
Description:
Version: 2.0
Function set: doorbell
Request parameters: Empty
Response status code: 200, 400
Response content:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| result | Int | M | 0: OK 1: unexpected error 2: this call already has been answered |
While doorbell is ringing, only the first answerDoorBell command would get result 0, other answerDoorBell command should get result 2.
If doorbell is not ringing, return result 1.
Device profile example:
{
"func":"answerDoorBell",
"return":{
"result":"Int"
}
}Nebula command request example:
{
"func":"answerDoorBell"
}Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK",
"content":{
"result": 1
}
}getGeoLocation
Description:
Version: 1.2
Function set: geoInfo
Request parameters: Empty
Response status code: 200, 400
Response content:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| latitude | Double | M | |
| longtitude | Double | M |
Device profile example:
{
"func":"getGeoLocation",
"return":{
"latitude":"Double",
"longtitude":"Double"
}
}Nebula command request example:
{
"func":"getGeoLocation"
}Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK",
"content":{
"latitude": 38.8757820293648,
"longtitude": 139.54628771315075
}
}startWebRtcEx
Description:
Version: 1.2
Function set: webrtcEx
Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| disableAuthTurn | Boolean | M | |
| amToken | String | O | |
| realm | String | O | |
| info | Object | O | User defined data |
| channels | Array of channel object | M |
| The elements of a channel object | Data type | Requirement | Description |
|---|---|---|---|
| channelId | Int | O | |
| streamType | String | M | |
| autoPlay | Boolean | O | |
| fileName | String | O | for playback only |
| startTime | Int | O | for playback only |
Response status code: 200, 400
Response content:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| rtcId | Int | M | |
| username | String | O | |
| password | String | O | |
| ttl | Int | O | |
| uris | String array | O | |
| channels | Array of channel objects | M |
| The elements of a channel object | Data type | Requirement | Note |
|---|---|---|---|
| channelId | Int | O | |
| url | String | M | Please refer to the url definition of startPlayback or startLiveStreamEx |
| direction | Array of direction objects | O | |
| duration | Int | O | for playback only, unit ms |
| The elements of a direction object | Data type | Requirement |
|---|---|---|
| audio | String | O |
| video | String | O |
Device profile example:
{
"func": "startWebRtcEx",
"args": {
"amToken": "String",
"realm": "String",
"disableAuthTurn": "Boolean",
"info": "Object",
"channels":[
{
"channelId":"Int",
"streamType":"String",
"autoPlay":"Boolean"
}
]
},
"return": {
"rtcId": "Int",
"username": "String",
"password": "String",
"ttl": "Int",
"uris": [
"String"
],
"channels":[
{
"channelId":"Int",
"url":"String",
"direction":[
{"video":"String"},
{"audio":"String"}
]
}
]
}
}Nebula command request example:
{
"func": "startWebRtcEx",
"args": {
"amToken": "ewrewrrwerdwed",
"realm": "tutk",
"disableAuthTurn": false,
"channels":[
{
"channelId":0,
"streamType":"audioAndVideo",
"autoPlay":true
}
]
}
}Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK",
"content": {
"rtcId": 123,
"username": "user123",
"password": "password123",
"ttl": 60,
"uris": [
"www.turn.tutk.com"
],
"channels":[
{
"channelId":0,
"url":"webrtc://*/frontCamera",
"direction":[
{"video":"sendonly"},
{"audio":"sendonly"}
]
}
]
}
}triggerCloudRecording
Description: Trigger the cloud recording instantly
Version: 1.2
Function set: cloudRecording
Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| channels | Int array | O | You can remove this parameter if you device do not support multiple channels |
Response status code: 200, 400
Response content: Empty
Device profile example:
{
"func":"triggerCloudRecording",
"args":{
"channels":["Int"]
}
}Nebula command request example:
{
"func":"triggerCloudRecording",
"args":{
"channels":[0,1]
}
}Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK"
}triggerLocalRecording
Description: Trigger the local recording instantly
Version: 1.2
Function set: playback
Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| channels | Int array | O |
Response status code: 200, 400
Response content: Empty
Device profile example:
{
"func":"triggerLocalRecording",
"args":{
"channels":["Int"]
}
}Nebula command request example:
{
"func":"triggerLocalRecording",
"args":{
"channels":[0,1]
}
}Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK"
}reboot
Description: Reboot the device remotely
Version: 1.2
Function set: powerControl
Request parameters: Empty
Response status code: 200, 400
Response content: Empty
Device profile example:
{
"func":"reboot"
}Nebula command request example:
{
"func":"reboot"
}Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK"
}zoomStep
Description: Use this command to move the camera
Version: 1.0
Function set: ptzControl
Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| step | Int | M | |
| direction | String | M | Detail see “Enumeration of direction” |
| channel | Int | O | NVR’s channel usage. if for IPC, it does not need to have channel parameter |
| Enumeration of direction |
|---|
| zoomIn |
| zoomOut |
Response status code: 200, 400
Response content: Empty
Device profile example:
{
"func":"zoomStep",
"args":{
"step":"Int",
"direction":"String",
"channel":"Int"
}
}Nebula command request example:
{
"func":"zoomStep",
"args":{
"step":8,
"direction":"zoomIn",
"channel":1
}
}Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK"
}enableAlarmOutput
Description:
Version: 1.2
Function set: alarmOutput
Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| value | Boolean | M |
Response status code: 200, 400
Response content: Empty
Device profile example:
{
"func":"enableAlarmOutput",
"args":{
"value":"Boolean"
}
}Nebula command request example:
{
"func":"enableAlarmOutput",
"args":{
"value":true
}
}Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK"
}isAlarmOutputEnabled
Description:
Version: 1.2
Function set: alarmOutput
Request parameters: Empty
Response status code: 200, 400
Response content:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| value | Boolean | M |
Device profile example:
{
"func":"isAlarmOutputEnabled",
"return":{
"value":"Boolean"
}
}Nebula command request example:
{
"func":"isAlarmOutputEnabled"
}Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK",
"content":{
"value":true
}
}setVideoOrientation
Description:
Version: 1.2
Function set: videoConfiguration
Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| value | String | M | enumation of the value: “normal”, “flip”, “mirror”, “flipMirror” |
| channel | Int | O |
Response status code: 200, 400
Response content: Empty
Device profile example:
{
"func":"setVideoOrientation",
"args":{
"value":"String",
"channel":"Int"
}
}Nebula command request example:
{
"func":"setVideoOrientation",
"args":{
"value":"flipMirror",
"channel":1
}
}Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK"
}getVideoOrientation
Description:
Version: 1.2
Function set: videoConfiguration
Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| channel | Int | O |
Response status code: 200, 400
Response content:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| value | String | M | enumation of the value: “normal”, “flip”, “mirror”, “flipMirror” |
Device profile example:
{
"func":"getVideoOrientation",
"args":{
"channel":"Int"
},
"return":{
"value":"String"
}
}Nebula command request example:
{
"func":"getVideoOrientation",
"args":{
"channel":1
}
}Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK",
"content":{
"value":"flipMirror"
}
}getTunnelServerPorts
Description:
Version: 1.2
Function set: videoConfiguration
Request parameters: Empty
Response status code: 200, 400
Response content:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| value | Int array | M |
Device profile example:
{
"func":"getTunnelServerPorts",
"return":{
"value":["Int"]
}
}Nebula command request example:
{
"func":"getTunnelServerPorts"
}Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK",
"content":{
"value":[80,443,23]
}
}addEventRecordingTriggers
Description:
Version: 1.2
Function set: playback
Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| triggers | String array | M | |
| channel | Int | O |
Please check setEventRecordingTriggers for the enumeration of triggers.
Response status code: 200, 400
Response content: Empty
Device profile example:
{
"func":"addEventRecordingTriggers",
"args":{
"channel":"Int",
"triggers":["String"]
}
}Nebula command request example:
{
"func": "addEventRecordingTriggers",
"args": {
"channel": 1,
"triggers": ["pir", "animal"]
}
}Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK"
}removeEventRecordingTriggers
Description:
Version: 1.2
Function set: playback
Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| triggers | String array | M | |
| channel | Int | O |
Please check setEventRecordingTriggers for the enumeration of triggers.
Response status code: 200, 400
Response content: Empty
Device profile example:
{
"func":"removeEventRecordingTriggers",
"args":{
"channel":"Int",
"triggers":["String"]
}
}Nebula command request example:
{
"func": "removeEventRecordingTriggers",
"args": {
"channel": 1,
"triggers": ["pir", "animal"]
}
}Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK"
}addPushNotificationTriggers
Description:
Version: 1.2
Function set: pushNotification
Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| triggers | String array | M | |
| channel | Int | O |
Please check setEventRecordingTriggers for the enumeration of triggers.
Response status code: 200, 400
Response content: Empty
Device profile example:
{
"func":"addPushNotificationTriggers",
"args":{
"channel":"Int",
"triggers":["String"]
}
}Nebula command request example:
{
"func":"addPushNotificationTriggers",
"args":{
"channel":1,
"triggers":["pir"]
}
}Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK"
}removePushNotificationTriggers
Description:
Version: 1.2
Function set: pushNotification
Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| triggers | String array | M | |
| channel | Int | O |
Please check setEventRecordingTriggers for the enumeration of triggers.
Response status code: 200, 400
Response content: Empty
Device profile example:
{
"func":"removePushNotificationTriggers",
"args":{
"channel":"Int",
"triggers":["String"]
}
}Nebula command request example:
{
"func":"removePushNotificationTriggers",
"args":{
"channel":1,
"triggers":["pir"]
}
}Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK"
}IOTCAV:playbackSeek
Description:
Version: 1.2
Function set: IOTCAV:playback
Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| time | Int | M | unit: ms |
Response status code: 200, 400
Response content: Empty
Device profile example:
{
"func":"playbackSeek",
"args":{
"time":"Int"
}
}AV JSON control request example:
{
"func":"playbackSeek",
"args":{
"time":1212313
}
}AV JSON control response example:
{
"statusCode": 200,
"statusMsg": "OK"
}playbackSeek
Description: Only for webrtc
Version: 1.2
Function set: webrtc
Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| time | Int | M | |
| rtcId | Int | M | |
| streamId | String | M |
Response status code: 200, 400
Response content: Empty
Device profile example:
{
"func":"playbackSeek",
"args":{
"time":"Int",
"rtcId":"Int",
"streamId":"String"
}
}Nebula command request example:
{
"func":"playbackSeek",
"args":{
"time":1212313,
"rtcId":12,
"streamId":"WebCam123"
}
}Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK"
}startSpeaker
Description:
Version: 1.2
Function set: speaker
Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| preferProtocol | String Array | M | |
| audioFormat | Audio format object | M | |
| channel | Int | O | |
| rtcId | Int | O | only for webrtc or http-webrtc protocol |
| Enumeration of protocol | Desciption |
|---|---|
| webrtc | We will use the WebRTC protocol to transmit audio data to the device. |
| http-iotc-tunnel | We will use the HTTP protocol to transmit audio data and send it through a tunnel. |
| http-webrtc | We will utilize the WebRTC protocol to transmit audio data. On the device side, the audio data will be received by a WebRTC proxy, which will then forward it to the local HTTP server. |
| The elements of audio format object | Data type | Requirement | Description |
|---|---|---|---|
| codec | String | M | The codec should be listed as the codec of the speaker preset object in the getCameraCapability function. |
| sampleRate | Int | M | |
| dataBit | Int | M | |
| audioChannel | String | M | could be “stereo” or “mono” |
Response status code: 200, 400
Response content:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| url | String | O | for webrtc, the url is not necessary |
Note:
If using “http” as the speaker protocol, the client should send the following data as a header before sending audio data. Replace “$path” with the resource path and “$basicAuth” with authentication data:
"POST $path HTTP/1.0\r\n" + "Content-Type: audio/basic\r\n" + "Content-Length: 999999999\r\n" + "Connection: Keep-Alive\r\n" + "Cache-Control: no-cache\r\n" + "Authorization: $basicAuth \r\n"+ "\r\n"
Device profile example:
{
"func":"startSpeaker",
"args":{
"channel": "Int",
"rtcId":"Int",
"preferProtocol":["String"],
"audioFormat":{
"codec":"String",
"sampleRate":"Int",
"dataBit":"Int",
"audioChannel":"String"
}
},
"return":{
"url":"String"
}
}Nebula command request example:
{
"func":"startSpeaker",
"args":{
"channel": 1,
"preferProtocol":["http-iotc-tunnel"],
"audioFormat":{
"codec":"pcm",
"sampleRate":8000,
"dataBit":16,
"audioChannel":"mono"
}
}
}Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK",
"content":{
"url":"http://iotc-tunnel:80/path/to/stream"
}
}stopSpeaker
Description:
Version: 1.2
Function set: speaker
Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| rtcId | Int | O | only for webrtc or http-webrtc protocol |
| channel | Int | O |
Response status code: 200, 400
Response content: Empty
Device profile example:
{
"func":"stopSpeaker",
"args":{
"channel":"Int",
"rtcId":"Int"
}
}Nebula command request example:
{
"func":"stopSpeaker",
"args":{
"channel":1
}
}Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK"
}setSystemFactoryDefault
Description:
Version: 1.2
Function set: system
Request parameters: Empty
Response status code: 200, 400
Response content:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| rebootNeeded | Boolean | M |
Device profile example:
{
"func":"setSystemFactoryDefault",
"return":{
"needReboot":"Boolean"
}
}Nebula command request example:
{
"func":"setSystemFactoryDefault"
}Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK",
"content":{
"rebootNeeded":true
}
}setSystemDateAndTime
Description:
Version: 1.2
Function set: system
Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| dateTimeType | String | M | should be “manual” or “ntp” |
| daylightSavings | Boolean | O | default value should be false |
| timeZone | String | O | the time zone in POSIX 1003.1 format |
| UTCDateTime | DateTime object | O | if the dateTimeType is set to “manual”, this field becomes mandatory |
| The elements of DateTime object | Data type | Requirement | Description |
|---|---|---|---|
| year | Int | M | |
| month | Int | M | |
| day | Int | M | |
| hour | Int | M | |
| minute | Int | M | |
| second | Int | M |
Response status code: 200, 400
Response content: Empty
Device profile example:
{
"func":"setSystemDateAndTime",
"args":{
"dateTimeType":"String",
"daylightSavings":"Boolean",
"timeZone":"String",
"UTCDateTime":{
"year":"Int",
"month":"Int",
"day":"Int",
"hour":"Int",
"minute":"Int",
"second":"Int",
}
}
}Nebula command request example:
{
"func":"setSystemDateAndTime",
"args":{
"dateTimeType":"manual",
"daylightSavings":false,
"timeZone":"Asia/Taipei",
"UTCDateTime":{
"year":2023,
"month":12,
"day":22,
"hour":13,
"minute":45,
"second":30,
}
}
}Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK"
}getSystemDateAndTime
Description:
Version: 1.2
Function set: system
Request parameters: Empty
Response status code: 200, 400
Response content:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| dateTimeType | String | M | should be “manual” or “ntp” |
| daylightSavings | Boolean | O | default value should be false |
| timeZone | String | O | the time zone in POSIX 1003.1 format |
| UTCDateTime | DateTime object | O | |
Please refer to the setSystemDateAndTime function for details on the DateTime object
Device profile example:
{
"func":"getSystemDateAndTime",
"return":{
"dateTimeType":"String",
"daylightSavings":"Boolean",
"timeZone":"String",
"UTCDateTime":{
"year":"Int",
"month":"Int",
"day":"Int",
"hour":"Int",
"minute":"Int",
"second":"Int",
}
}
}Nebula command request example:
{
"func":"setSystemDateAndTime"
}Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK",
"content":{
"dateTimeType":"ntp",
"daylightSavings":false,
"timeZone":"Asia/Taipei",
"UTCDateTime":{
"year":2023,
"month":12,
"day":22,
"hour":13,
"minute":45,
"second":30,
}
}
}setDNS
Description:
Version: 1.2
Function set: networkConfiguration
Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| fromDHCP | Boolean | M | |
| ipType | String | O | It should be “ipv4” or “ipv6”. If the fromDHCP is set to false, this field becomes mandatory. |
| primaryDnsServer | String | O | if the fromDHCP is set to false, this field becomes mandatory |
| secondaryDnsServer | String | O |
Response status code: 200, 400
Response content: Empty
Device profile example:
{
"func":"setDNS",
"args":{
"fromDHCP":"Boolean",
"ipType":"String",
"primaryDnsServer":"String",
"secondaryDnsServer":"String"
}
}Nebula command request example:
{
"func":"setDNS",
"args":{
"fromDHCP":false,
"ipType":"ipv4",
"primaryDnsServer":"8.8.8.8",
"secondaryDnsServer":"8.8.4.4"
}
}Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK"
}getDNS
Description:
Version: 1.2
Function set: networkConfiguration
Request parameters: Empty
Response status code: 200, 400
Response content:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| fromDHCP | Boolean | M | |
| ipType | String | O | It should be “ipv4” or “ipv6”. If the fromDHCP is set to false, this field becomes mandatory. |
| primaryDnsServer | String | O | if the fromDHCP is set to false, this field becomes mandatory |
| secondaryDnsServer | String | O |
Device profile example:
{
"func":"getDNS",
"return":{
"fromDHCP":"Boolean",
"ipType":"String",
"primaryDnsServer":"String",
"secondaryDnsServer":"String"
}
}Nebula command request example:
{
"func":"getDNS"
}Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK",
"content":{
"fromDHCP":false,
"ipType":"ipv4",
"primaryDnsServer":"8.8.8.8",
"secondaryDnsServer":"8.8.4.4"
}
}setNetworkDefaultGateway
Description:
Version: 1.2
Function set: networkConfiguration
Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| ipType | String | O | It should be “ipv4” or “ipv6”. If the fromDHCP is set to false, this field becomes mandatory. |
| defaultGatewayIP | String | O |
Response status code: 200, 400
Response content: Empty
Device profile example:
{
"func":"setNetworkDefaultGateway",
"args":{
"ipType":"String",
"defaultGatewayIP":"String"
}
}Nebula command request example:
{
"func":"setNetworkDefaultGateway",
"args":{
"ipType":"ipv4",
"defaultGatewayIP":"192.168.1.1"
}
}Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK"
}getNetworkDefaultGateway
Description:
Version: 1.2
Function set: networkConfiguration
Request parameters: Empty
Response status code: 200, 400
Response content:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| ipType | String | O | It should be “ipv4” or “ipv6”. If the fromDHCP is set to false, this field becomes mandatory. |
| defaultGatewayIP | String | O |
Device profile example:
{
"func":"getNetworkDefaultGateway",
"return":{
"ipType":"String",
"defaultGatewayIP":"String"
}
}Nebula command request example:
{
"func":"setNetworkDefaultGateway"
}Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK",
"content":{
"ipType":"ipv4",
"defaultGatewayIP":"192.168.1.1"
}
}setNetworkInterfaces
Description:
Version: 1.2
Function set: networkConfiguration
Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| networkInterfaces | network interface object | M |
| The elements of the network interface object | Data type | Requirement | Description |
|---|---|---|---|
| name | String | M | Network interface name |
| enable | Boolean | O | Indicates whether or not an interface is enabled. |
| mtu | Int | O | |
| ipv4 | ipv4 object | O | |
| ipv6 | ipv6 object | O |
| The elements of the ipv4 object | Data type | Requirement | Description |
|---|---|---|---|
| enable | Boolean | O | |
| dhcp | Boolean | O | |
| manual | ipv4 manual object | O | It becomes mandatory if dhcp is set to false |
| The elements of the ipv4 manual object | Data type | Requirement | Description |
|---|---|---|---|
| address | String | M | |
| prefixLength | Int | M | Prefix/submask length |
| The elements of the ipv6 object | Data type | Requirement | Description |
|---|---|---|---|
| enable | Boolean | O | |
| dhcp | String | O | should be “auto”, “stateful”, “stateless”, “off” |
| manual | ipv6 manual object | O |
| The elements of the ipv6 manual object | Data type | Requirement | Description |
|---|---|---|---|
| address | String | M | |
| prefixLength | Int | M | Prefix/submask length |
Response status code: 200, 400
Response content: Empty
Device profile example:
{
"func": "setNetworkInterfaces",
"args": {
"networkInterfaces": [
{
"name": "String",
"enable": "Boolean",
"mtu": "Int",
"ipv4": {
"enable": "Boolean",
"dhcp": "Boolean",
"manual": {
"address": "String",
"prefixLength": "Int"
}
},
"ipv6": {
"enable": "Boolean",
"dhcp": "String",
"manual": {
"address": "String",
"prefixLength": "Int"
}
}
}
]
}
}Nebula command request example:
To manually setup the IPv4 address of the interface eth0
{
"func": "setNetworkInterfaces",
"args": {
"networkInterfaces": [
{
"name": "eth0",
"ipv4": {
"dhcp": false,
"manual": {
"address": "192.168.1.15",
"prefixLength": 24
}
}
}
]
}
}To disable the interface eth0
{
"func": "setNetworkInterfaces",
"args": {
"networkInterfaces": [
{
"name": "eth0",
"enable": false
}
]
}
}Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK"
}getNetworkInterfaces
Description:
Version: 1.2
Function set: networkConfiguration
Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| networkInterfaces | network interface object | M |
| The elements of the network interface object | Data type | Requirement | Description |
|---|---|---|---|
| name | String | M | Network interface name |
| enable | Boolean | O | Indicates whether or not an interface is enabled. |
| link | link object | O | |
| mtu | Int | O | |
| ipv4 | ipv4 object | O | |
| ipv6 | ipv6 object | O |
| The elements of the ipv4 object | Data type | Requirement | Description |
|---|---|---|---|
| enable | Boolean | O | |
| dhcp | Boolean | O | |
| manual | ipv4 manual object | O | It becomes mandatory if dhcp is set to false |
| The elements of the ipv4 manual object | Data type | Requirement | Description |
|---|---|---|---|
| address | String | M | |
| netmask | String | M |
| The elements of the ipv6 object | Data type | Requirement | Description |
|---|---|---|---|
| enable | Boolean | O | |
| dhcp | String | O | should be “auto”, “stateful”, “stateless”, “off” |
| manual | ipv6 manual object | O |
| The elements of the ipv6 manual object | Data type | Requirement | Description |
|---|---|---|---|
| address | String | M | |
| netmask | String | M |
Response status code: 200, 400
Response content: Empty
Device profile example:
{
"func": "getNetworkInterfaces",
"return": {
"networkInterfaces": [
{
"name": "String",
"enabled": "Boolean",
"mtu": "Int",
"mac": "String"
"ipv4": {
"enabled": "Boolean",
"dhcp": "Boolean",
"address": "String",
"prefixLength": "Int"
},
"ipv6": {
"enabled": "Boolean",
"dhcp": "String",
"manual": {
"address": "String",
"prefixLength": "Int"
}
}
}
]
}
}Nebula command request example:
{
"func": "getNetworkInterfaces"
}Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK",
"content": {
"networkInterfaces": [
{
"name": "eth0",
"enabled": true,
"mtu": 1500,
"mac": "00:3d:11:31:80:11"
"ipv4": {
"enabled": "Boolean",
"dhcp": "Boolean",
"address": "String",
"prefixLength": "Int"
},
"ipv6": {
"enabled": "Boolean",
"dhcp": "String",
"manual": {
"address": "String",
"prefixLength": "Int"
}
}
}
]
}
}addFace
Description:
Version: 1.2
Function set: faceRecognition
Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| name | String | M | |
| vector | Float array | M | face features |
| thumbnail | String | O | base64 string |
| width | Int | O | |
| height | Int | O |
Response status code: 200, 400
Response content:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| id | Int | M | id = -1 if face limit reached |
Device profile example:
{
"func": "addFace",
"args": {
"name": "String",
"vector": ["Float"],
"thumbnail": "String",
"width": "Int",
"height": "Int"
},
"return":{
"id":"Int"
}
}Nebula command request example:
{
"func": "addFace",
"args": {
"name": "someone",
"vector": [0.0, 0.0, ..., 0.0],
"thumbnail": "base64 string",
"width": 112,
"height": 112
}
}Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK",
"content":{
"id":12
}
}getFaces
Description:
Version: 1.0
Function set: faceRecognition
Request parameters: Empty
Response status code: 200, 400
Response content:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| faces | face object array | M |
Elements of a face object
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| id | Int | M | |
| name | String | M | face features |
Device profile example:
{
"func": "getFaces",
"return":{
"faces":[
{
"id":"Int",
"name":"String"
}
]
}
}Nebula command request example:
{
"func": "getFace",
}Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK",
"content":{
"faces":[
{
"id": 0,
"name": "someone"
}
]
}
}getFaceThumbnail
Description:
Version: 1.2
Function set: faceRecognition
Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| id | Int | M |
Response status code: 200, 400
Response content:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| thumbnail | String | O | |
| width | Int | M | w = 0 if no thumbnail |
| height | Int | M | h = 0 if no thumbnail |
Device profile example:
{
"func": "getFaceThumbnail",
"args": {
"id": "Int"
},
"return":{
"thumbnail": "String",
"width": "Int",
"height": "Int"
}
}Nebula command request example:
{
"func": "getFaceThumbnail",
"args": {
"id": 0
}
}Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK",
"content":{
"thumbnail": "xxxxxxxx",
"width": 112,
"height": 112
}
}updateFace
Description:
Version: 1.2
Function set: faceRecognition
Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| id | Int | M | |
| name | String | O | |
| vector | Float array | O | face features |
Response status code: 200, 400
Response content: Empty
Device profile example:
{
"func": "updateFace",
"args": {
"id": "Int",
"name": "String",
"vector": ["Float"]
}
}Nebula command request example:
{
"func": "updateFace",
"args": {
"id": 0,
"name": "someone2",
"vector": [1.0, 1.0, ..., 1.0]
}
}Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK"
}deleteFace
Description:
Version: 1.2
Function set: faceRecognition
Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| id | Int | M |
Response status code: 200, 400
Response content: Empty
Device profile example:
{
"func": "deleteFace",
"args": {
"id": "Int"
}
}Nebula command request example:
{
"func": "deleteFace",
"args": {
"id": 0
}
}Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK"
}enableFaceRecognition
Description:
Version: 1.2
Function set: faceRecognition
Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| value | Boolean | M |
Response status code: 200, 400
Response content: Empty
Device profile example:
{
"func": "enableFaceRecognition",
"args": {
"value": "Boolean"
}
}Nebula command request example:
{
"func": "enableFaceRecognition",
"args": {
"value": true
}
}Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK",
}isFaceRecognitionEnabled
Description:
Version: 1.2
Function set: faceRecognition
Request parameters:
Response status code: 200, 400
Response content:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| value | Boolean | M |
Device profile example:
{
"func": "isFaceRecognitionEnabled",
"return": {
"value": "Boolean"
}
}Nebula command request example:
{
"func": "isFaceRecognitionEnabled"
}Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK",
"content":{
"value":true
}
}enableEventRecording
Description:
Version: 1.2
Function set: playback
Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| value | Boolean | M | |
| channel | Int | O | When this channel property is absent, all channel will be effected |
Response status code: 200, 400
Response content: Empty
Please check setEventRecordingTriggers for the enumeration of triggers.
Device profile example:
{
"func":"enableEventRecording",
"args":{
"channel":"Int",
"value":"Boolean"
}
}Nebula command request example:
{
"func":"enableEventRecording",
"args":{
"channel":1,
"value":true
}
}Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK"
}isEventRecordingEnabled
Description:
Version: 1.2
Function set: playback
Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| value | Boolean | M | |
| channel | Int | O | When this channel property is absent, all channel will be effected |
Response status code: 200, 400
Response content: Empty
Device profile example:
{
"func":"isEventRecordingEnabled",
"args":{
"channel":"Int"
},
"return":{
"value":"Boolean"
}
}Nebula command request example:
{
"func":"isEventRecordingEnabled",
"args":{
"channel":1
}
}Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK",
"content":{
"value":true
}
}IOTCAV:forceIFrame
Description: Use this function to request the device to send I frame immediately.
Version: 1.2
Function set: IOTCAV:videoStreaming
Request parameters: Empty
Response status code: 200, 400
Response content: Empty
Device profile example:
{
"func":"IOTCAV:forceIFrame"
}AV JSON control request example:
{
"func":"forceIFrame"
}AV JSON control response example:
{
"statusCode": 200,
"statusMsg": "OK"
}getSensorInfo
Description: List all sensors supported by the device. You can enable or disable sensors (events) via other functions, like setEventRecordingTriggers.
Version: 1.2
Function set: sensorInfo
Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| channel | Int | O |
Response status code: 200, 400
Response content:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| value | sensor object array | M |
Sensor object
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| sensor | String | M | |
| modes | String array | M |
Device profile example:
{
"func":"getSensorInfo",
"args":{
"channel":"Int"
},
"return":{
"value":[{
"sensor":"String",
"modes":["String"]
}]
}
}Nebula command request example:
{
"func":"getSensorInfo"
}Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK",
"content": {
"value": [
{
"sensor": "motion",
"modes": [
"motionSensor",
"pir"
]
},
{
"sensor": "objectDetection",
"modes": [
"human",
"vehicle",
"animal"
]
},
{
"sensor": "facialRecognition",
"modes": [
"familiar",
"unfamiliar"
]
}
]
}
}getRegion
Description: Utilize this function to retrieve the service region of the device.
Version: 1.2
Function set: region
Request parameters: Empty
Response status code: 200, 400
Response content:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| value | String | O |
Device profile example:
{
"func":"getRegion",
"return":{
"value":"String"
}
}Nebula command request example:
{
"func":"getRegion"
}Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK",
"content":{
"value":"us"
}
}setRegion
Description: Utilize this function to switch between service regions.
Version: 1.2
Function set: region
Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| value | String | O |
Response status code: 200, 400
Response content: Empty
Device profile example:
{
"func":"setRegion",
"args":{
"value":"String"
}
}Nebula command request example:
{
"func":"setRegion",
"args":{
"value":"us"
}
}Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK"
}setAwakeDuration
Description: Utilize this function to configure the duration for which the battery-powered device remains active when not connected during regular operation.
Version: 1.2
Function set: battery
Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| value | Int | M | unit: secrond |
Response status code: 200, 400
Response content: Empty
Device profile example:
{
"func":"setAwakeDuration",
"args":{
"value":"Int"
}
}Nebula command request example:
{
"func":"setAwakeDuration",
"args":{
"value":600
}
}Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK"
}setVideoBitrate
Description: This command is used to set the video bitrate.
Version: 1.2
Function set: videoConfiguration
Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| value | Int | M | unit: bps |
| channel | Int | O | The channel ID for NVR/DVR devices |
| videoStreamType | String | O |
| Enumeration of videoStreamType |
|---|
| mainStream |
| subStream |
| thirdStream |
Response status code: 200, 400
Response content: Empty
Device profile example:
{
"func":"setVideoBitrate",
"args":{
"value":"Int",
"channel":"Int",
"videoStreamType":"String"
}
}Nebula command request example:
{
"func":"setVideoBitrate",
"args":{
"value":1024000000,
"channel":1,
"videoStreamType":"mainStream"
}
}Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK"
}getVideoBitrate
Description: This command is used to get the video bitrate.
Version: 1.2
Function set: videoConfiguration
Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| channel | Int | O | The channel ID for NVR/DVR devices |
| videoStreamType | String | O |
Please check setVideoBitrate for the enumeration of videoStreamType.
Response status code: 200, 400
Response content:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| value | Int | M | unit: bps |
Device profile example:
{
"func":"getVideoBitrate",
"args":{
"channel":"Int",
"videoStreamType":"String"
},
"return":{
"value":"Int"
}
}Nebula command request example:
{
"func":"getVideoBitrate",
"args":{
"channel":1,
"videoStreamType":"mainStream"
}
}Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK",
"content":{
"value":1024000000
}
}setVideoCodec
Description: This command is used to set the video codec.
Version: 1.2
Function set: videoConfiguration
Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| value | String | M | The name of the codec to be set |
| channel | Int | O | The channel ID for NVR/DVR devices |
| videoStreamType | String | O |
Please check setVideoBitrate for the enumeration of videoStreamType.
Response status code: 200, 400
Response content: Empty
Device profile example:
{
"func":"setVideoCodec",
"args":{
"value":"String",
"channel":"Int",
"videoStreamType":"String"
}
}Nebula command control request example:
{
"func":"setVideoCodec",
"args":{
"value":"h264",
"channel":1,
"videoStreamType":"mainStream"
}
}Nebula command control response example:
{
"statusCode": 200,
"statusMsg": "OK"
}getVideoCodec
Description: This command is used to get the video codec.
Version: 1.2
Function set: videoConfiguration
Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| channel | Int | O | The channel ID for NVR/DVR devices |
| videoStreamType | String | O |
Please check setVideoBitrate for the enumeration of videoStreamType.
Response status code: 200, 400
Response content:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| value | String | M | The name of the codec to be set |
Device profile example:
{
"func":"getVideoCodec",
"args":{
"channel":"Int",
"videoStreamType":"String"
},
"return":{
"value":"String"
}
}Nebula command request example:
{
"func":"getVideoCodec",
"args":{
"channel":1,
"videoStreamType":"mainStream"
}
}Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK",
"content":{
"value":"h264"
}
}setVideoResolution
Description: This command is used to set the video resolution.
Version: 1.2
Function set: videoConfiguration
Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| width | Int | M | The width of the resolution to be set |
| height | Int | M | The height of the resolution to be set |
| channel | Int | O | The channel ID for NVR/DVR devices |
| videoStreamType | String | O |
Please check setVideoBitrate for the enumeration of videoStreamType.
Response status code: 200, 400
Response content: Empty
Device profile example:
{
"func":"setVideoResolution",
"args":{
"width":"Int",
"height":"Int",
"channel":"Int",
"videoStreamType":"String"
}
}Nebula command request example:
{
"func":"setVideoResolution",
"args":{
"width":1024,
"height":768,
"channel":1,
"videoStreamType":"mainStream"
}
}Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK"
}getVideoResolution
Description: This command is used to get the video resolution.
Version: 1.2
Function set: videoConfiguration
Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| channel | Int | O | The channel ID for NVR/DVR devices |
| videoStreamType | String | O |
Please check setVideoBitrate for the enumeration of videoStreamType.
Response status code: 200, 400
Response content:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| width | Int | M | The width of the resolution to be set |
| height | Int | M | The height of the resolution to be set |
Device profile example:
{
"func":"getVideoResolution",
"args":{
"channel":"Int",
"videoStreamType":"String"
},
"return":{
"width":"Int",
"height":"Int"
}
}Nebula command request example:
{
"func":"getVideoResolution",
"args":{
"channel":1,
"videoStreamType":"mainStream"
}
}Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK",
"content":{
"width":1024,
"height":768
}
}getDeviceSearchResult
Description: This command is used to get the device search result from local LAN or BLE or other protocols.
Version: 1.2
Function set: deviceSearch
Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| protocol | String | M | The protocol to excercute the device search functionality |
| searchDuration | Int | M | unit second |
the enumeration of protocol
| protocol |
|---|
| onvif |
| iotc |
| nebula |
Response status code: 200, 400
Response content:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| devices | Device object array | M |
Device object
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| ip | String | M | |
| model | String | O | |
| manufacturer | String | O | |
| name | String | O | |
| serialNumber | String | O | the serial number of the device |
| mac | String | O | MAC address, format should be xx:xx:xx:xx:xx:xx |
| fwVersion | String | O | the firmware version of the device |
| channelId | Int | O | If this camera has been added to the ONVIF bridge, the channel ID must be specified |
Device profile example:
{
"func":"getDeviceSearchResult",
"args":{
"protocol":"String",
"searchDuration":"Int"
},
"return":{
"devices":[
{
"ip":"String",
"model":"String",
"manufacturer":"String",
"name":"String",
"serialNumber":"String",
"mac":"String",
"fwVersion":"String",
"channelId":"Int"
}
]
}
}Nebula command request example:
{
"func":"getDeviceSearchResult",
"args":{
"protocol":"onvif",
"searchDuration":30
}
}Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK",
"content":{
"devices":[
{
"ip":"192.168.1.10",
"name":"Hikvision IPcam",
"model":"Model1",
"serialNumber":"XURYfYRIUBSWH1SWq",
"manufacturer":"Hikvision",
"mac":"xx:xx:xx:xx:xx:11",
"fwVersion":"v1.1.1"
},
{
"ip":"192.168.1.20",
"name":"TUTK IPcam",
"model":"Model2",
"serialNumber":"XURYfYRe21231SWH1SWq",
"manufacturer":"TUTK",
"mac":"xx:xx:xx:xx:xx:22",
"fwVersion":"v2.2.2",
"channelId":1
]
}
}setTargetDeviceCredential
Description: This command is used to configure the credentials (e.g., username and password) required for accessing a target device, such as an IP camera via CGI or ONVIF.
Version: 1.2
Function set: bridgeSetup
Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| identity | String | M | The username or identifier used to access the target device. |
| credential | String | M | The password or authentication token associated with the identity. |
| services | String array | O | The list of services this credential applies to. E.g., “http-cgi”, “onvif” |
| targetDeviceNetworkAddress | String | M | The IP address or hostname of the target device on the local network. |
the enumeration of service
| service |
|---|
| http-cgi |
| onvif |
Response status code: 200, 400
Response content:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| channelId | Int | M |
Device profile example:
{
"func":"setTargetDeviceCredential",
"args":{
"identity":"String",
"credential":"String",
"services":["String"],
"targetDeviceNetworkAddress":"String"
},
"return":{
"channelId":"Int"
}
}Nebula command request example:
{
"func":"setTargetDeviceCredential",
"args":{
"identity":"admin",
"credential":"password1",
"services":["http-cgi","onvif"],
"targetDeviceNetworkAddress":"192.168.1.1"
}
}Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK",
"content":{
"channelId":1
}
}removeTargetDeviceCredential
Description: This command is used to remove the credential of the target device.
Version: 1.2
Function set: bridgeSetup
Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| channelId | Int | M | The channel id of the target device |
Response status code: 200, 400
Response content: Empty
Device profile example:
{
"func":"removeTargetDeviceCredential",
"args":{
"channelId":"Int"
}
}Nebula command request example:
{
"func":"setTargetDeviceCredential",
"args":{
"channelId":1
}
}Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK"
}startFormatStorage
Description: Format the target storage
Version: 1.2
Function set: storageInfo
Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| value | String | M |
Response status code:
| status code | Description |
|---|---|
| 200 | OK |
| 400 | Invalid parameter or this command is not supported by the device |
| 404 | Storage not found |
Response content: Empty
Device profile example:
{
"func":"startFormatStorage",
"args":{
"value":"String"
}
}Nebula command request example:
{
"func":"startFormatStorage",
"args":{
"value":"sdcard"
}
}Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK"
}getFormatStatus
Description: Get format information of the target storage
Version: 1.2
Function set: storageInfo
Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| value | String | M |
Response status code:
| status code | Description |
|---|---|
| 200 | OK |
| 400 | Invalid parameter or this command is not supported by the device |
Response content:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| status | String | M | “stopped”,“inProgress” |
| lastFormatResult | String | O | “none”,“completed”,“failed” |
| lastFormatMessage | String | O | |
| progress | Int | O | Format completion percentage (0-100) |
Device profile example:
{
"func":"getFormatStatus",
"args":{
"value":"String"
},
"return":{
"status":"String",
"lastFormatResult":"String",
"lastFormatMessage":"String",
"progress":"Int"
}
}Nebula command request example:
{
"func":"getFormatStatus",
"args":{
"value":"sdcard"
}
}Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK",
"content": {
"status":"inProgress",
"lastFormatResult":"none",
"progress": 50
}
}getRecordingStatus
Description: Get recording information
Version: 1.2
Function set: playback
Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| channels | Int array | O | You can remove this parameter if device do not support multiple channels |
Response status code:
| status code | Description |
|---|---|
| 200 | OK |
| 400 | Invalid parameter or this command is not supported by the device |
Response content:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| results | status object array | M |
| Elements of status object | Data type | Requirement | Description |
|---|---|---|---|
| status | String | M | “stopped”,“inProgress” |
| channelId | Int | O |
Device profile example:
{
"func":"getRecordingStatus",
"channels":[Int],
"return":{
"results":[
{
"channelId":"Int",
"status":"String"
}
]
}
}Nebula command request example without channel:
{
"func":"getRecordingStatus"
}Nebula command request example with channel:
{
"func":"getRecordingStatus",
"args":{
"channels":[1,2,3]
}
}Nebula command response example without channel:
{
"statusCode": 200,
"statusMsg": "OK",
"content": {
"results":[
{
"status":"inProgress"
}
]
}
}Nebula command response example with channel:
{
"statusCode": 200,
"statusMsg": "OK",
"content": {
"results":[
{
"channelId":1,
"status":"inProgress"
},
{
"channelId":2,
"status":"inProgress"
},
{
"channelId":3,
"status":"stopped"
}
]
}
}