
-- get snapshot van camera
os.execute('wget "http://<host>:<port>/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=<user>&pwd=<password>" -O /var/tmp/snapshotV.jpg')
-- send snapshot with Telegram
os.execute('curl -s -X POST "https://api.telegram.org/>xxxx>:<yyy>/sendPhoto" -F chat_id=<uuu> -F photo="@/var/tmp/snapshotV.jpg" ')
Now I want to switch off and on surveillance of my camera with Domoticz (eg only at night or only when I am not at home).
To switch of surveillance (detection) I can use this command: "http://<host>:<port>/cgi-bin/CGIProxy.fcgi?usr=<user>&pwd=<password>&cmd=cmd=setMotionDetectConfig1&isEnable=0"
But the problem is that all setting of the detection are removed (also area's and sensitivity). So switching on in the same manner is more or less impossible. The command would be: "http://<host>:<port>/cgi-bin/CGIProxy.fcgi?usr=<user>&pwd=<password>&cmd=cmd=setMotionDetectConfig1&isEnable=1&linkage=1230&snapInterval=2&sensitivity=0&triggerInterval=5&schedule0=281474976710655&schedule1=281474976710655&schedule2=281474976710655&schedule3=281474976710655&schedule4=281474976710655&schedule5=281474976710655&schedule6=281474976710655&area0=1023&area1=1023&area2=1023&area3=1023&area4=1023&area5=1023&area6=1023&area7=1023&area7=1023&area8=1023&area9=1023". And if you change a setting you will have to change this "command".
It is possible to get from the camera these settings with a "get" instead of a "set": "http://<host>:<port>/cgi-bin/CGIProxy.fcgi?usr=<user>&pwd=<password>&cmd=getMotionDetectConfig1"




PS. For those interested in the commands see: http://lightswitch05.github.io/foscam-client/index.html
