Situation:
- Dummy switch for turning on / off Motion Detection on (Foscam) Webcam through URL with CGI-BIN
- With CGI-BIN / URL it's possible to detect current state of Motion Detection
Example:
Check status MD on Foscam Webcam
Code: Select all
http://192.168.0.10:88/cgi-bin/CGIProxy.fcgi?cmd=getMotionDetectConfig&usr=XXX&pwd=XXX
Code: Select all
<CGI_Result>
<result>0</result>
<isEnable>1</isEnable>
<linkage>142</linkage>
<snapInterval>1</snapInterval>
<sensitivity>3</sensitivity>
<triggerInterval>0</triggerInterval>
<isMovAlarmEnable>1</isMovAlarmEnable>
<isPirAlarmEnable>0</isPirAlarmEnable>
<schedule0>281474976710655</schedule0>
<schedule1>281474976710655</schedule1>
<schedule2>281474976710655</schedule2>
<schedule3>281474976710655</schedule3>
<schedule4>281474976710655</schedule4>
<schedule5>281474976710655</schedule5>
<schedule6>281474976710655</schedule6>
<area0>1022</area0>
<area1>1022</area1>
<area2>1020</area2>
<area3>992</area3>
<area4>768</area4>
<area5>772</area5>
<area6>518</area6>
<area7>7</area7>
<area8>7</area8>
<area9>7</area9>
</CGI_Result>
- When <isEnable>xx1</isEnable> = 1 and Dummy Switch is ON -> no action
- When <isEnable>xx/isEnable> = 1 and Dummy Switch is OFF -> update status Dummy Switch to ON
- When <isEnable>xx</isEnable> = 0 and Dummy Switch is OFF ->no action
- When <isEnable>xx</isEnable> = 0 and Dummy Switch is ON ->update status Dummy Switch to OFF
Is this possible and how do I start this in DzVents of LUA?
Maybe there is an example where I can hold on-to, so I can try to build a script.