- Set Wireless Network Parameters
- 设置无线参数(无需签名校验)
- 获取无线参数
- 获取无线扫描AP列表
- 获取无线扫描AP列表 (无需签名校验)
- 获取IP参数
- 设置IP参数
- 调焦
- 手动聚焦
- 自动聚焦
- 调焦聚焦复位
- 获取调焦和聚焦参数
- 设置夜视模式
- 获取夜视模式
- 设置动态侦测
- 获取动态侦测参数
- 设置IPC名称
- 获取IPC名称
- 设置指示灯开关
- 获取指示灯开关
- 设置画面旋转角度
- 获取画面旋转角度
- 获取支持的画面旋转角度
- 格式化存储卡
- 获取存储卡状态
- 获取人脸算法参数
- 设置人脸算法参数
- 获取人流统计参数
- 设置人流统计参数
1. Set Wireless Network Parameters
Description
This interface is used to configure the SSID and the password used to connect an IPC and its AP.
Interface
public void setWifiConf(String deviceId, String ssid, String password, RpcCallback‹RpcResponse› callback);
Parameters
Parameter | Description | Example |
deviceId | IPC SN | C201D98T00094 |
ssid | The name of the wireless AP to be connected (SSID), which shall not exceed 32 characters. | WeWork |
password | The password of the AP to be connected. If there is no password, leave it empty (shall not exceed 64 characters, and it does not support WEP). | 12345678 |
callback | The calling result. |
Response Parameter
Field | Type | Description |
code | int | The return code indicating the operation result; The return codes of this interface contain 0, 1, 2, 3, 5, 7, 100, 101. Please refer to RPCErrorCode Class for details. |
2. Set Wireless Network Parameters (No Signature Authentication Required)
Description
After using this interface, you don’t have to verify (through signature authentication) the SSID and password used to connect an IPC and its AP before activation; an activation will invalidate this interface.
Interface
public void setWifiConfWithoutAuth(String deviceId, String ssid, String password, RpcCallback‹RpcResponse› callback);
Parameters
Parameter | Description | Example |
deviceId | IPC SN | C201D98T00094 |
ssid | The name of the wireless AP to be connected (SSID), which shall not exceed 32 characters. | WeWork |
password | The password of the AP to be connected. If there is no password, leave it empty (shall not exceed 64 characters, and it does not support WEPs). | 12345678 |
callback | The calling result. |
Response Parameter
Field | Type | Description |
code | int | The return code indicating the operation result; The return codes of this interface contain 0, 1, 2, 3, 5, 7, 100, 101. Please refer to RPCErrorCode Class for details. |
3. Get Wireless Network Parameters
Description
This interface is used to get the wireless network parameters of the IPC.
Interface
public void getWifiConf(String deviceId, RpcCallback‹RpcResponse‹WifiConfiguration›› callback);
Parameters
Parameter | Description | Example |
deviceId | IPC SN | C201D98T00094 |
callback | The calling result. |
Response Parameters
Field | Type | Description |
code | int | The return code indicating the operation result; The return codes of this interface contain 0, 1, 2, 3, 5, 7, 100, 101. Please refer to RPCErrorCode Class for details. |
data | WifiConfiguration | This field shows only when the return code indicates a successful operation. Please refer to RPCResponse.WifiConfBean for details. |
Sample Callback
The implementations of subsequent interface callbacks are similar to this one.
new RpcCallback‹RpcResponse‹WifiConfiguration››() {
@Override
public void onComplete(RpcResponse‹WifiConfiguration› result) {
if (result.code() == RpcErrorCode.SUCCESS) {
WifiConfiguration wifiConf = result.data();
} else {
shotToast("response.code: " + result.code());
}
}
@Override
public void onError(Throwable t) {
shotToast("Exception: " + t.getMessage());
}
});
4. Get the List of APs
Description
This interface is used to get the list of APs wirelessly scanned by the IPC.
Interface
public void getApList(String deviceId, RpcCallback‹RpcResponse‹ScanResultCollection›› callback);
Parameters
Parameter | Description | Example |
deviceId | IPC SN | C201D98T00094 |
callback | The calling result. |
Response Parameters
Field | Type | Description |
code | int | The return code indicating the operation result; The return codes of this interface contain 0, 1, 2, 3, 5, 7, 100, 101. Please refer to RPCErrorCode Class for details. |
data | ScanResultCollection | This field shows only when the return code indicates a successful operation. Please refer to RpcResponse.ScanResultCollection for details. |
5. Get the List of APs (No Signature Authentication Required)
Description
This interface is used to get the list of APs wirelessly scanned by the IPC without any signature authentication. An activation will invalidate this interface.
Interface
public void getApListWithoutAuth(String deviceId, RpcCallback‹RpcResponse‹ScanResultCollection›› callback);
Parameters
Parameter | Description | Example |
deviceId | IPC SN | C201D98T00094 |
callback | The calling result. |
Response Parameters
Field | Type | Description |
code | int | The return code indicating the operation result; The return codes of this interface contain 0, 1, 2, 3, 5, 7, 100, 101. Please refer to RPCErrorCode Class for details. |
data | ScanResultCollection | This field shows only when the return code indicates a successful operation. Please refer to RpcResponse.ScanResultCollection for details |
6. Get IP Parameters of IPC
Description
This interface is used to get the IP parameters of IPC
Interface
public void getIpConfiguration(String deviceId, RpcCallback‹RpcResponse‹IpConfiguration›› callback);
Parameters
Parameter | Description | Example |
deviceId | IPC SN | C201D98T00094 |
callback | The calling result. |
Response Parameters
Field | Type | Description |
code | int | The return code indicating the operation result; The return codes of this interface contain 0, 1, 2, 3, 5, 7. Please refer to RPCErrorCode Class for details. |
data | IpConfiguration | This field shows only when the return code indicates a successful operation. Please refer to RpcResponse.IpConfiguration for details |
7. Set IP Parameters of IPC
Description
This interface is used to set the IP parameters of IPC
Interface
public void setIpConfiguration(String deviceId, Map‹String, String› options, RpcCallback‹RpcResponse› callback);
参数说明
Parameter | Description | Example |
deviceId | IPC SN | C201D98T00094 |
options | Configurable parameter set for dynamic detection | See option description in the table below |
callback | The calling result. |
option description
Name | Type | Description | Required | Example |
---|---|---|---|---|
proto | String | DHCP or static | Y | static |
ipaddr | String | IP address | N | 192.168.1.102 |
netmask | String | Subnet Mask | N | 255.255.255.0 |
gateway | String | Gateway | N | 192.168.1.1 |
dns1 | String | dns1 server ip | N | 202.96.128.86 |
dns2 | String | dns2 server ip | N | 202.96.134.166 |
Response Parameter
Field | Type | Description |
code | int | The return code indicating the operation result; The return codes of this interface contain 0, 1, 2, 3, 5, 7. Please refer to RPCErrorCode Class for details. |
8. Adjust Focal Length
Description
This interface is used to adjust the focal length according to the actual environment, in order to zoom in or zoom out. All interfaces such as focusing and focusing are only supported by zoom lens. At present, only SUNMI AI camera supports zoom lens.
Interface
public void setZoom(String deviceId, int zoom, RpcCallback‹RpcResponse› callback);
Parameters
Parameter | Description | Example |
deviceId | IPC SN | C201D98T00094 |
zoom | The focal length. An appropriate one ranges [0, 500]. | 200 |
callback | The calling result. |
Response Parameter
Field | Type | Description |
code | int | The return code indicating the operation result; The return codes of this interface contain 0, 1, 2, 3, 5, 7, 110. Please refer to RPCErrorCode Class for details. |
9. Manual Focus
Description
The lens will automatically focus after the focal length has been adjusted. However, you can adjust the focus manually with this interface when a slight modification is needed.
Interface
public void manualFocus(String deviceId, int focus, RpcCallback‹RpcResponse› callback);
Parameters
Parameter | Description | Example |
deviceId | IPC SN | C201D98T00094 |
focus | The focus parameter (the value of manual adjustment). An appropriate one ranges [0, 780]. | 200 |
callback | The calling result. |
Response Parameter
Field | Type | Description |
code | int | The return code indicating the operation result; The return codes of this interface contain 0, 1, 2, 3, 5, 7, 110. Please refer to RPCErrorCode Class for details. |
10. Auto Focus
Description
IPC will automatically focus after the focal length has been set. This interface is used to set the autofocus point.
Interface
public void autoFocus(String deviceId, int focus_x, int focus_y, RpcCallback‹RpcResponse› callback);
Parameters
Parameter | Description | Example |
deviceId | IPC SN | C201D98T00094 |
focus_x | The percentage indicating the pixel of the focus point in x axis. An appropriate one ranges [0, 100]. | 50 |
focus_y | The percentage indicating the pixel of the focus point in y axis. An appropriate one ranges [0, 100]. | 50 |
callback | The calling result. |
Response Parameter
Field | Type | Description |
code | int | The return code indicating the operation result; The return codes of this interface contain 0, 1, 2, 3, 5, 7, 112. Please refer to RPCErrorCode Class for details. |
11. 调焦聚焦复位
描述
用户可以通过此接口直接复位焦距和聚焦的参数。
接口
public void resetZoomFocus(String deviceId, RpcCallback‹RpcResponse› callback);
参数说明
参数名称 | 描述 | 示例 |
deviceId | IPC序列号 | C201D98T00094 |
callback | 调用结果 |
响应参数
字段名称 | 类型 | 描述 |
code | int | 返回码,表示操作的结果; 本接口返回码有:0、1、3、5、7,见错误码的描述 |
12. 获取调焦和聚焦参数
描述
获取当前IPC镜头的调焦聚焦参数。
接口
public void getZoomFocusConf(String deviceId, RpcCallback‹RpcResponse‹LensConfiguration›› callback);
参数说明
参数名称 | 描述 | 示例 |
deviceId | IPC序列号 | C201D98T00094 |
callback | 调用结果 |
响应参数
参数名称 | 类型 | 描述 |
code | int | 返回码,表示操作的结果; 本接口返回码有:0、1、3、5、7,见错误码的描述 |
data | LensConfiguration | 返回码成功才会有此字段,详见RpcResponse.LensConfiguration |
13. 设置夜视模式
描述
配置镜头的夜视模式。
接口
public void setIrMode(String deviceId, int irmode, RpcCallback‹RpcResponse› callback);
参数说明
参数名称 | 描述 | 示例 |
deviceId | IPC序列号 | C201D98T00094 |
irmode | 0表示关闭,1表示开启,2表示自动。一般选2。 | 2 |
callback | 调用结果 |
响应参数
字段名称 | 类型 | 描述 |
code | int | 返回码,表示操作的结果; 本接口返回码有:0、1、3、5、7、113,见错误码的描述 |
14. 获取夜视模式
描述
获取当前IPC的夜视模式。
接口
public void getIrMode(String deviceId, RpcCallback‹RpcResponse‹IrConfiguration›› callback);
参数说明
参数名称 | 描述 | 示例 |
deviceId | IPC序列号 | C201D98T00094 |
callback | 调用结果 |
响应参数
参数名称 | 类型 | 描述 |
code | int | 返回码,表示操作的结果; 本接口返回码有:0、1、3、5、7,见错误码的描述 |
data | IrConfiguration | 返回码成功才会有此字段,详见RpcResponse.IrConfiguration |
15. 设置动态侦测
描述
IPC的动态侦测支持根据画面变化和声音变化灵敏度来检测和报警,通过本API可以设置相关灵敏度和动态侦测的时间。
接口
public void setMotionDetectConfig(String deviceId, Map‹String, String› options, RpcCallback‹RpcResponse› callback);
参数说明
参数名称 | 描述 | 示例 |
deviceId | IPC序列号 | C201D98T00094 |
options | 可设置的动态侦测的参数集合,option说明中的所有参数都需要转换成String类型传入。 | 见下表option说明 |
callback | 调用结果 |
option说明
参数名称 | 类型 | 描述 | 是否必须 | 示例 |
---|---|---|---|---|
motion_level | int | 范围[0, 3],0表示关闭,数值越大,越灵敏。 | Y | 2 |
audio_level | int | 范围[0, 3],0表示关闭,数值越大,越灵敏。 | Y | 2 |
weekday | int | 以周为一个循环,用0xYY来表示选择哪一天,具体是0x80直接表示7×24小时,其余的, 以7bit来表示哪一天被选上,0x01表示选择周一,0x02表示选择周二,0x40表示选择 周天,0x7f表示选择一个礼拜的7天,与0x80的区别只是0x80直接默认724小时,而 0x7f选了7天后,还可以设置具体的开始时间和结束时间。 | Y | 128(0x80 的十进制) |
start_time | long | 用分钟来表示,以一天24小时为例,以分钟为最小粒度,总共24*60这样的时间数值, 60表示01:00,121表示02:01,依次类推。范围[0,1440] | Y | 200 |
stop_time | long | 用分钟来表示,以一天24小时为例,以分钟为最小粒度,总共24*60这样的时间数值, 60表示01:00,121表示02:01,依次类推。范围[0,1440] | Y | 400 |
响应参数
字段名称 | 类型 | 描述 |
code | int | 返回码,表示操作的结果; 本接口返回码有:0、1、3、5、7,见错误码的描述 |
16. 获取动态侦测参数
描述
获取当前IPC镜头的动态侦测参数。
接口
public void getMotionDetectConfig(String deviceId, RpcCallback‹RpcResponse‹MotionDetectConfig›› callback);
参数说明
本接口没有私有参数,公共参数见HTTP接口调用。
参数名称 | 描述 | 示例 |
deviceId | IPC序列号 | C201D98T00094 |
callback | 调用结果 |
响应参数
参数名称 | 类型 | 描述 |
code | int | 返回码,表示操作的结果; 本接口返回码有:0、1、3、5、7,见错误码的描述 |
data | MotionDetectConfig | 返回码成功才会有此字段,详见RpcResponse.MotionDetectConfig |
17. 设置IPC名称
描述
用户可以设置IPC的名称,以便区分不同的IPC设备。
接口
public void updateName(String deviceId, String name, RpcCallback‹RpcResponse› callback);
参数说明
参数名称 | 描述 | 示例 |
deviceId | IPC序列号 | C201D98T00094 |
name | 36个字符以内,12汉字以内 | 示例名称 |
callback | 调用结果 |
响应参数
字段名称 | 类型 | 描述 |
code | int | 返回码,表示操作的结果; 本接口返回码有:0、1、3、5、7、118,见错误码的描述 |
18. 获取IPC名称
描述
获取当前IPC的名称。
接口
public void getName(String deviceId, RpcCallback‹RpcResponse‹IpcName›› callback);
参数说明
本接口没有私有参数,公共参数见HTTP接口调用。
参数名称 | 描述 | 示例 |
deviceId | IPC序列号 | C201D98T00094 |
callback | 调用结果 |
响应参数
参数名称 | 类型 | 描述 |
code | int | 返回码,表示操作的结果; 本接口返回码有:0、1、3、5、7,见错误码的描述 |
data | IpcName | 返回码成功才会有此字段,详见RpcResponse.IpcName |
19. 设置指示灯开关
描述
设置指示灯是否需要关闭。
接口
public void setLedSwitch(String deviceId, int ledSwitch, RpcCallback‹RpcResponse› callback);
参数说明
参数名称 | 描述 | 示例 |
deviceId | IPC序列号 | C201D98T00094 |
led_switch | 0表示关闭指示灯,1表示开启指示灯,即可以亮 | 1 |
callback | 调用结果 |
响应参数
字段名称 | 类型 | 描述 |
code | int | 返回码,表示操作的结果; 本接口返回码有:0、1、3、5、7、119, 见错误码的描述 |
20. 获取指示灯开关
描述
获取当前IPC的指示灯状态。
接口
public void getLedSwitch(String deviceId, RpcCallback‹RpcResponse‹LedConfiguration›› callback);
参数说明
本接口没有私有参数,公共参数见HTTP接口调用。
参数名称 | 描述 | 示例 |
deviceId | IPC序列号 | C201D98T00094 |
callback | 调用结果 |
响应参数
参数名称 | 类型 | 描述 |
code | int | 返回码,表示操作的结果; 本接口返回码有:0、1、3、5、7, 见错误码的描述 |
data | LedConfiguration | 返回码成功才会有此字段,详见RpcResponse.LedConfiguration |
21. 设置画面旋转角度
描述
设置拍摄的画面是否需要旋转一定角度,可用的旋转角度可通过获取支持的画面旋转角度获取到。
接口
public void setRotation(String deviceId, int rotation, RpcCallback‹RpcResponse› callback);
参数说明
这里只列出接口的私有参数,公共参数见HTTP接口调用。
参数名称 | 描述 | 示例 |
deviceId | IPC序列号 | C201D98T00094 |
rotation | 画面旋转角度 对于FM010,支持的参数有0,90,180,270; 对于FM020,支持的参数有0,180 | 180 |
callback | 调用结果 |
响应参数
字段名称 | 类型 | 描述 |
code | int | 返回码,表示操作的结果; 本接口返回码有:0、1、3、5、7、120, 见错误码的描述 |
22. 获取画面旋转角度
描述
获取当前IPC当前的画面旋转角度。
接口
public void getRotation(String deviceId, RpcCallback‹RpcResponse‹Rotation›› callback);
参数说明
参数名称 | 描述 | 示例 |
deviceId | IPC序列号 | C201D98T00094 |
callback | 调用结果 |
响应参数
参数名称 | 类型 | 描述 |
code | int | 返回码,表示操作的结果; 本接口返回码有:0、1、3、5、7, 见错误码的描述 |
data | Rotation | 返回码成功才会有此字段,详见RpcResponse.Rotation 对于FM010,支持的参数有0,90,180,270; 对于FM020,支持的参数有0,180 |
23. 获取支持的画面旋转角度
描述
获取当前IPC设备支持的画面旋转角度。
接口
public void getSupportRotationAngles(String deviceId, RpcCallback‹RpcResponse‹SupportRotations›› callback);
参数说明
参数名称 | 描述 | 示例 |
deviceId | IPC序列号 | C201D98T00094 |
callback | 调用结果 |
响应参数
参数名称 | 类型 | 描述 |
code | int | 返回码,表示操作的结果; 本接口返回码有:0、1、3、5、7, 见错误码的描述 |
data | SupportRotations | 返回码成功才会有此字段,详见RpcResponse.SupportRotations 对于FM010,支持的参数有0,90,180,270; 对于FM020,支持的参数有0,180 |
24. 格式化存储卡
描述
格式化插入IPC里面的存储卡。
接口
public void formatMemoryCard(String deviceId, RpcCallback‹RpcResponse› callback);
参数说明
参数名称 | 描述 | 示例 |
deviceId | IPC序列号 | C201D98T00094 |
callback | 调用结果 |
响应参数
参数名称 | 类型 | 描述 |
code | int | 返回码,表示操作的结果; 本接口返回码有:0、1、3、5、7、220、221, 见错误码的描述 |
25. 获取存储卡状态
描述
获取IPC上存储卡状态
接口
public void getMemoryCardStatus(String deviceId, RpcCallback‹RpcResponse‹ExternalStorage›› callback);
参数说明
参数名称 | 描述 | 示例 |
deviceId | IPC序列号 | C201D98T00094 |
callback | 调用结果 |
响应参数
类型 | 描述 |
int | 返回码,表示操作的结果; 本接口返回码有:0、1、3、5、7, 见错误码的描述 |
ExternalStorage | 返回码成功才会有此字段,详见RpcResponse.ExternalStorage |
26. 获取人脸算法参数
描述
获取人脸算法参数,目前仅支持人脸图像优选时间参数。
接口
public void getAiFaceConfig(String deviceId, RpcCallback‹RpcResponse‹AiFaceConfig›› callback);
参数说明
参数名称 | 描述 | 示例 |
deviceId | IPC序列号 | C201D98T00094 |
callback | 调用结果 |
响应参数
类型 | 描述 |
int | 返回码,表示操作的结果; 本接口返回码有:0、1、3、5、7, 见错误码的描述 |
AiFaceConfig | 返回码成功才会有此字段,详见RpcResponse.AiFaceConfig |
27. 设置人脸算法参数
描述
设置人脸算法参数,目前仅支持人脸图像优选时间参数。
接口
public void setAiFaceConfig(String deviceId, Map‹String, String› options, RpcCallback‹RpcResponse› callback);
参数说明
参数名称 | 描述 | 示例 |
deviceId | IPC序列号 | C201D98T00094 |
options | 人脸算法相关参数,option说明中的所有参数都需要转换成String类型传入。 | 见下表option说明。 |
callback | 调用结果 |
option说明
参数名称 | 类型 | 描述 | 是否必须 | 示例 |
optimize_seconds | int | 人脸图像优选时间,人脸算法从人脸出现后在指定的时间范围内选取人脸图像质量较好的进行识别,单位:秒,取值范围[1,6]。 | Y | 6 |
响应参数
类型 | 描述 |
int | 返回码,表示操作的结果; 本接口返回码有:0、1、3、5、7, 见错误码的描述 |
28. 获取人流统计参数
描述
获取IPC的人流统计参数,目前包含人脸识别去重间隔和人脸识别模式两个参数。
接口
public void getPeopleFlowStatConfig(String deviceId, RpcCallback‹RpcResponse‹PeopleFlowStatConfig›› callback);
参数说明
参数名称 | 描述 | 示例 |
deviceId | IPC序列号 | C201D98T00094 |
callback | 调用结果 |
响应参数
字段名称 | 类型 | 描述 |
code | int | 返回码,表示操作的结果; 本接口返回码有:0、1、2、3、5、7,见错误码的描述 |
data | PeopleFlowStatConfig | 返回码成功才会有此字段,详见RpcResponse.PeopleFlowStatConfig |
29. 设置人流统计参数
描述
设置IPC的人流统计参数,目前包含人脸识别去重间隔和人脸识别模式两个参数。
接口
public void setPeopleFlowStatConfig(String deviceId, Map‹String, String› options, RpcCallback‹RpcResponse› callback);
参数说明
参数名称 | 描述 | 示例 |
deviceId | IPC序列号 | C201D98T00094 |
options | 人流统计参数,option说明中的所有参数都需要转换成String类型传入。 | 见下表option说明 |
callback | 调用结果 |
option说明
名称 | 类型 | 描述 | 是否必须 | 示例 |
facerecog_interval | int | 人脸识别去重间隔,取值[0,86400]。 | N | 60 |
customer_judgemode | int | 人脸识别模式,0-抓拍模式,1-正常模式,2-未划线。 | N | 0 |
响应参数
字段名称 | 类型 | 描述 |
code | int | 返回码,表示操作的结果; 本接口返回码有:0、1、2、3、5、7,见错误码的描述 |