指令列表:
- IOTCAV:startVideo
- IOTCAV:startAudio
- IOTCAV:startSpeaker
- IOTCAV:playbackControl
- getVideoFormatPreset
- setVideoFormatPreset
- getVideoBrightness
- setVideoBrightness
- getVideoContrast
- setVideoContrast
- setCloudRecordingEndpoint
- getCloudRecordingEndpoint
- enableCloudRecording
- getCloudRecordingStatus
- getCameraCapability
- setWifi
- queryWifiList
- getCurrentWifi
- queryStorageList
- getStorageInfo
- formatStorage
- getCameraCapability
- setWifi
- queryWifiList
- getCurrentWifi
- queryStorageList
- getStorageInfo
- formatStorage
- createCredential
- deleteCredential
- getAllIdentities
- getDeviceInfo
- setName
- getName
- getBatteryLevel
- addPushNotificationService
- delPushNotificationService
- queryPushNotificationService
- upgradeFirmware
- checkFirmwareUpgradeStatus
- writeFirmware
- getAllSettings
- panTiltStep
- queryEventList
- startWebRtc
- stopWebRtc
- exchangeSdp
- startWebRtcStreams
- stopWebRtcStreams
- getLiveCapabilities
- startLiveStream
- getPlaybackCapabilities
- startPlayback
- setEventRecordingTriggers
- getEventRecordingTriggers
- enableAllLocalRecording
- isAllLocalRecordingEnabled
- setContinuousRecordingSchedule
- getContinuousRecordingSchedule
- enableContinuousScheduleRecording
- isContinuousScheduleRecordingEnabled
- setPushNotificationTriggers
- getPushNotificationTriggers
- enablePushNotification
- enablePushNotifications
- arePushNotificationsEnabled
- isPushNotificationEnabled
- getChannelInfo
- setChannelName
- getChannelName
- getChannelNames
- queryEventCalendar
- queryEventListByNumber
错误码说明:
- 200: Request successful
- 400: Invalid parameter or command not supported
- 404: Resource not found
- 415: Unsupported format
- 422: Resource not formatted
- 423: Resource not writable
IOTCAV:startVideo
Description: Use this function to request the device to start playing video stream with AV JSON control. Please note that "IOTCAV:" should be removed from the control string before sending it. Version: 1.0 Function set: IOTCAV:videoStreaming Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| value | Boolean | M | true: request the device to start playing video, false: request the device to stop playing video |
| videoFormatPreset | String | O | please check getCameraCapability for the information of video format presets |
Response status code: 200, 400 Response content: Empty Device profile example:
{
"func":"IOTCAV:startVideo",
"args":{
"value":"Boolean",
"videoFormatPreset":"String"
}
}
AV JSON control request example:
{
"func":"startVideo",
"args":{
"value": true
}
}
AV JSON control response example:
{
"statusCode": 200,
"statusMsg": "OK"
}
IOTCAV:startAudio
Description: Use this function to request the device to start playing audio stream with AV JSON control. Please note that "IOTCAV:" should be removed from the control string before sending it. Version: 1.0 Function set: IOTCAV:audioStreaming Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| value | Boolean | M | true: request the device to start playing audio, false: request the device to stop playing audio |
Response status code: 200, 400 Response content: Empty Device profile example:
{
"func":"IOTCAV:startAudio",
"args":{
"value":"Boolean"
}
}
AV JSON control request example:
{
"func":"startAudio",
"args":{
"value": true
}
}
AV JSON control response example:
{
"statusCode": 200,
"statusMsg": "OK"
}
IOTCAV:startSpeaker
Description: Use this function to request the device to recieve audio stream from client. Please note that "IOTCAV:" should be removed from the control string before sending it. Version: 1.0 Function set: IOTCAV:speaker Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| value | Boolean | M | true: request the device to start recieving audio, false: request the device to stop recieving audio |
Response status code: 200, 400 Response content: Empty Device profile example:
{
"func":"IOTCAV:startSpeaker",
"args":{
"value":"Boolean"
}
}
AV JSON control request example:
{
"func":"startSpeaker",
"args":{
"value": true
}
}
AV JSON control response example:
{
"statusCode": 200,
"statusMsg": "OK"
}
IOTCAV:playbackControl
Description: Use this function to request the device to start playing video stream with AV JSON control. Please note that "IOTCAV:" should be removed from the control string before sending it. Version: 1.0 Function set: IOTCAV:playback Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| ctrl | Int | M | |
| fileName | String | M | |
| iotcChannel | Int | O | device should use channel 1 in default |
| Enumeration of ctrl | description | note |
|---|---|---|
| 0 | pause | Device should continue to play video stream after receiving control "play" not "pause" |
| 1 | play | |
| 2 | stop |
Response status code: 200, 400 Response content: Empty Device profile example:
{
"func":"IOTCAV:playbackControl",
"args":{
"ctrl":"Int",
"fileName":"String",
"iotcChannel":"Int"
}
}
AV JSON control request example:
{
"func":"playbackControl",
"args":{
"ctrl":1,
"fileName":"20201229.h264",
"iotcChannel":2
}
}
AV JSON control response example:
{
"statusCode": 200,
"statusMsg": "OK"
}
getVideoFormatPreset
Description: Use this function to get the currently utilized video format present, please check getCameraCapability for the information of video format presets. Version: 1.0 Function set: videoConfiguration Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| channel | Int | O | For NVR, DVR devices |
Response content:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| value | String | M | Present name |
Device profile example:
{
"func":"getVideoFormatPreset",
"args":{
"channel":"Int"
},
"return":{
"value":"String"
}
}
Nebula command request example:
{
"func":"getVideoFormatPreset",
"args":{
"channel":1
}
}
Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK",
"content":{
"value": "hd"
}
}
setVideoFormatPreset
Description: Use this function to set the current video format present, please check getCameraCapability for the information of video format presets. Version: 1.0 Function set: videoConfiguration Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| value | String | M | Present name |
| channel | Int | O | For NVR,DVR devices |
Response status code: 200, 400 Response content: Empty Device profile example:
{
"func":"setVideoFormatPreset",
"args":{
"value":"String",
"channel":"Int"
}
}
Nebula command request example:
{
"func":"setVideoFormatPreset",
"args":{
"value":"720p",
"channel":1
}
}
Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK"
}
getVideoBrightness
Description: Get the brightness value of the video stream. Version: 1.0 Function set: videoConfiguration Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| channel | Int | O | support in v1.2 |
Response content:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| value | Int | M | value range is 0-100 |
Device profile example:
{
"func":"getVideoBrightness",
"args":{
"channel":"Int"
},
"return":{
"value":"Int"
}
}
Nebula command request example:
{
"func":"getVideoBrightness"
}
Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK",
"content":{
"value": 57
}
}
setVideoBrightness
Description: Set the brightness value of the video stream. Version: 1.0 Function set: videoConfiguration Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| value | Int | M | value range is 0-100 |
| channel | Int | O | support in v1.2 |
Response status code: 200, 400 Response content: Empty Device profile example:
{
"func":"setVideoBrightness",
"args":{
"value":"Int",
"channel":"Int"
}
}
Nebula command request example:
{
"func":"setVideoBrightness",
"args":{
"value":99
}
}
Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK"
}
getVideoContrast
Description: Get the contrast value of the video stream. Version: 1.0 Function set: videoConfiguration Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| channel | Int | O | support in v1.2 |
Response content:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| value | Int | M | value range is 0-100 |
Device profile example:
{
"func":"getVideoContrast",
"args":{
"channel":"Int"
},
"return":{
"value":"Int"
}
}
Nebula command request example:
{
"func":"getVideoContrast"
}
Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK",
"content":{
"value": 67
}
}
setVideoContrast
Description: Set the contrast value of the video stream. Version: 1.0 Function set: videoConfiguration Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| value | Int | M | value range is 0-100 |
| channel | Int | O | support in v1.2 |
Response status code: 200, 400 Response content: Empty Device profile example:
{
"func":"setVideoContrast",
"args":{
"value":"Int",
"channel":"Int"
}
}
Nebula command request example:
{
"func":"setVideoContrast",
"args":{
"value":67
}
}
Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK"
}
setCloudRecordingEndpoint
Description: Setup target could recording url of the device, this function is supported internally by Nebula Device. Version: 1.2 Function set: cloudRecording Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| url | String | M | URL of VSaaS server |
| intention | String | O | Enumeration of "subscribe", "cancel", "modify" |
| header | Dictionary | O | all content will be put in the http header |
| channel | Integer | O | specific channel that this endpoint belongs to, only given for devices that supports channels |
| recordingType | String | O | specific recording type that is supported by this endpoint. Will be either "fulltime" or "event" |
Response status code: 200, 400 Response content: Empty Device profile example:
{
"func":"setCloudRecordingEndpoint",
"args":{
"url":"String",
"header":"Dictionary"
}
}
Nebula command request example no channel old format:
{
"func":"setCloudRecordingEndpoint",
"args":{
"url":"https://vpbs-rd.kalay.us/vsaas/api/v1/stream/stream_url/TC021LBP010000000001LBG10KXETTV8DUMFM111?stoken=r43rjio4jrin3o3r",
"header": {
"Authorization":"Bearer XXXXXXXXX",
"User-Agent":"TUTK Device"
}
}
}
Nebula command request example no channel:
{
"func": "setCloudRecordingEndpoint",
"args": {
"url": "https://asia-vpapi-tutk-stg.kalay.us/vsaas/api/v1/stream/stream_url/EBYUANJMU3L4UM6GU1EJ?stoken=stoken",
"header": {
"Authorization": "Bearer XXXXXXXXX",
"User-Agent": "TUTK Device"
},
"recordingType": "event",
"intension": "subscribe"
}
}
Nebula command request example with channel:
{
"func": "setCloudRecordingEndpoint",
"args": {
"url": "https://asia-vpapi-tutkstg.kalay.us/vsaas/api/v1/stream/stream_url/EBYUANJMU3L4UM6GU1EJstoken=stoken",
"header": {
"Authorization": "Bearer XXXXXXXXX",
"User-Agent": "TUTK Device"
},
"channel": 1,
"intension": "subscribe",
"recordingType": "fulltime"
}
}
Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK"
}
getCloudRecordingEndpoint
Description: To retrieve the cloud recording URL of the device, you can use the internal SDK function 'getCloudRecordingEndpoint' Version: 1.3 Function set: cloudRecording Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| channel | Integer | O | only given for devices that supports channels |
Response content:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| url | String | M | URL of VSaaS server |
| header | Dictionary | O | all content will be put in the http header |
| channel | Integer | O | specific channel that this endpoint belongs to, only given for devices that supports channels |
| recordingType | String | O | specific recording type that is supported by this endpoint. Will be either "fulltime" or "event" |
Device profile example:
{
"func":"getCloudRecordingEndpoint",
"return":{
"url":"String",
"header":"Dictionary",
"channel": "int",
"recordingType": "String"
}
}
Nebula command request example:
{
"func":"getCloudRecordingEndpoint"
}
Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK",
"content":
{
"url":"https://vpbs-rd.kalay.us/vsaas/api/v1/stream/stream_url/TC021LBP010000000001LBG10KXETTV8DUMFM111?stoken=r43rjio4jrin3o3r",
"header": {
"Authorization":"Bearer XXXXXXXXX",
"User-Agent":"TUTK Device"
}
}
}
Nebula command response example no channel:
{
"statusCode": 200,
"statusMsg": "OK",
"content":
{
"url":"https://vpbs-rd.kalay.us/vsaas/api/v1/stream/stream_url/TC021LBP010000000001LBG10KXETTV8DUMFM111?stoken=r43rjio4jrin3o3r",
"header": {
"Authorization":"Bearer XXXXXXXXX",
"User-Agent":"TUTK Device"
},
"recordingType":"fulltime"
}
}
Nebula command response example with channel:
{
"statusCode": 200,
"statusMsg": "OK",
"content":
{
"url":"https://vpbs-rd.kalay.us/vsaas/api/v1/stream/stream_url/TC021LBP010000000001LBG10KXETTV8DUMFM111?stoken=r43rjio4jrin3o3r",
"header": {
"Authorization":"Bearer XXXXXXXXX",
"User-Agent":"TUTK Device"
},
"channel": 1,
"recordingType":"event"
}
}
enableCloudRecording
Description: Turn on/off the cloud recording functionality of the device. Version: 1.0 Function set: cloudRecording Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| value | Boolean | M | true is turn on , false is off |
Response status code: 200, 400 Response content: Empty Device profile example:
{
"func":"enableCloudRecording",
"args":{
"value":"Boolean"
}
}
Nebula command request example:
{
"func":"enableCloudRecording",
"args":{
"value":true
}
}
Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK"
}
getCloudRecordingStatus
Description: Get the on/off status of the cloud recording functionality of the device Version: 1.0 Function set: cloudRecording Request parameters: Empty Response content:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| value | Boolean | M | true is turn on the cloud recording , false is turn off. |
Device profile example:
{
"func":"getCloudRecordingStatus",
"return":{
"value":"Boolean"
}
}
Nebula command request example:
{
"func":"getCloudRecordingStatus"
}
Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK",
"content":{
"value":true
}
}
getCameraCapability
Description: Get the capabilities of a camera. Version: 1.0 Function set: cameraInfo Request parameters: Empty Response status code: 200, 400 Response content:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| channels | Array of channel object | M | Capabilities for each iotc channel |
| The elements of a channel object | Data type | Requirement | Description |
|---|---|---|---|
| protocols | Array of String | M | could be "iotc-av","rtsp-iotc-tunnel","webrtc" |
| channelId | Int | M | |
| lens | lens object | M | |
| video | video object | M | |
| audio | audio object | O | |
| speaker | speaker object | O |
| The elements of a lens object | Data type | Requirement | Description |
|---|---|---|---|
| type | String | M |
| Possible strings of the lens type | Description |
|---|---|
| fisheye | Fisheye lens type |
| wideAngle | Wide angle lens type |
| normal | Normal lens type |
| The elements of a video object | Data type | Requirement | Description |
|---|---|---|---|
| codecs | Array of String | M | could be h264, h265, mjpeg |
| averageBitrates | Array of Int | M | |
| presets | Array of video preset object | M |
| The elements of an audio/speaker object | Data type | Requirement |
|---|---|---|
| presets | Array of audio preset object | M |
| The elements of an video preset object | Data type | Requirement | Description |
|---|---|---|---|
| name | String | M | Preset name |
| codec | String | M | h264, h265, mjpeg |
| averageBitrate | Int | M | Unit: bps |
| resolution | String | M | 1920x1080, 1024x768,… |
| The elements of an audio/speaker preset object | Data type | Requirement | Description |
|---|---|---|---|
| name | String | M | Preset name |
| codec | String | M | pcm, g711u, g711u, aac |
| sampleRate | Int | M | 8000, 16000, …44100 |
| bitsPerSample | Int | M | 8, 16, 24 |
| channelCount | Int | M | 1, 2 |
Device profile example:
{
"func": "getCameraCapability",
"return": {
"channels": [
{
"protocols": [
"String"
],
"channelId": "Int",
"lens": {
"type": "String"
},
"video": {
"presets": [
{
"name": "String",
"codec": "String",
"averageBitrate": "Int",
"resolution": "String"
}
],
"codecs": [
"String"
],
"averageBitrates": [
"Int"
]
},
"audio": {
"presets": [
{
"name": "String",
"codec": "String",
"sampleRate": "Int",
"bitsPerSample": "Int",
"channelCount": "Int"
}
]
},
"speaker": {
"presets": [
{
"name": "String",
"codec": "String",
"sampleRate": "Int",
"bitsPerSample": "Int",
"channelCount": "Int"
}
]
}
}
]
}
}
Nebula command request example:
{
"func":"getCameraCapability"
}
Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK",
"content": {
"channels": [
{
"protocols": [
"iotc-av",
"rtsp-iotc-tunnel"
],
"channelId": 0,
"lens": {
"type": "normal"
},
"video": {
"codecs": [
"h264",
"h265"
],
"averageBitrates": [
100000,
500000
],
"presets": [
{
"name": "720p",
"codec": "h264",
"averageBitrate": 100000,
"resolution": "1280×720"
},
{
"name": "1080p",
"codec": "h264",
"averageBitrate": 500000,
"resolution": "1920x1080"
}
]
},
"audio": {
"presets": [
{
"name": "pcm_8000_16_1",
"codec": "pcm",
"sampleRate": 8000,
"bitsPerSample": 16,
"channelCount": 1
}
]
},
"speaker": {
"presets": [
{
"name": "speaker_1",
"codec": "pcm",
"sampleRate": 8000,
"bitsPerSample": 16,
"channelCount": 1
}
]
}
},
{
"protocols": [
"iotc-av",
"rtsp-iotc-tunnel"
],
"channelId": 1,
"lens": {
"type": "normal"
},
"video": {
"codecs": [
"h264",
"h265"
],
"averageBitrates": [
100000,
500000
],
"presets": [
{
"name": "720p",
"codec": "h264",
"averageBitrate": 100000,
"resolution": "1280×720"
},
{
"name": "1080p",
"codec": "h264",
"averageBitrate": 500000,
"resolution": "1920x1080"
}
]
}
}
]
}
}
setWifi
Description: update the wifi configuration of the device Version: 1.0 Function set: wifi Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| ssid | String | M | |
| pwd | String | M |
Response status code: 200, 400 Response content: Empty Device profile example:
{
"func": "setWifi",
"args": {
"ssid": "String",
"pwd":"String"
}
}
Nebula command request example:
{
"func": "setWifi",
"args": {
"ssid": "TestAP",
"pwd":"12345678"
}
}
Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK"
}
queryWifiList
Description: The device will scan the wifi aps and provide the results to the client Version: 1.0 Function set: wifi Request parameters: Empty Response status code: 200, 400 Response content:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| list | Array of wifi object | M |
| element of wifi object | Data type | Requirement | Description |
|---|---|---|---|
| ssid | String | M | |
| signal | float | O | unit: dbm |
Device profile example:
{
"func": "queryWifiList",
"return": {
"list":[{
"ssid":"String",
"signal":"Float"
}]
}
}
Nebula command request example:
{
"func": "queryWifiList"
}
Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK",
"content": {
"list":[
{
"ssid":"TestAP1",
"signal": -50.1
},
{
"ssid":"TestAP2",
"signal": -30.2
}
]
}
}
getCurrentWifi
Description: Get the wifi ssid currently used by the device Version: 1.0 Function set: wifi Request parameters: Empty Response status code: 200, 400 Response content:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| ssid | String | M | |
| signal | Float | O | unit: dbm |
Device profile example:
{
"func": "getCurrentWifi",
"return": {
"ssid": "String",
"signal": "Float"
}
}
Nebula command request example:
{
"func": "getCurrentWifi"
}
Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK",
"content": {
"ssid": "TestAP",
"signal": -90.0
}
}
queryStorageList
Description: Query all the storage infos of the device Version: 1.0 Function set: storageInfo Request parameters: Empty Response status code: 200, 400 Response content:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| list | String array | M |
Device profile example:
{
"func":"queryStorageList",
"return":{
"list":["String"]
}
}
Nebula command request example:
{
"func":"queryStorageList"
}
Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK",
"content": {
"list":["sdcard", "usb"]
}
}
getStorageInfo
Description: Get more information of the target storage through its name Version: 1.0 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 |
| 415 | Storage format not support |
| 422 | Storage not formatted |
| 423 | Storage is not writtable due to some reason |
Response content:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| totalSize | Int | M | unit: MByte |
| freeSize | Int | M | unit: MByte |
| format | String | O | "exFAT","vFAT","NFTS" |
Device profile example:
{
"func":"getStorageInfo",
"args":{
"value":"String"
},
"return":{
"totalSize":"Int",
"freeSize":"Int",
"format":"String"
}
}
Nebula command request example:
{
"func":"getStorageInfo",
"args":{
"value":"sdcard"
}
}
Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK",
"content": {
"totalSize":64000,
"freeSize":32000,
"format":"exFAT"
}
}
formatStorage
Description: Format the target storage through its name Version: 1.0 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 |
| 405 | Format storage failed |
Response content: Empty Device profile example:
{
"func":"formatStorage",
"args":{
"value":"String"
}
}
Nebula command request example:
{
"func":"formatStorage",
"args":{
"value":"sdcard"
}
}
Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK"
}
createCredential
Description: This function is used to create a new identity name with a new credential, or to overwrite the credential already exists through its identity name Version: 1.0 Function set: authentication Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| identity | String | M | |
| createMode | String | M |
| Possible strings of createMode | description |
|---|---|
| createIfNotExist | Create new credential if not exist, return old credential if exist |
| updateIfExist | Create update credential if exist, return error if not exist |
Response status code: 200, 400 Response content: Empty Device profile example:
{
"func":"createCredential",
"args":{
"identity":"String",
"createMode":"String"
},
"return":{
"credential":"String"
}
}
Nebula command request example:
{
"func":"createCredential",
"args":{
"identity":"guest",
"createMode":"createIfNotExist"
}
}
Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK",
"content":{
"credential":"doen43rniosqwsni"
}
}
deleteCredential
Description: This function is used to delete a credential through its identity name Version: 1.0 Function set: authentication Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| identity | String | M |
Response status code: 200, 400 Response content: Empty Device profile example:
{
"func":"deleteCredential",
"args":{
"identity":"String"
}
}
Nebula command request example:
{
"func":"deleteCredential",
"args":{
"identity":"guest"
}
}
Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK"
}
getAllIdentities
Description: This function is used to enumerate all the identities Version: 1.0 Function set: authentication Request parameters: Empty Response status code: 200, 400 Response content:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| identities | String array | M |
Device profile example:
{
"func":"getAllIdentities",
"return":{
"identities":["String"]
}
}
Nebula command request example:
{
"func":"getAllIdentities"
}
Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK",
"content":{
"identities":["admin","guest","user1"]
}
}
getDeviceInfo
Description: This function is used to get the infomation of the device Version: 1.0 Function set: deviceInfo Request parameters: Empty Response status code: 200, 400 Response content:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| skuNumber | String | M | Fill it up empty string if the device does not have this infomation |
| serialNumber | String | M | Fill it up empty string if the device does not have this infomation |
| model | String | M | |
| mac | String | M | the format should be like "D8:23:F4:2D:22:CE" |
| name | String | M | device name |
| ip | String | M | |
| type | String | M | device type |
Device profile example:
{
"func":"getDeviceInfo",
"return":{
"skuNumber":"String",
"serialNumber":"String",
"model":"String",
"mac":"String",
"name":"String",
"ip":"String",
"type":"String"
}
}
Nebula command request example:
{
"func":"getDeviceInfo"
}
Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK",
"content":{
"skuNumber":"234-324",
"serialNumber":"4mk234j",
"model":"TUTKIPC01",
"mac":"D8:23:F4:2D:22:CE",
"name":"ipcam",
"ip":"192.168.1.2",
"type":"camera"
}
}
setName
Description: This function is used to set the name of the device Version: 1.0 Function set: deviceInfo Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| name | String | M |
Response status code: 200, 400 Response content: Empty Device profile example:
{
"func":"setName",
"args":{
"name":"String"
}
}
Nebula command request example:
{
"func":"setName",
"args":{
"name":"front door ipcam"
}
}
Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK"
}
getName
Description: This function is used to get the name of the device Version: 1.0 Function set: deviceInfo Request parameters: Empty Response status code: 200, 400 Response content:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| name | String | M |
Device profile example:
{
"func":"getName",
"return":{
"name":"String"
}
}
Nebula command request example:
{
"func":"getName"
}
Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK",
"content":{
"name":"front door ipcam"
}
}
getBatteryLevel
Description: This function is used on battery-powered devices to get the level of the battery Version: 1.0 Function set: battery Request parameters: Empty Response status code: 200, 400 Response content:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| value | Int | M | the battery percentage |
Device profile example:
{
"func":"getBatteryLevel",
"return":{
"value":"Int"
}
}
Nebula command request example:
{
"func":"getBatteryLevel"
}
Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK",
"content":{
"value":100
}
}
addPushNotificationService
Description: It is an internal command supported by nebula SDK to add push notification api into SDK and the device should call related nebula SDK API to send out push notification. A device might have multiple push destinations, we use service to distinguish those destinations. Version: 1.0 Function set: pushNotification Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| service | String | M | |
| url | String | M | |
| header | String | O | |
| method | String array | O | POST or GET, default value is GET |
| supportImageUpload | Boolean | O | default value is false |
Response status code: 200, 400 Response content: Empty Device profile example:
{
"func":"addPushNotificationService",
"args":{
"service": "String",
"url":"String",
"method":["String"],
"supportImageUpload": "Boolean",
"header": "Dictionary"
}
}
Nebula command request example:
{
"func":"addPushNotificationService",
"args":{
"service": "tutk-push",
"url":"https://tutk.push.com/ewmkrlewmrl/token=j45ntj4n5tjk4ntj",
"header": {
"Authorization":"Bearer XXXXXXXXX",
"User-Agent":"TUTK Device"
}
}
}
Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK"
}
delPushNotificationService
Description: It is an internal command supported by nebula SDK to remove push notification api stored in SDK. Version: 1.0 Function set: pushNotification Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| service | String | M |
Response status code: 200, 400 Response content: Empty Device profile example:
{
"func":"delPushNotificationService",
"args":{
"service": "String"
}
}
Nebula command request example:
{
"func":"delPushNotificationService",
"args":{
"service": "tutk-push"
}
}
Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK"
}
queryPushNotificationService
Description: It is an internal command supported by nebula SDK to get all the push destinations stored in nebula SDK with service names. Version: 1.2 Function set: pushNotification Request parameters: Empty Response status code: 200, 400 Response content:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| list | push-info object array | M |
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| service | String | M | |
| url | String | M | |
| header | String | O |
Device profile example:
{
"func":"queryPushNotificationService",
"return": {
"list": [
{
"service": "String",
"url":"String",
"header": "Dictionary"
}
]
}
}
Nebula command request example:
{
"func":"queryPushNotificationService"
}
Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK",
"content": {
"list": [
{
"service": "tutk-push",
"url":"https://tutk.push.com/ewmkrlewmrl/token=j45ntj4n5tjk4ntj",
"header": {
"Authorization":"Bearer XXXXXXXXX",
"User-Agent":"TUTK Device"
}
},
{
"service": "other-push",
"url":"https://tutk.push.com/ewmkrlewmrl/token=j45ntj4n5tjk4ntj",
"header": {
"Authorization":"Bearer XXXXXXXXX",
"User-Agent":"TUTK Device"
}
}
]
}
}
upgradeFirmware
Description: Use this command to trigger the firmware upgrade process. Version: 1.0 Function set: ota Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| url | String | M | |
| auto | Boolean | M | Write firmware directly after firmware is downloaded or not |
Response status code: 200, 400 Response content: Empty Device profile example:
{
"func":"upgradeFirmware",
"args":{
"url":"String",
"auto": "Boolean"
}
}
Nebula command request example:
{
"func":"upgradeFirmware",
"args":{
"url":"https://kota.kalayservice.com/ota/GET/i/Company/Product/Model",
"auto": true
}
}
Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK"
}
checkFirmwareUpgradeStatus
Description: Check the firmware upgrade status. Version: 1.0 Function set: ota Request parameters: Empty Response status code: 200, 400 Response content:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| status | Int | M | |
| progressBar | Int | O | It only works with status(1) and status(3) and its value range is 0~100. When it works with status(3), the value means the progress percentage of writing firmware |
Enumeration of status:
- 0 - Firmware upgrade is not in progress
- 1 - Downloading firmware.
- 2 - Firmware upgrade failed
- 3 - Firmware has been downloaded. If APP send upgradeFireware with auto=true, status 3 also means the FW is being written into the flash.
{
"func":"checkFirmwareUpgradeStatus",
"return":{
"status":"Int",
"progressBar":"Int"
}
}
Nebula command request example:
{
"func":"checkFirmwareUpgradeStatus"
}
Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK",
"content":{
"status":1,
"progressBar":50
}
}
writeFirmware
Description: This command should be used when “auto” is not enabled with “upgradeFirmware” it will start to write the firmware. Otherwise, the device will not write firmware automatically. Version: 1.0 Function set: ota Request parameters: Empty Response status code: 200, 400 Response content: Empty Device profile example:
{
"func":"writeFirmware"
}
Nebula command request example:
{
"func":"writeFirmware"
}
Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK"
}
getAllSettings
Description: This is a special command that can get multiple result of commands to avoid multiple times of command request. Version: 1.0 Function set: allSettings Request parameters: Empty Response status code: 200, 400 Response content:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| settings | Dictionary | M | the key value of the settings dictionary should be recognized by client, otherwise the client must skip to read its value |
Device profile example:
{
"func":"getAllSettings",
"return":{
"settings":"Dictionary"
}
}
Nebula command request example:
{
"func":"getAllSettings"
}
Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK",
"content":{
"settings":{
"func1":"value1",
"func2":2,
"func3":true,
"someID1":"value1",
"someID2":2
}
}
}
panTiltStep
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 | added in spec 1.2, NVR’s channel usage. if for IPC, it does not need to have channel parameter |
Enumeration of direction:
- up
- down
- left
- right
{
"func":"panTiltStep",
"args":{
"step":"Int",
"direction":"String",
"channel":"Int"
}
}
Nebula command request example:
{
"func":"panTiltStep",
"args":{
"step":8,
"direction":"up",
"channel":1
}
}
Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK"
}
queryEventList
Description: To query the recorded event list Version: 1.0 Function set: playback Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| startTime | Int | M | UNIX timestamp(unit: sec) |
| endTime | Int | M | UNIX timestamp(unit: sec) |
| eventType | String | M | |
| channel | Int | O | some devices have multiple channels, each channel has at least one camera. If your device do not support multiple channels, please do not add this field into your device profile |
Enumeration of eventType:
- all
- motion
- alarm
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| value | Array of event objects | M |
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| eventType | String | M | it has the same enumeration as the “eventType” in request parameters |
| timestamp | Int | M | start time of the event in the format of UNIX timestamp(unit: sec) |
| duration | Int | M | the duration of the event (unit: ms) |
| fileName | String | M | the filename of the recorded video file related to the event |
| fileSize | Int | M | unit: byte |
Device profile example:
{
"func": "queryEventList",
"args": {
"startTime": "Int",
"endTime": "Int",
"eventType": "String",
"channel": "Int"
},
"return": {
"value": [
{
"eventType": "String",
"timestamp": "Int",
"duration": "Int",
"fileName": "String",
"fileSize": "Int"
}
]
}
}
Nebula command request example:
{
"func": "queryEventList",
"args": {
"startTime": 1559692800, //05 June 2019 08:00:00 GMT +8:00
"endTime": 1559779200, //06 June 2019 08:00:00 GMT +8:00
"eventType": "motion"
}
}
Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK",
"content":{
"value":[
{
"eventType": "motion",
"timestamp": 1559696400, //05 June 2019 09:00:00 GMT +8:00
"duration": 60000,
"fileName": "20190605_090000",
"fileSize": 102400000
},
{
"eventType": "motion",
"timestamp": 1559754000, //06 June 2019 01:00:00 GMT +8:00
"duration": 60000,
"fileName": "20190606_010000",
"fileSize": 102400000
}
]
}
}
startWebRtc
Description: - Version: 1.1 Function set: webrtc 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 |
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| channelId | Int | O | |
| streamId | String array | M |
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 |
Device profile example:
{
"func": "startWebRtc",
"args": {
"amToken": "String",
"realm": "String",
"disableAuthTurn": "Boolean",
"info": "Object",
"channels":[
{
"channelId":"Int",
"streamId":[
"String"
]
}
]
},
"return": {
"rtcId": "Int",
"username": "String",
"password": "String",
"ttl": "Int",
"uris": [
"String"
]
}
}
Nebula command request example:
{
"func": "startWebRtc",
"args": {
"amToken": "ewrewrrwerdwed",
"realm": "tutk",
"disableAuthTurn": false,
"channels":[
{
"channelId":0,
"streamId":["camera1","camera2"]
}
]
}
}
Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK",
"content": {
"rtcId": 123,
"username": "user123",
"password": "password123",
"ttl": 60,
"uris": [
"www.turn.tutk.com"
]
}
}
stopWebRtc
Description: - Version: 1.1 Function set: webrtc, webrtcEx Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| rtcId | Int | M |
Response status code: 200, 400 Response content: Empty Device profile example:
{
"func": "stopWebRtc",
"args": {
"rtcId": "Int"
}
}
Nebula command request example:
{
"func": "stopWebRtc",
"args": {
"rtcId": 123
}
}
Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK"
}
exchangeSdp
Description: - Version: 1.1 Function set: webrtc, webrtcEx Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| type | String | M | Must fill up with “offer” |
| sdp | String | M | |
| rtcId | Int | M |
Response status code: 200, 400 Response content:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| type | String | M | Must fill up with “answer” |
| sdp | String | M |
Device profile example:
{
"func": "exchangeSdp",
"args": {
"type": "String",
"sdp": "String",
"rtcId": "Int"
},
"return": {
"type": "String",
"sdp": "String"
}
}
Nebula command request example:
{
"func": "exchangeSdp",
"args": {
"type": "offer",
"sdp": "v=0 o=- 20518 0 IN IP4 0.0.0.0 ...",
"rtcId": 123
}
}
Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK",
"content": {
"type": "answer",
"sdp": "v=0 o=- 16833 0 IN IP4 0.0.0.0 .."
}
}
startWebRtcStreams
Description: - Version: 1.1 Function set: webrtc, webrtcEx Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| streamIds | String array | M | |
| rtcId | Int | O | |
| setupConnection | setupConnection object | O |
| element name | Data type | Requirement | Description |
|---|---|---|---|
| type | String | M | |
| sdp | String | M | |
| info | Object | O |
Response status code: 200, 400 Response content:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| setupConnectionResult | setupConnectionResult object | O | |
| startStreamsResults | startStreamsResults object | O |
| element name | Data type | Requirement | Description |
|---|---|---|---|
| rtcId | Int | M | |
| type | String | M | |
| sdp | String | M | |
| resultCode | Int | M |
| element name | Data type | Requirement | Description |
|---|---|---|---|
| streamId | String | M | |
| resultCode | Int | M |
Device profile example:
{
"func": "startWebRtcStreams",
"args": {
"rtcId": "Int",
"streamIds": [
"String"
],
"setupConnection": {
"type": "String:offer",
"sdp": "String",
"info": "Object"
}
},
"return": {
"setupConnectionResult": {
"rtcId": "Int",
"type": "String:answer",
"sdp": "String",
"resultCode": "Int"
},
"startStreamsResults": [
{
"streamId": "String",
"resultCode": "Int"
}
]
}
}
Nebula command request example: case 1
{
"func": "startWebRtcStreams",
"args": {
"rtcId": 123,
"streamIds": [
"video",
"audio"
]
}
}
Nebula command request example: case 2
{
"func": "startWebRtcStreams",
"args": {
"streamIds": [
"video",
"audio"
],
"setupConnection": {
"type": "offer",
"sdp": "v=0 o=- 16833 0 IN IP4 0.0.0.0 .."
}
}
}
Nebula command response example: case 1
{
"statusCode": 200,
"statusMsg": "OK",
"content": {
"startStreamsResults": [
{
"streamId": "video",
"resultCode": 200
},
{
"streamId": "audio",
"resultCode": 200
}
]
}
}
Nebula command response example: case 2
{
"statusCode": 200,
"statusMsg": "OK",
"content": {
"setupConnectionResult": {
"rtcId": 123,
"type": "answer",
"sdp": "v=0 o=- 16833 0 IN IP4 0.0.0.0 ..",
"resultCode": 200
},
"startStreamsResults": [
{
"streamId": "video",
"resultCode": 200
},
{
"streamId": "audio",
"resultCode": 200
}
]
}
}
stopWebRtcStreams
Description: - Version: 1.1 Function set: webrtc Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| streamIds | String array | M | |
| rtcId | Int | O |
Response status code: 200, 400 Response content:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| stopStreamsResults | stopStreamsResults object array | M |
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| streamId | String | M | |
| resultCode | Int | M |
Device profile example:
{
"func": "stopWebRtcStreams",
"args": {
"rtcId": "Int",
"streamIds": [
"String"
]
},
"return": {
"stopStreamsResults": [
{
"streamId": "String",
"resultCode": "Int"
}
]
}
}
Nebula command request example:
{
"func": "stopWebRtcStreams",
"args": {
"rtcId": 123,
"streamIds": [
"video",
"audio"
]
}
}
Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK",
"content": {
"stopStreamsResults": [
{
"streamId": "video",
"resultCode": 200
},
{
"streamId": "audio",
"resultCode": 200
}
]
}
}
getLiveCapabilities
Description: - Version: 1.1 Function set: liveStreaming Request parameters: Empty
Response status code: 200, 400 Response content:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| protocol | String array | M | |
| streamType | String array | M | |
| channels | Int array | O |
Enumeration of protocol:
- webrtc
- rtsp-iotc-tunnel
- iotc-av
- video
- audio
- subVideo
- audioAndVideo
- audioAndSubVideo
Device profile example:
{
"func":"getLiveCapabilities",
"return":{
"protocol":["String"],
"streamType":["String"],
"channels":["Int"]
}
}
Nebula command request example:
{
"func":"getLiveCapabilities"
}
Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK",
"content":{
"protocol":["rtsp-iotc-tunnel","iotc-av", "webrtc"],
"streamType":["video","audio","audioAndVideo", "subVideo"],
"channels":[0,1,5]
}
}
startLiveStream
Description: - Version: 1.1 Function set: liveStreaming Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| streamType | String | M | |
| preferProtocol | String Array | M | |
| channel | Int | O | please check getLiveCapabilities for the enumeration of preferProtocol and streamType |
Response status code: 200, 400 Response content:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| url | String | M |
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>
Device profile example:
{
"func":"startLiveStream",
"args":{
"channel":"Int",
"streamType":"String",
"preferProtocol":["String"]
},
"return":{
"url":"String"
}
}
Nebula command request example for rtsp:
{
"func":"startLiveStream",
"args":{
"channel":1,
"streamType":"video",
"preferProtocol":["rtsp-iotc-tunnel"]
}
}
Nebula command response example for rtsp:
{
"statusCode": 200,
"statusMsg": "OK",
"content":{
"url":"rtsp://iotc-tunnel:80/path/to/stream"
}
}
Nebula command request example iotc-av:
{
"func":"startLiveStream",
"args":{
"channel":1,
"streamType":"subVideo",
"preferProtocol":["iotc-av"]
}
}
Nebula command response example for iotc-av:
{
"statusCode": 200,
"statusMsg": "OK",
"content":{
"url":"iotc-av://*/0/audio"
}
}
Nebula command request example webrtc:
{
"func": "startLiveStream",
"args": {
"channel": 1,
"preferProtocol": ["webrtc"]
}
}
Nebula command response example for webrtc:
{
"statusCode": 200,
"statusMsg": "OK",
"content": {
"url": "webrtc://*/video"
}
}
getPlaybackCapabilities
Description: - Version: 1.1 Function set: playback Request parameters: Empty
Response status code: 200, 400 Response content:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| protocol | String array | M | |
| streamType | String array | M | |
| channels | Int array | O |
Enumeration of protocol:
- webrtc
- rtsp-iotc-tunnel
- hls-iotc-tunnel
- iotc-av
- video
- audio
- subVideo
- audioAndVideo
- audioAndSubVideo
Device profile example:
{
"func":"getPlaybackCapabilities",
"return":{
"protocol":["String"],
"streamType":["String"],
"channels":["Int"]
}
}
Nebula command request example:
{
"func":"getPlaybackCapabilities"
}
Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK",
"content":{
"protocol":["rtsp-iotc-tunnel","iotc-av", "webrtc"],
"streamType":["video","audio","audioAndVideo", "subVideo"],
"channels":[0,1,5]
}
}
startPlayback
Description: - Version: 1.1 Function set: playback Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| streamType | String | M | |
| preferProtocol | String Array | M | |
| channel | Int | O | |
| fileName | String | O | Please choose one from fileName or startTime, fileName for the events, startTime for the contiuous recording |
| startTime | Int | O | timestamp |
| endTime | Int | O | timestamp, some platforms do not need this parameter when the duration is fixed, support in version 1.2 |
Note: Please check getPlaybackCapabilities for the enumeration of preferProtocol and streamType
Response status code: 200, 400, 404(no event was found) Response content:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| url | String | M | |
| duration | Int | O | unit: ms |
| iotc-channel | Int | O | default value should be 0 |
protocol url definition:
- rtsp-iotc-tunnel: rtsp://iotc-tunnel:<remote port>/<rtsp path>
- hls-iotc-tunnel: http://iotc-tunnel:<remote port>/<hls m3us 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
Device profile example:
{
"func":"startPlayback",
"args":{
"streamType":"String",
"preferProtocol":["String"],
"channel":"Int",
"fileName":"String",
"startTime":"Int"
},
"return":{
"url":"String",
"duration":"Int",
"iotc-channel":"Int"
}
}
Nebula command request example for rtsp:
{
"func":"startPlayback",
"args":{
"channel":1,
"streamType":"audioAndVideo",
"preferProtocol":["rtsp-iotc-tunnel"],
"fileName": "20190605_133000.mp4"
}
}
or
// Sat, 15 June 2019 13:30:00 GMT
{
"func":"startPlayback",
"args":{
"channel":1,
"streamType":"audioAndVideo",
"preferProtocol":["rtsp-iotc-tunnel"],
"startTime": 1560605400
}
}
Nebula command response example for rtsp:
{
"statusCode": 200,
"statusMsg": "OK",
"content":{
"url":"rtsp://iotc-tunnel:80/path/to/stream",
"duration":10000
}
}
setEventRecordingTriggers
Description: - Version: 1.0 Function set: playback Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| channel | Int | M | |
| triggers | String array | O |
Enumeration of trigger groups (sensor in getChannelsCapabilities) & Enumeration of triggers (mode in getChannelsCapabilities):
- motion: motionSensor, pir, perimeterIntrusion, lineCrossing
- objectDetection: stationaryObject, human, vehicle, attributeDetection, animal, objectAbandoned, objectMissing
- facialRecognition (faceRecognition): familiar, unfamiliar
- faceDetection: face
- counters: crossCounting, crowdDensity, queueLength
- licensePlate: licensePlate
- soundDetection: rareSound, sound, babyCry
- other: inputTrigger, doorbellRing, lowBattery, videoTampering, automaticNetworkReplenishment, smokeAlarm, fireAlarm, heatmap, loiterDetection
Response status code: 200, 400 Response content: Empty
Device profile example:
{
"func":"setEventRecordingTriggers",
"args":{
"channel":"Int",
"triggers":["String"]
}
}
Nebula command request example:
{
"func": "setEventRecordingTriggers",
"args": {
"channel": 1,
"triggers": ["pir", "animal"]
}
}
Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK"
}
getEventRecordingTriggers
Description: - Version: 1.0 Function set: playback Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| channel | Int | M |
Response status code: 200, 400 Response content:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| triggers | String array | M | Please check setEventRecordingTriggers for the enumeration of triggers. |
Device profile example:
{
"func":"getEventRecordingTriggers",
"args":{
"channel":"Int"
},
"return":{
"triggers":["String"]
}
}
Nebula command request example:
{
"func":"getEventRecordingTriggers",
"args":{
"channel":1
}
}
Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK",
"content": {
"triggers": [
"pir",
"animal"
]
}
}
enableAllLocalRecording
Description: - Version: 1.0 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 Note: Please check setEventRecordingTriggers for the enumeration of triggers.
Device profile example:
{
"func":"enableAllLocalRecording",
"args":{
"channel":"Int",
"value":"Boolean"
}
}
Nebula command request example:
{
"func":"enableAllLocalRecording",
"args":{
"channel":1,
"value":true
}
}
Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK"
}
isAllLocalRecordingEnabled
Description: - Version: 1.0 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":"isAllLocalRecordingEnabled",
"args":{
"channel":"Int"
},
"return":{
"value":"Boolean"
}
}
Nebula command request example:
{
"func":"isAllLocalRecordingEnabled",
"args":{
"channel":1
}
}
Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK",
"content":{
"value":true
}
}
setContinuousRecordingSchedule
Description: - Version: 1.0 Function set: playback Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| channel | Int | O | |
| rules | rule object array | M |
| element name | Data type | Requirement | Description |
|---|---|---|---|
| weekdays | Int array | M | |
| startTime | String | M | format: HHMMSS |
| endTime | String | M | format: HHMMSS |
Response status code: 200, 400 Response content: Empty
Device profile example:
{
"func":"setContinuousRecordingSchedule",
"args":{
"channel":"Int",
"rules":[
{
"weekdays":["Int"],
"startTime":"String",
"endTime":"String"
}
]
}
}
Nebula command request example:
{
"func": "setContinuousRecordingSchedule",
"args": {
"channel": 1,
"rules": [
{
"weekdays": [1,2,7],
"startTime": "110000",
"endTime": "203000"
}
]
}
}
Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK"
}
getContinuousRecordingSchedule
Description: - Version: 1.0 Function set: playback Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| channel | Int | O |
Response status code: 200, 400 Response content:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| rules | rule object array | M |
| element name | Data type | Requirement | Description |
|---|---|---|---|
| weekdays | Int array | M | |
| startTime | String | M | format: HHMMSS |
| endTime | String | M | format: HHMMSS |
Device profile example:
{
"func":"getContinuousRecordingSchedule",
"args":{
"channel":1
}
}
Nebula command request example:
{
"func":"getContinuousRecordingSchedule",
"args":{
"channel":1
}
}
Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK",
"content":{
"rules": [
{
"weekdays": [1,2,7],
"startTime": "110000",
"endTime": "203000"
}
]
}
}
enableContinuousScheduleRecording
Description: - Version: 1.1 Function set: playback Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| value | Boolean | M | |
| channel | Int | O |
Response status code: 200, 400 Response content: Empty
Device profile example:
{
"func":"enableContinuousScheduleRecording",
"args":{
"channel":"Int",
"value":"Boolean"
}
}
Nebula command request example:
{
"func":"enableContinuousScheduleRecording",
"args":{
"channel":1,
"value":true
}
}
Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK"
}
isContinuousScheduleRecordingEnabled
Description: - Version: 1.0 Function set: playback 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 | Boolean | M |
Device profile example:
{
"func":"isContinuousScheduleRecordingEnabled",
"args":{
"channel":"Int"
},
"return":{
"value":"Boolean"
}
}
Nebula command request example:
{
"func":"isContinuousScheduleRecordingEnabled",
"args":{
"channel":1
}
}
Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK",
"content":{
"value":true
}
}
setPushNotificationTriggers
Description: - Version: 1.0 Function set: pushNotification Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| triggers | String array | M | Please check setEventRecordingTriggers for the enumeration of triggers. |
| channel | Int | O |
Response status code: 200, 400 Response content: Empty
Device profile example:
{
"func":"setPushNotificationTriggers",
"args":{
"channel":"Int",
"triggers":["String"]
}
}
Nebula command request example:
{
"func":"setPushNotificationTriggers",
"args":{
"channel":1,
"triggers":["pir"]
}
}
Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK"
}
getPushNotificationTriggers
Description: - Version: 1.0 Function set: pushNotification Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| channel | Int | M |
Response status code: 200, 400 Response content:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| triggers | String array | M | Please check setEventRecordingTriggers for the enumeration of triggers. |
Device profile example:
{
"func":"getPushNotificationTriggers",
"args":{
"channel":"Int"
},
"return":{
"triggers":["String"]
}
}
Nebula command request example:
{
"func":"getPushNotificationTriggers",
"args":{
"channel":1
}
}
Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK",
"content":{
"triggers":["pir"]
}
}
enablePushNotification
Description: - Version: 1.0 Function set: pushNotification Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| value | Boolean | M | |
| channel | Int | O |
Response status code: 200, 400 Response content: Empty
Device profile example:
{
"func":"enablePushNotification",
"args":{
"channel":"Int",
"value":"Boolean"
}
}
Nebula command request example:
{
"func":"enablePushNotification",
"args":{
"channel":1,
"value":true
}
}
Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK"
}
enablePushNotifications
Description: - Version: 1.1 Function set: pushNotification Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| channels | channel object array | M |
| element name | Data type | Requirement | Description |
|---|---|---|---|
| value | Boolean | M | |
| channel | Int | M |
Response status code: 200, 400 Response content: Empty
Device profile example:
{
"func":"enablePushNotifications",
"args":{
"channels":[
{
"channel":"Int",
"value":"Boolean"
}
]
}
}
Nebula command request example:
{
"func":"enablePushNotifications",
"args":{
"channels":[
{
"channel":1,
"value":true
},
{
"channel":2,
"value":false
},
{
"channel":3,
"value":true
},
{
"channel":4,
"value":false
}
]
}
}
Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK"
}
arePushNotificationsEnabled
Description: - Version: 1.1 Function set: pushNotification Request parameters: Empty
Response status code: 200, 400 Response content:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| channels | channel object array | M |
| element name | Data type | Requirement | Description |
|---|---|---|---|
| value | Boolean | M | |
| channel | Int | M |
Device profile example:
{
"func":"ArePushNotificationsEnabled",
"return":{
"channels":[
{
"channel":"Int",
"value":"Boolean"
}
]
}
}
Nebula command request example:
{
"func":"ArePushNotificationsEnabled"
}
Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK",
"content":{
"channels":[
{
"channel":1,
"value":true
},
{
"channel":2,
"value":false
},
{
"channel":3,
"value":true
},
{
"channel":4,
"value":false
}
]
}
}
isPushNotificationEnabled
Description: - Version: 1.1 Function set: pushNotification 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 | Boolean | M |
Device profile example:
{
"func":"isPushNotificationEnabled",
"args":{
"channel":"Int"
},
"return":{
"value":"Boolean"
}
}
Nebula command request example:
{
"func":"isPushNotificationEnabled",
"args":{
"channel":1
}
}
Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK",
"content":{
"value":true
}
}
getChannelInfo
Description: - Version: 1.1 Function set: channelInfo 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 | String | M | |
| name | String | O | |
| firmwareVersion | String | O | |
| serialNumber | String | O | |
| model | String | O | |
| mac | String | O | |
| manufacturer | String | O | |
| type | String | O | |
| ip | String | O | |
| storageType | String | O | |
| network | String | O | |
| wifiSignalStrength | Int | O | percantage |
| batteryLevel | Int | O | percantage |
Enumeration of status:
| status value | Description |
|---|---|
| unknown | disconnected or no camera |
| active | - |
| Inactive | connected but in sleeping |
Device profile example:
{
"func":"getChannelInfo",
"args":{
"channel":"Int"
},
"return": {
"status":"String",
"name": "String",
"firmwareVersion": "String",
"serialNumber": "String",
"model": "String",
"mac": "String",
"manufacturer": "String",
"type": "String",
"ip": "String",
"storageType": "String",
"network": "String",
"wifiSignalStrength": "Int",
"batteryLevel": "Int"
}
}
Nebula command request example:
{
"func":"getChannelInfo",
"args":{
"channel":"Int"
}
}
Nebula command response example: case 1:
{
"statusCode": 200,
"statusMsg": "OK",
"content": {
"status":"active",
"name": "channel 1",
"firmwareVersion": "20200608",
"serialNumber": "CXQS1HJ72IOO",
"model": "DB-WNIP2-SU",
"mac": "54:2B:57:2E:84:50",
"manufacturer": "NightOwl",
"type": "doorbell",
"ip": "192.168.4.36",
"storageType": "none",
"network": "asus router",
"wifiSignalStrength": 88,
"batteryLevel": 50
}
}
case 2:
{
"statusCode": 200,
"statusMsg": "OK",
"content": {
"status":"unknown"
}
}
setChannelName
Description: - Version: 1.1 Function set: channelInfo Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| channel | Int | M | |
| name | String | M |
Response status code: 200, 400 Response content: Empty
Device profile example:
{
"func":"setChannelName",
"args":{
"name":"String",
"channel":"Int"
}
}
Nebula command request example:
{
"func":"setChannelName",
"args":{
"name":"front door cam",
"channel":1
}
}
Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK"
}
getChannelName
Description: - Version: 1.1 Function set: channelInfo Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| channel | Int | M |
Response status code: 200, 400 Response content:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| name | String | M |
Device profile example:
{
"func":"getChannelName",
"args":{
"channel":"Int"
},
"return":{
"name":"String"
}
}
Nebula command request example:
{
"func":"getChannelName",
"args":{
"channel":1
}
}
Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK",
"content":{
"name":"front door cam"
}
}
getChannelNames
Description: - Version: 1.1 Function set: channelInfo Request parameters: Empty
Response status code: 200, 400 Response content:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| names | channel object array | M |
| element name | Data type | Requirement | Description |
|---|---|---|---|
| name | String | M | |
| channel | Int | M |
Device profile example:
{
"func":"getChannelNames",
"return":{
"names":[
{
"channel":"Int",
"name": "String"
}
]
}
}
Nebula command request example:
{
"func":"getChannelNames"
}
Nebula command response example:
{
"statusCode": 200,
"statusMsg": "OK",
"content":{
"names":[
{
"channel":1,
"name": "front door cam"
},
{
"channel":2,
"name": "back door cam"
}
]
}
}
queryEventCalendar
Description: - Version: 1.1 Function set: playback Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| resolution | String | M | |
| year | Int | M | |
| month | Int | O | |
| channels | Int array | O |
Enumeration of resolution:
| resolution value | Description | Note |
|---|---|---|
| month | Query which months have events | The parameter "month" should be ignored |
| day | Query which days have events | Please fill in the "month" parameter |
Response status code: 200, 400 Response content:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| results | Int array | M |
Device profile example:
{
"func":"queryEventCalendar",
"args":{
"resolution":"String",
"year":"Int",
"month":"Int",
"channels":["Int"]
},
"return":{
"results":["Int"]
}
}
Nebula command request example: case 1:
{
"func":"queryEventCalendar",
"args":{
"resolution":"month",
"year":2020,
"channels":[1]
}
}
case 2:
{
"func":"queryEventCalendar",
"args":{
"resolution":"day",
"year":2020,
"month":10,
"channels":[1]
}
}
Nebula command response example: case 1:
{
"statusCode": 200,
"statusMsg": "OK",
"content":{
"results":[2,10,12]
}
}
case 2:
{
"statusCode": 200,
"statusMsg": "OK",
"content":{
"results":[1,2,3,15,20,30]
}
}
queryEventListByNumber
Description: - Version: 1.1 Function set: playback Request parameters:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| listNumber | Int | M | |
| startTime | Int | M | UNIX timestamp(unit: sec) |
| order | String | O | Default value "descending" |
| eventTypes | String array | O | search all event types if this parameter is not used or fill up with no element |
| channels | Int array | O |
Enumeration of order:
| order value | Description |
|---|---|
| descending | query event in descending order from startTime to earliest event |
| ascending | query event in ascending order from startTime to latest event |
Note: Please check setEventRecordingTriggers for the enumeration of triggers for eventTypes.
Response status code: 200, 400 Response content:
| Parameter name | Data type | Requirement | Description |
|---|---|---|---|
| results | event object array | M |
| element name | Data type | Requirement | Description |
|---|---|---|---|
| eventTypes | String array | M | |
| timestamp | Int | M | UNIX timestamp(unit: sec) in timezone UTC+00:00 |
| fileName | String | M | |
| duration | Int | M | the duration of the event (unit: ms) |
| thumbnailUrl | String | O | |
| channel | Int | O | |
| utcOffset | String | O | If the "utcOffset" field is not filled in, its default value should be "+0000". For UTC+08:00, it should be "+0800". |
Device profile example:
{
"func": "queryEventListByNumber",
"args": {
"startTime":"Int",
"order":"String",
"listNumber":"Int",
"eventTypes":["String"],
"channels":["Int"]
},
"return":{
"results":[
{
"eventTypes":["String"],
"timestamp":"Int",
"fileName":"String",
"thumbnailUrl":"String",
"channel":"Int",
"duration":"Int"
}
]
}
}
Nebula command request example for descening order: first step:
// Mon, 01 Aug 2022 00:00:00 GMT+8
{
"func": "queryEventListByNumber",
"args": {
"startTime": 1659283200,
"order":"descending",
"eventTypes": ["pir", "human"],
"channels":[1,2],
"listNumber":4
}
}
next step:
startTime = timestamp of the last item in the previous step -1
// Mon, 31 July 2022 23:59:39 GMT+8
{
"func": "queryEventListByNumber",
"args": {
"startTime": 1659283179,
"order":"descending",
"eventTypes": ["pir", "human"],
"channels":[1,2],
"listNumber":4
}
}
Nebula command response example for descending order: response of the first step:
{
"statusCode": 200,
"statusMsg": "OK",
"content":{
"results":[
{
"eventTypes": ["pir"],
"timestamp": 1659283200,
"fileName": "20220801_000000_1.mp4",
"thumbnailUrl": "http://iotc-tunnel:80/path/to/thumbnail1_1",
"channel": 1,
"duration": 10000
},
{
"eventTypes": ["pir"],
"timestamp": 1659283200,
"fileName": "20220801_000000_2.mp4",
"thumbnailUrl": "http://iotc-tunnel:80/path/to/thumbnail2_1",
"channel": 2,
"duration": 10000
},
{
"eventTypes": ["pir"],
"timestamp": 1659283180,
"fileName": "20220731_235940_1.mp4",
"thumbnailUrl": "http://iotc-tunnel:80/path/to/thumbnail1_3",
"channel": 1,
"duration": 10000
},
{
"eventTypes": ["pir"],
"timestamp": 1659283180,
"fileName": "20220731_235940_2.mp4",
"thumbnailUrl": "http://iotc-tunnel:80/path/to/thumbnail2_3",
"channel": 2,
"duration": 10000
}
]
}
}
response of the next step:
{
"statusCode": 200,
"statusMsg": "OK",
"content":{
"results":[
{
"eventTypes": ["human","pir"],
"timestamp": 1659283170,
"fileName": "20220731_235930_1.mp4",
"thumbnailUrl": "http://iotc-tunnel:80/path/to/thumbnail1_4",
"channel": 1,
"duration": 10000
},
{
"eventTypes": ["pir"],
"timestamp": 1659283170,
"fileName": "20220731_235930_2.mp4",
"thumbnailUrl": "http://iotc-tunnel:80/path/to/thumbnail2_4",
"channel": 2,
"duration": 10000
},
{
"eventTypes": ["human","pir"],
"timestamp": 1659283160,
"fileName": "20220731_235920_1.mp4",
"thumbnailUrl": "http://iotc-tunnel:80/path/to/thumbnail1_5",
"channel": 1,
"duration": 10000
},
{
"eventTypes": ["pir"],
"timestamp": 1659283160,
"fileName": "20220731_235920_2.mp4",
"thumbnailUrl": "http://iotc-tunnel:80/path/to/thumbnail2_5",
"channel": 2,
"duration": 10000
}
]
}
}
