curl -u admin:xxxxxxx http://192.168.0.10/ISAPI/System/Video/inputs/channels/2/MotionDetection
<?xml version="1.0" encoding="UTF-8"?>
<MotionDetection version="2.0" xmlns="http://www.std-cgi.com/ver20/XMLSchema">
<enabled>true</enabled>
<enableHighlight>false</enableHighlight>
<samplingInterval>2</samplingInterval>
<startTriggerTime>500</startTriggerTime>
<endTriggerTime>500</endTriggerTime>
<regionType>grid</regionType>
<Grid>
<rowGranularity>18</rowGranularity>
<columnGranularity>22</columnGranularity>
</Grid>
<MotionDetectionLayout version="2.0" xmlns="http://www.std-cgi.com/ver20/XMLSchema">
<sensitivityLevel>100</sensitivityLevel>
<layout>
<gridMap>ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff</gridMap>
</layout>
</MotionDetectionLayout>
</MotionDetection>
Save the XML in a file md.xml
and change what you want, then:
curl -u admin:xxxxxxx -X PUT -d @md.xml http://192.168.0.10/ISAPI/System/Video/inputs/channels/2/MotionDetection
<?xml version="1.0" encoding="UTF-8"?>
<ResponseStatus version="2.0" xmlns="http://www.std-cgi.com/ver20/XMLSchema">
<requestURL>/ISAPI/System/Video/inputs/channels/2/MotionDetection</requestURL>
<statusCode>1</statusCode>
<statusString>OK</statusString>
<subStatusCode>ok</subStatusCode>
</ResponseStatus>