From a1cc21d4645eddd4a3ce8ea510eed77651e5b5ac Mon Sep 17 00:00:00 2001 From: nasseeder1 <> Date: Tue, 1 Dec 2015 19:26:22 +0000 Subject: [PATCH] 49_SSCam: avoid messages "insufficient user privilege" even though the user was set up properly git-svn-id: https://svn.fhem.de/fhem/trunk@10068 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 2 ++ fhem/FHEM/49_SSCam.pm | 51 +++++++++++++++++-------------------------- fhem/HISTORY | 3 +++ 3 files changed, 25 insertions(+), 31 deletions(-) diff --git a/fhem/CHANGED b/fhem/CHANGED index ac78ff129..9646667a8 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,7 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Do not insert empty lines here, update check depends on it. + - bugfix: 49_SSCam: avoid messages "insufficient user privilege" even + though the user was set up properly - bugfix: 70_PIONEERAVR: suppressed Smartmatch is experimental warnings - feature: 30_pilight_temp add attributes offsetTemp and offsetHumidity to correct temperature and humidity diff --git a/fhem/FHEM/49_SSCam.pm b/fhem/FHEM/49_SSCam.pm index 3ee392902..4ed59b250 100644 --- a/fhem/FHEM/49_SSCam.pm +++ b/fhem/FHEM/49_SSCam.pm @@ -216,7 +216,7 @@ sub camstart { $apiextrecpath = $hash->{APIEXTRECPATH}; $apiextrecmaxver = $hash->{APIEXTRECMAXVER}; $errorcode = ""; - $url = "http://$servername:$serverport/webapi/$apiextrecpath?api=SYNO.SurveillanceStation.ExternalRecording&method=Record&version=$apiextrecmaxver&cameraId=$camid&action=start&session=SurveillanceStation&_sid=$sid"; + $url = "http://$servername:$serverport/webapi/$apiextrecpath?api=SYNO.SurveillanceStation.ExternalRecording&method=Record&version=$apiextrecmaxver&cameraId=$camid&action=start&session=SurveillanceStation&_sid=\"$sid\""; $myjson = get $url; # Evaluiere ob Daten im JSON-Format empfangen @@ -245,7 +245,7 @@ sub camstart { readingsEndUpdate($hash, 1); $hash->{STATE} = "on"; - # bedingt Browseraktualisierung und Status der "Lampen" + # Generiert das Ereignis "on", bedingt Browseraktualisierung und Status der "Lampen" { fhem "trigger $device on" } # Logausgabe @@ -334,7 +334,7 @@ sub camstop { $apiextrecmaxver = $hash->{APIEXTRECMAXVER}; $errorcode = ""; - $url = "http://$servername:$serverport/webapi/$apiextrecpath?api=SYNO.SurveillanceStation.ExternalRecording&method=Record&version=$apiextrecmaxver&cameraId=$camid&action=stop&session=SurveillanceStation&_sid=$sid"; + $url = "http://$servername:$serverport/webapi/$apiextrecpath?api=SYNO.SurveillanceStation.ExternalRecording&method=Record&version=$apiextrecmaxver&cameraId=$camid&action=stop&session=SurveillanceStation&_sid=\"$sid\""; $myjson = get $url; # Evaluiere ob Daten im JSON-Format empfangen @@ -362,8 +362,8 @@ sub camstop { readingsEndUpdate($hash, 1); $hash->{STATE} = "off"; - # bedingt Browseraktualisierung und Status der "Lampen" - { fhem "trigger $device on" } + # Generiert das Ereignis "on", bedingt Browseraktualisierung und Status der "Lampen" + { fhem "trigger $device off" } # Logausgabe $logstr = "Camera $camname Recording stopped"; @@ -605,7 +605,7 @@ sub getcamid { &printlog($hash,$logstr,"5"); # einlesen aller Kameras - $url = "http://$servername:$serverport/webapi/$apicampath?api=SYNO.SurveillanceStation.Camera&version=$apicammaxver&method=List&session=SurveillanceStation&_sid=$sid"; + $url = "http://$servername:$serverport/webapi/$apicampath?api=SYNO.SurveillanceStation.Camera&version=$apicammaxver&method=List&session=SurveillanceStation&_sid=\"$sid\""; $myjson = get $url; # Evaluiere ob Daten im JSON-Format empfangen @@ -967,6 +967,10 @@ return($hash,$success);

SSCam