IPCamera
1.IPCamera.getState
Get Current State
| Param | Value | Desc |
|---|---|---|
| method | IPCamera.getState | Get device's State |
| targetDevice | <String,Necessary> | DeviceId of the device you use; |
| token | <String,Necessary> | Net token of the device you use; You can get it here |
| Param | Value | Desc |
|---|---|---|
| data.online | <Boolean,Necessary> | Is device online |
| data.wifi.enable | <String,Necessary> | Is WiFi Connected |
| data.wifi.ip | <String,Necessary> | Current ip of Wi-Fi |
| data.wifi.mask | <String,String> | Current Subnet Mask of Wi-Fi |
| data.wifi.gateway | <String,Optional> | Current Gateway of Wi-Fi |
| data.wifi.mac | <String,Optional> | Mac address of Wi-Fi |
| data.wifi.rssi | <Integer,Necessary> | Rssi of Wi-Fi |
| data.volume | <Integer,Necessary> | Speaker volume [0-5] |
| data.recordMode | <String,Necessary> | Record mode ["full-time","alarm","off"] |
| data.indicatorLight | <String,Necessary> | Indicator light status ["on","off"] |
| data.voicePrompts | <String,Necessary> | Voice prompt status ["on","off"] |
| data.maxManualRecordTime | <Integer,Necessary> | Maximum manual recording time in minutes |
| data.nightVision | <String,Necessary> | Night vision mode ["on","off","auto"] |
| data.soundDetection.enable | <Boolean,Necessary> | Sound detection |
| data.soundDetection.level | <Integer,Necessary> | Sound detection sensitivity [0-5] |
| data.motionDetection.enable | <Boolean,Necessary> | Motion detection |
| data.motionDetection.level | <Integer,Necessary> | Motion detection sensitivity [0-4] |
| data.storage.total | <Integer,Necessary> | SD card total capacity(MB) |
| data.storage.free | <Integer,Necessary> | SD card remaining capacity(MB) |
| data.storage.sdFormat | <String,Necessary> | SD card format |
| data.storage.rwMode | <String,Necessary> | SD card read-write mode |
| data.soundEnable | <Boolean,Necessary> | Sound enabled |
| data.privacyMode | <String,Necessary> | Privacy mode ["on","off"] |
| data.version | <String,Necessary> | Firmware version |
| data.tz | <Integer,Necessary> | timezone |
2.IPCamera.setProperties
Set device's properties
| Param | Value | Desc |
|---|---|---|
| method | IPCamera.setProperties | Set device's properties |
| targetDevice | <String,Necessary> | DeviceId of the device you use; |
| token | <String,Necessary> | Net token of the device you use; You can get it here |
| params.volume | <Integer,Optional> | Speaker volume [0-5] |
| params.indicatorLight | <String,Optional> | Indicator light status ["on","off"] |
| params.voicePrompts | <String,Optional> | Voice prompt status ["on","off"] |
| params.maxManualRecordTime | <Integer,Optional> | Maximum manual recording time in minutes |
| params.nightVision | <String,Optional> | Night vision mode ["on","off","auto"] |
| params.soundDetection.enable | <Boolean,Optional> | Sound detection |
| params.soundDetection.level | <Integer,Optional> | Sound detection sensitivity [0-5] |
| params.motionDetection.enable | <Boolean,Optional> | Motion detection |
| params.motionDetection.level | <Integer,Optional> | Motion detection sensitivity [0-4] |
| params.soundEnable | <Boolean,Optional> | Sound enable |
| Param | Value | Desc |
|---|---|---|
| data.success | <Boolean,Necessary> | If properties set successfully |
| data.code | <Integer,Necessary> | If code is 200 means properties set successfully |
3.IPCamera.startRecording
Start local video recording
| Param | Value | Desc |
|---|---|---|
| method | IPCamera.startRecording | Start local video recording |
| targetDevice | <String,Necessary> | DeviceId of the device you use; |
| token | <String,Necessary> | Net token of the device you use; You can get it here |
| params.audioEnable | <Boolean,Optional> | Recording audio option, default true |
| params.duration | <Integer,Optional> | Recording duration in minutes |
| Param | Value | Desc |
|---|---|---|
| data.success | <Boolean,Necessary> | If video recording has started successfully |
| data.code | <Integer,Necessary> | If code is 200 means video recording started |
4.IPCamera.stopRecording
Stop local recording
| Param | Value | Desc |
|---|---|---|
| method | IPCamera.stopRecording | Stop local recording |
| targetDevice | <String,Necessary> | DeviceId of the device you use; |
| token | <String,Necessary> | Net token of the device you use; You can get it here |
| Param | Value | Desc |
|---|---|---|
| data.success | <Boolean,Necessary> | If video recording ends |
| data.code | <Integer,Necessary> | If code is 200 means video recording is end |
5.Callbacks
You can receive it with Http Callback API or MQTT report topic