# per CURL die Webcam steuern

**URL:** <https://community.symcon.de/t/per-curl-die-webcam-steuern/34912>\
**Category:** Skripte, PHP, SQL (Fragen)\
**Created:** [15. August 2014 um 12:51 UTC](https://community.symcon.de/t/per-curl-die-webcam-steuern/34912 "2014-08-15T12:51:17Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![anko](https://community.symcon.de/letter_avatar_proxy/v4/letter/a/8c91f0/32.png) [@anko](https://community.symcon.de/u/anko)\
**Post date:** [16. August 2014 um 21:11 UTC](https://community.symcon.de/t/per-curl-die-webcam-steuern/34912/3 "2014-08-16T21:11:14Z")

</div>

Hi,

hier al ein Auszug aus der Doku zu meiner Camera:

8.4.13 /ISAPI/System/Video/inputs/channels/\<ID\>/motionDetection

/ISAPI/System/Video/inputs/channels/ID  
/MotionDetection

GET  
Description It is used to get the motion detection configuration for all video input channels.  
Query None  
Inbound Data None  
Success Return MotionDetection

PUT  
Description It is used to udpate the motion detection configuration for a video input channel.  
Query None  
Inbound Data MotionDetection  
Success Return ResponseStatus

Notes:  
If motion detection is supported by the device, a motion detection ID will be allocated for  
each video input channel ID. The motion detection ID must correspond to the video input  
channel ID.

MotionDetection XML Block

\<MotionDetection version=“2.0” xmlns=“[http://www.isapi.org/ver20/XMLSchema”](http://www.isapi.org/ver20/XMLSchema%E2%80%9D)\>  
\<enabled\> \<!-- req, xs:boolean --\> \</enabled\>  
\<enableHighlight\> \<!-- opt, xs:boolean --\> \</enableHighlight\>  
\<samplingInterval\> \<!-- opt, xs:integer, number of frames --\> \</samplingInterval\>  
\<startTriggerTime\> \<!-- opt, xs:integer, milliseconds --\> \</startTriggerTime\>  
\<endTriggerTime\> \<!-- opt, xs:integer, milliseconds --\> \</endTriggerTime\>  
\<regionType\> \<!-- ro, req, xs:string, “grid, roi, none” --\> \</regionType\>  
\<Grid\> \<!-- dep --\>  
\<rowGranularity\> \<!-- ro, req, xs:integer --\> \</rowGranularity\>  
\<columnGranularity\> \<!-- ro, req, xs:integer --\> \</columnGranularity\>  
\</Grid\>  
\<ROI\> \<!-- dep --\>  
\<normalizedScreenWidth\> \<!-- ro, req, xs:integer --\>\</normalizedScreenWidth\>  
\<normalizedScreenHeight\> \<!-- ro, req, xs:integer --\>\</normalizedScreenHeight\>  
\</ROI\>  
\<MotionDetectionLayout/\> \<!-- req --\>  
\</MotionDetection\>

Den GET bekomme ich so hin:

$out =„[http://admin:12345@192.168.178.166/ISAPI/System/Video/inputs/channels/1/motionDetection](http://admin:12345@192.168.178.166/ISAPI/System/Video/inputs/channels/1/motionDetection)“;  
$ch = curl\_init($out);  
curl\_setopt($ch, CURLOPT\_RETURNTRANSFER, 1);  
$ergebnis = curl\_exec($ch);  
$fehler = curl\_error($ch);  
echo $ergebnis;  
echo $fehler;  
curl\_close($ch);

Ich bekomme dann folgendes zurück:

\<?xml version=„1.0“ encoding=„UTF-8“?\>  
\<MotionDetection version=„2.0“ xmlns=„[http://www.isapi.org/ver20/XMLSchema](http://www.isapi.org/ver20/XMLSchema)“\>  
\<enabled\>true\</enabled\>  
\<enableHighlight\>true\</enableHighlight\>  
\<samplingInterval\>2\</samplingInterval\>  
\<startTriggerTime\>500\</startTriggerTime\>  
\<endTriggerTime\>500\</endTriggerTime\>  
\<regionType\>grid\</regionType\>  
\<Grid\>  
\<rowGranularity\>15\</rowGranularity\>  
\<columnGranularity\>22\</columnGranularity\>  
\</Grid\>  
\<MotionDetectionLayout version=„2.0“ xmlns=„[http://www.isapi.org/ver20/XMLSchema](http://www.isapi.org/ver20/XMLSchema)“\>  
\<sensitivityLevel\>60\</sensitivityLevel\>  
\<layout\>  
\<gridMap\>7ffff87ffff8fffffcfffffcfffffcfffffcfffffcfffffcfffffcfffffcfffffcfffffcfffffcfffffcfffffc\</gridMap\>  
\</layout\>  
\</MotionDetectionLayout\>  
\</MotionDetection\>

Davon möchte ich \<enabled\>true\</enabled\> in \<enabled\>false\</enabled\> ändern.

Nur beim senden der geänderten Einstellungen haperts…  
So wie ich es verstanden habe, muss ich eigentlich „nur“ das manipulierte Ergebnis des GET wieder an die Kamera senden.

Gruß  
Andreas

---

_[View the full topic](https://community.symcon.de/t/per-curl-die-webcam-steuern/34912)._
