Very Simple Python Project
Budget: $10 – $20 USD
1) Make a HTTP request EVERY 5 SECONDS as follows:
http://10.0.0.30:88/cgi-bin/CGIProxy.fcgi?cmd=getDevState&usr=admin&pwd=xxxxxx
Result will be like this:
<CGI_Result>
....
<motionDetectAlarm>1</motionDetectAlarm>
....
</CGI_Result>
.... = Other lines that can be ignored
IF (in the result)
<motionDetectAlarm>2</motionDetectAlarm>
THEN
DO
http://10.0.0.30:88/cgi-bin/CGIProxy.fcgi?cmd=ptzGotoPresetPoint&name=Left&usr=admin&pwd=xxxxxx
WAIT 3 SECONDS, DO
http://10.0.0.30:88/cgi-bin/CGIProxy.fcgi?cmd=ptzGotoPresetPoint&name=Home&usr=admin&pwd=xxxxxx
REPEAT INFINITE
http://10.0.0.30:88/cgi-bin/CGIProxy.fcgi?cmd=getDevState&usr=admin&pwd=xxxxxx
Result will be like this:
<CGI_Result>
....
<motionDetectAlarm>1</motionDetectAlarm>
....
</CGI_Result>
.... = Other lines that can be ignored
IF (in the result)
<motionDetectAlarm>2</motionDetectAlarm>
THEN
DO
http://10.0.0.30:88/cgi-bin/CGIProxy.fcgi?cmd=ptzGotoPresetPoint&name=Left&usr=admin&pwd=xxxxxx
WAIT 3 SECONDS, DO
http://10.0.0.30:88/cgi-bin/CGIProxy.fcgi?cmd=ptzGotoPresetPoint&name=Home&usr=admin&pwd=xxxxxx
REPEAT INFINITE