简体中文
首页 > 文档中心 > 实时传输P2P > Web影像传输 > Agent > Nebula Functions

Nebula Functions v1.2a - page 2_2

2025-11-25

Nebula Functions v1.2a - page 2/2

Functions

queryLocalRecordingIntervel

Description:
Version: 1.1
Function set: playback
Request parameters:

Parameter nameData typeRequirementDescription
startTimeIntM
endTimeIntM
channelIntO

Response status code: 200, 400
Response content:

Parameter nameData typeRequirementDescription
resultsinterval object arrayM

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 nameData typeRequirementDescription
protocolStringM

Response status code: 200, 400
Response content:

Parameter nameData typeRequirementDescription
usernameStringM
passwordStringM
iotc-channelIntM

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 nameData typeRequirementDescription
channelscapability object arrayM

Elements of a capability object

Parameter nameData typeRequirementDescription
channelIntM
signalStringM
capabilitiesString arrayM
hasBatteryBooleanM
lightString arrayO
ptzString arrayO
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"
            ]
          }
        ]
      }
    ]
  }
}

upgradeChannelFirmware

Description:
Version: 1.1
Function set: ota
Request parameters:

Parameter nameData typeRequirementDescription
channelIntM
urlStringM
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"
}

checkChannelUpgradeStatus

Description:
Version: 1.1
Function set: ota
Request parameters:

Parameter nameData typeRequirementDescription
channelIntM

Response status code: 200, 400
Response content:

Parameter nameData typeRequirementDescription
statusIntM

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 nameData typeRequirementDescription
urlStringM
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"
}

startEventDownloadwithURL

Description:
Version: 1.1
Function set: playback
Request parameters:

Parameter nameData typeRequirementDescription
startTimeIntOtimestamp (unit: sec), modify to optional in version 1.2
channelIntO
fileNameStringOuse fileName in function startEventDownloadwithURL if the device can only reproduce the download url from the fileName

Response status code: 200, 400
Response content:

Parameter nameData typeRequirementDescription
downloadUrlStringM
filesizeIntOUnit: 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 nameData typeRequirementDescription
protocolString arrayM
channelsArray of channel objectMCapabilities for each channel
The elements of a channel objectData typeRequirement
channelIdIntO
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"]
      }
    ]
  }
}

startLiveStreamEx

Description:
Version: 1.1
Function set: liveStreamingEx
Request parameters:

Parameter nameData typeRequirementDescription
preferProtocolString ArrayMYou could input multiple protocols here, and the leftmost one will have the highest priority.
channelsArray of channel objectM

please check getLiveCapabilitiesEx for the enumeration of preferProtocol and streamType

The elements of a channel objectData typeRequirement
channelIdIntO
streamTypeStringM

Response status code: 200, 400
Response content:

Parameter nameData typeRequirementDescription
channelsArray of channel objectM
The elements of a channel objectData typeRequirementNote
channelIdIntO
urlStringM
directionArray of direction objectM
iotc-channelIntOdefault value should be 0
protocolurl definition
rtsp-iotc-tunnelrtsp://iotc-tunnel:<remote port>/<rtsp path>
iotc-aviotc-av://<UDID or *>/<iotc channel id>/<audio or video>
webrtcwebrtc://<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 objectData typeRequirement
videoStringAlternative
audioStringAlternative
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 nameData typeRequirementDescription
resultIntM0: 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 nameData typeRequirementDescription
latitudeDoubleM
longtitudeDoubleM

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 nameData typeRequirementDescription
disableAuthTurnBooleanM
amTokenStringO
realmStringO
infoObjectOUser defined data
channelsArray of channel objectM
The elements of a channel objectData typeRequirementDescription
channelIdIntO
streamTypeStringM
autoPlayBooleanO
fileNameStringOfor playback only
startTimeIntOfor playback only

Response status code: 200, 400
Response content:

Parameter nameData typeRequirementDescription
rtcIdIntM
usernameStringO
passwordStringO
ttlIntO
urisString arrayO
channelsArray of channel objectsM
The elements of a channel objectData typeRequirementNote
channelIdIntO
urlStringMPlease refer to the url definition of startPlayback or startLiveStreamEx
directionArray of direction objectsO
durationIntOfor playback only, unit ms
The elements of a direction objectData typeRequirement
audioStringO
videoStringO

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 nameData typeRequirementDescription
channelsInt arrayOYou 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 nameData typeRequirementDescription
channelsInt arrayO

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 nameData typeRequirementDescription
stepIntM
directionStringMDetail see “Enumeration of direction”
channelIntONVR’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 nameData typeRequirementDescription
valueBooleanM

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 nameData typeRequirementDescription
valueBooleanM

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 nameData typeRequirementDescription
valueStringMenumation of the value: “normal”, “flip”, “mirror”, “flipMirror”
channelIntO

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 nameData typeRequirementDescription
channelIntO

Response status code: 200, 400
Response content:

Parameter nameData typeRequirementDescription
valueStringMenumation 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 nameData typeRequirementDescription
valueInt arrayM

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 nameData typeRequirementDescription
triggersString arrayM
channelIntO

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 nameData typeRequirementDescription
triggersString arrayM
channelIntO

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 nameData typeRequirementDescription
triggersString arrayM
channelIntO

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 nameData typeRequirementDescription
triggersString arrayM
channelIntO

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 nameData typeRequirementDescription
timeIntMunit: 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 nameData typeRequirementDescription
timeIntM
rtcIdIntM
streamIdStringM

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 nameData typeRequirementDescription
preferProtocolString ArrayM
audioFormatAudio format objectM
channelIntO
rtcIdIntOonly for webrtc or http-webrtc protocol
Enumeration of protocolDesciption
webrtcWe will use the WebRTC protocol to transmit audio data to the device.
http-iotc-tunnelWe will use the HTTP protocol to transmit audio data and send it through a tunnel.
http-webrtcWe 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 objectData typeRequirementDescription
codecStringMThe codec should be listed as the codec of the speaker preset object in the getCameraCapability function.
sampleRateIntM
dataBitIntM
audioChannelStringMcould be “stereo” or “mono”

Response status code: 200, 400
Response content:

Parameter nameData typeRequirementDescription
urlStringOfor 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 nameData typeRequirementDescription
rtcIdIntOonly for webrtc or http-webrtc protocol
channelIntO

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 nameData typeRequirementDescription
rebootNeededBooleanM

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 nameData typeRequirementDescription
dateTimeTypeStringMshould be “manual” or “ntp”
daylightSavingsBooleanOdefault value should be false
timeZoneStringOthe time zone in POSIX 1003.1 format
UTCDateTimeDateTime objectOif the dateTimeType is set to “manual”, this field becomes mandatory
The elements of DateTime objectData typeRequirementDescription
yearIntM
monthIntM
dayIntM
hourIntM
minuteIntM
secondIntM

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 nameData typeRequirementDescription
dateTimeTypeStringMshould be “manual” or “ntp”
daylightSavingsBooleanOdefault value should be false
timeZoneStringOthe time zone in POSIX 1003.1 format
UTCDateTimeDateTime objectO




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 nameData typeRequirementDescription
fromDHCPBooleanM
ipTypeStringOIt should be “ipv4” or “ipv6”. If the fromDHCP is set to false, this field becomes mandatory.
primaryDnsServerStringOif the fromDHCP is set to false, this field becomes mandatory
secondaryDnsServerStringO

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 nameData typeRequirementDescription
fromDHCPBooleanM
ipTypeStringOIt should be “ipv4” or “ipv6”. If the fromDHCP is set to false, this field becomes mandatory.
primaryDnsServerStringOif the fromDHCP is set to false, this field becomes mandatory
secondaryDnsServerStringO

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 nameData typeRequirementDescription
ipTypeStringOIt should be “ipv4” or “ipv6”. If the fromDHCP is set to false, this field becomes mandatory.
defaultGatewayIPStringO

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 nameData typeRequirementDescription
ipTypeStringOIt should be “ipv4” or “ipv6”. If the fromDHCP is set to false, this field becomes mandatory.
defaultGatewayIPStringO

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 nameData typeRequirementDescription
networkInterfacesnetwork interface objectM
The elements of the network interface objectData typeRequirementDescription
nameStringMNetwork interface name
enableBooleanOIndicates whether or not an interface is enabled.
mtuIntO
ipv4ipv4 objectO
ipv6ipv6 objectO
The elements of the ipv4 objectData typeRequirementDescription
enableBooleanO
dhcpBooleanO
manualipv4 manual objectOIt becomes mandatory if dhcp is set to false
The elements of the ipv4 manual objectData typeRequirementDescription
addressStringM
prefixLengthIntMPrefix/submask length
The elements of the ipv6 objectData typeRequirementDescription
enableBooleanO
dhcpStringOshould be “auto”, “stateful”, “stateless”, “off”
manualipv6 manual objectO
The elements of the ipv6 manual objectData typeRequirementDescription
addressStringM
prefixLengthIntMPrefix/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 nameData typeRequirementDescription
networkInterfacesnetwork interface objectM
The elements of the network interface objectData typeRequirementDescription
nameStringMNetwork interface name
enableBooleanOIndicates whether or not an interface is enabled.
linklink objectO
mtuIntO
ipv4ipv4 objectO
ipv6ipv6 objectO
The elements of the ipv4 objectData typeRequirementDescription
enableBooleanO
dhcpBooleanO
manualipv4 manual objectOIt becomes mandatory if dhcp is set to false
The elements of the ipv4 manual objectData typeRequirementDescription
addressStringM
netmaskStringM
The elements of the ipv6 objectData typeRequirementDescription
enableBooleanO
dhcpStringOshould be “auto”, “stateful”, “stateless”, “off”
manualipv6 manual objectO
The elements of the ipv6 manual objectData typeRequirementDescription
addressStringM
netmaskStringM

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 nameData typeRequirementDescription
nameStringM
vectorFloat arrayMface features
thumbnailStringObase64 string
widthIntO
heightIntO

Response status code: 200, 400
Response content:

Parameter nameData typeRequirementDescription
idIntMid = -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 nameData typeRequirementDescription
facesface object arrayM

Elements of a face object

Parameter nameData typeRequirementDescription
idIntM
nameStringMface 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 nameData typeRequirementDescription
idIntM

Response status code: 200, 400

Response content:

Parameter nameData typeRequirementDescription
thumbnailStringO
widthIntMw = 0 if no thumbnail
heightIntMh = 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 nameData typeRequirementDescription
idIntM
nameStringO
vectorFloat arrayOface 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 nameData typeRequirementDescription
idIntM

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 nameData typeRequirementDescription
valueBooleanM

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 nameData typeRequirementDescription
valueBooleanM

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 nameData typeRequirementDescription
valueBooleanM
channelIntOWhen 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 nameData typeRequirementDescription
valueBooleanM
channelIntOWhen 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 nameData typeRequirementDescription
channelIntO

Response status code: 200, 400
Response content:

Parameter nameData typeRequirementDescription
valuesensor object arrayM

Sensor object

Parameter nameData typeRequirementDescription
sensorStringM
modesString arrayM

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 nameData typeRequirementDescription
valueStringO

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 nameData typeRequirementDescription
valueStringO

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 nameData typeRequirementDescription
valueIntMunit: 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 nameData typeRequirementDescription
valueIntMunit: bps
channelIntOThe channel ID for NVR/DVR devices
videoStreamTypeStringO
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 nameData typeRequirementDescription
channelIntOThe channel ID for NVR/DVR devices
videoStreamTypeStringO

Please check setVideoBitrate for the enumeration of videoStreamType.
Response status code: 200, 400
Response content:

Parameter nameData typeRequirementDescription
valueIntMunit: 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 nameData typeRequirementDescription
valueStringMThe name of the codec to be set
channelIntOThe channel ID for NVR/DVR devices
videoStreamTypeStringO

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 nameData typeRequirementDescription
channelIntOThe channel ID for NVR/DVR devices
videoStreamTypeStringO

Please check setVideoBitrate for the enumeration of videoStreamType.
Response status code: 200, 400
Response content:

Parameter nameData typeRequirementDescription
valueStringMThe 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 nameData typeRequirementDescription
widthIntMThe width of the resolution to be set
heightIntMThe height of the resolution to be set
channelIntOThe channel ID for NVR/DVR devices
videoStreamTypeStringO

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 nameData typeRequirementDescription
channelIntOThe channel ID for NVR/DVR devices
videoStreamTypeStringO

Please check setVideoBitrate for the enumeration of videoStreamType.
Response status code: 200, 400
Response content:

Parameter nameData typeRequirementDescription
widthIntMThe width of the resolution to be set
heightIntMThe 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 nameData typeRequirementDescription
protocolStringMThe protocol to excercute the device search functionality
searchDurationIntMunit second

the enumeration of protocol

protocol
onvif
iotc
nebula

Response status code: 200, 400
Response content:

Parameter nameData typeRequirementDescription
devicesDevice object arrayM

Device object

Parameter nameData typeRequirementDescription
ipStringM
modelStringO
manufacturerStringO
nameStringO
serialNumberStringOthe serial number of the device
macStringOMAC address, format should be xx:xx:xx:xx:xx:xx
fwVersionStringOthe firmware version of the device
channelIdIntOIf 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 nameData typeRequirementDescription
identityStringMThe username or identifier used to access the target device.
credentialStringMThe password or authentication token associated with the identity.
servicesString arrayOThe list of services this credential applies to. E.g., “http-cgi”, “onvif”
targetDeviceNetworkAddressStringMThe 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 nameData typeRequirementDescription
channelIdIntM

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 nameData typeRequirementDescription
channelIdIntMThe 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 nameData typeRequirementDescription
valueStringM

Response status code:

status codeDescription
200OK
400Invalid parameter or this command is not supported by the device
404Storage 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 nameData typeRequirementDescription
valueStringM

Response status code:

status codeDescription
200OK
400Invalid parameter or this command is not supported by the device

Response content:

Parameter nameData typeRequirementDescription
statusStringM“stopped”,“inProgress”
lastFormatResultStringO“none”,“completed”,“failed”
lastFormatMessageStringO
progressIntOFormat 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 nameData typeRequirementDescription
channelsInt arrayOYou can remove this parameter if device do not support multiple channels

Response status code:

status codeDescription
200OK
400Invalid parameter or this command is not supported by the device

Response content:

Parameter nameData typeRequirementDescription
resultsstatus object arrayM
Elements of status objectData typeRequirementDescription
statusStringM“stopped”,“inProgress”
channelIdIntO

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"
      }
    ]
  }
}


  • 上一篇:Nebula Functions v1.2a - page
  • 下一篇:没有了
  • 热门新闻

    即刻开启您的物联网之旅

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

    +86 755 27702549

    7×24小时服务热线

    法律声明 隐私权条款

    关注“TUTK”

    TUTK服务尽在掌握

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

    TUTK服务尽在掌握

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

    返回顶部