Skip to content

Commit ab3e0bf

Browse files
committed
add more data info
Signed-off-by: likaci <likaci@qq.com>
1 parent c2c24c9 commit ab3e0bf

File tree

1 file changed

+82
-13
lines changed

1 file changed

+82
-13
lines changed

README.md

+82-13
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,96 @@
11

22
## Usage
33
install packages `rsa` and `requests`
4-
```
5-
pip install requests
6-
pip install rsa
4+
```bash
5+
pip install requests
6+
pip install rsa
7+
# or
8+
python2 -m pip install requests
9+
python2 -m pip install requests
710
```
811

912
## Example
1013
```
11-
python mipcc.py admin password url data
12-
python mipcc.py admin password http://192.168.2.89:80 '{"method":"do","preset":{"goto_preset": {"id": "1"}}}'
14+
python2 mipcc.py admin password url data
15+
python2 mipcc.py admin password http://192.168.2.89:80 '{"method":"do","preset":{"goto_preset": {"id": "1"}}}'
1316
```
1417

1518

1619
## Data Example
17-
```
18-
PTZ to preset position {"method":"do","preset":{"goto_preset": {"id": "1"}}}
19-
PTZ by coord {"method":"do","motor":{"move":{"x_coord":"10","y_coord":"0"}}}
20-
PTZ horizontal by step {"method":"do","motor":{"movestep":{"direction":"0"}}}
21-
PTZ vertical by step {"method":"do","motor":{"movestep":{"direction":"90"}}}
22-
stop PTZ {"method":"do","motor":{"stop":"null"}}
23-
add PTZ preset position {"method":"do","preset":{"set_preset":{"name":"name","save_ptz":"1"}}}
24-
lens mask {"method":"set","lens_mask":{"lens_mask_info":{"enabled":"on"}}}
20+
```json
21+
// add PTZ preset position 添加预置点
22+
{"method":"do","preset":{"set_preset":{"name":"name","save_ptz":"1"}}}
23+
24+
// PTZ to preset position 转动到预置点
25+
{"method":"do","preset":{"goto_preset": {"id": "1"}}}
26+
27+
// PTZ by coord 按坐标转动
28+
{"method":"do","motor":{"move":{"x_coord":"10","y_coord":"0"}}}
29+
30+
// PTZ horizontal by step 水平步进
31+
{"method":"do","motor":{"movestep":{"direction":"0"}}}
32+
33+
// PTZ vertical by step 垂直步进
34+
{"method":"do","motor":{"movestep":{"direction":"90"}}}
35+
36+
// stop PTZ 停止步进
37+
{"method":"do","motor":{"stop":"null"}}
38+
39+
//reset PTZ 云台重置
40+
{"method":"do","motor":{"manual_cali":"null"}}
41+
42+
// lens mask 镜头遮蔽
43+
{"method":"set","lens_mask":{"lens_mask_info":{"enabled":"on"}}}
44+
45+
// manual alarm 手动报警
46+
{"method":"do","msg_alarm":{"manual_msg_alarm":{"action":"start"}}}
47+
{"method":"do","msg_alarm":{"manual_msg_alarm":{"action":"stop"}}}
48+
49+
// toggle green led 绿色led开关
50+
{"method":"set","led":{"config":{"enabled":"off"}}}
51+
{"method":"set","led":{"config":{"enabled":"on"}}}
52+
53+
//auto track moving obj 智能追踪 摄像机追随移动物体
54+
{"method":"set","target_track":{"target_track_info":{"enabled":"on"}}}
55+
{"method":"set","target_track":{"target_track_info":{"enabled":"off"}}}
56+
57+
//alarm if found moving obj 检测到移动物体时报警
58+
{"method":"set","msg_alarm":{"chn1_msg_alarm_info":{"enabled":"on","alarm_type":"0","alarm_mode":["sound"]}}}
59+
{"method":"set","msg_alarm":{"chn1_msg_alarm_info":{"enabled":"on","alarm_type":"0","alarm_mode":["light"]}}}
60+
{"method":"set","msg_alarm":{"chn1_msg_alarm_info":{"enabled":"on","alarm_type":"0","alarm_mode":["sound","light"]}}}
61+
{"method":"set","msg_alarm_plan":{"chn1_msg_alarm_plan":{"enabled":"on","alarm_plan_1":"0000-0000%2c127"}}}
62+
63+
//motion detection 移动侦测 与 侦测灵敏度
64+
{"method":"set","motion_detection":{"motion_det":{"enabled":"off"}}}
65+
{"method":"set","motion_detection":{"motion_det":{"enabled":"on"}}}
66+
{"method":"set","motion_detection":{"motion_det":{"digital_sensitivity":"20"}}}
67+
{"method":"set","motion_detection":{"motion_det":{"digital_sensitivity":"50"}}}
68+
{"method":"set","motion_detection":{"motion_det":{"digital_sensitivity":"80"}}}
69+
70+
//enable record and plan 是否录制与录制计划
71+
{"method":"set","record_plan":{"chn1_channel":{"enabled":"off","monday":"%5b%220000-2400%3a2%22%5d","tuesday":"%5b%220000-2400%3a2%22%5d","wednesday":"%5b%220000-2400%3a2%22%5d","thursday":"%5b%220000-2400%3a2%22%5d","friday":"%5b%220000-2400%3a2%22%5d","saturday":"%5b%220000-2400%3a2%22%5d","sunday":"%5b%220000-2400%3a2%22%5d"}}}
72+
{"method":"set","record_plan":{"chn1_channel":{"enabled":"on","monday":"%5b%220000-2400%3a2%22%5d","tuesday":"%5b%220000-2400%3a2%22%5d","wednesday":"%5b%220000-2400%3a2%22%5d","thursday":"%5b%220000-2400%3a2%22%5d","friday":"%5b%220000-2400%3a2%22%5d","saturday":"%5b%220000-2400%3a2%22%5d","sunday":"%5b%220000-2400%3a2%22%5d"}}}
73+
74+
//reboot and timing reboot 重启与定时重启
75+
{"method":"do","system":{"reboot":"null"}}
76+
{"method":"set","timing_reboot":{"reboot":{"enabled":"off","day":"7","time":"03%3a00%3a00"}}}
77+
{"method":"set","timing_reboot":{"reboot":{"enabled":"on","day":"7","time":"03%3a00%3a00"}}}
78+
79+
//greetings 个性语音提示
80+
{"method":"set","greeter":{"chn1_greeter_ctrl":{"enabled":"on"}}}
81+
{"method":"set","greeter":{"chn1_greeter_ctrl":{"enabled":"off"}}}
82+
//greeting volume 音量
83+
{"method":"set","greeter":{"chn1_greeter_audio":{"enter_volume":"77","leave_volume":"77"}}}
84+
//play greetings 播放语音
85+
{"method":"do","greeter":{"test_audio":{"force":"1"}}} 播放默认语音
86+
{"method":"do","greeter":{"test_audio":{"id":"4096","force":"1"}}} 播放指定语音
87+
//id
88+
//0 无
89+
//12288 你好
90+
//4096-4104 依次为 你好欢迎光临 .....
91+
//set enter or leave greetings 设置进入或离开语音
92+
{"method":"set","greeter":{"chn1_greeter_audio":{"enter_audio_id":"0"}}}
93+
{"method":"set","greeter":{"chn1_greeter_audio":{"leave_audio_id":"4104"}}}
2594
```
2695

2796
ref: http://blog.xiazhiri.com/Mercury-MIPC251C-4-Reverse.html

0 commit comments

Comments
 (0)