Page 1 of 1

loose all settings when change motion detection via cgi

PostPosted: Thu Jul 25, 2013 2:53 pm
by petrho
Why will all settings (area and schedule etc) be deleted when I enable/disable the motion detection via cgi?

I have a FI9805W...

Re: loose all settings when change motion detection via cgi

PostPosted: Thu Jul 25, 2013 4:52 pm
by TheUberOverLord
petrho wrote:Why will all settings (area and schedule etc) be deleted when I enable/disable the motion detection via cgi?

I have a FI9805W...

You need to include ALL the parameters with the cgi command.

Don

Re: loose all settings when change motion detection via cgi

PostPosted: Fri Jul 26, 2013 9:35 am
by petrho
TheUberOverLord wrote:
petrho wrote:Why will all settings (area and schedule etc) be deleted when I enable/disable the motion detection via cgi?

I have a FI9805W...

You need to include ALL the parameters with the cgi command.

Don

yes but that seems to be a very hard thing. why can't it just delta update the settings?

Re: loose all settings when change motion detection via cgi

PostPosted: Fri Jul 26, 2013 9:41 am
by TheUberOverLord
petrho wrote:
TheUberOverLord wrote:
petrho wrote:Why will all settings (area and schedule etc) be deleted when I enable/disable the motion detection via cgi?

I have a FI9805W...

You need to include ALL the parameters with the cgi command.

Don

yes but that seems to be a very hard thing. why can't it just delta update the settings?

Because that's the way it was designed and currently works. While this might change in the future. That's the way it works today.

If you are going to be working with the cgi interface. Besides reviewing the CGI SDK. I suggest unpacking the firmware and reviewing this folder to see how the standard camera interface is dealing with saving information. You can use tools like IZArc to do this:

http://www.izarc.org/

Example using FI9821W V1 firmware version .13, Note: The cgi commands are currently the same as the FI9805W:

Code: Select all
FI9821W-1.1.1.13-20130606\Firmware\FI9821W_app_ver1.1.1.13\FI9821W_app_ver1.1.1\app.tar\app\app\www.tar\www\html\cfg

In your case. You would look at the alarm.js file to see how this is being properly done using the setMotionDetectConfig cgi command:

Example of enabling motion detection with all the proper values being present. With only all of Wednesday being set to enabled for the schedule.

Code: Select all
http://192.168.1.130:92/cgi-bin/CGIProxy.fcgi?usr=admin&pwd=password&cmd=setMotionDetectConfig&isEnable=1&snapInterval=5&sensitivity=0&linkage=7&triggerInterval=5&schedule0=0&schedule1=0&schedule2=281474976710655&schedule3=0&schedule4=0&schedule5=0&schedule6=0&area0=1023&area1=1023&area2=1023&area3=1023&area4=1023&area5=1023&area6=1023&area7=1023&area8=1023&area9=1023

If you do a getMotionDetectConfig cgi command first. You will have any values you need besides the ones you wish to change for the setMotionDetectConfig cgi command.

You can also use utilities like Fiddler2 to capture the http traffic between your system and the camera to analyze what the standard camera interface generates for cgi commands between your system and the camera as well. So that if you encounter issues. You can see how the standard camera interface is doing the same things:

http://fiddler2.com/

Don