\"");
+
+ $hash->{HELPER}{ACTIVE} = "off";
+ if (AttrVal($name,"debugactivetoken",0)) {
+ Log3($name, 3, "$name - Active-Token deleted by OPMODE: $hash->{OPMODE}");
+ }
+ return;
+ }
+
+ if($hash->{HELPER}{LOGINRETRIES} >= $lrt) {
+ # login wird abgebrochen, Freigabe Funktionstoken
+ $hash->{HELPER}{ACTIVE} = "off";
+ if (AttrVal($name,"debugactivetoken",0)) {
+ Log3($name, 3, "$name - Active-Token deleted by OPMODE: $hash->{OPMODE}");
+ }
+ Log3($name, 2, "$name - ERROR - Login or privilege of user $username unsuccessful");
+ return;
+ }
+
+ my $httptimeout = AttrVal($name,"httptimeout",4);
+ Log3($name, 5, "$name - HTTP-Call login will be done with httptimeout-Value: $httptimeout s");
+
+ my $urlwopw; # nur zur Anzeige bei verbose >= 4 und "showPassInLog" == 0
+
+ # sid in Quotes einschliessen oder nicht -> bei Problemen mit 402 - Permission denied
+ my $sid = AttrVal($name, "noQuotesForSID", "0") == 1 ? "sid" : "\"sid\"";
+
+ if (AttrVal($name,"session","DSM") eq "SurveillanceStation") {
+ $url = "$proto://$serveraddr:$serverport/webapi/$apiauthpath?api=$apiauth&version=$apiauthmaxver&method=Login&account=$username&passwd=$password&session=SurveillanceStation&format=$sid";
+ $urlwopw = "$proto://$serveraddr:$serverport/webapi/$apiauthpath?api=$apiauth&version=$apiauthmaxver&method=Login&account=$username&passwd=*****&session=SurveillanceStation&format=$sid";
+ } else {
+ $url = "$proto://$serveraddr:$serverport/webapi/$apiauthpath?api=$apiauth&version=$apiauthmaxver&method=Login&account=$username&passwd=$password&format=$sid";
+ $urlwopw = "$proto://$serveraddr:$serverport/webapi/$apiauthpath?api=$apiauth&version=$apiauthmaxver&method=Login&account=$username&passwd=*****&format=$sid";
+ }
+
+ AttrVal($name, "showPassInLog", "0") == 1 ? Log3($name, 4, "$name - Call-Out now: $url") : Log3($name, 4, "$name - Call-Out now: $urlwopw");
+ $hash->{HELPER}{LOGINRETRIES}++;
+
+ $param = {
+ url => $url,
+ timeout => $httptimeout,
+ hash => $hash,
+ user => $username,
+ funcret => $fret,
+ method => "GET",
+ header => "Accept: application/json",
+ callback => \&SSCam_login_return
+ };
+ HttpUtils_NonblockingGet ($param);
+}
+
+sub SSCam_login_return ($) {
+ my ($param, $err, $myjson) = @_;
+ my $hash = $param->{hash};
+ my $name = $hash->{NAME};
+ my $username = $param->{user};
+ my $fret = $param->{funcret};
+ my $subref = \&$fret;
+ my $success;
+
+ # Verarbeitung der asynchronen Rückkehrdaten aus sub "login_nonbl"
+ if ($err ne "") {
+ # ein Fehler bei der HTTP Abfrage ist aufgetreten
+ Log3($name, 2, "$name - error while requesting ".$param->{url}." - $err");
+
+ readingsSingleUpdate($hash, "Error", $err, 1);
+
+ return SSCam_login($hash,$fret);
+
+ } elsif ($myjson ne "") {
+ # wenn die Abfrage erfolgreich war ($data enthält die Ergebnisdaten des HTTP Aufrufes)
+
+ # Evaluiere ob Daten im JSON-Format empfangen wurden
+ ($hash, $success) = SSCam_evaljson($hash,$myjson);
+ unless ($success) {
+ Log3($name, 4, "$name - no JSON-Data returned: ".$myjson);
+ $hash->{HELPER}{ACTIVE} = "off";
+
+ if (AttrVal($name,"debugactivetoken",0)) {
+ Log3($name, 3, "$name - Active-Token deleted by OPMODE: $hash->{OPMODE}");
+ }
+ return;
+ }
+
+ my $data = decode_json($myjson);
+
+ # Logausgabe decodierte JSON Daten
+ Log3($name, 5, "$name - JSON decoded: ". Dumper $data);
+
+ $success = $data->{'success'};
+
+ if ($success) {
+ # login war erfolgreich
+ my $sid = $data->{'data'}->{'sid'};
+
+ # Session ID in hash eintragen
+ $hash->{HELPER}{SID} = $sid;
+
+ # Setreading
+ readingsBeginUpdate($hash);
+ readingsBulkUpdate($hash,"Errorcode","none");
+ readingsBulkUpdate($hash,"Error","none");
+ readingsEndUpdate($hash, 1);
+
+ # Logausgabe
+ Log3($name, 4, "$name - Login of User $username successful - SID: $sid");
+
+ return &$subref($hash);
+
+ } else {
+ # Errorcode aus JSON ermitteln
+ my $errorcode = $data->{'error'}->{'code'};
+
+ # Fehlertext zum Errorcode ermitteln
+ my $error = SSCam_experrorauth($hash,$errorcode);
+
+ # Setreading
+ readingsBeginUpdate($hash);
+ readingsBulkUpdate($hash,"Errorcode",$errorcode);
+ readingsBulkUpdate($hash,"Error",$error);
+ readingsEndUpdate($hash, 1);
+
+ # Logausgabe
+ Log3($name, 3, "$name - Login of User $username unsuccessful. Code: $errorcode - $error - try again");
+
+ return SSCam_login($hash,$fret);
+ }
+ }
+return SSCam_login($hash,$fret);
+}
+
+###################################################################################
+# Funktion logout
+###################################################################################
+sub SSCam_logout ($) {
+ my ($hash) = @_;
+ my $name = $hash->{NAME};
+ my $serveraddr = $hash->{SERVERADDR};
+ my $serverport = $hash->{SERVERPORT};
+ my $apiauth = $hash->{HELPER}{APIAUTH};
+ my $apiauthpath = $hash->{HELPER}{APIAUTHPATH};
+ my $apiauthmaxver = $hash->{HELPER}{APIAUTHMAXVER};
+ my $sid = $hash->{HELPER}{SID};
+ my $proto = $hash->{PROTOCOL};
+ my $url;
+ my $param;
+ my $httptimeout;
+
+ Log3($name, 4, "$name - ####################################################");
+ Log3($name, 4, "$name - ### start cam operation $hash->{OPMODE} ");
+ Log3($name, 4, "$name - ####################################################");
+ Log3($name, 4, "$name - --- Begin Function SSCam_logout nonblocking ---");
+
+ $httptimeout = AttrVal($name,"httptimeout",4);
+ Log3($name, 5, "$name - HTTP-Call will be done with httptimeout-Value: $httptimeout s");
+
+ if (AttrVal($name,"session","DSM") eq "SurveillanceStation") {
+ $url = "$proto://$serveraddr:$serverport/webapi/$apiauthpath?api=$apiauth&version=$apiauthmaxver&method=Logout&session=SurveillanceStation&_sid=$sid";
+ } else {
+ $url = "$proto://$serveraddr:$serverport/webapi/$apiauthpath?api=$apiauth&version=$apiauthmaxver&method=Logout&_sid=$sid";
+ }
+
+ $param = {
+ url => $url,
+ timeout => $httptimeout,
+ hash => $hash,
+ method => "GET",
+ header => "Accept: application/json",
+ callback => \&SSCam_logout_return
+ };
+
+ HttpUtils_NonblockingGet ($param);
+}
+
+sub SSCam_logout_return ($) {
+ my ($param, $err, $myjson) = @_;
+ my $hash = $param->{hash};
+ my $name = $hash->{NAME};
+ my $sid = $hash->{HELPER}{SID};
+ my ($success, $username) = SSCam_getcredentials($hash,0);
+ my $OpMode = $hash->{OPMODE};
+ my $data;
+ my $error;
+ my $errorcode;
+
+ if($err ne "") {
+ # wenn ein Fehler bei der HTTP Abfrage aufgetreten ist
+ Log3($name, 2, "$name - error while requesting ".$param->{url}." - $err");
+
+ readingsSingleUpdate($hash, "Error", $err, 1);
+ } elsif($myjson ne "") {
+ # wenn die Abfrage erfolgreich war ($data enthält die Ergebnisdaten des HTTP Aufrufes)
+ Log3($name, 4, "$name - URL-Call: ".$param->{url});
+
+ # Evaluiere ob Daten im JSON-Format empfangen wurden
+ ($hash, $success) = SSCam_evaljson($hash,$myjson);
+
+ unless ($success) {
+ Log3($name, 4, "$name - Data returned: ".$myjson);
+
+ $hash->{HELPER}{ACTIVE} = "off";
+
+ if (AttrVal($name,"debugactivetoken",0)) {
+ Log3($name, 3, "$name - Active-Token deleted by OPMODE: $hash->{OPMODE}");
+ }
+ return;
+ }
+
+ $data = decode_json($myjson);
+
+ # Logausgabe decodierte JSON Daten
+ Log3($name, 4, "$name - JSON returned: ". Dumper $data);
+
+ $success = $data->{'success'};
+
+ if ($success) {
+ # die Logout-URL konnte erfolgreich aufgerufen werden
+ Log3($name, 4, "$name - Session of User $username has ended - SID: \"$sid\" has been deleted");
+
+ } else {
+ # Errorcode aus JSON ermitteln
+ $errorcode = $data->{'error'}->{'code'};
+
+ # Fehlertext zum Errorcode ermitteln
+ $error = &SSCam_experrorauth($hash,$errorcode);
+
+ Log3($name, 2, "$name - ERROR - Logout of User $username was not successful, however SID: \"$sid\" has been deleted. Errorcode: $errorcode - $error");
+ }
+ }
+ # Session-ID aus Helper-hash löschen
+ delete $hash->{HELPER}{SID};
+
+ # ausgeführte Funktion ist erledigt (auch wenn logout nicht erfolgreich), Freigabe Funktionstoken
+ $hash->{HELPER}{ACTIVE} = "off";
+
+ if (AttrVal($name,"debugactivetoken",0)) {
+ Log3($name, 3, "$name - Active-Token deleted by OPMODE: $hash->{OPMODE}");
+ }
+return;
+}
+
+###############################################################################
+# Test ob JSON-String empfangen wurde
+###############################################################################
+sub SSCam_evaljson($$) {
+ my ($hash,$myjson) = @_;
+ my $OpMode = $hash->{OPMODE};
+ my $name = $hash->{NAME};
+ my $success = 1;
+
+ eval {decode_json($myjson)} or do
+ {
+ if($hash->{HELPER}{RUNVIEW} =~ m/^live_.*hls$/ || $OpMode =~ m/^.*_hls$/) {
+ # HLS aktivate/deaktivate bringt kein JSON wenn bereits aktiviert/deaktiviert
+ Log3($name, 5, "$name - HLS-activation data return: $myjson");
+ if ($myjson =~ m/{"success":true}/) {
+ $success = 1;
+ $myjson = '{"success":true}';
+ }
+ } else {
+ $success = 0;
+ # Setreading
+ readingsBeginUpdate($hash);
+ readingsBulkUpdate($hash,"Errorcode","none");
+ readingsBulkUpdate($hash,"Error","malformed JSON string received");
+ readingsEndUpdate($hash, 1);
+ }
+ };
+
+return($hash,$success,$myjson);
+}
+
+######################################################################################################
+# Refresh eines Raumes aus $hash->{HELPER}{STRMROOM}
+# bzw. Longpoll von SSCam bzw. eines SSCamSTRM Devices wenn
+# $hash->{HELPER}{STRMDEV} gefüllt
+# $hash, $pload (1=Page reload), SSCam-state-Event(1=Event), SSCamSTRM-Event (1=Event)
+######################################################################################################
+sub SSCam_refresh($$$$) {
+ my ($hash,$pload,$lpoll_scm,$lpoll_strm) = @_;
+ my $name;
+ if (ref $hash ne "HASH")
+ {
+ ($name,$pload,$lpoll_scm,$lpoll_strm) = split ",",$hash;
+ $hash = $defs{$name};
+ } else {
+ $name = $hash->{NAME};
+ }
+ my $fpr = 0;
+
+ # Kontext des SSCamSTRM-Devices speichern für Refresh
+ my $sd = $hash->{HELPER}{STRMDEV}?$hash->{HELPER}{STRMDEV}:"\"n.a.\""; # Name des aufrufenden SSCamSTRM-Devices
+ my $sr = $hash->{HELPER}{STRMROOM}?$hash->{HELPER}{STRMROOM}:"\"n.a.\""; # Raum aus dem das SSCamSTRM-Device die Funktion aufrief
+ my $sl = $hash->{HELPER}{STRMDETAIL}?$hash->{HELPER}{STRMDETAIL}:"\"n.a.\""; # Name des SSCamSTRM-Devices (wenn Detailansicht)
+ $fpr = AttrVal($hash->{HELPER}{STRMDEV},"forcePageRefresh",0) if($hash->{HELPER}{STRMDEV});
+ Log3($name, 4, "$name - SSCam_refresh - caller: $sd, callerroom: $sr, detail: $sl, pload: $pload, forcePageRefresh: $fpr");
+
+ # Page-Reload
+ if($pload && $hash->{HELPER}{STRMROOM} && $hash->{HELPER}{STRMDETAIL}) {
+ if($hash->{HELPER}{STRMROOM} && !$hash->{HELPER}{STRMDETAIL} && !$fpr) {
+ Log3($name, 4, "$name - SSCam_refresh jetzt");
+ # trifft zu wenn in einer Raumansicht
+ my @rooms = split(",",$hash->{HELPER}{STRMROOM});
+ foreach (@rooms) {
+ my $room = $_;
+ { map { FW_directNotify("FILTER=room=$room", "#FHEMWEB:$_", "location.reload('true')", "") } devspec2array("TYPE=FHEMWEB") }
+ }
+ } elsif ( !$hash->{HELPER}{STRMROOM} || $hash->{HELPER}{STRMDETAIL} || $fpr ) {
+ # trifft zu bei Detailansicht oder im FLOORPLAN bzw. Dashboard oder wenn Seitenrefresh mit dem
+ # SSCamSTRM-Attribut "forcePageRefresh" erzwungen wird
+ { map { FW_directNotify("#FHEMWEB:$_", "location.reload('true')", "") } devspec2array("TYPE=FHEMWEB") }
+ }
+ } elsif ($fpr) {
+ # Seitenrefresh durch SSCamSTRM-Attribut "forcePageRefresh" erzwungen
+ { map { FW_directNotify("#FHEMWEB:$_", "location.reload('true')", "") } devspec2array("TYPE=FHEMWEB") }
+ }
+
+ # Aufnahmestatus/Disabledstatus in state abbilden & SSCam-Device state setzen (mit/ohne Event)
+ my $st = (ReadingsVal($name, "Availability", "enabled") eq "disabled")?"disabled":(ReadingsVal($name, "Record", "") eq "Start")?"on":"off";
+ if($lpoll_scm) {
+ readingsSingleUpdate($hash,"state", $st, 1);
+ } else {
+ readingsSingleUpdate($hash,"state", $st, 0);
+ }
+
+ # parentState des SSCamSTRM-Device mit Opmode updaten (mit/ohne Event)
+ my @strmdvs = devspec2array("TYPE=SSCamSTRM:FILTER=PARENT=".$name);
+ if(@strmdvs) {
+ foreach (@strmdvs) {
+ my $strmhash = $defs{$_};
+ if($lpoll_strm) {
+ readingsSingleUpdate($strmhash,"parentState", $hash->{OPMODE}, 1);
+ } else {
+ readingsSingleUpdate($strmhash,"parentState", $hash->{OPMODE}, 0);
+ }
+ }
+ }
+
+return;
+}
+
+###############################################################################
+# Test ob MODEL=SVS (sonst ist es eine Cam)
+###############################################################################
+sub SSCam_IsModelCam($){
+ my ($hash)= @_;
+ my $m = ($hash->{MODEL} ne "SVS")?1:0;
+return($m);
+}
+
+###############################################################################
+# JSON Boolean Test und Mapping
+###############################################################################
+sub SSCam_jboolmap($){
+ my ($bool)= @_;
+
+ if(JSON::is_bool($bool)) {
+ $bool = $bool?"true":"false";
+ }
+
+return $bool;
+}
+
+###############################################################################
+# Schnappschußgalerie abrufen (snapGalleryBoost) o. nur Info des letzten Snaps
+###############################################################################
+sub SSCam_snaplimsize ($) {
+ my ($hash)= @_;
+ my $name = $hash->{NAME};
+ my ($slim,$ssize);
+
+ if(!AttrVal($name,"snapGalleryBoost",0)) {
+ $slim = 1;
+ $ssize = 0;
+ } else {
+ $hash->{HELPER}{GETSNAPGALLERY} = 1;
+ $slim = AttrVal($name,"snapGalleryNumber",$SSCam_slim); # Anzahl der abzurufenden Snaps
+ my $sg = AttrVal($name,"snapGallerySize","Icon"); # Auflösung Image
+ $ssize = ($sg eq "Icon")?1:2;
+ }
+return ($slim,$ssize);
+}
+
+###############################################################################
+# Helper für listLog-Argumente extrahieren
+###############################################################################
+sub SSCam_extlogargs ($$) {
+ my ($hash,$a) = @_;
+
+ $hash->{HELPER}{LISTLOGSEVERITY} = (split("severity:",$a))[1] if(lc($a) =~ m/^severity:.*/);
+ $hash->{HELPER}{LISTLOGLIMIT} = (split("limit:",$a))[1] if(lc($a) =~ m/^limit:.*/);
+ $hash->{HELPER}{LISTLOGMATCH} = (split("match:",$a))[1] if(lc($a) =~ m/^match:.*/);
+
+return;
+}
+
+###############################################################################
+# Helper für optimizeParams-Argumente extrahieren
+###############################################################################
+sub SSCam_extoptpar($$$) {
+ my ($hash,$a,$cpcl) = @_;
+
+ $hash->{HELPER}{MIRROR} = (split("mirror:",$a))[1] if(lc($a) =~ m/^mirror:.*/);
+ $hash->{HELPER}{FLIP} = (split("flip:",$a))[1] if(lc($a) =~ m/^flip:.*/);
+ $hash->{HELPER}{ROTATE} = (split("rotate:",$a))[1] if(lc($a) =~ m/^rotate:.*/);
+ $hash->{HELPER}{NTPSERV} = (split("ntp:",$a))[1] if(lc($a) =~ m/^ntp:.*/);
+
+ $hash->{HELPER}{CHKLIST} = ($hash->{HELPER}{NTPSERV}?$cpcl->{ntp}:0)+
+ ($hash->{HELPER}{MIRROR}?$cpcl->{mirror}:0)+
+ ($hash->{HELPER}{FLIP}?$cpcl->{flip}:0)+
+ ($hash->{HELPER}{ROTATE}?$cpcl->{rotate}:0);
+
+return;
+}
+
+###############################################################################
+# Helper für HLS Lieferfähigkeit
+# HLS kann geliefert werden wenn "SYNO.SurveillanceStation.VideoStream"
+# existiert und Reading CamStreamFormat "HLS" ist
+###############################################################################
+sub SSCam_IsHLSCap($) {
+ my ($hash) = @_;
+ my $name = $hash->{NAME};
+ my $ret = 0;
+ my $api = $hash->{HELPER}{APIVIDEOSTMSMAXVER};
+ my $csf = (ReadingsVal($name,"CamStreamFormat","MJPEG") eq "HLS")?1:0;
+
+ $ret = 1 if($api && $csf);
+
+return $ret;
+}
+
+###############################################################################
+# Clienthash übernehmen oder zusammenstellen
+# Identifikation ob über FHEMWEB ausgelöst oder nicht -> erstellen $hash->CL
+sub SSCam_getclhash($;$$) {
+ my ($hash,$nobgd)= @_;
+ my $name = $hash->{NAME};
+ my $ret;
+
+ if($nobgd) {
+ # nur übergebenen CL-Hash speichern,
+ # keine Hintergrundverarbeitung bzw. synthetische Erstellung CL-Hash
+ $hash->{HELPER}{CL}{1} = $hash->{CL};
+ return undef;
+ }
+
+ if (!defined($hash->{CL})) {
+ # Clienthash wurde nicht übergeben und wird erstellt (FHEMWEB Instanzen mit canAsyncOutput=1 analysiert)
+ my $outdev;
+ my @webdvs = devspec2array("TYPE=FHEMWEB:FILTER=canAsyncOutput=1:FILTER=STATE=Connected");
+ my $i = 1;
+ foreach (@webdvs) {
+ $outdev = $_;
+ next if(!$defs{$outdev});
+ $hash->{HELPER}{CL}{$i}->{NAME} = $defs{$outdev}{NAME};
+ $hash->{HELPER}{CL}{$i}->{NR} = $defs{$outdev}{NR};
+ $hash->{HELPER}{CL}{$i}->{COMP} = 1;
+ $i++;
+ }
+ } else {
+ # übergebenen CL-Hash in Helper eintragen
+ $hash->{HELPER}{CL}{1} = $hash->{CL};
+ }
+
+ # Clienthash auflösen zur Fehlersuche (aufrufende FHEMWEB Instanz
+ if (defined($hash->{HELPER}{CL}{1})) {
+ for (my $k=1; (defined($hash->{HELPER}{CL}{$k})); $k++ ) {
+ Log3($name, 4, "$name - Clienthash number: $k");
+ while (my ($key,$val) = each(%{$hash->{HELPER}{CL}{$k}})) {
+ $val = $val?$val:" ";
+ Log3($name, 4, "$name - Clienthash: $key -> $val");
+ }
+ }
+ } else {
+ Log3($name, 2, "$name - Clienthash was neither delivered nor created !");
+ $ret = "Clienthash was neither delivered nor created. Can't use asynchronous output for function.";
+ }
+
+return ($ret);
+}
+
+###############################################################################
+# konvertiere alle ptzPanel_rowXX-attribute zu html-Code für
+# das generierte Widget und das weblink-Device ptzpanel_$name
+###############################################################################
+sub SSCam_ptzpanel($;$$) {
+ my ($name,$ptzcdev,$ptzcontrol) = @_;
+ my $hash = $defs{$name};
+ my $iconpath = AttrVal("$name","ptzPanel_iconPath","www/images/sscam");
+ my $iconprefix = AttrVal("$name","ptzPanel_iconPrefix","black_btn_");
+ my $rowisset = 0;
+ my $ptz_ret;
+ my $row;
+
+ my @vl = split (/\.|-/,ReadingsVal($name, "SVSversion", ""));
+ if(@vl) {
+ my $actvs = $vl[0];
+ $actvs .= $vl[1];
+ return "" if($actvs <= 71);
+ }
+
+ $ptz_ret = "";
+ $ptz_ret.= '
';
+
+ foreach my $rownr (0..9) {
+ $rownr = sprintf("%2.2d",$rownr);
+ $row = AttrVal("$name","ptzPanel_row$rownr",undef);
+ next if (!$row);
+ $rowisset = 1;
+ $ptz_ret .= "";
+ my @btn = split (",",$row); # die Anzahl Buttons in einer Reihe
+
+ foreach my $btnnr (0..$#btn) {
+ $ptz_ret .= '';
+ if ($btn[$btnnr] ne "") {
+ my $cmd;
+ my $img;
+ if ($btn[$btnnr] =~ /(.*?):(.*)/) { # enthält Komando -> :
+ $cmd = $1;
+ $img = $2;
+ } else { # button has format or is empty
+ $cmd = $btn[$btnnr];
+ $img = $btn[$btnnr];
+ }
+ if ($img =~ m/\.svg/) { # Verwendung für SVG's
+ $img = FW_makeImage($img, $cmd, "rc-button");
+ } else {
+ $img = " "; # $FW_ME = URL-Pfad unter dem der FHEMWEB-Server via HTTP erreichbar ist, z.B. /fhem
+ }
+ if ($cmd || $cmd eq "0") {
+ $cmd = "cmd=set $name $cmd";
+ $ptz_ret .= "$img"; # $FW_subdir = Sub-path in URL, used by FLOORPLAN/weblink
+ } else {
+ $ptz_ret .= $img;
+ }
+ }
+ $ptz_ret .= " | ";
+ $ptz_ret .= "\n";
+ }
+ $ptz_ret .= "
\n";
+ }
+
+ $ptz_ret .= "
";
+ $ptz_ret .= "
";
+
+ if ($rowisset) {
+ return $ptz_ret;
+ } else {
+ return "";
+ }
+}
+
+###############################################################################
+# spezielle Attribute für PTZ-ControlPanel verfügbar machen
+###############################################################################
+sub SSCam_addptzattr($) {
+ my ($name) = @_;
+ my $hash = $defs{$name};
+ my $actvs;
+
+ my @vl = split (/\.|-/,ReadingsVal($name, "SVSversion", ""));
+ if(@vl) {
+ $actvs = $vl[0];
+ $actvs.= $vl[1];
+ }
+ return if(ReadingsVal($name,"DeviceType","Camera") ne "PTZ" || $actvs <= 71);
+
+ foreach my $n (0..9) {
+ $n = sprintf("%2.2d",$n);
+ addToDevAttrList($name, "ptzPanel_row$n");
+ }
+ if(ReadingsVal("$name","Presets","") ne "") {
+ $attr{$name}{userattr} =~ s/ptzPanel_Home:$hash->{HELPER}{OLDPRESETS}//g if($hash->{HELPER}{OLDPRESETS} && ReadingsVal("$name","Presets","") ne $hash->{HELPER}{OLDPRESETS});
+ $hash->{HELPER}{OLDPRESETS} = ReadingsVal("$name","Presets","");
+ addToDevAttrList($name, "ptzPanel_Home:".ReadingsVal("$name","Presets",""));
+ }
+ addToDevAttrList($name, "ptzPanel_iconPrefix");
+ addToDevAttrList($name, "ptzPanel_iconPath");
+ addToDevAttrList($name, "ptzPanel_use:0,1");
+
+ # PTZ Panel Widget initial generieren
+ my $upleftfast = "move upleft";
+ my $upfast = "move up";
+ my $uprightfast = "move upright";
+ my $upleft = "move upleft 0.5";
+ my $up = "move up 0.5";
+ my $upright = "move upright 0.5";
+ my $leftfast = "move left";
+ my $left = "move left 0.5";
+ my $home = "goPreset ".AttrVal($name,"ptzPanel_Home",ReadingsVal($name,"PresetHome",""));
+ my $right = "move right 0.5";
+ my $rightfast = "move right";
+ my $downleft = "move downleft 0.5";
+ my $down = "move down 0.5";
+ my $downright = "move downright 0.5";
+ my $downleftfast = "move downleft";
+ my $downfast = "move down";
+ my $downrightfast = "move downright";
+
+ $attr{$name}{ptzPanel_row00} = "$upleftfast:CAMUPLEFTFAST.png,:CAMBLANK.png,$upfast:CAMUPFAST.png,:CAMBLANK.png,$uprightfast:CAMUPRIGHTFAST.png"
+ if(!AttrVal($name,"ptzPanel_row00",undef));
+ $attr{$name}{ptzPanel_row01} = ":CAMBLANK.png,$upleft:CAMUPLEFT.png,$up:CAMUP.png,$upright:CAMUPRIGHT.png"
+ if(!AttrVal($name,"ptzPanel_row01",undef));
+ $attr{$name}{ptzPanel_row02} = "$leftfast:CAMLEFTFAST.png,$left:CAMLEFT.png,$home:CAMHOME.png,$right:CAMRIGHT.png,$rightfast:CAMRIGHTFAST.png"
+ if(!AttrVal($name,"ptzPanel_row02",undef) || $home ne $hash->{HELPER}{OLDPTZHOME});
+ $attr{$name}{ptzPanel_row03} = ":CAMBLANK.png,$downleft:CAMDOWNLEFT.png,$down:CAMDOWN.png,$downright:CAMDOWNRIGHT.png"
+ if(!AttrVal($name,"ptzPanel_row03",undef));
+ $attr{$name}{ptzPanel_row04} = "$downleftfast:CAMDOWNLEFTFAST.png,:CAMBLANK.png,$downfast:CAMDOWNFAST.png,:CAMBLANK.png,$downrightfast:CAMDOWNRIGHTFAST.png"
+ if(!AttrVal($name,"ptzPanel_row04",undef));
+
+ $hash->{HELPER}{OLDPTZHOME} = $home;
+ $hash->{".ptzhtml"} = ""; # SSCam_ptzpanel wird neu durchlaufen
+
+return;
+}
+
+######################################################################################
+# Stream einer Kamera - Kamera Liveview weblink device
+# API: SYNO.SurveillanceStation.VideoStreaming
+# Methode: GetLiveViewPath
+######################################################################################
+sub SSCam_StreamDev($$$) {
+ my ($camname,$strmdev,$fmt) = @_;
+ my $hash = $defs{$camname};
+ my $wltype = $hash->{HELPER}{WLTYPE};
+ my $serveraddr = $hash->{SERVERADDR};
+ my $serverport = $hash->{SERVERPORT};
+ my $apivideostm = $hash->{HELPER}{APIVIDEOSTM};
+ my $apivideostmpath = $hash->{HELPER}{APIVIDEOSTMPATH};
+ my $apivideostmmaxver = $hash->{HELPER}{APIVIDEOSTMMAXVER};
+ my $apiaudiostm = $hash->{HELPER}{APIAUDIOSTM};
+ my $apiaudiostmpath = $hash->{HELPER}{APIAUDIOSTMPATH};
+ my $apiaudiostmmaxver = $hash->{HELPER}{APIAUDIOSTMMAXVER};
+ my $apivideostms = $hash->{HELPER}{APIVIDEOSTMS};
+ my $apivideostmspath = $hash->{HELPER}{APIVIDEOSTMSPATH};
+ my $apivideostmsmaxver = $hash->{HELPER}{APIVIDEOSTMSMAXVER};
+ my $camid = $hash->{CAMID};
+ my $sid = $hash->{HELPER}{SID};
+ my $proto = $hash->{PROTOCOL};
+ my ($cause,$ret,$link,$audiolink,$devWlink,$wlhash,$alias,$wlalias);
+
+ # Kontext des SSCamSTRM-Devices speichern für SSCam_refresh
+ $hash->{HELPER}{STRMDEV} = $strmdev; # Name des aufrufenden SSCamSTRM-Devices
+ $hash->{HELPER}{STRMROOM} = $FW_room?$FW_room:""; # Raum aus dem das SSCamSTRM-Device die Funktion aufrief
+ $hash->{HELPER}{STRMDETAIL} = $FW_detail?$FW_detail:""; # Name des SSCamSTRM-Devices (wenn Detailansicht)
+
+ # Definition Tasten
+ my $imgblank = "
"; # nicht sichtbare Leertaste
+ my $cmdstop = "cmd=set $camname stopView"; # Stream deaktivieren
+ my $imgstop = "
";
+ my $cmdhlsreact = "cmd=set $camname hlsreactivate"; # HLS Stream reaktivieren
+ my $imghlsreact = "
";
+ my $cmdmjpegrun = "cmd=set $camname runView live_fw"; # MJPEG Stream aktivieren
+ my $imgmjpegrun = "
";
+ my $cmdhlsrun = "cmd=set $camname runView live_fw_hls"; # HLS Stream aktivieren
+ my $imghlsrun = "
";
+ my $cmdlrirun = "cmd=set $camname runView lastrec_fw"; # Last Record IFrame
+ my $imglrirun = "
";
+ my $cmdlh264run = "cmd=set $camname runView lastrec_fw_MPEG4/H.264"; # Last Record H.264
+ my $imglh264run = "
";
+ my $cmdlmjpegrun = "cmd=set $camname runView lastrec_fw_MJPEG"; # Last Record MJPEG
+ my $imglmjpegrun = "
";
+ my $cmdlsnaprun = "cmd=set $camname runView lastsnap_fw STRM"; # Last SNAP
+ my $imglsnaprun = "
";
+ my $cmdrecendless = "cmd=set $camname on 0"; # Endlosaufnahme Start
+ my $imgrecendless = "
";
+ my $cmdrecstop = "cmd=set $camname off"; # Aufnahme Stop
+ my $imgrecstop = "
";
+ my $cmddosnap = "cmd=set $camname snap STRM"; # Snapshot auslösen mit Kennzeichnung "by STRM-Device"
+ my $imgdosnap = "
";
+ my $cmdrefresh = "cmd=set $camname refresh STRM"; # Refresh in SSCamSTRM-Devices
+ my $imgrefresh = "
";
+
+ my $ha = AttrVal($camname, "htmlattr", 'width="500" height="325"'); # HTML Attribute der Cam
+ $ha = AttrVal($strmdev, "htmlattr", $ha); # htmlattr mit htmattr Streaming-Device übersteuern
+ my $StmKey = ReadingsVal($camname,"StmKey",undef);
+
+ $ret = "";
+ $ret .= '';
+ $ret .= '';
+ $ret .= '';
+
+ if(!$StmKey || ReadingsVal($camname, "Availability", "") ne "enabled" || IsDisabled($camname)) {
+ # Ausgabe bei Fehler
+ my $cam = AttrVal($camname, "alias", $camname);
+ $cause = !$StmKey?"Cam $cam has no Reading \"StmKey\" set !":"Cam \"$cam\" is disabled";
+ $cause = "Cam \"$cam\" is disabled" if(IsDisabled($camname));
+ $ret .= " $cause
| ";
+ $ret .= '
';
+ $ret .= '';
+ $ret .= '
';
+ $ret .= '';
+ return $ret;
+ }
+
+ if($fmt =~ /mjpeg/) {
+ if($apivideostmsmaxver) { # keine API "SYNO.SurveillanceStation.VideoStream" mehr ab API v2.8
+ $link = "$proto://$serveraddr:$serverport/webapi/$apivideostmspath?api=$apivideostms&version=$apivideostmsmaxver&method=Stream&cameraId=$camid&format=mjpeg&_sid=$sid";
+ } elsif ($hash->{HELPER}{STMKEYMJPEGHTTP}) {
+ $link = $hash->{HELPER}{STMKEYMJPEGHTTP};
+ }
+ if($apiaudiostmmaxver) { # keine API "SYNO.SurveillanceStation.AudioStream" mehr ab API v2.8
+ $audiolink = "$proto://$serveraddr:$serverport/webapi/$apiaudiostmpath?api=$apiaudiostm&version=$apiaudiostmmaxver&method=Stream&cameraId=$camid&_sid=$sid";
+ }
+ $ret .= " ";
+ if(ReadingsVal($camname, "Record", "Stop") eq "Stop") {
+ # Aufnahmebutton endlos Start
+ $ret .= "$imgrecendless ";
+ } else {
+ # Aufnahmebutton Stop
+ $ret .= "$imgrecstop ";
+ }
+ $ret .= "$imgdosnap ";
+ $ret .= " | ";
+ if(AttrVal($camname,"ptzPanel_use",1)) {
+ my $ptz_ret = SSCam_ptzpanel($camname);
+ if($ptz_ret) {
+ $ret .= "$ptz_ret | ";
+ }
+ }
+ if($audiolink && ReadingsVal($camname, "CamAudioType", "Unknown") !~ /Unknown/) {
+ $ret .= '';
+ $ret .= '';
+ $ret .= "";
+ $ret .= " | ";
+ }
+
+ } elsif($fmt =~ /generic/) {
+ my $htag = AttrVal($camname,"genericStrmHtmlTag","");
+ if( $htag =~ m/^\s*(.*)\s*$/s ) {
+ $htag = $1;
+ $htag =~ s/\$NAME/$camname/g;
+ $htag =~ s/\$HTMLATTR/$ha/g;
+ }
+
+ if(!$htag) {
+ $ret .= " Set attribute \"genericStrmHtmlTag\" in device $camname
| ";
+ $ret .= '
';
+ $ret .= '';
+ $ret .= '';
+ $ret .= '';
+ return $ret;
+ }
+
+ $ret .= "";
+ $ret .= "$htag";
+ $ret .= " ";
+ Log3($strmdev, 4, "$strmdev - generic Stream params:\n$htag");
+ $ret .= "$imgrefresh ";
+ $ret .= $imgblank;
+ if(ReadingsVal($camname, "Record", "Stop") eq "Stop") {
+ # Aufnahmebutton endlos Start
+ $ret .= "$imgrecendless ";
+ } else {
+ # Aufnahmebutton Stop
+ $ret .= "$imgrecstop ";
+ }
+ $ret .= "$imgdosnap ";
+ $ret .= " | ";
+ if(AttrVal($camname,"ptzPanel_use",1)) {
+ my $ptz_ret = SSCam_ptzpanel($camname);
+ if($ptz_ret) {
+ $ret .= "$ptz_ret | ";
+ }
+ }
+
+ } elsif($fmt =~ /switched/) {
+ my $wltype = $hash->{HELPER}{WLTYPE};
+ $link = $hash->{HELPER}{LINK};
+
+ if($link && $wltype =~ /image|iframe|video|base64img|embed|hls/) {
+ if($wltype =~ /image/) {
+ $ret .= " ";
+ $ret .= "$imgstop ";
+ $ret .= $imgblank;
+ if($hash->{HELPER}{RUNVIEW} =~ /live_fw/) {
+ if(ReadingsVal($camname, "Record", "Stop") eq "Stop") {
+ # Aufnahmebutton endlos Start
+ $ret .= "$imgrecendless ";
+ } else {
+ # Aufnahmebutton Stop
+ $ret .= "$imgrecstop ";
+ }
+ $ret .= "$imgdosnap ";
+ }
+ $ret .= " | ";
+ if(AttrVal($camname,"ptzPanel_use",1) && $hash->{HELPER}{RUNVIEW} =~ /live_fw/) {
+ my $ptz_ret = SSCam_ptzpanel($camname);
+ if($ptz_ret) {
+ $ret .= "$ptz_ret | ";
+ }
+ }
+ if($hash->{HELPER}{AUDIOLINK} && ReadingsVal($camname, "CamAudioType", "Unknown") !~ /Unknown/) {
+ $ret .= "";
+ $ret .= '';
+ $ret .= "";
+ }
+
+ } elsif ($wltype =~ /iframe/) {
+ $ret .= " | ";
+ $ret .= "$imgstop ";
+ $ret .= "$imgrefresh ";
+ $ret .= " | ";
+ if($hash->{HELPER}{AUDIOLINK} && ReadingsVal($camname, "CamAudioType", "Unknown") !~ /Unknown/) {
+ $ret .= '
';
+ $ret .= '';
+ $ret .= "";
+ $ret .= " | ";
+ }
+
+ } elsif ($wltype =~ /video/) {
+ $ret .= " ";
+ $ret .= "$imgstop ";
+ $ret .= " | ";
+ if($hash->{HELPER}{AUDIOLINK} && ReadingsVal($camname, "CamAudioType", "Unknown") !~ /Unknown/) {
+ $ret .= '
';
+ $ret .= '';
+ $ret .= "";
+ $ret .= " | ";
+ }
+ } elsif($wltype =~ /base64img/) {
+ $ret .= " ";
+ $ret .= "$imgstop ";
+ $ret .= " | ";
+
+ } elsif($wltype =~ /embed/) {
+ $ret .= " | ";
+
+ } elsif($wltype =~ /hls/) {
+ $ret .= " ";
+ $ret .= "$imgstop ";
+ $ret .= "$imgrefresh ";
+ $ret .= "$imghlsreact ";
+ $ret .= $imgblank;
+ if(ReadingsVal($camname, "Record", "Stop") eq "Stop") {
+ # Aufnahmebutton endlos Start
+ $ret .= "$imgrecendless ";
+ } else {
+ # Aufnahmebutton Stop
+ $ret .= "$imgrecstop ";
+ }
+ $ret .= "$imgdosnap ";
+ $ret .= " | ";
+ if(AttrVal($camname,"ptzPanel_use",1)) {
+ my $ptz_ret = SSCam_ptzpanel($camname);
+ if($ptz_ret) {
+ $ret .= "$ptz_ret | ";
+ }
+ }
+ }
+ } else {
+ my $cam = AttrVal($camname, "alias", $camname);
+ $cause = "Playback cam \"$cam\" switched off";
+ $ret .= " $cause
";
+ $ret .= "$imgmjpegrun ";
+ $ret .= "$imghlsrun " if(SSCam_IsHLSCap($hash));
+ $ret .= "$imglrirun ";
+ $ret .= "$imglh264run ";
+ $ret .= "$imglmjpegrun ";
+ $ret .= "$imglsnaprun ";
+ $ret .= " | ";
+ }
+ } else {
+ $cause = "Videoformat not supported";
+ $ret .= " $cause
| ";
+ }
+
+ $ret .= '
';
+ $ret .= '';
+ $ret .= '';
+ Log3($strmdev, 4, "$strmdev - Link called: $link") if($link);
+
+return $ret;
+}
+
+###############################################################################
+# Schnappschußgalerie zusammenstellen
+###############################################################################
+sub composegallery ($;$$) {
+ my ($name,$strmdev,$model) = @_;
+
+ Log3($name, 1, "$name - SSCam will change the internal Code soon. Please delete your old Snapgallery-Device and create a new one by \"set $name createSnapGallery\" ");
+ my $htmlCode = SSCam_composegallery($name,$strmdev,$model);
+
+return $htmlCode;
+}
+
+###############################################################################
+# Schnappschußgalerie zusammenstellen
+###############################################################################
+sub SSCam_composegallery ($;$$) {
+ my ($name,$strmdev,$model) = @_;
+ my $hash = $defs{$name};
+ my $camname = $hash->{CAMNAME};
+ my $allsnaps = $hash->{HELPER}{".SNAPHASH"}; # = \%allsnaps
+ my $sgc = AttrVal($name,"snapGalleryColumns",3); # Anzahl der Images in einer Tabellenzeile
+ my $lss = ReadingsVal($name, "LastSnapTime", " "); # Zeitpunkt neueste Aufnahme
+ my $lang = AttrVal("global","language","EN"); # Systemsprache
+ my $limit = $hash->{HELPER}{SNAPLIMIT}; # abgerufene Anzahl Snaps
+ my $totalcnt = $hash->{HELPER}{TOTALCNT}; # totale Anzahl Snaps
+ $limit = $totalcnt if ($limit > $totalcnt); # wenn weniger Snaps vorhanden sind als $limit -> Text in Anzeige korrigieren
+ my $lupt = ((ReadingsTimestamp($name,"LastSnapTime"," ") gt ReadingsTimestamp($name,"LastUpdateTime"," "))
+ ? ReadingsTimestamp($name,"LastSnapTime"," ")
+ : ReadingsTimestamp($name,"LastUpdateTime"," ")); # letzte Aktualisierung
+ $lupt =~ s/ / \/ /;
+
+ my $cmddosnap = "cmd=set $name snap STRM"; # Snapshot auslösen mit Kennzeichnung "by STRM-Device"
+ my $imgdosnap = "
";
+
+ my $ha = AttrVal($name, "snapGalleryHtmlAttr", AttrVal($name, "htmlattr", 'width="500" height="325"'));
+
+ # falls "SSCam_composegallery" durch ein SSCamSTRM-Device aufgerufen wird
+ my $devWlink = "";
+ if ($strmdev) {
+ my $wlha = AttrVal($strmdev, "htmlattr", undef);
+ $ha = (defined($wlha))?$wlha:$ha; # htmlattr vom SSCamSTRM-Device übernehmen falls von SSCamSTRM-Device aufgerufen und gesetzt
+ }
+
+ # wenn SSCamSTRM-device genutzt wird und attr "snapGalleryBoost" nicht gesetzt ist -> Warnung in Gallerie ausgeben
+ my $sgbnote = " ";
+ if($strmdev && !AttrVal($name,"snapGalleryBoost",0)) {
+ $sgbnote = "CAUTION - No snapshots can be retrieved. Please set the attribute \"snapGalleryBoost=1\" in device $name" if ($lang eq "EN");
+ $sgbnote = "ACHTUNG - Es können keine Schnappschüsse abgerufen werden. Bitte setzen sie das Attribut \"snapGalleryBoost=1\" im Device $name" if ($lang eq "DE");
+ }
+
+ my $header;
+ if ($lang eq "EN") {
+ $header = "Snapshots ($limit/$totalcnt) of camera $camname - newest Snapshot: $lss
";
+ $header .= " (Possibly another snapshots are available. Last recall: $lupt)
" if(AttrVal($name,"snapGalleryBoost",0));
+ } else {
+ $header = "Schnappschüsse ($limit/$totalcnt) von Kamera $camname - neueste Aufnahme: $lss
";
+ $header .= " (Eventuell sind neuere Aufnahmen verfügbar. Letzter Abruf: $lupt)
" if(AttrVal($name,"snapGalleryBoost",0));
+ }
+ $header .= $sgbnote;
+
+ my $gattr = (AttrVal($name,"snapGallerySize","Icon") eq "Full")?$ha:" ";
+ my @as = sort{$a <=>$b}keys%{$allsnaps};
+
+ # Ausgabetabelle erstellen
+ my ($htmlCode,$ct);
+ $htmlCode = "";
+ $htmlCode .= sprintf("$devWlink $header
");
+ $htmlCode .= "
";
+ $htmlCode .= "";
+ $htmlCode .= "";
+ my $cell = 1;
+
+ foreach my $key (@as) {
+ $ct = $allsnaps->{$key}{createdTm};
+ my $html = sprintf("$ct {$key}{imageData}\" /> | " );
+
+ $cell++;
+
+ if ( $cell == $sgc+1 ) {
+ $htmlCode .= $html;
+ $htmlCode .= "
";
+ $htmlCode .= "";
+ $cell = 1;
+ } else {
+ $htmlCode .= $html;
+ }
+ }
+
+ if ( $cell == 2 ) {
+ $htmlCode .= " | ";
+ }
+
+ $htmlCode .= "
";
+ $htmlCode .= "";
+ $htmlCode .= "
";
+ $htmlCode .= "
";
+ $htmlCode .= "$imgdosnap " if($strmdev);
+ $htmlCode .= "";
+
+return $htmlCode;
+}
+
+##############################################################################
+# Auflösung Errorcodes bei Login / Logout
+##############################################################################
+sub SSCam_experrorauth {
+ # Übernahmewerte sind $hash, $errorcode
+ my ($hash,@errorcode) = @_;
+ my $device = $hash->{NAME};
+ my $errorcode = shift @errorcode;
+ my $error;
+
+ unless (exists($SSCam_errauthlist{"$errorcode"})) {$error = "Message of errorcode \"$errorcode\" not found. Please turn to Synology Web API-Guide."; return ($error);}
+
+ # Fehlertext aus Hash-Tabelle %errorauthlist ermitteln
+ $error = $SSCam_errauthlist{"$errorcode"};
+return ($error);
+}
+
+##############################################################################
+# Auflösung Errorcodes SVS API
+
+sub SSCam_experror {
+ # Übernahmewerte sind $hash, $errorcode
+ my ($hash,@errorcode) = @_;
+ my $device = $hash->{NAME};
+ my $errorcode = shift @errorcode;
+ my $error;
+
+ unless (exists($SSCam_errlist{"$errorcode"})) {$error = "Message of errorcode $errorcode not found. Please turn to Synology Web API-Guide."; return ($error);}
+
+ # Fehlertext aus Hash-Tabelle %errorlist ermitteln
+ $error = $SSCam_errlist{"$errorcode"};
+ return ($error);
+}
+
+
+1;
+
+=pod
+=item summary Camera module to control the Synology Surveillance Station
+=item summary_DE Kamera-Modul für die Steuerung der Synology Surveillance Station
+=begin html
+
+
+SSCam
+
+ Using this Module you are able to operate cameras which are defined in Synology Surveillance Station (SVS) and execute
+ functions of the SVS. It is based on the SVS API and supports the SVS version 7 and above.
+
+ At present the following functions are available:
+
+
+ - Start a Recording
+ - Stop a Recording (using command or automatically after the <RecordTime> period
+ - Trigger a Snapshot
+ - Deaktivate a Camera in Synology Surveillance Station
+ - Activate a Camera in Synology Surveillance Station
+ - Control of the exposure modes day, night and automatic
+ - switchover the motion detection by camera, by SVS or deactivate it
+ - control of motion detection parameters sensitivity, threshold, object size and percentage for release
+ - Retrieval of Camera Properties (also by Polling) as well as informations about the installed SVS-package
+ - Move to a predefined Preset-position (at PTZ-cameras)
+ - Start a predefined Patrol (at PTZ-cameras)
+ - Positioning of PTZ-cameras to absolute X/Y-coordinates
+ - continuous moving of PTZ-camera lense
+ - trigger of external events 1-10 (action rules in SVS)
+ - start and stop of camera livestreams incl. audio replay, show the last recording and snapshot
+ - fetch of livestream-Url's with key (login not needed in that case)
+ - playback of last recording and playback the last snapshot
+ - switch the Surveillance Station HomeMode on/off and retrieve the HomeModeState
+ - show the stored credentials of a device
+ - fetch the Surveillance Station Logs, exploit the newest entry as reading
+ - create a gallery of the last 1-10 snapshots (as Popup or in a discrete device)
+ - Start/Stop Object Tracking (only supported PTZ-Cams with this capability)
+ - set/delete a Preset (at PTZ-cameras)
+ - set a Preset or current position as Home Preset (at PTZ-cameras)
+ - provides a panel for camera control (at PTZ-cameras)
+ - create different types of discrete Streaming-Devices (createStreamDev)
+
+
+
+ The recordings and snapshots will be stored in Synology Surveillance Station (SVS) and are managed like the other (normal) recordings / snapshots defined by Surveillance Station rules.
+ For example the recordings are stored for a defined time in Surveillance Station and will be deleted after that period.
+
+ If you like to discuss or help to improve this module please use FHEM-Forum with link:
+ 49_SSCam: Fragen, Hinweise, Neuigkeiten und mehr rund um dieses Modul.
+
+ Prerequisites
+ This module uses the Perl-module JSON.
+ On Debian-Linux based systems this module can be installed by:
+
+ sudo apt-get install libjson-perl
+
+ SSCam is completely using the nonblocking functions of HttpUtils respectively HttpUtils_NonblockingGet.
+ In DSM respectively in Synology Surveillance Station an User has to be created. The login credentials are needed later when using a set-command to assign the login-data to a device.
+ Further informations could be find among Credentials.
+
+ Overview which Perl-modules SSCam is using:
+
+ JSON
+ Data::Dumper
+ MIME::Base64
+ Time::HiRes
+ HttpUtils (FHEM-module)
+
+
+
+ Define
+
+
+ There is a distinction between the definition of a camera-device and the definition of a Surveillance Station (SVS)
+ device, that means the application on the discstation itself.
+ Dependend on the type of defined device the internal MODEL will be set to "<vendor> - <camera type>"
+ or "SVS" and a proper subset of the described set/get-commands are assigned to the device.
+ The scope of application of set/get-commands is denoted to every particular command (valid for CAM, SVS, CAM/SVS).
+
+
+ A camera is defined by:
+
+ define <Name> SSCAM <camera name in SVS> <ServerAddr> [Port] [Protocol]
+
+
+ At first the devices have to be set up and has to be operable in Synology Surveillance Station 7.0 and above.
+
+ A SVS-device to control functions of the Surveillance Station (SVS) is defined by:
+
+ define <Name> SSCAM SVS <ServerAddr> [Port] [Protocol]
+
+
+ In that case the term <camera name in SVS> become replaced by SVS only.
+
+ The Modul SSCam ist based on functions of Synology Surveillance Station API.
+
+ The parameters are in detail:
+
+
+
+
+
+ Name | the name of the new device to use in FHEM |
+ Cameraname | camera name as defined in Synology Surveillance Station if camera-device, "SVS" if SVS-Device. Spaces are not allowed in camera name. |
+ ServerAddr | IP-address of Synology Surveillance Station Host. Note: avoid using hostnames because of DNS-Calls are not unblocking in FHEM |
+ Port | optional - the port of synology disc station. If not set, the default "5000" is used |
+ Protocol | optional - the protocol (http or https) to access the synology disc station. If not set, the default "http" is used |
+
+
+
+
+ Examples:
+
+ define CamCP SSCAM Carport 192.168.2.20 [5000] [http]
+ define CamCP SSCAM Carport 192.168.2.20 [5001] [https]
+ # creates a new camera device CamCP
+
+ define DS1 SSCAM SVS 192.168.2.20 [5000] [http]
+ define DS1 SSCAM SVS 192.168.2.20 [5001] [https]
+ # creares a new SVS device DS1
+
+
+ When a new Camera is defined, as a start the recordingtime of 15 seconds will be assigned to the device.
+ Using the attribute "rectime" you can adapt the recordingtime for every camera individually.
+ The value of "0" for rectime will lead to an endless recording which has to be stopped by a "set <name> off" command.
+ Due to a Log-Entry with a hint to that circumstance will be written.
+
+ If the attribute "rectime" would be deleted again, the default-value for recording-time (15s) become active.
+
+ With command "set <name> on [rectime]" a temporary recordingtime is determinded which would overwrite the dafault-value of recordingtime
+ and the attribute "rectime" (if it is set) uniquely.
+
+ In that case the command "set <name> on 0" leads also to an endless recording as well.
+
+ If you have specified a pre-recording time in SVS it will be considered too.
+
+ If the module recognizes the defined camera as a PTZ-device (Reading "DeviceType = PTZ"), then a control panel is
+ created automatically in the detal view. This panel requires SVS >= 7.1. The properties and the behave of the
+ panel can be affected by attributes "ptzPanel_.*".
+ Please see also command "set <name> createPTZcontrol" in this context.
+
+
+
+
+ Credentials
+
+
+ After a camera-device is defined, firstly it is needed to save the credentials. This will be done with command:
+
+
+ set <name> credentials <username> <password>
+
+
+ The password length has a maximum of 20 characters.
+ The operator can, dependend on what functions are planned to execute, create an user in DSM respectively in Synology Surveillance Station as well.
+ If the user is member of admin-group, he has access to all module functions. Without this membership the user can only execute functions with lower need of rights.
+ The required minimum rights to execute functions are listed in a table further down.
+
+ Alternatively to DSM-user a user created in SVS can be used. Also in that case a user of type "manager" has the right to execute all functions,
+ whereat the access to particular cameras can be restricted by the privilege profile (please see help function in SVS for details).
+ As best practice it is proposed to create an user in DSM as well as in SVS too:
+
+
+ - DSM-User as member of admin group: unrestricted test of all module functions -> session: DSM
+ - SVS-User as Manager or observer: adjusted privilege profile -> session: SurveillanceStation
+
+
+
+ Using the Attribute "session" can be selected, if the session should be established to DSM or the SVS instead.
+ If the session will be established to DSM, SVS Web-API methods are available as well as further API methods of other API's what possibly needed for processing.
+
+ After device definition the default is "login to DSM", that means credentials with admin rights can be used to test all camera-functions firstly.
+ After this the credentials can be switched to a SVS-session with a restricted privilege profile as needed on dependency what module functions are want to be executed.
+
+ The following list shows the minimum rights what the particular module function needs.
+
+
+
+ - set ... on
| session: ServeillanceStation - observer with enhanced privilege "manual recording" |
+ - set ... off
| session: ServeillanceStation - observer with enhanced privilege "manual recording" |
+ - set ... snap
| session: ServeillanceStation - observer |
+ - set ... delPreset
| session: ServeillanceStation - observer |
+ - set ... disable
| session: ServeillanceStation - manager |
+ - set ... enable
| session: ServeillanceStation - manager |
+ - set ... expmode
| session: ServeillanceStation - manager |
+ - set ... extevent
| session: DSM - user as member of admin-group |
+ - set ... goPreset
| session: ServeillanceStation - observer with privilege objective control of camera |
+ - set ... homeMode
| ssession: ServeillanceStation - observer with privilege Home Mode switch |
+ - set ... motdetsc
| session: ServeillanceStation - manager |
+ - set ... runPatrol
| session: ServeillanceStation - observer with privilege objective control of camera |
+ - set ... goAbsPTZ
| session: ServeillanceStation - observer with privilege objective control of camera |
+ - set ... move
| session: ServeillanceStation - observer with privilege objective control of camera |
+ - set ... runView
| session: ServeillanceStation - observer with privilege liveview of camera |
+ - set ... setHome
| session: ServeillanceStation - observer |
+ - set ... setPreset
| session: ServeillanceStation - observer |
+ - set ... snap
| session: ServeillanceStation - observer |
+ - set ... snapGallery
| session: ServeillanceStation - observer |
+ - set ... stopView
| - |
+ - set ... credentials
| - |
+ - get ... caminfo[all]
| session: ServeillanceStation - observer |
+ - get ... eventlist
| session: ServeillanceStation - observer |
+ - get ... listLog
| session: ServeillanceStation - observer |
+ - get ... listPresets
| session: ServeillanceStation - observer |
+ - get ... scanVirgin
| session: ServeillanceStation - observer |
+ - get ... svsinfo
| session: ServeillanceStation - observer |
+ - get ... snapfileinfo
| session: ServeillanceStation - observer |
+ - get ... snapinfo
| session: ServeillanceStation - observer |
+ - get ... stmUrlPath
| session: ServeillanceStation - observer |
+
+
+
+
+
+ HTTP-Timeout Settings
+
+ All functions of SSCam use HTTP-calls to SVS Web API.
+ The default-value of HTTP-Timeout amounts 4 seconds. You can set the attribute "httptimeout" > 0 to adjust the value as needed in your technical environment.
+
+
+
+
+
+
+Set
+
+
+ The specified set-commands are available for CAM/SVS-devices or only valid for CAM-devices or rather for SVS-Devices.
+ They can be selected in the drop-down-menu of the particular device.
+
+
+
+ - set <name> createStreamDev [generic | mjpeg | switched] (valid for CAM)
+
+ A separate Streaming-Device (type SSCamSTRM) will be created. This device can be used as a discrete device in a dashboard for example.
+ The current room of the parent camera device is assigned to the new device if it is set there.
+
+
+
+
+
+ generic | - the streaming device playback a content determined by attribute "genericStrmHtmlTag" |
+ mjpeg | - the streaming device playback a permanent MJPEG video stream (Streamkey method) |
+ switched | - playback of different streaming types. Buttons for mode control are provided. |
+
+
+
+
+ You can control the design with HTML tags in attribute "htmlattr" of the camera device or by the
+ specific attributes of the SSCamSTRM-device itself.
+ In "switched"-Devices are buttons provided for mode control.
+ If HLS (HTTP Live Streaming) is used in Streaming-Device of type "switched", then the camera has to be set to video format
+ H.264 in the Synology Surveillance Station and the SVS-Version has to support the HLS format.
+ Therefore the selection button of HLS is only provided by the Streaming-Device if the Reading "CamStreamFormat" contains
+ "HLS".
+ HTTP Live Streaming is currently only available on Mac Safari or modern mobile iOS/Android devices.
+ In devices of type "switched" buttons for controlling the media type to start are provided.
+ A Streaming-Device of type "generic" needs the complete definition of HTML-Tags by the attribute "genericStrmHtmlTag".
+ These tags specify the content to playback.
+
+
+attr <name> genericStrmHtmlTag <video $HTMLATTR controls autoplay>
+ <source src='http://192.168.2.10:32000/$NAME.m3u8' type='application/x-mpegURL'>
+ </video>
+
+ The variables $HTMLATTR, $NAME are placeholder and absorb the attribute "htmlattr" (if set) respectively the SSCam-Devicename.
+
+
+
+
+
+ - set <name> createPTZcontrol (valid for PTZ-CAM)
+
+ A separate PTZ-control panel will be created (type SSCamSTRM). The current room of the parent camera device is
+ assigned if it is set there.
+ With the "ptzPanel_.*"-attributes or respectively the specific attributes of the SSCamSTRM-device
+ the properties of the control panel can be affected.
+
+
+
+
+ - set <name> createSnapGallery (valid for CAM)
+
+ A snapshot gallery will be created as a separate device (type SSCamSTRM). The device will be provided in
+ room "SnapGallery".
+ With the "snapGallery..."-attributes respectively the specific attributes of the SSCamSTRM-device
+ you are able to manipulate the properties of the new snapshot gallery device.
+
+
+
+
+ - set <name> credentials <username> <password> (valid for CAM/SVS)
+
+ set username / password combination for access the Synology Surveillance Station.
+ See Credentials
for further informations.
+
+
+
+
+
+ - set <name> delPreset <PresetName> (valid for PTZ-CAM)
+
+ Deletes a preset "<PresetName>". In FHEMWEB a drop-down list with current available presets is provieded.
+
+
+
+
+
+ - set <name> [enable|disable] (valid for CAM)
+
+ For deactivating / activating a list of cameras or all cameras by Regex-expression, subsequent two
+ examples using "at":
+
+ define a13 at 21:46 set CamCP1,CamFL,CamHE1,CamTER disable (enable)
+ define a14 at 21:46 set Cam.* disable (enable)
+
+
+ A bit more convenient is it to use a dummy-device for enable/disable all available cameras in Surveillance Station.
+ At first the Dummy will be created.
+
+ define allcams dummy
+ attr allcams eventMap on:enable off:disable
+ attr allcams room Cams
+ attr allcams webCmd enable:disable
+
+
+ With combination of two created notifies, respectively one for "enable" and one for "diasble", you are able to switch all cameras into "enable" or "disable" state at the same time if you set the dummy to "enable" or "disable".
+
+ define all_cams_disable notify allcams:.*off set CamCP1,CamFL,CamHE1,CamTER disable
+ attr all_cams_disable room Cams
+
+ define all_cams_enable notify allcams:on set CamCP1,CamFL,CamHE1,CamTER enable
+ attr all_cams_enable room Cams
+
+
+
+
+
+ - set <name> expmode [day|night|auto] (valid for CAM)
+
+ With this command you are able to control the exposure mode and can set it to day, night or automatic mode.
+ Thereby, for example, the behavior of camera LED's will be suitable controlled.
+ The successful switch will be reported by the reading CamExposureMode (command "get ... caminfoall").
+
+ Note:
+ The successfully execution of this function depends on if SVS supports that functionality of the connected camera.
+ Is the field for the Day/Night-mode shown greyed in SVS -> IP-camera -> optimization -> exposure mode, this function will be probably unsupported.
+
+
+
+
+ - set <name> extevent [ 1-10 ] (valid for SVS)
+
+ This command triggers an external event (1-10) in SVS.
+ The actions which will are used have to be defined in the actionrule editor of SVS at first. There are the events 1-10 possible.
+ In the message application of SVS you may select Email, SMS or Mobil (DS-Cam) messages to release if an external event has been triggerd.
+ Further informations can be found in the online help of the actionrule editor.
+ The used user needs to be a member of the admin-group and DSM-session is needed too.
+
+
+
+
+ - set <name> goAbsPTZ [ X Y | up | down | left | right ] (valid for CAM)
+
+ This command can be used to move a PTZ-camera to an arbitrary absolute X/Y-coordinate, or to absolute position using up/down/left/right.
+ The option is only available for cameras which are having the Reading "CapPTZAbs=true". The property of a camera can be requested with "get <name> caminfoall" .
+
+
+ Example for a control to absolute X/Y-coordinates:
+
+
+ set <name> goAbsPTZ 120 450
+
+
+ In this example the camera lense moves to position X=120 und Y=450.
+ The valuation is:
+
+
+ X = 0 - 640 (0 - 319 moves lense left, 321 - 640 moves lense right, 320 don't move lense)
+ Y = 0 - 480 (0 - 239 moves lense down, 241 - 480 moves lense up, 240 don't move lense)
+
+
+ The lense can be moved in smallest steps to very large steps into the desired direction.
+ If necessary the procedure has to be repeated to bring the lense into the desired position.
+
+ If the motion should be done with the largest possible increment the following command can be used for simplification:
+
+
+ set <name> goAbsPTZ up [down|left|right]
+
+
+ In this case the lense will be moved with largest possible increment into the given absolute position.
+ Also in this case the procedure has to be repeated to bring the lense into the desired position if necessary.
+
+
+
+
+ - set <name> goPreset <Preset> (valid for CAM)
+
+ Using this command you can move PTZ-cameras to a predefined position.
+ The Preset-positions have to be defined first of all in the Synology Surveillance Station. This usually happens in the PTZ-control of IP-camera setup in SVS.
+ The Presets will be read ito FHEM with command "get <name> caminfoall" (happens automatically when FHEM restarts). The import process can be repeated regular by camera polling.
+ A long polling interval is recommendable in this case because of the Presets are only will be changed if the user change it in the IP-camera setup itself.
+
+
+ Here it is an example of a PTZ-control depended on IR-motiondetector event:
+
+
+ define CamFL.Preset.Wandschrank notify MelderTER:on.* set CamFL goPreset Wandschrank, ;; define CamFL.Preset.record at +00:00:10 set CamFL on 5 ;;;; define s3 at +*{3}00:00:05 set CamFL snap ;; define CamFL.Preset.back at +00:00:30 set CamFL goPreset Home
+
+
+ Operating Mode:
+
+ The IR-motiondetector registers a motion. Hereupon the camera "CamFL" moves to Preset-posion "Wandschrank". A recording with the length of 5 seconds starts 10 seconds later.
+ Because of the prerecording time of the camera is set to 10 seconds (cf. Reading "CamPreRecTime"), the effectice recording starts when the camera move begins.
+ When the recording starts 3 snapshots with an interval of 5 seconds will be taken as well.
+ After a time of 30 seconds in position "Wandschrank" the camera moves back to postion "Home".
+
+ An extract of the log illustrates the process:
+
+
+ 2016.02.04 15:02:14 2: CamFL - Camera Flur_Vorderhaus has moved to position "Wandschrank"
+ 2016.02.04 15:02:24 2: CamFL - Camera Flur_Vorderhaus Recording with Recordtime 5s started
+ 2016.02.04 15:02:29 2: CamFL - Snapshot of Camera Flur_Vorderhaus has been done successfully
+ 2016.02.04 15:02:30 2: CamFL - Camera Flur_Vorderhaus Recording stopped
+ 2016.02.04 15:02:34 2: CamFL - Snapshot of Camera Flur_Vorderhaus has been done successfully
+ 2016.02.04 15:02:39 2: CamFL - Snapshot of Camera Flur_Vorderhaus has been done successfully
+ 2016.02.04 15:02:44 2: CamFL - Camera Flur_Vorderhaus has moved to position "Home"
+
+
+
+
+
+ - set <name> homeMode [on|off] (valid for SVS)
+
+ Switch the HomeMode of the Surveillance Station on or off.
+ Further informations about HomeMode you can find in the Synology Onlinehelp.
+
+
+
+
+ - set <name> motdetsc [camera|SVS|disable] (valid for CAM)
+
+ The command "motdetsc" (stands for "motion detection source") switchover the motion detection to the desired mode.
+ If motion detection will be done by camera / SVS without any parameters, the original camera motion detection settings are kept.
+ The successful execution of that opreration one can retrace by the state in SVS -> IP-camera -> event detection -> motion.
+
+ For the motion detection further parameter can be specified. The available options for motion detection by SVS are "sensitivity" and "threshold".
+
+
+
+
+ set <name> motdetsc SVS [sensitivity] [threshold] | # command pattern |
+ set <name> motdetsc SVS 91 30 | # set the sensitivity to 91 and threshold to 30 |
+ set <name> motdetsc SVS 0 40 | # keep the old value of sensitivity, set threshold to 40 |
+ set <name> motdetsc SVS 15 | # set the sensitivity to 15, threshold keep unchanged |
+
+
+
+
+ If the motion detection is used by camera, there are the options "sensitivity", "object size", "percentage for release" available.
+
+
+
+
+ set <name> motdetsc camera [sensitivity] [threshold] [percentage] | # command pattern |
+ set <name> motdetsc camera 89 0 20 | # set the sensitivity to 89, percentage to 20 |
+ set <name> motdetsc camera 0 40 10 | # keep old value for sensitivity, set threshold to 40, percentage to 10 |
+ set <name> motdetsc camera 30 | # set the sensitivity to 30, other values keep unchanged |
+
+
+
+
+ Please consider always the sequence of parameters. Unwanted options have to be set to "0" if further options which have to be changed are follow (see example above).
+ The numerical values are between 1 - 99 (except special case "0").
+
+ The each available options are dependend of camera type respectively the supported functions by SVS. Only the options can be used they are available in
+ SVS -> edit camera -> motion detection. Further informations please read in SVS online help.
+
+ With the command "get <name> caminfoall" the Reading "CamMotDetSc" also will be updated which documents the current setup of motion detection.
+ Only the parameters and parameter values supported by SVS at present will be shown. The camera itself may offer further options to adjust.
+
+ Example:
+
+ CamMotDetSc SVS, sensitivity: 76, threshold: 55
+
+
+
+
+
+ - set <name> move [ right | up | down | left | dir_X ] [Sekunden] (valid for CAM up to SVS version 7.1)
+ set <name> move [ right | upright | up | upleft | left | downleft | down | downright ] [Sekunden] (valid for CAM and SVS Version 7.2 and above)
+
+ With this command a continuous move of a PTZ-camera will be started. In addition to the four basic directions up/down/left/right is it possible to use angular dimensions
+ "dir_X". The grain size of graduation depends on properties of the camera and can be identified by the Reading "CapPTZDirections".
+
+ The radian measure of 360 degrees will be devided by the value of "CapPTZDirections" and describes the move drections starting with "0=right" counterclockwise.
+ That means, if a camera Reading is "CapPTZDirections = 8" it starts with dir_0 = right, dir_2 = top, dir_4 = left, dir_6 = bottom and respectively dir_1, dir_3, dir_5 and dir_7
+ the appropriate directions between. The possible moving directions of cameras with "CapPTZDirections = 32" are correspondingly divided into smaller sections.
+
+ In opposite to the "set <name> goAbsPTZ"-command starts "set <name> move" a continuous move until a stop-command will be received.
+ The stop-command will be generated after the optional assignable time of [seconds]. If that retention period wouldn't be set by the command, a time of 1 second will be set implicit.
+
+ Examples:
+
+
+ set <name> move up 0.5 : moves PTZ 0,5 Sek. (plus processing time) to the top
+ set <name> move dir_1 1.5 : moves PTZ 1,5 Sek. (plus processing time) to top-right
+ set <name> move dir_20 0.7 : moves PTZ 1,5 Sek. (plus processing time) to left-bottom ("CapPTZDirections = 32)"
+
+
+
+
+
+ - set <name> [on [<rectime>] | off] (valid for CAM)
+
+ The command "set <name> on" starts a recording. The default recording time takes 15 seconds. It can be changed by
+ the attribute "rectime" individualy.
+ With the attribute (respectively the default value) provided recording time can be overwritten
+ once by "set <name> on <rectime>".
+ The recording will be stopped after processing time "rectime"automatically.
+
+ A special case is start recording by "set <name> on 0" respectively the attribute value "rectime = 0". In that case
+ a endless-recording will be started. One have to stop this recording by command "set <name> off" explicitely.
+
+ The recording behavior can be impacted with attribute "recextend" furthermore as explained as follows.
+
+ Attribute "recextend = 0" or not set (default):
+
+ - if, for example, a recording with rectimeme=22 is started, no other startcommand (for a recording) will be accepted until this started recording is finished.
+ A hint will be logged in case of verboselevel = 3.
+
+
+
+ Attribute "recextend = 1" is set:
+
+ - a before started recording will be extend by the recording time "rectime" if a new start command is received. That means, the timer for the automatic stop-command will be
+ renewed to "rectime" given bei the command, attribute or default value. This procedure will be repeated every time a new start command for recording is received.
+ Therefore a running recording will be extended until no start command will be get.
+
+ - a before started endless-recording will be stopped after recordingtime 2rectime" if a new "set on"-command is received (new set of timer). If it is unwanted make sure you
+ don't set the attribute "recextend" in case of endless-recordings.
+
+
+
+ Examples for simple Start/Stop a Recording:
+
+
+
+ set <name> on [rectime] | starts a recording of camera <name>, stops automatically after [rectime] (default 15s or defined by attribute) |
+ set <name> off | stops the recording of camera <name> |
+
+
+
+
+
+ - set <name> optimizeParams [mirror:<value>] [flip:<value>] [rotate:<value>] [ntp:<value>] (gilt für CAM)
+
+ Set one or several properties of the camera. The video can be mirrored (mirror), turned upside down (flip) or
+ rotated (rotate). Specified properties must be supported by the camera type. With "ntp" you can set a time server the camera
+ use for time synchronization.
+
+ <value> can be for:
+
+ - mirror, flip, rotate: true | false
+ - ntp: the name or the IP-address of time server
+
+
+
+ Examples:
+ set <name> optimizeParams mirror:true flip:true ntp:time.windows.com
+ # The video will be mirrored, turned upside down and the time server is set to "time.windows.com".
+ set <name> optimizeParams ntp:Surveillance%20Station
+ # The Surveillance Station is set as time server. (NTP-service has to be activated in DSM)
+ set <name> optimizeParams mirror:true flip:false rotate:true
+ # The video will be mirrored and rotated round 90 degrees.
+
+
+
+
+
+ - set <name> runPatrol <Patrolname> (valid for CAM)
+
+ This commans starts a predefined patrol (tour) of a PTZ-camera.
+ At first the patrol has to be predefined in the Synology Surveillance Station. It can be done in the PTZ-control of IP-Kamera Setup -> PTZ-control -> patrol.
+ The patrol tours will be read with command "get <name> caminfoall" which is be executed automatically when FHEM restarts.
+ The import process can be repeated regular by camera polling. A long polling interval is recommendable in this case because of the patrols are only will be changed
+ if the user change it in the IP-camera setup itself.
+ Further informations for creating patrols you can get in the online-help of Surveillance Station.
+
+
+
+
+ - set <name> runView [live_fw | live_link | live_open [<room>] | lastrec_fw | lastrec_fw_MJPEG | lastrec_fw_MPEG4/H.264 | lastrec_open [<room>] | lastsnap_fw] (valid for CAM)
+
+
+
+
+ live_fw | - MJPEG-Livestream. Audio playback is provided if possible. |
+ live_fw_hls | - HLS-Livestream (currently only Mac Safari Browser and mobile iOS/Android-Devices) |
+ live_link | - Link of a MJPEG-Livestream |
+ live_open [<room>] | - opens MJPEG-Livestream in separate Browser window |
+ lastrec_fw | - playback last recording as iFrame object |
+ lastrec_fw_MJPEG | - usable if last recording has format MJPEG |
+ lastrec_fw_MPEG4/H.264 | - usable if last recording has format MPEG4/H.264 |
+ lastrec_open [<room>] | - playback last recording in a separate Browser window |
+ lastsnap_fw | - playback last snapshot |
+
+
+
+
+ With "live_fw, live_link" a MJPEG-Livestream will be started, either as an embedded image
+ or as a generated link.
+ The option "live_open" starts a new browser window with a MJPEG-Livestream. If the optional "<room>" is set, the
+ window will only be started if the specified room is currently opened in a FHEMWEB-session.
+ If a HLS-Stream by "live_fw_hls" is requested, the camera has to be setup to video format H.264 (not MJPEG) in the
+ Synology Surveillance Station and the SVS-Version has to support the HLS format.
+ Therefore this possibility is only present if the Reading "CamStreamFormat" is set to "HLS".
+
+
+ Access to the last recording of a camera can be done using "lastrec_fw.*" respectively "lastrec_open".
+ By "lastrec_fw" the recording will be opened in an iFrame. There are some control elements provided if available.
+ The "lastrec_open" command can be extended optionally by a room. In this case the new window opens only, if the
+ room is the same as a FHEMWEB-session has currently opened.
+ The command "set <name> runView lastsnap_fw" shows the last snapshot of the camera embedded.
+ The Streaming-Device properties can be affected by HTML-tags in attribute "htmlattr".
+
+
+ Examples:
+
+ attr <name> htmlattr width="500" height="375"
+ attr <name> htmlattr width="700",height="525",top="200",left="300"
+
+
+ The command "set <name> runView live_open" starts the stream immediately in a new browser window.
+ A browser window will be initiated to open for every FHEMWEB-session which is active. If you want to change this behavior,
+ you can use command "set <name> runView live_open <room>". In this case the new window opens only, if the
+ room is the same as a FHEMWEB-session has currently opened.
+ The settings of attribute "livestreamprefix" overwrite the data for protocol, servername and
+ port in reading "LiveStreamUrl".
+ By "livestreamprefix" the LivestreamURL (is shown if attribute "showStmInfoFull" is set) can
+ be modified and used for distribution and external access to the Livestream.
+
+ Example:
+
+ attr <name> livestreamprefix https://<Servername>:<Port>
+
+
+ The livestream can be stopped again by command "set <name> stopView".
+ The "runView" function also switches Streaming-Devices of type "switched" into the appropriate mode.
+
+ Dependend of the content to playback, different control buttons are provided:
+
+
+
+ Start Recording | - starts an endless recording |
+ Stop Recording | - stopps the recording |
+ Take Snapshot | - take a snapshot |
+ Switch off | - stops a running playback |
+
+
+
+
+ Note for HLS (HTTP Live Streaming):
+ The video starts with a technology caused delay. Every stream will be segemented into some little video files
+ (with a lenth of approximately 10 seconds) and is than delivered to the client.
+ The video format of the camera has to be set to H.264 in the Synology Surveillance Station and not every camera type is
+ a proper device for HLS-Streaming.
+ At the time only the Mac Safari Browser and modern mobile iOS/Android-Devices are able to playback HLS-Streams.
+
+
+
+
+
+ - set <name> setHome <PresetName> (valid for PTZ-CAM)
+
+ Set the Home-preset to a predefined preset name "<PresetName>" or the current position of the camera.
+
+
+
+
+
+ - set <name> setPreset <PresetNumber> [<PresetName>] [<Speed>] (valid for PTZ-CAM)
+
+ Sets a Preset with name "<PresetName>" to the current postion of the camera. The speed can be defined
+ optionally (<Speed>). If no PresetName is specified, the PresetNummer is used as name.
+ For this reason <PresetName> is defined as optional, but should usually be set.
+
+
+
+
+
+ - set <name> snap (valid for CAM)
+
+ A snapshot can be triggered with:
+
+ set <name> snap
+
+
+ Subsequent some Examples for taking snapshots:
+
+ If a serial of snapshots should be released, it can be done using the following notify command.
+ For the example a serial of snapshots are to be triggerd if the recording of a camera starts.
+ When the recording of camera "CamHE1" starts (Attribut event-on-change-reading -> "Record" has to be set), then 3 snapshots at intervals of 2 seconds are triggered.
+
+
+ define he1_snap_3 notify CamHE1:Record.*on define h3 at +*{3}00:00:02 set CamHE1 snap
+
+
+ Release of 2 Snapshots of camera "CamHE1" at intervals of 6 seconds after the motion sensor "MelderHE1" has sent an event,
+ can be done e.g. with following notify-command:
+
+
+ define he1_snap_2 notify MelderHE1:on.* define h2 at +*{2}00:00:06 set CamHE1 snap
+
+
+ The ID and the filename of the last snapshot will be displayed as value of variable "LastSnapId" respectively "LastSnapFilename" in the device-Readings.
+
+
+
+
+ - set <name> snapGallery [1-10] (valid for CAM)
+
+ The command is only available if the attribute "snapGalleryBoost=1" is set.
+ It creates an output of the last [x] snapshots as well as "get ... snapGallery". But differing from "get" with
+ attribute "snapGalleryBoost=1" no popup will be created. The snapshot gallery will be depicted as
+ an browserpage instead. All further functions and attributes are appropriate the "get <name> snapGallery"
+ command.
+ If you want create a snapgallery output by triggering, e.g. with an "at" or "notify", you should use the
+ "get <name> snapGallery" command instead of "set".
+
+
+
+
+ - set <name> startTracking (valid for CAM with tracking capability)
+
+ Starts object tracking of camera.
+ The command is only available if surveillance station has recognised the object tracking capability of camera
+ (Reading "CapPTZObjTracking").
+
+
+
+
+ - set <name> stopTracking (valid for CAM with tracking capability)
+
+ Stops object tracking of camera.
+ The command is only available if surveillance station has recognised the object tracking capability of camera
+ (Reading "CapPTZObjTracking").
+
+
+
+
+
+
+
+
+Get
+
+
+ With SSCam the properties of SVS and defined Cameras could be retrieved.
+ The specified get-commands are available for CAM/SVS-devices or only valid for CAM-devices or rather for SVS-Devices.
+ They can be selected in the drop-down-menu of the particular device.
+
+
+ - get <name> caminfoall (valid for CAM/SVS)
+ get <name> caminfo (valid for CAM)
+
+ Dependend of the type of camera (e.g. Fix- or PTZ-Camera) the available properties are retrieved and provided as Readings.
+ For example the Reading "Availability" will be set to "disconnected" if the camera would be disconnected from Synology
+ Surveillance Station and can't be used for further processing like creating events.
+ "getcaminfo" retrieves a subset of "getcaminfoall".
+
+
+
+
+ - get <name> eventlist (valid for CAM)
+
+ The Reading "CamEventNum" and "CamLastRecord" will be refreshed which containes the total number
+ of in SVS registered camera events and the path/name of the last recording.
+ This command will be implicit executed when "get <name> caminfoall" is running.
+ The attribute "videofolderMap" replaces the content of reading "VideoFolder". You can use it for
+ example if you have mounted the videofolder of SVS under another name or path and want to access by your local pc.
+
+
+
+
+ - get <name> homeModeState (valid for SVS)
+
+ HomeMode-state of the Surveillance Station will be retrieved.
+
+
+
+
+ - get <name> listLog [severity:<Loglevel>] [limit:<Number of lines>] [match:<Searchstring>] (valid for SVS)
+
+ Fetches the Surveillance Station Log from Synology server. Without any further options the whole log will be retrieved.
+ You can specify all or any of the following options:
+
+
+ - <Loglevel> - Information, Warning or Error. Only datasets having this severity are retrieved (default: all)
+ - <Number of lines> - the specified number of lines (newest) of the log are retrieved (default: all)
+ - <Searchstring> - only log entries containing the searchstring are retrieved (Note: no Regex possible, the searchstring will be given into the call to SVS)
+
+
+
+ Examples
+
+ get <name> listLog severity:Error limit:5
+ Reports the last 5 Log entries with severity "Error"
+ get <name> listLog severity:Information match:Carport
+ Reports all Log entries with severity "Information" and containing the string "Carport"
+ get <name> listLog severity:Warning
+ Reports all Log entries with severity "Warning"
+
+
+
+ If the polling of SVS is activated by setting the attribute "pollcaminfoall", the reading
+ "LastLogEntry" will be created.
+ In the protocol-setup of the SVS you can adjust what data you want to log. For further informations please have a look at
+ Synology Online-Help.
+
+
+
+
+ - get <name> listPresets (valid for PTZ-CAM)
+
+ Get a popup with a lists of presets saved for the camera.
+
+
+
+
+ - get <name> scanVirgin (valid for CAM/SVS)
+
+ This command is similar to get caminfoall, informations relating to SVS and the camera will be retrieved.
+ In difference to caminfoall in either case a new session ID will be generated (do a new login), the camera ID will be
+ new identified and all necessary API-parameters will be new investigated.
+
+
+
+
+ - get <name> snapGallery [1-10] (valid for CAM)
+
+ A popup with the last [x] snapshots will be created. If the attribute "snapGalleryBoost" is set,
+ the last snapshots (default 3) are requested by polling and they will be stored in the FHEM-servers main memory.
+ This method is helpful to speed up the output especially in case of full size images, but it can be possible
+ that NOT the newest snapshots are be shown if they have not be initialized by the SSCAm-module itself.
+ The function can also be triggered, e.g. by an "at" or "notify". In that case the snapshotgallery will be displayed on all
+ connected FHEMWEB instances as a popup.
+
+ To control this function behavior there are further attributes:
+
+
+ - snapGalleryBoost
+ - snapGalleryColumns
+ - snapGalleryHtmlAttr
+ - snapGalleryNumber
+ - snapGallerySize
+
+ available.
+
+
+
+ Note:
+ Depended from quantity and resolution (quality) of the snapshot images adequate CPU and/or main memory
+ ressources are needed.
+
+
+
+
+ - get <name> snapfileinfo (valid for CAM)
+
+ The filename of the last snapshot will be retrieved. This command will be executed with "get <name> snap"
+ automatically.
+
+
+
+
+ - get <name> snapinfo (valid for CAM)
+
+ Informations about snapshots will be retrieved. Heplful if snapshots are not triggerd by SSCam, but by motion detection of the camera or surveillance
+ station instead.
+
+
+
+
+ - get <name> stmUrlPath (valid for CAM)
+
+ This command is to fetch the streamkey information and streamurl using that streamkey. The reading "StmKey" will be filled when this command will be executed and can be used
+ to send it and run by your own application like a browser (see example).
+ If the attribute "showStmInfoFull" is set, additional stream readings like "StmKeyUnicst", "StmKeymjpegHttp" will be shown and can be used to run the
+ appropriate livestream without session id. Is the attribute "livestreamprefix" (usage: "http(s)://<hostname><port>) used, the servername / port will be replaced if necessary.
+ The strUrlPath function will be included automatically if polling is used.
+
+
+ Example to create an http-call to a livestream using StmKey:
+
+
+http(s)://<hostname><port>/webapi/entry.cgi?api=SYNO.SurveillanceStation.VideoStreaming&version=1&method=Stream&format=mjpeg&cameraId=5&StmKey="31fd87279976d89bb98409728cced890"
+
+
+ cameraId (Internal CAMID) and StmKey has to be replaced by valid values.
+
+ Note:
+
+ If you use the stream-call from external and replace hostname / port with valid values and open your router ip ports, please
+ make shure that no unauthorized person could get this sensible data !
+
+
+
+
+ - get <name> storedCredentials (valid for CAM/SVS)
+
+ Shows the stored login credentials in a popup as plain text.
+
+
+
+
+ - get <name> svsinfo (valid for CAM/SVS)
+
+ Determines common informations about the installed SVS-version and other properties.
+
+
+
+
+ Polling of Camera/SVS-Properties
+
+ Retrieval of Camera-Properties can be done automatically if the attribute "pollcaminfoall" will be set to a value > 10.
+ As default that attribute "pollcaminfoall" isn't be set and the automatic polling isn't be active.
+ The value of that attribute determines the interval of property-retrieval in seconds. If that attribute isn't be set or < 10 the automatic polling won't be started
+ respectively stopped when the value was set to > 10 before.
+
+ The attribute "pollcaminfoall" is monitored by a watchdog-timer. Changes of the attribute-value will be checked every 90 seconds and transact corresponding.
+ Changes of the pollingstate and pollinginterval will be reported in FHEM-Logfile. The reporting can be switched off by setting the attribute "pollnologging=1".
+ Thereby the needless growing of the logfile can be avoided. But if verbose level is set to 4 or above even though the attribute "pollnologging" is set as well, the polling
+ will be actived due to analysis purposes.
+
+ If FHEM will be restarted, the first data retrieval will be done within 60 seconds after start.
+
+ The state of automatic polling will be displayed by reading "PollState":
+
+
+ - PollState = Active - automatic polling will be executed with interval correspondig value of attribute "pollcaminfoall"
+ - PollState = Inactive - automatic polling won't be executed
+
+
+
+ The readings are described here.
+
+ Notes:
+
+ If polling is used, the interval should be adjusted only as short as needed due to the detected camera values are predominantly static.
+ A feasible guide value for attribute "pollcaminfoall" could be between 600 - 1800 (s).
+ Per polling call and camera approximately 10 - 20 Http-calls will are stepped against Surveillance Station.
+ Because of that if HTTP-Timeout (pls. refer Attribut "httptimeout") is set to 4 seconds, the theoretical processing time couldn't be higher than 80 seconds.
+ Considering a safety margin, in that example you shouldn't set the polling interval lower than 160 seconds.
+
+ If several Cameras are defined in SSCam, attribute "pollcaminfoall" of every Cameras shouldn't be set exactly to the same value to avoid processing bottlenecks
+ and thereby caused potential source of errors during request Synology Surveillance Station.
+ A marginal difference between the polling intervals of the defined cameras, e.g. 1 second, can already be faced as
+ sufficient value.
+
+
+
+
+
+Internals
+
+ The meaning of used Internals is depicted in following list:
+
+ - CAMID - the ID of camera defined in SVS, the value will be retrieved automatically on the basis of SVS-cameraname
+ - CAMNAME - the name of the camera in SVS
+ - COMPATIBILITY - information up to which SVS-version the module version is currently released/tested (see also Reading "compstate")
+ - CREDENTIALS - the value is "Set" if Credentials are set
+ - NAME - the cameraname in FHEM
+ - MODEL - distinction between camera device (CAM) and Surveillance Station device (SVS)
+ - OPMODE - the last executed operation of the module
+ - SERVERADDR - IP-Address of SVS Host
+ - SERVERPORT - SVS-Port
+
+
+
+
+
+Attributes
+
+
+
+
+
+
+
+ - httptimeout
+ Timeout-Value of HTTP-Calls to Synology Surveillance Station, Default: 4 seconds (if httptimeout = "0"
+ or not set)
+
+ - htmlattr
+ additional specifications to inline oictures to manipulate the behavior of stream, e.g. size of the image.
+
+
+ Example:
+ attr <name> htmlattr width="500" height="325" top="200" left="300"
+
+
+
+ - livestreamprefix
+ overwrites the specifications of protocol, servername and port for further use of the livestream address, e.g.
+ as an link to external use. It has to be specified as "http(s)://<servername>:<port>"
+
+ - loginRetries
+ set the amount of login-repetitions in case of failure (default = 1)
+
+ - noQuotesForSID
+ this attribute may be helpfull in some cases to avoid errormessage "402 - permission denied" and makes login
+ possible.
+
+ - pollcaminfoall
+ Interval of automatic polling the Camera properties (if <= 10: no polling, if > 10: polling with interval)
+
+ - pollnologging
+ "0" resp. not set = Logging device polling active (default), "1" = Logging device polling inactive
+
+ - ptzPanel_Home
+ In the PTZ-control panel the Home-Icon (in attribute "ptzPanel_row02") is automatically assigned to the value of
+ Reading "PresetHome".
+ With "ptzPanel_Home" you can change the assignment to another preset from the available Preset list.
+
+ - ptzPanel_iconPath
+ Path for icons used in PTZ-control panel, default is "www/images/sscam".
+ The attribute value will be used for all icon-files except *.svg.
+
+ - ptzPanel_iconPrefix
+ Prefix for icons used in PTZ-control panel, default is "black_btn_".
+ The attribute value will be used for all icon-files except *.svg.
+ If the used icon-files begin with e.g. "black_btn_" ("black_btn_CAMDOWN.png"), the icon needs to be defined in
+ attributes "ptzPanel_row[00-09]" just with the subsequent part of name, e.g. "CAMDOWN.png".
+
+
+ - ptzPanel_row[00-09] <command>:<icon>,<command>:<icon>,...
+ For PTZ-cameras the attributes "ptzPanel_row00" to "ptzPanel_row04" are created automatically for usage by
+ the PTZ-control panel.
+ The attributes contain a comma spareated list of command:icon-combinations (buttons) each panel line.
+ One panel line can contain a random number of buttons. The attributes "ptzPanel_row00" to "ptzPanel_row04" can't be
+ deleted because of they are created automatically again in that case.
+ The user can change or complement the attribute values. These changes are conserved.
+ If needed the assignment for Home-button in "ptzPanel_row02" can be changed by attribute "ptzPanel_Home".
+ The icons are searched in path "ptzPanel_iconPath". The value of "ptzPanel_iconPrefix" is prepend to the icon filename.
+ Own extensions of the PTZ-control panel can be done using the attributes "ptzPanel_row05" to "ptzPanel_row09".
+ For creation of own icons a template is provided in the SVN:
+ contrib/sscam/black_btn_CAM_Template.pdn. This
+ template can be edited by e.g. Paint.Net.
+
+ Note:
+ For an empty field please use ":CAMBLANK.png" respectively ":CAMBLANK.png,:CAMBLANK.png,:CAMBLANK.png,..." for an empty
+ line.
+
+
+
+ Example:
+ attr <name> ptzPanel_row00 move upleft:CAMUPLEFTFAST.png,:CAMBLANK.png,move up:CAMUPFAST.png,:CAMBLANK.png,move upright:CAMUPRIGHTFAST.png
+ # The command "move upleft" is transmitted to the camera by pressing the button(icon) "CAMUPLEFTFAST.png".
+
+
+
+
+ - ptzPanel_use
+ Switch the usage of a PTZ-control panel in detail view respectively a created StreamDevice off or on
+ (default: on).
+
+ - rectime
+ determines the recordtime when a recording starts. If rectime = 0 an endless recording will be started. If
+ it isn't defined, the default recordtime of 15s is activated
+
+ - recextend
+ "rectime" of a started recording will be set new. Thereby the recording time of the running recording will be
+ extended
+
+ - session
+ selection of login-Session. Not set or set to "DSM" -> session will be established to DSM (Sdefault).
+ "SurveillanceStation" -> session will be established to SVS
+
+ - simu_SVSversion
+ simulates another SVS version. (only a lower version than the installed one is possible !)
+
+ - snapGalleryBoost
+ If set, the last snapshots (default 3) will be retrieved by Polling, will be stored in the FHEM-servers main memory
+ and can be displayed by the "set/get ... snapGallery" command.
+ This mode is helpful if many or full size images shall be displayed.
+ If the attribute is set, you can't specify arguments in addition to the "set/get ... snapGallery" command.
+ (see also attribut "snapGalleryNumber")
+
+ - snapGalleryColumns
+ The number of snapshots which shall appear in one row of the gallery popup (default 3).
+
+ - snapGalleryHtmlAttr
+ the image parameter can be controlled by this attribute.
+ If the attribute isn't set, the value of attribute "htmlattr" will be used.
+ If "htmlattr" is also not set, default parameters are used instead (width="500" height="325").
+
+
+ Example:
+ attr <name> snapGalleryHtmlAttr width="325" height="225"
+
+
+
+
+ - snapGalleryNumber
+ The number of snapshots to retrieve (default 3).
+
+ - snapGallerySize
+ By this attribute the quality of the snapshot images can be controlled (default "Icon").
+ If mode "Full" is set, the images are retrieved with their original available resolution. That requires more ressources
+ and may slow down the display. By setting attribute "snapGalleryBoost=1" the display may accelerated, because in that case
+ the images will be retrieved by continuous polling and need only bring to display.
+
+ - showStmInfoFull
+ additional stream informations like LiveStreamUrl, StmKeyUnicst, StmKeymjpegHttp will be created
+
+ - showPassInLog
+ if set the used password will be shown in logfile with verbose 4. (default = 0)
+
+ - videofolderMap
+ replaces the content of reading "VideoFolder", Usage if e.g. folders are mountet with different names than original
+ (SVS)
+
+ - verbose
+
+
+ Different Verbose-Level are supported.
+ Those are in detail:
+
+
+
+ 0 | - Start/Stop-Event will be logged |
+ 1 | - Error messages will be logged |
+ 2 | - messages according to important events were logged |
+ 3 | - sended commands will be logged |
+ 4 | - sended and received informations will be logged |
+ 5 | - all outputs will be logged for error-analyses. Caution: a lot of data could be written into logfile ! |
+
+
+
+ - readingFnAttributes
+
+
+
+
+
+
+Readings
+
+
+ Using the polling mechanism or retrieval by "get"-call readings are provieded, The meaning of the readings are listed in subsequent table:
+ The transfered Readings can be deversified dependend on the type of camera.
+
+
+
+ - CamAudioType
| - Indicating audio type |
+ - Availability
| - Availability of Camera (disabled, enabled, disconnected, other) |
+ - CamEventNum
| - delivers the total number of in SVS registered events of the camera |
+ - CamExposureControl
| - indicating type of exposure control |
+ - CamExposureMode
| - current exposure mode (Day, Night, Auto, Schedule, Unknown) |
+ - CamForceEnableMulticast
| - Is the camera forced to enable multicast. |
+ - CamIP
| - IP-Address of Camera |
+ - CamLastRec
| - Path / name of the last recording |
+ - CamLastRecTime
| - date / starttime / endtime of the last recording |
+ - CamLiveFps
| - Frames per second of Live-Stream |
+ - CamLiveMode
| - Source of Live-View (DS, Camera) |
+ - camLiveQuality
| - Live-Stream quality set in SVS |
+ - camLiveResolution
| - Live-Stream resolution set in SVS |
+ - camLiveStreamNo
| - used Stream-number for Live-Stream |
+ - CamModel
| - Model of camera |
+ - CamMotDetSc
| - state of motion detection source (disabled, by camera, by SVS) and their parameter |
+ - CamNTPServer
| - set time server |
+ - CamPort
| - IP-Port of Camera |
+ - CamPreRecTime
| - Duration of Pre-Recording (in seconds) adjusted in SVS |
+ - CamPtSpeed
| - adjusted value of Pan/Tilt-activities (setup in SVS) |
+ - CamRecShare
| - shared folder on disk station for recordings |
+ - CamRecVolume
| - Volume on disk station for recordings |
+ - CamStreamFormat
| - the current format of video streaming |
+ - CamVideoType
| - Indicating video type |
+ - CamVendor
| - Identifier of camera producer |
+ - CamVideoFlip
| - Is the video flip |
+ - CamVideoMirror
| - Is the video mirror |
+ - CamVideoRotate
| - Is the video rotate |
+ - CapAudioOut
| - Capability to Audio Out over Surveillance Station (false/true) |
+ - CapChangeSpeed
| - Capability to various motion speed |
+ - CapPTZAbs
| - Capability to perform absolute PTZ action |
+ - CapPTZAutoFocus
| - Capability to perform auto focus action |
+ - CapPTZDirections
| - the PTZ directions that camera support |
+ - CapPTZFocus
| - mode of support for focus action |
+ - CapPTZHome
| - Capability to perform home action |
+ - CapPTZIris
| - mode of support for iris action |
+ - CapPTZObjTracking
| - Capability to perform objekt-tracking |
+ - CapPTZPan
| - Capability to perform pan action |
+ - CapPTZPresetNumber
| - The maximum number of preset supported by the model. 0 stands for preset incapability |
+ - CapPTZTilt
| - mode of support for tilt action |
+ - CapPTZZoom
| - Capability to perform zoom action |
+ - DeviceType
| - device type (Camera, Video_Server, PTZ, Fisheye) |
+ - Error
| - message text of last error |
+ - Errorcode
| - error code of last error |
+ - HomeModeState
| - HomeMode-state (SVS-version 8.1.0 and above) |
+ - LastLogEntry
| - the neweset entry of Surveillance Station Log (only if SVS-device and if attribute pollcaminfoall is set) |
+ - LastSnapFilename
| - the filename of the last snapshot |
+ - LastSnapId
| - the ID of the last snapshot |
+ - LastSnapTime
| - timestamp of the last snapshot |
+ - LastUpdateTime
| - date / time the last update of readings by "caminfoall" |
+ - LiveStreamUrl
| - the livestream URL if stream is started (is shown if attribute "showStmInfoFull" is set) |
+ - Patrols
| - in Synology Surveillance Station predefined patrols (at PTZ-Cameras) |
+ - PollState
| - shows the state of automatic polling |
+ - PresetHome
| - Name of Home-position (at PTZ-Cameras) |
+ - Presets
| - in Synology Surveillance Station predefined Presets (at PTZ-Cameras) |
+ - Record
| - if recording is running = Start, if no recording is running = Stop |
+ - StmKey
| - current streamkey. it can be used to open livestreams without session id |
+ - StmKeyUnicst
| - Uni-cast stream path of the camera. (attribute "showStmInfoFull" has to be set) |
+ - StmKeymjpegHttp
| - Mjpeg stream path(over http) of the camera (attribute "showStmInfoFull" has to be set) |
+ - SVScustomPortHttp
| - Customized port of Surveillance Station (HTTP) (to get with "svsinfo") |
+ - SVScustomPortHttps
| - Customized port of Surveillance Station (HTTPS) (to get with "svsinfo") |
+ - SVSlicenseNumber
| - The total number of installed licenses (to get with "svsinfo") |
+ - SVSuserPriv
| - The effective rights of the user used for log in (to get with "svsinfo") |
+ - SVSversion
| - package version of the installed Surveillance Station (to get with "svsinfo") |
+ - UsedSpaceMB
| - used disk space of recordings by Camera |
+ - VideoFolder
| - Path to the recorded video |
+ - compstate
| - state of compatibility (compares current/simulated SVS-version with Internal COMPATIBILITY) |
+
+
+
+
+
+
+
+
+=end html
+=begin html_DE
+
+
+SSCam
+
+ Mit diesem Modul können Operationen von in der Synology Surveillance Station (SVS) definierten Kameras und Funktionen
+ der SVS ausgeführt werden. Es basiert auf der SVS API und unterstützt die SVS ab Version 7.
+ Zur Zeit werden folgende Funktionen unterstützt:
+
+
+ - Start einer Aufnahme
+ - Stop einer Aufnahme (per Befehl bzw. automatisch nach Ablauf der Aufnahmedauer)
+ - Aufnehmen eines Schnappschusses und Ablage in der Synology Surveillance Station
+ - Deaktivieren einer Kamera in Synology Surveillance Station
+ - Aktivieren einer Kamera in Synology Surveillance Station
+ - Steuerung der Belichtungsmodi Tag, Nacht bzw. Automatisch
+ - Umschaltung der Ereigniserkennung durch Kamera, durch SVS oder deaktiviert
+ - steuern der Erkennungsparameterwerte Empfindlichkeit, Schwellwert, Objektgröße und Prozentsatz für Auslösung
+ - Abfrage von Kameraeigenschaften (auch mit Polling) sowie den Eigenschaften des installierten SVS-Paketes
+ - Bewegen an eine vordefinierte Preset-Position (bei PTZ-Kameras)
+ - Start einer vordefinierten Überwachungstour (bei PTZ-Kameras)
+ - Positionieren von PTZ-Kameras zu absoluten X/Y-Koordinaten
+ - kontinuierliche Bewegung von PTZ-Kameras
+ - auslösen externer Ereignisse 1-10 (Aktionsregel SVS)
+ - starten und beenden von Kamera-Livestreams incl. Audiowiedergabe, anzeigen der letzten Aufnahme oder des letzten Schnappschusses
+ - Abruf und Ausgabe der Kamera Streamkeys sowie Stream-Urls (Nutzung von Kamera-Livestreams ohne Session Id)
+ - abspielen der letzten Aufnahme bzw. Anzeige des letzten Schnappschusses
+ - anzeigen der gespeicherten Anmeldeinformationen (Credentials)
+ - Ein- bzw. Ausschalten des Surveillance Station HomeMode und abfragen des HomeMode-Status
+ - abrufen des Surveillance Station Logs, auswerten des neuesten Eintrags als Reading
+ - erzeugen einer Gallerie der letzten 1-10 Schnappschüsse (als Popup oder permanentes Device)
+ - Start bzw. Stop Objekt Tracking (nur unterstützte PTZ-Kameras mit dieser Fähigkeit)
+ - Setzen/Löschen eines Presets (bei PTZ-Kameras)
+ - Setzen der Home-Position (bei PTZ-Kameras)
+ - erstellen eines Paneels zur Kamera-Steuerung. (bei PTZ-Kameras)
+ - erzeugen unterschiedlicher Typen von separaten Streaming-Devices (createStreamDev)
+
+
+
+
+ Die Aufnahmen stehen in der Synology Surveillance Station (SVS) zur Verfügung und unterliegen, wie jede andere Aufnahme, den in der Synology Surveillance Station eingestellten Regeln.
+ So werden zum Beispiel die Aufnahmen entsprechend ihrer Archivierungsfrist gespeichert und dann gelöscht.
+
+ Wenn sie über dieses Modul diskutieren oder zur Verbesserung des Moduls beitragen möchten, ist im FHEM-Forum ein Sammelplatz unter:
+ 49_SSCam: Fragen, Hinweise, Neuigkeiten und mehr rund um dieses Modul.
+
+ Weitere Infomationen zum Modul sind im FHEM-Wiki zu finden:
+ SSCAM - Steuerung von Kameras in Synology Surveillance Station.
+
+
+ Vorbereitung
+
+
+ Dieses Modul nutzt das Perl-Modul JSON.
+ Auf Debian-Linux basierenden Systemen kann es installiert werden mit:
+
+ sudo apt-get install libjson-perl
+
+ Das Modul verwendet für HTTP-Calls die nichtblockierenden Funktionen von HttpUtils bzw. HttpUtils_NonblockingGet.
+ Im DSM bzw. der Synology Surveillance Station muß ein Nutzer angelegt sein. Die Zugangsdaten werden später über ein Set-Kommando dem angelegten Gerät zugewiesen.
+ Nähere Informationen dazu unter Credentials
+
+ Überblick über die Perl-Module welche von SSCam genutzt werden:
+
+ JSON
+ Data::Dumper
+ MIME::Base64
+ Time::HiRes
+ HttpUtils (FHEM-Modul)
+
+
+
+Definition
+
+
+ Bei der Definition wird zwischen einer Kamera-Definition und der Definition einer Surveillance Station (SVS), d.h.
+ der Applikation selbst auf der Diskstation, unterschieden.
+ Abhängig von der Art des definierten Devices wird das Internal MODEL auf "<Hersteller> - <Kameramodell>" oder
+ SVS gesetzt und eine passende Teilmenge der beschriebenen set/get-Befehle dem Device zugewiesen.
+ Der Gültigkeitsbereich von set/get-Befehlen ist nach dem jeweiligen Befehl angegeben "gilt für CAM, SVS, CAM/SVS".
+
+
+ Eine Kamera wird definiert mit:
+
+ define <Name> SSCAM <Kameraname in SVS> <ServerAddr> [Port] [Protocol]
+
+
+ Zunächst muß diese Kamera in der Synology Surveillance Station 7.0 oder höher eingebunden sein und entsprechend
+ funktionieren.
+
+ Ein SVS-Device zur Steuerung von Funktionen der Surveillance Station wird definiert mit:
+
+ define <Name> SSCAM SVS <ServerAddr> [Port] [Protocol]
+
+
+ In diesem Fall wird statt <Kameraname in SVS> nur SVS angegeben.
+
+ Das Modul SSCam basiert auf Funktionen der Synology Surveillance Station API.
+
+ Die Parameter beschreiben im Einzelnen:
+
+
+
+
+
+ Name | der Name des neuen Gerätes in FHEM |
+ Kameraname | Kameraname wie er in der Synology Surveillance Station angegeben ist für Kamera-Device, "SVS" für SVS-Device. Leerzeichen im Namen sind nicht erlaubt. |
+ ServerAddr | die IP-Addresse des Synology Surveillance Station Host. Hinweis: Es sollte kein Servername verwendet werden weil DNS-Aufrufe in FHEM blockierend sind. |
+ Port | optional - der Port der Synology Disc Station. Wenn nicht angegeben, wird der Default-Port "5000" genutzt |
+ Protocol | optional - das Protokoll (http oder https) zum Funktionsaufruf. Wenn nicht angegeben, wird der Default "http" genutzt |
+
+
+
+
+ Beispiel:
+
+ define CamCP SSCAM Carport 192.168.2.20 [5000] [http]
+ define CamCP SSCAM Carport 192.168.2.20 [5001] [https]
+ # erstellt ein neues Kamera-Device CamCP
+
+ define DS1 SSCAM SVS 192.168.2.20 [5000] [http]
+ define DS1 SSCAM SVS 192.168.2.20 [5001] [https]
+ # erstellt ein neues SVS-Device DS1
+
+
+ Wird eine neue Kamera definiert, wird diesem Device zunächst eine Standardaufnahmedauer von 15 zugewiesen.
+ Über das Attribut "rectime" kann die Aufnahmedauer für jede Kamera individuell angepasst werden. Der Wert "0" für "rectime" führt zu einer Endlosaufnahme, die durch "set <name> off" wieder gestoppt werden muß.
+ Ein Logeintrag mit einem entsprechenden Hinweis auf diesen Umstand wird geschrieben.
+
+ Wird das Attribut "rectime" gelöscht, greift wieder der Default-Wert (15s) für die Aufnahmedauer.
+
+ Mit dem Befehl "set <name> on [rectime]" wird die Aufnahmedauer temporär festgelegt und überschreibt einmalig sowohl den Defaultwert als auch den Wert des gesetzten Attributs "rectime".
+ Auch in diesem Fall führt "set <name> on 0" zu einer Daueraufnahme.
+
+ Eine eventuell in der SVS eingestellte Dauer der Voraufzeichnung wird weiterhin berücksichtigt.
+
+ Erkennt das Modul die definierte Kamera als PTZ-Device (Reading "DeviceType = PTZ"), wird automatisch ein
+ Steuerungspaneel in der Detailansicht erstellt. Dieses Paneel setzt SVS >= 7.1 voraus. Die Eigenschaften und das
+ Verhalten des Paneels können mit den Attributen "ptzPanel_.*" beeinflusst werden.
+ Siehe dazu auch den Befehl "set <name> createPTZcontrol".
+
+
+
+
+
+ Credentials
+
+
+ Nach dem Definieren des Gerätes müssen zuerst die Zugangsparameter gespeichert werden. Das geschieht mit dem Befehl:
+
+
+ set <name> credentials <Username> <Passwort>
+
+
+ Die Passwortlänge beträgt maximal 20 Zeichen.
+ Der Anwender kann in Abhängigkeit der beabsichtigten einzusetzenden Funktionen einen Nutzer im DSM bzw. in der Surveillance Station einrichten.
+ Ist der DSM-Nutzer der Gruppe Administratoren zugeordnet, hat er auf alle Funktionen Zugriff. Ohne diese Gruppenzugehörigkeit können nur Funktionen mit niedrigeren
+ Rechtebedarf ausgeführt werden. Die benötigten Mindestrechte der Funktionen sind in der Tabelle weiter unten aufgeführt.
+
+ Alternativ zum DSM-Nutzer kann ein in der SVS angelegter Nutzer verwendet werden. Auch in diesem Fall hat ein Nutzer vom Typ Manager das Recht alle Funktionen
+ auszuführen, wobei der Zugriff auf bestimmte Kameras/ im Privilegienprofil beschränkt werden kann (siehe Hilfefunktion in SVS).
+ Als Best Practice wird vorgeschlagen jeweils einen User im DSM und einen in der SVS anzulegen:
+
+
+ - DSM-User als Mitglied der Admin-Gruppe: uneingeschränkter Test aller Modulfunktionen -> session:DSM
+ - SVS-User als Manager oder Betrachter: angepasstes Privilegienprofil -> session: SurveillanceStation
+
+
+
+ Über das Attribut "session" kann ausgewählt werden, ob die Session mit dem DSM oder der SVS augebaut werden soll.
+ Erfolgt der Session-Aufbau mit dem DSM, stehen neben der SVS Web-API auch darüber hinaus gehende API-Zugriffe zur Verfügung die unter Umständen zur Verarbeitung benötigt werden.
+
+ Nach der Gerätedefinition ist die Grundeinstellung "Login in das DSM", d.h. es können Credentials mit Admin-Berechtigungen genutzt werden um zunächst alle
+ Funktionen der Kameras testen zu können. Danach können die Credentials z.B. in Abhängigkeit der benötigten Funktionen auf eine SVS-Session mit entsprechend beschränkten Privilegienprofil umgestellt werden.
+
+ Die nachfolgende Aufstellung zeigt die Mindestanforderungen der jeweiligen Modulfunktionen an die Nutzerrechte.
+
+
+
+ - set ... credentials
| - |
+ - set ... delPreset
| session: ServeillanceStation - Betrachter |
+ - set ... disable
| session: ServeillanceStation - Manager |
+ - set ... enable
| session: ServeillanceStation - Manager |
+ - set ... expmode
| session: ServeillanceStation - Manager |
+ - set ... extevent
| session: DSM - Nutzer Mitglied von Admin-Gruppe |
+ - set ... goPreset
| session: ServeillanceStation - Betrachter mit Privileg Objektivsteuerung der Kamera |
+ - set ... homeMode
| session: ServeillanceStation - Betrachter mit Privileg Home-Modus schalten |
+ - set ... goAbsPTZ
| session: ServeillanceStation - Betrachter mit Privileg Objektivsteuerung der Kamera |
+ - set ... move
| session: ServeillanceStation - Betrachter mit Privileg Objektivsteuerung der Kamera |
+ - set ... motdetsc
| session: ServeillanceStation - Manager |
+ - set ... on
| session: ServeillanceStation - Betrachter mit erweiterten Privileg "manuelle Aufnahme" |
+ - set ... off
| session: ServeillanceStation - Betrachter mit erweiterten Privileg "manuelle Aufnahme" |
+ - set ... runView
| session: ServeillanceStation - Betrachter mit Privileg Liveansicht für Kamera |
+ - set ... runPatrol
| session: ServeillanceStation - Betrachter mit Privileg Objektivsteuerung der Kamera |
+ - set ... setHome
| session: ServeillanceStation - Betrachter |
+ - set ... setPreset
| session: ServeillanceStation - Betrachter |
+ - set ... snap
| session: ServeillanceStation - Betrachter |
+ - set ... snapGallery
| session: ServeillanceStation - Betrachter |
+ - set ... stopView
| - |
+ - get ... caminfo[all]
| session: ServeillanceStation - Betrachter |
+ - get ... eventlist
| session: ServeillanceStation - Betrachter |
+ - get ... listLog
| session: ServeillanceStation - Betrachter |
+ - get ... listPresets
| session: ServeillanceStation - Betrachter |
+ - get ... scanVirgin
| session: ServeillanceStation - Betrachter |
+ - get ... svsinfo
| session: ServeillanceStation - Betrachter |
+ - get ... snapfileinfo
| session: ServeillanceStation - Betrachter |
+ - get ... snapGallery
| session: ServeillanceStation - Betrachter |
+ - get ... snapinfo
| session: ServeillanceStation - Betrachter |
+ - get ... stmUrlPath
| session: ServeillanceStation - Betrachter |
+
+
+
+
+
+
+ HTTP-Timeout setzen
+
+ Alle Funktionen dieses Moduls verwenden HTTP-Aufrufe gegenüber der SVS Web API.
+ Der Standardwert für den HTTP-Timeout beträgt 4 Sekunden. Durch Setzen des Attributes "httptimeout" > 0 kann dieser Wert bei Bedarf entsprechend den technischen Gegebenheiten angepasst werden.
+
+
+
+
+
+
+Set
+
+
+ Die aufgeführten set-Befehle sind für CAM/SVS-Devices oder nur für CAM-Devices bzw. nur für SVS-Devices gültig. Sie stehen im
+ Drop-Down-Menü des jeweiligen Devices zur Auswahl zur Verfügung.
+
+
+
+ - set <name> createStreamDev [generic | mjpeg | switched] (gilt für CAM)
+
+ Es wird ein separates Streaming-Device (Typ SSCamSTRM) erstellt. Dieses Device kann z.B. als separates Device
+ in einem Dashboard genutzt werden.
+ Dem Streaming-Device wird der aktuelle Raum des Kameradevice zugewiesen sofern dort gesetzt.
+
+
+
+
+
+ generic | - das Streaming-Device gibt einen durch das Attribut "genericStrmHtmlTag" bestimmten Content wieder |
+ mjpeg | - das Streaming-Device gibt einen permanenten MJPEG Kamerastream wieder (Streamkey Methode) |
+ switched | - Wiedergabe unterschiedlicher Streamtypen. Drucktasten zur Steuerung werden angeboten. |
+
+
+
+
+ Die Gestaltung kann durch HTML-Tags im Attribut "htmlattr" im Kameradevice oder mit den
+ spezifischen Attributen im Streaming-Device beeinflusst werden.
+ Soll ein HLS-Stream im Streaming-Device vom Typ "switched" gestartet werden, muss die Kamera in der Synology Surveillance Station
+ auf das Videoformat H.264 eingestellt und HLS von der eingesetzten SVS-Version unterstützt sein.
+ Diese Auswahltaste wird deshalb im nur im Streaming-Device angeboten wenn das Reading "CamStreamFormat = HLS" beinhaltet.
+ HLS (HTTP Live Streaming) kann momentan nur auf Mac Safari oder mobilen iOS/Android-Geräten wiedergegeben werden.
+ Im "switched"-Device werden Drucktasten zur Steuerung des zu startenden Medientyps angeboten.
+ Ein Streaming-Device vom Typ "generic" benötigt die Angabe von HTML-Tags im Attribut "genericStrmHtmlTag". Diese Tags
+ spezifizieren den wiederzugebenden Content.
+
+
+attr <name> genericStrmHtmlTag <video $HTMLATTR controls autoplay>
+ <source src='http://192.168.2.10:32000/$NAME.m3u8' type='application/x-mpegURL'>
+ </video>
+
+ Die Variablen $HTMLATTR, $NAME sind Platzhalter und übernehmen ein gesetztes Attribut "htmlattr" bzw. den SSCam-Devicenamen.
+
+
+
+
+
+ - set <name> createPTZcontrol (gilt für PTZ-CAM)
+
+ Es wird ein separates PTZ-Steuerungspaneel (Type SSCamSTRM) erstellt. Es wird der aktuelle Raum des Kameradevice
+ zugewiesen sofern dort gesetzt.
+ Mit den "ptzPanel_.*"-Attributen bzw. den spezifischen Attributen des erzeugten
+ SSCamSTRM-Devices können die Eigenschaften des PTZ-Paneels beeinflusst werden.
+
+
+
+
+ - set <name> createSnapGallery (gilt für CAM)
+
+ Es wird eine Schnappschußgallerie als separates Device (Type SSCamSTRM) erzeugt. Das Device wird im Raum
+ "SnapGallery" erstellt.
+ Mit den "snapGallery..."-Attributen bzw. den spezifischen Attributen des erzeugten SSCamSTRM-Devices
+ können die Eigenschaften der Schnappschußgallerie beeinflusst werden.
+
+
+
+
+ - set <name> credentials <username> <password> (gilt für CAM/SVS)
+
+ Setzt Username / Passwort für den Zugriff auf die Synology Surveillance Station.
+ Siehe Credentials
+
+
+
+
+
+ - set <name> delPreset <PresetName> (gilt für PTZ-CAM)
+
+ Löscht einen Preset "<PresetName>". Im FHEMWEB wird eine Drop-Down Liste der aktuell vorhandenen
+ Presets angeboten.
+
+
+
+
+
+ - set <name> [enable|disable] (gilt für CAM)
+
+ Aktviviert / deaktiviert eine Kamera.
+ Um eine Liste von Kameras oder alle Kameras (mit Regex) zum Beispiel um 21:46 zu deaktivieren / zu aktivieren zwei Beispiele mit at:
+
+ define a13 at 21:46 set CamCP1,CamFL,CamHE1,CamTER disable (enable)
+ define a14 at 21:46 set Cam.* disable (enable)
+
+
+ Etwas komfortabler gelingt das Schalten aller Kameras über einen Dummy. Zunächst wird der Dummy angelegt:
+
+ define allcams dummy
+ attr allcams eventMap on:enable off:disable
+ attr allcams room Cams
+ attr allcams webCmd enable:disable
+
+
+ Durch Verknüpfung mit zwei angelegten notify, jeweils ein notify für "enable" und "disable", kann man durch Schalten des Dummys auf "enable" bzw. "disable" alle Kameras auf einmal aktivieren bzw. deaktivieren.
+
+ define all_cams_disable notify allcams:.*off set CamCP1,CamFL,CamHE1,CamTER disable
+ attr all_cams_disable room Cams
+
+ define all_cams_enable notify allcams:on set CamCP1,CamFL,CamHE1,CamTER enable
+ attr all_cams_enable room Cams
+
+
+
+
+
+ - set <name> expmode [day|night|auto] (gilt für CAM)
+
+ Mit diesem Befehl kann der Belichtungsmodus der Kameras gesetzt werden. Dadurch wird z.B. das Verhalten der Kamera-LED's entsprechend gesteuert.
+ Die erfolgreiche Umschaltung wird durch das Reading CamExposureMode ("get ... caminfoall") reportet.
+
+ Hinweis:
+ Die erfolgreiche Ausführung dieser Funktion ist davon abhängig ob die SVS diese Funktionalität der Kamera unterstützt.
+ Ist in SVS -> IP-Kamera -> Optimierung -> Belichtungsmodus das Feld für den Tag/Nachtmodus grau hinterlegt, ist nicht von einer lauffähigen Unterstützung dieser
+ Funktion auszugehen.
+
+
+
+
+ - set <name> extevent [ 1-10 ] (gilt für SVS)
+
+ Dieses Kommando triggert ein externes Ereignis (1-10) in der SVS.
+ Die Aktionen, die dieses Ereignis auslöst, sind zuvor in dem Aktionsregeleditor der SVS einzustellen. Es stehen die Ereignisse
+ 1-10 zur Verfügung.
+ In der Benachrichtigungs-App der SVS können auch Email, SMS oder Mobil (DS-Cam) Nachrichten ausgegeben werden wenn ein externes
+ Ereignis ausgelöst wurde.
+ Nähere Informationen dazu sind in der Hilfe zum Aktionsregeleditor zu finden.
+ Der verwendete User benötigt Admin-Rechte in einer DSM-Session.
+
+
+
+
+ - set <name> goAbsPTZ [ X Y | up | down | left | right ] (gilt für CAM)
+
+ Mit diesem Kommando wird eine PTZ-Kamera in Richtung einer wählbaren absoluten X/Y-Koordinate bewegt, oder zur maximalen Absolutposition in Richtung up/down/left/right.
+ Die Option ist nur für Kameras verfügbar die das Reading "CapPTZAbs=true" (die Fähigkeit für PTZAbs-Aktionen) besitzen. Die Eigenschaften der Kamera kann mit "get <name> caminfoall" abgefragt werden.
+
+
+ Beispiel für Ansteuerung absoluter X/Y-Koordinaten:
+
+
+ set <name> goAbsPTZ 120 450
+
+
+ Dieses Beispiel bewegt die Kameralinse in die Position X=120 und Y=450.
+ Der Wertebereich ist dabei:
+
+
+ X = 0 - 640 (0 - 319 bewegt nach links, 321 - 640 bewegt nach rechts, 320 bewegt die Linse nicht)
+ Y = 0 - 480 (0 - 239 bewegt nach unten, 241 - 480 bewegt nach oben, 240 bewegt die Linse nicht)
+
+
+ Die Linse kann damit in kleinsten bis sehr großen Schritten in die gewünschte Richtung bewegt werden.
+ Dieser Vorgang muß ggf. mehrfach wiederholt werden um die Kameralinse in die gewünschte Position zu bringen.
+
+ Soll die Bewegung mit der maximalen Schrittweite erfolgen, kann zur Vereinfachung der Befehl:
+
+
+ set <name> goAbsPTZ [up|down|left|right]
+
+
+ verwendet werden. Die Optik wird in diesem Fall mit der größt möglichen Schrittweite zur Absolutposition in der angegebenen Richtung bewegt.
+ Auch in diesem Fall muß der Vorgang ggf. mehrfach wiederholt werden um die Kameralinse in die gewünschte Position zu bringen.
+
+
+
+
+ - set <name> goPreset <Preset> (gilt für CAM)
+
+ Mit diesem Kommando können PTZ-Kameras in eine vordefininierte Position bewegt werden.
+ Die Preset-Positionen müssen dazu zunächst in der Synology Surveillance Station angelegt worden sein. Das geschieht in der PTZ-Steuerung im IP-Kamera Setup.
+ Die Presets werden über das Kommando "get <name> caminfoall" eingelesen (geschieht bei restart von FHEM automatisch). Der Einlesevorgang kann durch ein Kamerapolling
+ regelmäßig wiederholt werden. Ein langes Pollingintervall ist in diesem Fall empfehlenswert, da sich die Presetpositionen nur im Fall der Neuanlage bzw. Änderung verändern werden.
+
+
+ Hier ein Beispiel einer PTZ-Steuerung in Abhängigkeit eines IR-Melder Events:
+
+
+ define CamFL.Preset.Wandschrank notify MelderTER:on.* set CamFL goPreset Wandschrank, ;; define CamFL.Preset.record at +00:00:10 set CamFL on 5 ;;;; define s3 at +*{3}00:00:05 set CamFL snap ;; define CamFL.Preset.back at +00:00:30 set CamFL goPreset Home
+
+
+ Funktionsweise:
+ Der IR-Melder "MelderTER" registriert eine Bewegung. Daraufhin wird die Kamera CamFL in die Preset-Position "Wandschrank" gebracht. Eine Aufnahme mit Dauer von 5 Sekunden startet 10 Sekunden
+ später. Da die Voraufnahmezeit der Kamera 10s beträgt (vgl. Reading "CamPreRecTime"), startet die effektive Aufnahme wenn der Kameraschwenk beginnt.
+ Mit dem Start der Aufnahme werden drei Schnappschüsse im Abstand von 5 Sekunden angefertigt.
+ Nach einer Zeit von 30 Sekunden fährt die Kamera wieder zurück in die "Home"-Position.
+
+ Ein Auszug aus dem Log verdeutlicht den Ablauf:
+
+
+ 2016.02.04 15:02:14 2: CamFL - Camera Flur_Vorderhaus has moved to position "Wandschrank"
+ 2016.02.04 15:02:24 2: CamFL - Camera Flur_Vorderhaus Recording with Recordtime 5s started
+ 2016.02.04 15:02:29 2: CamFL - Snapshot of Camera Flur_Vorderhaus has been done successfully
+ 2016.02.04 15:02:30 2: CamFL - Camera Flur_Vorderhaus Recording stopped
+ 2016.02.04 15:02:34 2: CamFL - Snapshot of Camera Flur_Vorderhaus has been done successfully
+ 2016.02.04 15:02:39 2: CamFL - Snapshot of Camera Flur_Vorderhaus has been done successfully
+ 2016.02.04 15:02:44 2: CamFL - Camera Flur_Vorderhaus has moved to position "Home"
+
+
+
+
+
+ - set <name> homeMode [on|off] (gilt für SVS)
+
+ Schaltet den HomeMode der Surveillance Station ein bzw. aus.
+ Informationen zum HomeMode sind in der Synology Onlinehilfe
+ enthalten.
+
+
+
+
+ - set <name> motdetsc [camera|SVS|disable] (gilt für CAM)
+
+ Der Befehl "motdetsc" (steht für motion detection source) schaltet die Bewegungserkennung in den gewünschten Modus.
+ Wird die Bewegungserkennung durch die Kamera / SVS ohne weitere Optionen eingestellt, werden die momentan gültigen Bewegungserkennungsparameter der
+ Kamera / SVS beibehalten. Die erfolgreiche Ausführung der Operation lässt sich u.a. anhand des Status von SVS -> IP-Kamera -> Ereigniserkennung ->
+ Bewegung nachvollziehen.
+ Für die Bewegungserkennung durch SVS bzw. durch Kamera können weitere Optionen angegeben werden. Die verfügbaren Optionen bezüglich der Bewegungserkennung
+ durch SVS sind "Empfindlichkeit" und "Schwellwert".
+
+
+
+ set <name> motdetsc SVS [Empfindlichkeit] [Schwellwert] | # Befehlsmuster |
+ set <name> motdetsc SVS 91 30 | # setzt die Empfindlichkeit auf 91 und den Schwellwert auf 30 |
+ set <name> motdetsc SVS 0 40 | # behält gesetzten Wert für Empfindlichkeit bei, setzt Schwellwert auf 40 |
+ set <name> motdetsc SVS 15 | # setzt die Empfindlichkeit auf 15, Schwellwert bleibt unverändert |
+
+
+
+
+ Wird die Bewegungserkennung durch die Kamera genutzt, stehen die Optionen "Empfindlichkeit", "Objektgröße" und "Prozentsatz für Auslösung" zur Verfügung.
+
+
+
+ set <name> motdetsc camera [Empfindlichkeit] [Schwellwert] [Prozentsatz] | # Befehlsmuster |
+ set <name> motdetsc camera 89 0 20 | # setzt die Empfindlichkeit auf 89, Prozentsatz auf 20 |
+ set <name> motdetsc camera 0 40 10 | # behält gesetzten Wert für Empfindlichkeit bei, setzt Schwellwert auf 40, Prozentsatz auf 10 |
+ set <name> motdetsc camera 30 | # setzt die Empfindlichkeit auf 30, andere Werte bleiben unverändert |
+
+
+
+
+ Es ist immer die Reihenfolge der Optionswerte zu beachten. Nicht gewünschte Optionen sind mit "0" zu besetzen sofern danach Optionen folgen
+ deren Werte verändert werden sollen (siehe Beispiele oben). Der Zahlenwert der Optionen beträgt 1 - 99 (außer Sonderfall "0").
+
+ Die jeweils verfügbaren Optionen unterliegen der Funktion der Kamera und der Unterstützung durch die SVS. Es können jeweils nur die Optionen genutzt werden die in
+ SVS -> Kamera bearbeiten -> Ereigniserkennung zur Verfügung stehen. Weitere Infos sind der Online-Hilfe zur SVS zu entnehmen.
+
+ Über den Befehl "get <name> caminfoall" wird auch das Reading "CamMotDetSc" aktualisiert welches die gegenwärtige Einstellung der Bewegungserkennung dokumentiert.
+ Es werden nur die Parameter und Parameterwerte angezeigt, welche die SVS aktiv unterstützt. Die Kamera selbst kann weiterführende Einstellmöglichkeiten besitzen.
+
+ Beipiel:
+
+ CamMotDetSc SVS, sensitivity: 76, threshold: 55
+
+
+
+
+
+ - set <name> move [ right | up | down | left | dir_X ] [Sekunden] (gilt für CAM bis SVS Version 7.1)
+ set <name> move [ right | upright | up | upleft | left | downleft | down | downright ] [Sekunden] (gilt für CAM ab SVS Version 7.2)
+
+ Mit diesem Kommando wird eine kontinuierliche Bewegung der PTZ-Kamera gestartet. Neben den vier Grundrichtungen up/down/left/right stehen auch
+ Zwischenwinkelmaße "dir_X" zur Verfügung. Die Feinheit dieser Graduierung ist von der Kamera abhängig und kann dem Reading "CapPTZDirections" entnommen werden.
+
+ Das Bogenmaß von 360 Grad teilt sich durch den Wert von "CapPTZDirections" und beschreibt die Bewegungsrichtungen beginnend mit "0=rechts" entgegen dem
+ Uhrzeigersinn. D.h. bei einer Kamera mit "CapPTZDirections = 8" bedeutet dir_0 = rechts, dir_2 = oben, dir_4 = links, dir_6 = unten bzw. dir_1, dir_3, dir_5 und dir_7
+ die entsprechenden Zwischenrichtungen. Die möglichen Bewegungsrichtungen bei Kameras mit "CapPTZDirections = 32" sind dementsprechend kleinteiliger.
+
+ Im Gegensatz zum "set <name> goAbsPTZ"-Befehl startet der Befehl "set <name> move" eine kontinuierliche Bewegung bis ein Stop-Kommando empfangen wird.
+ Das Stop-Kommando wird nach Ablauf der optional anzugebenden Zeit [Sekunden] ausgelöst. Wird diese Laufzeit nicht angegeben, wird implizit Sekunde = 1 gesetzt.
+
+ Beispiele:
+
+
+ set <name> move up 0.5 : bewegt PTZ 0,5 Sek. (zzgl. Prozesszeit) nach oben
+ set <name> move dir_1 1.5 : bewegt PTZ 1,5 Sek. (zzgl. Prozesszeit) nach rechts-oben
+ set <name> move dir_20 0.7 : bewegt PTZ 1,5 Sek. (zzgl. Prozesszeit) nach links-unten ("CapPTZDirections = 32)"
+
+
+
+
+
+ - set <name> [on [<rectime>] | off] (gilt für CAM)
+
+ Der Befehl "set <name> on" startet eine Aufnahme. Die Standardaufnahmedauer beträgt 15 Sekunden. Sie kann mit dem
+ Attribut "rectime" individuell festgelegt werden.
+ Die im Attribut (bzw. im Standard) hinterlegte Aufnahmedauer kann einmalig mit "set <name> on <rectime>"
+ überschrieben werden.
+ Die Aufnahme stoppt automatisch nach Ablauf der Zeit "rectime".
+
+ Ein Sonderfall ist der Start einer Daueraufnahme mit "set <name> on 0" bzw. dem Attributwert "rectime = 0".
+ In diesem Fall wird eine Daueraufnahme gestartet, die explizit wieder mit dem Befehl "set <name> off" gestoppt
+ werden muß.
+
+ Das Aufnahmeverhalten kann weiterhin mit dem Attribut "recextend" beeinflusst werden.
+
+ Attribut "recextend = 0" bzw. nicht gesetzt (Standard):
+
+ - wird eine Aufnahme mit z.B. rectime=22 gestartet, wird kein weiterer Startbefehl für eine Aufnahme akzeptiert bis diese gestartete Aufnahme nach 22 Sekunden
+ beendet ist. Ein Hinweis wird bei verbose=3 im Logfile protokolliert.
+
+
+
+ Attribut "recextend = 1" gesetzt:
+
+ - eine zuvor gestartete Aufnahme wird bei einem erneuten "set on" -Befehl um die Aufnahmezeit "rectime" verlängert. Das bedeutet, dass der Timer für
+ den automatischen Stop auf den Wert "rectime" neu gesetzt wird. Dieser Vorgang wiederholt sich mit jedem Start-Befehl. Dadurch verlängert sich eine laufende
+ Aufnahme bis kein Start-Inpuls mehr registriert wird.
+
+ - eine zuvor gestartete Endlos-Aufnahme wird mit einem erneuten "set on"-Befehl nach der Aufnahmezeit "rectime" gestoppt (Timerneustart). Ist dies
+ nicht gewünscht, ist darauf zu achten dass bei der Verwendung einer Endlos-Aufnahme das Attribut "recextend" nicht verwendet wird.
+
+
+
+ Beispiele für einfachen Start/Stop einer Aufnahme:
+
+
+
+ set <name> on [rectime] | startet die Aufnahme der Kamera <name>, automatischer Stop der Aufnahme nach Ablauf der Zeit [rectime] (default 15s oder wie im Attribut "rectime" angegeben) |
+ set <name> off | stoppt die Aufnahme der Kamera <name> |
+
+
+
+
+
+ - set <name> optimizeParams [mirror:<value>] [flip:<value>] [rotate:<value>] [ntp:<value>] (gilt für CAM)
+
+ Setzt eine oder mehrere Eigenschaften für die Kamera. Das Video kann gespiegelt (mirror), auf den Kopf gestellt (flip) oder
+ gedreht (rotate) werden. Die jeweiligen Eigenschaften müssen von der Kamera unterstützt werden. Mit "ntp" wird der Zeitserver
+ eingestellt den die Kamera zur Zeitsynchronisation verwendet.
+
+ <value> kann sein für:
+
+ - mirror, flip, rotate: true | false
+ - ntp: der Name oder die IP-Adresse des Zeitservers
+
+
+
+ Beispiele:
+ set <name> optimizeParams mirror:true flip:true ntp:time.windows.com
+ # Das Bild wird gespiegelt, auf den Kopf gestellt und der Zeitserver auf "time.windows.com" eingestellt.
+ set <name> optimizeParams ntp:Surveillance%20Station
+ # Die Surveillance Station wird als Zeitserver eingestellt. (NTP-Dienst muss im DSM aktiviert sein)
+ set <name> optimizeParams mirror:true flip:false rotate:true
+ # Das Bild wird gespiegelt und um 90 Grad gedreht.
+
+
+
+
+
+ - set <name> runPatrol <Patrolname> (gilt für CAM)
+
+ Dieses Kommando startet die vordefinierterte Überwachungstour einer PTZ-Kamera.
+ Die Überwachungstouren müssen dazu zunächst in der Synology Surveillance Station angelegt worden sein.
+ Das geschieht in der PTZ-Steuerung im IP-Kamera Setup -> PTZ-Steuerung -> Überwachung.
+ Die Überwachungstouren (Patrols) werden über das Kommando "get <name> caminfoall" eingelesen, welches beim Restart von FHEM automatisch abgearbeitet wird.
+ Der Einlesevorgang kann durch ein Kamerapolling regelmäßig wiederholt werden. Ein langes Pollingintervall ist in diesem Fall empfehlenswert, da sich die
+ Überwachungstouren nur im Fall der Neuanlage bzw. Änderung verändern werden.
+ Nähere Informationen zur Anlage von Überwachungstouren sind in der Hilfe zur Surveillance Station enthalten.
+
+
+
+
+ - set <name> runView [live_fw | live_fw_hls | live_link | live_open [<room>] | lastrec_fw | lastrec_fw_MJPEG | lastrec_fw_MPEG4/H.264 | lastrec_open [<room>] | lastsnap_fw] (gilt für CAM)
+
+
+
+
+ live_fw | - MJPEG-LiveStream. Audiowiedergabe wird mit angeboten wenn verfügbar. |
+ live_fw_hls | - HLS-LiveStream (aktuell nur Mac Safari und mobile iOS/Android-Geräte) |
+ live_link | - Link zu einem MJPEG-Livestream |
+ live_open [<room>] | - öffnet MJPEG-Stream in separatem Browser-Fenster |
+ lastrec_fw | - letzte Aufnahme als iFrame Objekt |
+ lastrec_fw_MJPEG | - nutzbar wenn Aufnahme im Format MJPEG vorliegt |
+ lastrec_fw_MPEG4/H.264 | - nutzbar wenn Aufnahme im Format MPEG4/H.264 vorliegt |
+ lastrec_open [<room>] | - letzte Aufnahme wird in separatem Browser-Fenster geöffnet |
+ lastsnap_fw | - letzter Schnappschuss wird dargestellt |
+
+
+
+
+ Mit "live_fw, live_link, live_open" wird ein MJPEG-Livestream, entweder als eingebettetes Image
+ oder als generierter Link, gestartet.
+ Der Befehl "live_open" öffnet ein separates Browserfenster mit dem MJPEG-Livestream. Wird dabei optional der Raum mit
+ angegeben, wird das Browserfenster nur dann gestartet, wenn dieser Raum aktuell im Browser geöffnet ist.
+ Soll mit "live_fw_hls" ein HLS-Stream verwendet werden, muss die Kamera in der Synology Surveillance Station auf
+ das Videoformat H.264 (nicht MJPEG) eingestellt und HLS durch die eingesetzte SVS-Version unterstützt sein.
+ Diese Möglichkeit wird deshalb nur dann angeboten wenn das Reading "CamStreamFormat" den Wert "HLS" hat.
+
+
+ Der Zugriff auf die letzte Aufnahme einer Kamera kann über die Optionen "lastrec_fw.*" bzw. "lastrec_open" erfolgen.
+ Bei Verwendung von "lastrec_fw.*" wird die letzte Aufnahme als eingebettetes iFrame-Objekt abgespielt. Es werden entsprechende
+ Steuerungselemente zur Wiedergabegeschwindigkeit usw. angeboten wenn verfügbar.
+
+ Der Befehl "set <name> runView lastsnap_fw" zeigt den letzten Schnappschuss der Kamera eingebettet an.
+ Durch Angabe des optionalen Raumes bei "lastrec_open" erfolgt die gleiche Einschränkung wie bei "live_open".
+ Die Gestaltung der Fenster im FHEMWEB kann durch HTML-Tags im Attribut "htmlattr" beeinflusst werden.
+
+
+ Beispiel:
+
+ attr <name> htmlattr width="500" height="375"
+ attr <name> htmlattr width="500" height="375" top="200" left="300"
+
+
+ Wird der Stream als live_fw gestartet, ändert sich die Größe entsprechend der Angaben von Width und Hight.
+ Das Kommando "set <name> runView live_open" startet den Livestreamlink sofort in einem neuen
+ Browserfenster.
+ Dabei wird für jede aktive FHEMWEB-Session eine Fensteröffnung initiiert. Soll dieses Verhalten geändert werden, kann
+ "set <name> runView live_open <room>" verwendet werden um das Öffnen des Browserfensters in einem
+ beliebigen, in einer FHEMWEB-Session aktiven Raum "<room>", zu initiieren.
+ Das gesetzte Attribut "livestreamprefix" überschreibt im Reading "LiveStreamUrl"
+ die Angaben für Protokoll, Servername und Port. Damit kann z.B. die LiveStreamUrl für den Versand und externen Zugriff
+ auf die SVS modifiziert werden.
+
+ Beispiel:
+
+ attr <name> livestreamprefix https://<Servername>:<Port>
+
+
+ Der Livestream wird über das Kommando "set <name> stopView" wieder beendet.
+ Die "runView" Funktion schaltet ebenfalls Streaming-Devices vom Typ "switched" in den entsprechenden Modus.
+
+ Abhängig vom wiedergegebenen Content werden unterschiedliche Steuertasten angeboten:
+
+
+
+ Start Recording | - startet eine Endlosaufnahme |
+ Stop Recording | - stoppt eine Aufnahme |
+ Take Snapshot | - löst einen Schnappschuß aus |
+ Switch off | - stoppt eine laufende Wiedergabe |
+
+
+
+
+ Hinweis zu HLS (HTTP Live Streaming):
+ Das Video startet mit einer technologisch bedingten Verzögerung. Jeder Stream wird in eine Reihe sehr kleiner Videodateien
+ (mit etwa 10 Sekunden Länge) segmentiert und an den Client ausgeliefert.
+ Die Kamera muss in der SVS auf das Videoformat H.264 eingestellt sein und nicht jeder Kameratyp ist gleichermassen für
+ HLS-Streaming geeignet.
+ Momentan kann HLS nur durch den Mac Safari Browser sowie auf mobilen iOS/Android-Geräten wiedergegeben werden.
+
+
+
+
+
+
+ - set <name> setHome <PresetName> (gilt für PTZ-CAM)
+
+ Setzt die Home-Position der Kamera auf einen vordefinierten Preset "<PresetName>" oder auf die aktuell angefahrene
+ Position.
+
+
+
+
+
+ - set <name> setPreset <PresetNummer> [<PresetName>] [<Speed>] (gilt für PTZ-CAM)
+
+ Setzt einen Preset mit dem Namen "<PresetName>" auf die aktuell angefahrene Position der Kamera. Optional kann die
+ Geschwindigkeit angegeben werden (<Speed>). Ist kein PresetName angegeben, wird die PresetNummer als Name verwendet.
+ Aus diesem Grund ist <PresetName> optional definiert, sollte jedoch im Normalfall gesetzt werden.
+
+
+
+
+
+ - set <name> snap (gilt für CAM)
+
+ Ein Schnappschuß kann ausgelöst werden mit:
+
+ set <name> snap
+
+
+ Nachfolgend einige Beispiele für die Auslösung von Schnappschüssen.
+
+ Soll eine Reihe von Schnappschüssen ausgelöst werden wenn eine Aufnahme startet, kann das z.B. durch folgendes notify geschehen.
+ Sobald der Start der Kamera CamHE1 ausgelöst wird (Attribut event-on-change-reading -> "Record" setzen), werden abhängig davon 3 Snapshots im Abstand von 2 Sekunden getriggert.
+
+
+ define he1_snap_3 notify CamHE1:Record.*Start define h3 at +*{3}00:00:02 set CamHE1 snap
+
+
+ Triggern von 2 Schnappschüssen der Kamera "CamHE1" im Abstand von 6 Sekunden nachdem der Bewegungsmelder "MelderHE1" einen Event gesendet hat,
+ kann z.B. mit folgendem notify geschehen:
+
+
+ define he1_snap_2 notify MelderHE1:on.* define h2 at +*{2}00:00:06 set CamHE1 snap
+
+
+ Es wird die ID und der Filename des letzten Snapshots als Wert der Variable "LastSnapId" bzw. "LastSnapFilename" in den Readings der Kamera ausgegeben.
+
+
+
+
+ - set <name> snapGallery [1-10] (gilt für CAM)
+
+ Der Befehl ist nur vorhanden wenn das Attribut "snapGalleryBoost=1" gesetzt wurde.
+ Er erzeugt eine Ausgabe der letzten [x] Schnappschüsse ebenso wie "get <name> snapGallery". Abweichend von "get" wird mit Attribut
+ Attribut "snapGalleryBoost=1" kein Popup erzeugt, sondern die Schnappschußgalerie als Browserseite
+ dargestellt. Alle weiteren Funktionen und Attribute entsprechen dem "get <name> snapGallery" Kommando.
+ Wenn die Ausgabe einer Schnappschußgalerie, z.B. über ein "at oder "notify", getriggert wird, sollte besser das
+ "get <name> snapGallery" Kommando anstatt "set" verwendet werden.
+
+
+
+
+ - set <name> startTracking (gilt für CAM mit Tracking Fähigkeit)
+
+ Startet Objekt Tracking der Kamera.
+ Der Befehl ist nur vorhanden wenn die Surveillance Station die Fähigkeit der Kamera zum Objekt Tracking erkannt hat
+ (Reading "CapPTZObjTracking").
+
+
+
+
+ - set <name> stopTracking (gilt für CAM mit Tracking Fähigkeit)
+
+ Stoppt Objekt Tracking der Kamera.
+ Der Befehl ist nur vorhanden wenn die Surveillance Station die Fähigkeit der Kamera zum Objekt Tracking erkannt hat
+ (Reading "CapPTZObjTracking").
+
+
+
+
+
+
+
+Get
+
+
+ Mit SSCam können die Eigenschaften der Surveillance Station und der Kameras abgefragt werden.
+ Die aufgeführten get-Befehle sind für CAM/SVS-Devices oder nur für CAM-Devices bzw. nur für SVS-Devices gültig. Sie stehen im
+ Drop-Down-Menü des jeweiligen Devices zur Auswahl zur Verfügung.
+
+
+ - get <name> caminfoall (gilt für CAM/SVS)
+ get <name> caminfo (gilt für CAM)
+
+ Es werden SVS-Parameter und abhängig von der Art der Kamera (z.B. Fix- oder PTZ-Kamera) die verfügbaren Kamera-Eigenschaften
+ ermittelt und als Readings zur Verfügung gestellt.
+ So wird zum Beispiel das Reading "Availability" auf "disconnected" gesetzt falls die Kamera von der Surveillance Station
+ getrennt ist.
+ "getcaminfo" ruft eine Teilmenge von "getcaminfoall" ab.
+
+
+
+
+ - get <name> eventlist (gilt für CAM)
+
+ Es wird das Reading "CamEventNum" und "CamLastRec"
+ aktualisiert, welches die Gesamtanzahl der registrierten Kameraevents und den Pfad / Namen der letzten Aufnahme enthält.
+ Dieser Befehl wird implizit mit "get <name> caminfoall" ausgeführt.
+ Mit dem Attribut "videofolderMap" kann der Inhalt des Readings "VideoFolder" überschrieben werden.
+ Dies kann von Vortel sein wenn das Surveillance-Verzeichnis der SVS an dem lokalen PC unter anderem Pfadnamen gemountet ist
+ und darüber der Zugriff auf die Aufnahmen erfolgen soll (z.B. Verwendung bei Email-Versand).
+
+ Ein DOIF-Beispiel für den Email-Versand von Snapshot und Aufnahmelink per non-blocking sendmail:
+
+ define CamHE1.snap.email DOIF ([CamHE1:"LastSnapFilename"])
+ ({DebianMailnbl ('Recipient@Domain','Bewegungsalarm CamHE1','Eine Bewegung wurde an der Haustür registriert. Aufnahmelink: \
+ \[CamHE1:VideoFolder]\[CamHE1:CamLastRec]','/media/sf_surveillance/@Snapshot/[CamHE1:LastSnapFilename]')})
+
+
+
+
+ - get <name> homeModeState (gilt für SVS)
+
+ HomeMode-Status der Surveillance Station wird abgerufen.
+
+
+
+
+ - get <name> listLog [severity:<Loglevel>] [limit:<Zeilenzahl>] [match:<Suchstring>] (gilt für SVS)
+
+ Ruft das Surveillance Station Log vom Synology Server ab. Ohne Angabe der optionalen Zusätze wird das gesamte Log abgerufen.
+ Es können alle oder eine Auswahl der folgenden Optionen angegeben werden:
+
+
+ - <Loglevel> - Information, Warning oder Error. Nur Sätze mit dem Schweregrad werden abgerufen (default: alle)
+ - <Zeilenzahl> - die angegebene Anzahl der Logzeilen (neueste) wird abgerufen (default: alle)
+ - <Suchstring> - nur Logeinträge mit dem angegeben String werden abgerufen (Achtung: kein Regex, der Suchstring wird im Call an die SVS mitgegeben)
+
+
+
+ Beispiele
+
+ get <name> listLog severity:Error limit:5
+ Zeigt die letzten 5 Logeinträge mit dem Schweregrad "Error"
+ get <name> listLog severity:Information match:Carport
+ Zeigt alle Logeinträge mit dem Schweregrad "Information" die den String "Carport" enthalten
+ get <name> listLog severity:Warning
+ Zeigt alle Logeinträge mit dem Schweregrad "Warning"
+
+
+
+ Wurde mit dem Attribut "pollcaminfoall" das Polling der SVS aktiviert, wird das Reading
+ "LastLogEntry" erstellt.
+ Im Protokoll-Setup der SVS kann man einstellen was protokolliert werden soll. Für weitere Informationen
+ siehe Synology Online-Hlfe.
+
+
+
+
+ - get <name> listPresets (gilt für PTZ-CAM)
+
+ Die für die Kamera gespeicherten Presets werden in einem Popup ausgegeben.
+
+
+
+
+ - get <name> scanVirgin (gilt für CAM/SVS)
+
+ Wie mit get caminfoall werden alle Informationen der SVS und Kamera abgerufen. Allerdings wird in jedem Fall eine
+ neue Session ID generiert (neues Login), die Kamera-ID neu ermittelt und es werden alle notwendigen API-Parameter neu
+ eingelesen.
+
+
+
+
+ - get <name> snapGallery [1-10] (gilt für CAM)
+
+ Es wird ein Popup mit den letzten [x] Schnapschüssen erzeugt. Ist das Attribut "snapGalleryBoost" gesetzt,
+ werden die letzten Schnappschüsse (default 3) über Polling abgefragt und im Speicher gehalten. Das Verfahren hilft die Ausgabe zu beschleunigen,
+ kann aber möglicherweise nicht den letzten Schnappschuß anzeigen, falls dieser NICHT über das Modul ausgelöst wurde.
+ Diese Funktion kann ebenfalls, z.B. mit "at" oder "notify", getriggert werden. Dabei wird die Schnappschußgalerie auf allen
+ verbundenen FHEMWEB-Instanzen als Popup angezeigt.
+
+ Zur weiteren Steuerung dieser Funktion stehen die Attribute:
+
+
+ - snapGalleryBoost
+ - snapGalleryColumns
+ - snapGalleryHtmlAttr
+ - snapGalleryNumber
+ - snapGallerySize
+
+ zur Verfügung.
+
+
+
+ Hinweis:
+ Abhängig von der Anzahl und Auflösung (Qualität) der Schnappschuß-Images werden entsprechend ausreichende CPU und/oder
+ RAM-Ressourcen benötigt.
+
+
+
+
+ - get <name> snapfileinfo (gilt für CAM)
+
+ Es wird der Filename des letzten Schnapschusses ermittelt. Der Befehl wird implizit mit "get <name> snap"
+ ausgeführt.
+
+
+
+
+ - get <name> snapinfo (gilt für CAM)
+
+ Es werden Schnappschussinformationen gelesen. Hilfreich wenn Schnappschüsse nicht durch SSCam, sondern durch die Bewegungserkennung der Kamera
+ oder Surveillance Station erzeugt werden.
+
+
+
+
+ - get <name> stmUrlPath (gilt für CAM)
+
+ Mit diesem Kommando wird der aktuelle Streamkey der Kamera abgerufen und das Reading mit dem Key-Wert gefüllt.
+ Dieser Streamkey kann verwendet werden um eigene Aufrufe eines Livestreams aufzubauen (siehe Beispiel).
+ Wenn das Attribut "showStmInfoFull" gesetzt ist, werden zusaätzliche Stream-Informationen wie "StmKeyUnicst", "StmKeymjpegHttp" ausgegeben.
+ Diese Readings enthalten die gültigen Stream-Pfade zu einem Livestream und können z.B. versendet und von einer entsprechenden Anwendung ohne session Id geöffnet werden.
+ Wenn das Attribut "livestreamprefix" (Format: "http(s)://<hostname><port>) gesetzt ist, wird der Servername und Port überschrieben soweit es sinnvoll ist.
+ Wird Polling der Kameraeigenschaften genutzt, wird die stmUrlPath-Funktion automatisch mit ausgeführt.
+
+
+ Beispiel für den Aufbau eines Http-Calls zu einem Livestream mit StmKey:
+
+
+http(s)://<hostname><port>/webapi/entry.cgi?api=SYNO.SurveillanceStation.VideoStreaming&version=1&method=Stream&format=mjpeg&cameraId=5&StmKey="31fd87279976d89bb98409728cced890"
+
+
+ cameraId (Internal CAMID), StmKey müssen durch gültige Werte ersetzt werden.
+
+ Hinweis:
+
+ Falls der Stream-Aufruf versendet und von extern genutzt wird sowie hostname / port durch gültige Werte ersetzt und die
+ Routerports entsprechend geöffnet werden, ist darauf zu achten, dass diese sensiblen Daten nicht durch unauthorisierte Personen
+ für den Zugriff genutzt werden können !
+
+
+
+
+
+ - get <name> storedCredentials (gilt für CAM/SVS)
+
+ Die gespeicherten Anmeldeinformationen (Credentials) werden in einem Popup als Klartext angezeigt.
+
+
+
+
+ - get <name> svsinfo (gilt für CAM/SVS)
+
+ Ermittelt allgemeine Informationen zur installierten SVS-Version und andere Eigenschaften.
+
+
+
+
+
+
+ Polling der Kamera/SVS-Eigenschaften:
+
+ Die Abfrage der Kameraeigenschaften erfolgt automatisch, wenn das Attribut "pollcaminfoall" (siehe Attribute) mit einem Wert > 10 gesetzt wird.
+ Per Default ist das Attribut "pollcaminfoall" nicht gesetzt und das automatische Polling nicht aktiv.
+ Der Wert dieses Attributes legt das Intervall der Abfrage in Sekunden fest. Ist das Attribut nicht gesetzt oder < 10 wird kein automatisches Polling
+ gestartet bzw. gestoppt wenn vorher der Wert > 10 gesetzt war.
+
+ Das Attribut "pollcaminfoall" wird durch einen Watchdog-Timer überwacht. Änderungen des Attributwertes werden alle 90 Sekunden ausgewertet und entsprechend umgesetzt.
+ Eine Änderung des Pollingstatus / Pollingintervalls wird im FHEM-Logfile protokolliert. Diese Protokollierung kann durch Setzen des Attributes "pollnologging=1" abgeschaltet werden.
+ Dadurch kann ein unnötiges Anwachsen des Logs vermieden werden. Ab verbose=4 wird allerdings trotz gesetzten "pollnologging"-Attribut ein Log des Pollings
+ zu Analysezwecken aktiviert.
+
+ Wird FHEM neu gestartet, wird bei aktivierten Polling der ersten Datenabruf innerhalb 60s nach dem Start ausgeführt.
+
+ Der Status des automatischen Pollings wird durch das Reading "PollState" signalisiert:
+
+
+ - PollState = Active - automatisches Polling wird mit Intervall entsprechend "pollcaminfoall" ausgeführt
+ - PollState = Inactive - automatisches Polling wird nicht ausgeführt
+
+
+
+ Die Bedeutung der Readingwerte ist unter Readings beschrieben.
+
+ Hinweise:
+
+ Wird Polling eingesetzt, sollte das Intervall nur so kurz wie benötigt eingestellt werden da die ermittelten Werte überwiegend statisch sind.
+ Das eingestellte Intervall sollte nicht kleiner sein als die Summe aller HTTP-Verarbeitungszeiten.
+ Pro Pollingaufruf und Kamera werden ca. 10 - 20 Http-Calls gegen die Surveillance Station abgesetzt.
+ Bei einem eingestellten HTTP-Timeout (siehe Attribut) "httptimeout") von 4 Sekunden kann die theoretische Verarbeitungszeit nicht höher als 80 Sekunden betragen.
+ In dem Beispiel sollte man das Pollingintervall mit einem Sicherheitszuschlag auf nicht weniger 160 Sekunden setzen.
+ Ein praktikabler Richtwert könnte zwischen 600 - 1800 (s) liegen.
+
+ Sind mehrere Kameras in SSCam definiert, sollte "pollcaminfoall" nicht bei allen Kameras auf exakt den gleichen Wert gesetzt werden um Verarbeitungsengpässe
+ und dadurch versursachte potentielle Fehlerquellen bei der Abfrage der Synology Surveillance Station zu vermeiden.
+ Ein geringfügiger Unterschied zwischen den Pollingintervallen der definierten Kameras von z.B. 1s kann bereits als ausreichend angesehen werden.
+
+
+
+Internals
+
+ Die Bedeutung der verwendeten Internals stellt die nachfolgende Liste dar:
+
+ - CAMID - die ID der Kamera in der SVS, der Wert wird automatisch anhand des SVS-Kameranamens ermittelt.
+ - CAMNAME - der Name der Kamera in der SVS
+ - COMPATIBILITY - Information bis zu welcher SVS-Version das Modul kompatibel bzw. zur Zeit getestet ist (siehe Reading "compstate")
+ - CREDENTIALS - der Wert ist "Set" wenn die Credentials gesetzt wurden
+ - MODEL - Unterscheidung von Kamera-Device (Hersteller - Kameratyp) und Surveillance Station Device (SVS)
+ - NAME - der Kameraname in FHEM
+ - OPMODE - die zuletzt ausgeführte Operation des Moduls
+ - SERVERADDR - IP-Adresse des SVS Hostes
+ - SERVERPORT - der SVS-Port
+
+
+
+
+
+
+
+Attribute
+
+
+
+
+
+
+
+ - httptimeout
+ Timeout-Wert für HTTP-Aufrufe zur Synology Surveillance Station, Default: 4 Sekunden (wenn
+ httptimeout = "0" oder nicht gesetzt)
+
+ - htmlattr
+ ergänzende Angaben zur Inline-Bilddarstellung um das Verhalten wie Bildgröße zu beeinflussen.
+
+
+ Beispiel:
+ attr <name> htmlattr width="500" height="325" top="200" left="300"
+
+
+
+
+ - livestreamprefix
+ überschreibt die Angaben zu Protokoll, Servernamen und Port zur Weiterverwendung der
+ Livestreamadresse als z.B. externer Link. Anzugeben in der Form
+ "http(s)://<servername>:<port>"
+
+ - loginRetries
+ setzt die Anzahl der Login-Wiederholungen im Fehlerfall (default = 1)
+
+ - noQuotesForSID
+ dieses Attribut kann in bestimmten Fällen die Fehlermeldung "402 - permission denied"
+ vermeiden und ein login ermöglichen.
+
+ - pollcaminfoall
+ Intervall der automatischen Eigenschaftsabfrage (Polling) einer Kamera (kleiner/gleich 10: kein
+ Polling, größer 10: Polling mit Intervall)
+
+ - pollnologging
+ "0" bzw. nicht gesetzt = Logging Gerätepolling aktiv (default), "1" = Logging
+ Gerätepolling inaktiv
+
+ - ptzPanel_Home
+ Im PTZ-Steuerungspaneel wird dem Home-Icon (im Attribut "ptzPanel_row02") automatisch der Wert des Readings
+ "PresetHome" zugewiesen.
+ Mit "ptzPanel_Home" kann diese Zuweisung mit einem Preset aus der verfügbaren Preset-Liste geändert werden.
+
+ - ptzPanel_iconPath
+ Pfad für Icons im PTZ-Steuerungspaneel, default ist "www/images/sscam".
+ Der Attribut-Wert wird für alle Icon-Dateien außer *.svg verwendet.
+
+ - ptzPanel_iconPrefix
+ Prefix für Icon-Dateien im PTZ-Steuerungspaneel, default ist "black_btn_".
+ Der Attribut-Wert wird für alle Icon-Dateien außer *.svg verwendet.
+ Beginnen die verwendeten Icon-Dateien z.B. mit "black_btn_" ("black_btn_CAMDOWN.png"), braucht das Icon in den
+ Attributen "ptzPanel_row[00-09]" nur noch mit dem darauf folgenden Teilstring, z.B. "CAMDOWN.png" benannt zu werden.
+
+
+ - ptzPanel_row[00-09] <command>:<icon>,<command>:<icon>,...
+ Für PTZ-Kameras werden automatisch die Attribute "ptzPanel_row00" bis "ptzPanel_row04" zur Verwendung im
+ PTZ-Steuerungspaneel angelegt.
+ Die Attribute enthalten eine Komma-separarierte Liste von Befehl:Icon-Kombinationen (Tasten) je Paneelzeile.
+ Eine Paneelzeile kann beliebig viele Tasten enthalten. Die Attribute "ptzPanel_row00" bis "ptzPanel_row04" können nicht
+ gelöscht werden da sie in diesem Fall automatisch wieder angelegt werden. Der User kann die Attribute ändern und ergänzen.
+ Diese Änderungen bleiben erhalten.
+ Bei Bedarf kann die Belegung der Home-Taste in "ptzPanel_row02" geändert werden mit dem Attribut "ptzPanel_Home".
+ Die Icons werden im Pfad "ptzPanel_iconPath" gesucht. Dem Icon-Namen wird "ptzPanel_iconPrefix" vorangestellt.
+ Eigene Erweiterungen des PTZ-Steuerungspaneels können über die Attribute "ptzPanel_row05" bis "ptzPanel_row09"
+ vorgenommen werden. Zur Erstellung eigener Icons gibt es eine Vorlage im SVN:
+ contrib/sscam/black_btn_CAM_Template.pdn. Diese
+ Vorlage kann zum Beispiel mit Paint.Net bearbeitet werden.
+
+ Hinweis
+ Für eine Leerfeld verwenden sie bitte ":CAMBLANK.png" bzw. ":CAMBLANK.png,:CAMBLANK.png,:CAMBLANK.png,..." für eine
+ Leerzeile.
+
+
+
+ Beispiel:
+ attr <name> ptzPanel_row00 move upleft:CAMUPLEFTFAST.png,:CAMBLANK.png,move up:CAMUPFAST.png,:CAMBLANK.png,move upright:CAMUPRIGHTFAST.png
+ # Der Befehl "move upleft" wird der Kamera beim Druck auf Tastenicon "CAMUPLEFTFAST.png" übermittelt.
+
+
+
+
+ - ptzPanel_use
+ Die Anzeige des PTZ-Steuerungspaneels in der Detailanzeige bzw. innerhalb eines generierten Streamdevice wird
+ ein- bzw. ausgeschaltet (default ein).
+
+ - rectime
+ festgelegte Aufnahmezeit wenn eine Aufnahme gestartet wird. Mit rectime = 0 wird eine
+ Endlosaufnahme gestartet. Ist "rectime" nicht gesetzt, wird der Defaultwert von 15s
+ verwendet.
+
+ - recextend
+ "rectime" einer gestarteten Aufnahme wird neu gesetzt. Dadurch verlängert sich die
+ Aufnahemzeit einer laufenden Aufnahme
+
+ - session
+ Auswahl der Login-Session. Nicht gesetzt oder "DSM" -> session wird mit DSM aufgebaut
+ (Standard). "SurveillanceStation" -> Session-Aufbau erfolgt mit SVS
+
+ - simu_SVSversion
+ Simuliert eine andere SVS-Version. (es ist nur eine niedrigere als die installierte SVS
+ Version möglich !)
+
+ - snapGalleryBoost
+ Wenn gesetzt, werden die letzten Schnappschüsse (default 3) über Polling im Speicher gehalten und mit "set/get snapGallery"
+ aufbereitet angezeigt. Dieser Modus bietet sich an wenn viele bzw. Fullsize Images angezeigt werden sollen.
+ Ist das Attribut eingeschaltet, können bei "set/get snapGallery" keine Argumente mehr mitgegeben werden.
+ (siehe Attribut "snapGalleryNumber")
+
+ - snapGalleryColumns
+ Die Anzahl der Snaps die in einer Reihe im Popup erscheinen sollen (default 3).
+
+ - snapGalleryHtmlAttr
+ hiermit kann die Bilddarstellung beeinflusst werden.
+ Ist das Attribut nicht gesetzt, wird das Attribut "htmlattr" verwendet.
+ Ist auch dieses nicht gesetzt, wird eine Standardvorgabe verwendet (width="500" height="325").
+
+
+ Beispiel:
+ attr <name> snapGalleryHtmlAttr width="325" height="225"
+
+
+
+
+ - snapGalleryNumber
+ Die Anzahl der abzurufenden Schnappschüsse (default 3).
+
+ - snapGallerySize
+ Mit diesem Attribut kann die Qualität der Images eingestellt werden (default "Icon").
+ Im Modus "Full" wird die original vorhandene Auflösung der Images abgerufen. Dies erfordert mehr Ressourcen und kann die
+ Anzeige verlangsamen. Mit "snapGalleryBoost=1" kann die Ausgabe beschleunigt werden, da in diesem Fall die Aufnahmen über
+ Polling abgerufen und nur noch zur Anzeige gebracht werden.
+
+ - showStmInfoFull
+ zusaätzliche Streaminformationen wie LiveStreamUrl, StmKeyUnicst, StmKeymjpegHttp werden
+ ausgegeben
+
+ - showPassInLog
+ wenn gesetzt wird das verwendete Passwort im Logfile (verbose 4) angezeigt.
+ (default = 0)
+
+ - videofolderMap
+ ersetzt den Inhalt des Readings "VideoFolder", Verwendung z.B. bei gemounteten
+ Verzeichnissen
+
+ - verbose
+
+
+ Es werden verschiedene Verbose-Level unterstützt.
+ Dies sind im Einzelnen:
+
+
+
+ 0 | - Start/Stop-Ereignisse werden geloggt |
+ 1 | - Fehlermeldungen werden geloggt |
+ 2 | - Meldungen über wichtige Ereignisse oder Alarme |
+ 3 | - gesendete Kommandos werden geloggt |
+ 4 | - gesendete und empfangene Daten werden geloggt |
+ 5 | - alle Ausgaben zur Fehleranalyse werden geloggt. ACHTUNG: möglicherweise werden sehr viele Daten in das Logfile geschrieben! |
+
+
+
+ - readingFnAttributes
+
+
+
+
+Readings
+
+
+ Über den Pollingmechanismus bzw. durch Abfrage mit "Get" werden Readings bereitgestellt, deren Bedeutung in der nachfolgenden Tabelle dargestellt sind.
+ Die übermittelten Readings können in Abhängigkeit des Kameratyps variieren.
+
+
+
+ - CamAudioType
| - listet den eingestellten Audiocodec auf wenn verwendet |
+ - Availability
| - Verfügbarkeit der Kamera (disabled, enabled, disconnected, other) |
+ - CamEventNum
| - liefert die Gesamtanzahl der in SVS registrierten Events der Kamera |
+ - CamExposureControl
| - zeigt den aktuell eingestellten Typ der Belichtungssteuerung |
+ - CamExposureMode
| - aktueller Belichtungsmodus (Day, Night, Auto, Schedule, Unknown) |
+ - CamForceEnableMulticast
| - sagt aus ob die Kamera verpflichet ist Multicast einzuschalten. |
+ - CamIP
| - IP-Adresse der Kamera |
+ - CamLastRec
| - Pfad / Name der letzten Aufnahme |
+ - CamLastRecTime
| - Datum / Startzeit - Stopzeit der letzten Aufnahme |
+ - CamLiveFps
| - Frames pro Sekunde des Live-Streams |
+ - CamLiveMode
| - Quelle für Live-Ansicht (DS, Camera) |
+ - camLiveQuality
| - in SVS eingestellte Live-Stream Qualität |
+ - camLiveResolution
| - in SVS eingestellte Live-Stream Auflösung |
+ - camLiveStreamNo
| - verwendete Stream-Nummer für Live-Stream |
+ - CamModel
| - Kameramodell |
+ - CamMotDetSc
| - Status der Bewegungserkennung (disabled, durch Kamera, durch SVS) und deren Parameter |
+ - CamNTPServer
| - eingestellter Zeitserver |
+ - CamPort
| - IP-Port der Kamera |
+ - CamPreRecTime
| - Dauer der der Voraufzeichnung in Sekunden (Einstellung in SVS) |
+ - CamPtSpeed
| - eingestellter Wert für Schwenken/Neige-Aktionen (Einstellung in SVS) |
+ - CamRecShare
| - gemeinsamer Ordner auf der DS für Aufnahmen |
+ - CamRecVolume
| - Volume auf der DS für Aufnahmen |
+ - CamStreamFormat
| - aktuelles Format des Videostream |
+ - CamVideoType
| - listet den eingestellten Videocodec auf |
+ - CamVendor
| - Kamerahersteller Bezeichnung |
+ - CamVideoFlip
| - Ist das Video gedreht |
+ - CamVideoMirror
| - Ist das Video gespiegelt |
+ - CamVideoRotate
| - Ist das Video gedreht |
+ - CapAudioOut
| - Fähigkeit der Kamera zur Audioausgabe über Surveillance Station (false/true) |
+ - CapChangeSpeed
| - Fähigkeit der Kamera verschiedene Bewegungsgeschwindigkeiten auszuführen |
+ - CapPTZAbs
| - Fähigkeit der Kamera für absolute PTZ-Aktionen |
+ - CapPTZAutoFocus
| - Fähigkeit der Kamera für Autofokus Aktionen |
+ - CapPTZDirections
| - die verfügbaren PTZ-Richtungen der Kamera |
+ - CapPTZFocus
| - Art der Kameraunterstützung für Fokussierung |
+ - CapPTZHome
| - Unterstützung der Kamera für Home-Position |
+ - CapPTZIris
| - Unterstützung der Kamera für Iris-Aktion |
+ - CapPTZObjTracking
| - Unterstützung der Kamera für Objekt-Tracking |
+ - CapPTZPan
| - Unterstützung der Kamera für Pan-Aktion |
+ - CapPTZPresetNumber
| - die maximale Anzahl unterstützter Presets. 0 steht für keine Preset-Unterstützung |
+ - CapPTZTilt
| - Unterstützung der Kamera für Tilt-Aktion |
+ - CapPTZZoom
| - Unterstützung der Kamera für Zoom-Aktion |
+ - DeviceType
| - Kameratyp (Camera, Video_Server, PTZ, Fisheye) |
+ - Error
| - Meldungstext des letzten Fehlers |
+ - Errorcode
| - Fehlercode des letzten Fehlers |
+ - HomeModeState
| - HomeMode-Status (ab SVS-Version 8.1.0) |
+ - LastLogEntry
| - der neueste Eintrag des Surveillance Station Logs (nur SVS-Device und wenn Attribut pollcaminfoall gesetzt) |
+ - LastSnapFilename
| - der Filename des letzten Schnapschusses |
+ - LastSnapId
| - die ID des letzten Schnapschusses |
+ - LastSnapTime
| - Zeitstempel des letzten Schnapschusses |
+ - LastUpdateTime
| - Datum / Zeit der letzten Aktualisierung durch "caminfoall" |
+ - LiveStreamUrl
| - die LiveStream-Url wenn der Stream gestartet ist. (Attribut "showStmInfoFull" muss gesetzt sein) |
+ - Patrols
| - in Surveillance Station voreingestellte Überwachungstouren (bei PTZ-Kameras) |
+ - PollState
| - zeigt den Status des automatischen Pollings an |
+ - PresetHome
| - Name der Home-Position (bei PTZ-Kameras) |
+ - Presets
| - in Surveillance Station voreingestellte Positionen (bei PTZ-Kameras) |
+ - Record
| - Aufnahme läuft = Start, keine Aufnahme = Stop |
+ - StmKey
| - aktueller StreamKey. Kann zum öffnen eines Livestreams ohne Session Id genutzt werden. |
+ - StmKeyUnicst
| - Uni-cast Stream Pfad der Kamera. (Attribut "showStmInfoFull" muss gesetzt sein) |
+ - StmKeymjpegHttp
| - Mjpeg Stream Pfad (über http) der Kamera. (Attribut "showStmInfoFull" muss gesetzt sein) |
+ - SVScustomPortHttp
| - benutzerdefinierter Port der Surveillance Station (HTTP) im DSM-Anwendungsportal (get mit "svsinfo") |
+ - SVScustomPortHttps
| - benutzerdefinierter Port der Surveillance Station (HTTPS) im DSM-Anwendungsportal (get mit "svsinfo") |
+ - SVSlicenseNumber
| - die Anzahl der installierten Kameralizenzen (get mit "svsinfo") |
+ - SVSuserPriv
| - die effektiven Rechte des verwendeten Users nach dem Login (get mit "svsinfo") |
+ - SVSversion
| - die Paketversion der installierten Surveillance Station (get mit "svsinfo") |
+ - UsedSpaceMB
| - durch Aufnahmen der Kamera belegter Plattenplatz auf dem Volume |
+ - VideoFolder
| - Pfad zu den aufgenommenen Videos |
+ - compstate
| - Kompatibilitätsstatus (Vergleich von eingesetzter/simulierter SVS-Version zum Internal COMPATIBILITY) |
+
+
+
+
+
+
+
+
+
+=end html_DE
+=cut