diff --git a/fhem/CHANGED b/fhem/CHANGED
index d071cdf00..d105ae826 100644
--- a/fhem/CHANGED
+++ b/fhem/CHANGED
@@ -1,5 +1,7 @@
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
# Do not insert empty lines here, update check depends on it.
+ - feature: 49_SSCam: V3.9.1, PTZ control panel added, please consider
+ attributes "ptzPanel_.*" and command "createPTZcontrol"
- bugfix: 93_DbRep: V7.17.1, sqlCmd can't use §timestamp_begin§
- feature: 73_GardenaSmartBridge: add set command deleteAccountPassword
- change: 88_HMCCU: minor changes
diff --git a/fhem/FHEM/49_SSCam.pm b/fhem/FHEM/49_SSCam.pm
index d9e481883..8e492a6e5 100644
--- a/fhem/FHEM/49_SSCam.pm
+++ b/fhem/FHEM/49_SSCam.pm
@@ -27,6 +27,8 @@
#########################################################################################################################
# Versions History:
#
+# 3.9.1 20.04.2018 Attribute ptzPanel_use, initial webcommands in DeviceOverview changed, minor fixes ptzPanel
+# 3.9.0 17.04.2018 control panel & PTZcontrol weblink device for PTZ cams
# 3.8.4 06.04.2018 Internal MODEL changed to SVS or "CamVendor - CamModel" for Cams
# 3.8.3 05.04.2018 bugfix V3.8.2, $OpMode "Start" changed, composegallery changed
# 3.8.2 04.04.2018 $attr replaced by AttrVal, SSCam_wdpollcaminfo redesigned
@@ -217,7 +219,7 @@ use Time::HiRes;
use HttpUtils;
# no if $] >= 5.017011, warnings => 'experimental';
-my $SSCamVersion = "3.8.4";
+my $SSCamVersion = "3.9.1";
# Aufbau Errorcode-Hashes (siehe Surveillance Station Web API)
my %SSCam_errauthlist = (
@@ -276,8 +278,8 @@ sub SSCam_Initialize($) {
$hash->{GetFn} = "SSCam_Get";
$hash->{AttrFn} = "SSCam_Attr";
# Aufrufe aus FHEMWEB
- $hash->{FW_summaryFn} = "SSCam_FWview";
- # $hash->{FW_detailFn} = "SSCam_FWview";
+ $hash->{FW_summaryFn} = "SSCam_FWsummaryFn";
+ $hash->{FW_detailFn} = "SSCam_FWdetailFn";
$hash->{FW_deviceOverview} = 1;
$hash->{AttrList} =
@@ -354,7 +356,7 @@ sub SSCam_Define($@) {
# Startwerte setzen
if(SSCam_IsModelCam($hash)) {
- $attr{$name}{webCmd} = "on:off:snap:enable:disable"; # initiale Webkommandos setzen
+ $attr{$name}{webCmd} = "on:off:snap:enable:disable:runView:stopView"; # initiale Webkommandos setzen
} else {
$attr{$name}{webCmd} = "homeMode";
$attr{$name}{webCmdLabel} = "HomeMode";
@@ -363,6 +365,7 @@ sub SSCam_Define($@) {
$hash->{HELPER}{OLDVALPOLLNOLOGGING} = "0"; # Loggingfunktion für Polling ist an
$hash->{HELPER}{OLDVALPOLL} = "0";
$hash->{HELPER}{RECTIME_DEF} = "15"; # Standard für rectime setzen, überschreibbar durch Attribut "rectime" bzw. beim "set .. on-for-time"
+ $hash->{".ptzhtml"} = "";
readingsBeginUpdate($hash);
readingsBulkUpdate($hash,"PollState","Inactive"); # es ist keine Gerätepolling aktiv
@@ -416,6 +419,20 @@ sub SSCam_Attr($$$$) {
# $name is device name
# aName and aVal are Attribute name and value
+ # dynamisch PTZ-Attribute setzen (wichtig beim Start wenn Reading "DeviceType" nicht gesetzt ist)
+ if ($cmd eq "set" && ($aName =~ m/ptzPanel_.*/)) {
+ foreach my $n (0..9) {
+ $n = sprintf("%2.2d",$n);
+ addToDevAttrList($name, "ptzPanel_row$n");
+ }
+ addToDevAttrList($name, "ptzPanel_iconPrefix");
+ addToDevAttrList($name, "ptzPanel_iconPath");
+ }
+
+ if($aName =~ m/ptzPanel_row.*|ptzPanel_Home|ptzPanel_use/) {
+ InternalTimer(gettimeofday()+0.7, "SSCam_addptzattr", "$name", 0);
+ }
+
if ($aName eq "disable") {
if($cmd eq "set") {
$do = ($aVal) ? 1 : 0;
@@ -547,8 +564,7 @@ sub SSCam_Attr($$$$) {
if(AttrVal($name,"snapGalleryBoost",0));
}
}
-
-
+
return undef;
}
@@ -581,6 +597,7 @@ sub SSCam_Set($@) {
"snap:noArg ".
(AttrVal($name, "snapGalleryBoost",0)?(AttrVal($name,"snapGalleryNumber",undef) || AttrVal($name,"snapGalleryBoost",0))?"snapGallery:noArg ":"snapGallery:$SSCAM_snum ":" ").
"createSnapGallery:noArg ".
+ ((ReadingsVal("$name", "CapPTZPan", "false") ne "false") ? "createPTZcontrol:noArg ": "").
"enable:noArg ".
"disable:noArg ".
"optimizeParams ".
@@ -672,8 +689,18 @@ sub SSCam_Set($@) {
my $wlname = "SSCam.$name.snapgallery";
my $room = "SnapGallery";
CommandAttr($hash->{CL},$wlname." room ".$room);
- return "Snapgallery device \"$sgdev\" was created successfully. Please have a look to room $room.
You can now assign it to another room if you want. Don't rename this new device ! ";
+ return "Snapgallery device \"$sgdev\" was created successfully. Please have a look to room $room.
You can now assign it to another room if you want. Don't rename this new device !";
+ } elsif ($opt eq "createPTZcontrol" && SSCam_IsModelCam($hash)) {
+ if (!$hash->{CREDENTIALS}) {return "Credentials of $name are not set - make sure you've set it with \"set $name credentials username password\"";}
+ my $ptzcdev = "SSCam.$name.PTZcontrol";
+ my $ret = CommandDefine($hash->{CL},"$ptzcdev weblink htmlCode {SSCam_ptzpanel('$name')}");
+ return $ret if($ret);
+ my $room = AttrVal($name,"room","PTZcontrol");
+ $attr{$ptzcdev}{room} = $room;
+ $attr{$ptzcdev}{group} = $name."_PTZcontrol";
+ return "PTZ control device \"$ptzcdev\" was created successfully. Please have a look to room \"$room\".\nYou can assign \"$ptzcdev\" to another room if you want.";
+
} elsif ($opt eq "enable" && SSCam_IsModelCam($hash)) {
if (!$hash->{CREDENTIALS}) {return "Credentials of $name are not set - make sure you've set it with \"set $name credentials username password\"";}
SSCam_camenable($hash);
@@ -714,6 +741,10 @@ sub SSCam_Set($@) {
if($success) {
SSCam_getcaminfoall($hash,0);
+ RemoveInternalTimer($hash, "SSCam_getptzlistpreset");
+ InternalTimer(gettimeofday()+11, "SSCam_getptzlistpreset", $hash, 0);
+ RemoveInternalTimer($hash, "SSCam_getptzlistpatrol");
+ InternalTimer(gettimeofday()+12, "SSCam_getptzlistpatrol", $hash, 0);
return "Username and Password saved successfully";
} else {
return "Error while saving Username / Password - see logfile for details";
@@ -1043,19 +1074,19 @@ return $ret; # not generate trigger out of command
######################################################################################
# wird von FW aufgerufen. $FW_wname = aufrufende Webinstanz, $d = aufrufendes
# Device (z.B. CamCP1)
-sub SSCam_FWview ($$$$) {
+sub SSCam_FWsummaryFn ($$$$) {
my ($FW_wname, $d, $room, $pageHash) = @_; # pageHash is set for summaryFn in FHEMWEB
- my $hash = $defs{$d};
- my $name = $hash->{NAME};
- my $link = $hash->{HELPER}{LINK};
- my $wltype = $hash->{HELPER}{WLTYPE};
+ my $hash = $defs{$d};
+ my $name = $hash->{NAME};
+ my $link = $hash->{HELPER}{LINK};
+ my $wltype = $hash->{HELPER}{WLTYPE};
my $ret;
my $alias;
return if(!$hash->{HELPER}{LINK} || ReadingsVal("$name", "state", "") =~ /^dis.*/ || IsDisabled($name));
my $attr = AttrVal($d, "htmlattr", " ");
- Log3($name, 4, "$name - SSCam_FWview called - FW_wname: $FW_wname, device: $d, room: $room, attributes: $attr");
+ Log3($name, 4, "$name - SSCam_FWsummaryFn called - FW_wname: $FW_wname, device: $d, room: $room, attributes: $attr");
if($wltype eq "image") {
$ret = "
".weblink_FwDetail($d);
@@ -1076,6 +1107,24 @@ sub SSCam_FWview ($$$$) {
return $ret;
}
+######################################################################################
+# PTZ-Steuerpanel in Detailanzeige darstellen
+######################################################################################
+sub SSCam_FWdetailFn ($$$$) {
+ my ($FW_wname, $d, $room, $pageHash) = @_; # pageHash is set for summaryFn.
+ my $hash = $defs{$d};
+
+ return undef if(!AttrVal($d,"ptzPanel_use",1));
+ $hash->{".ptzhtml"} = SSCam_ptzpanel($d) if($hash->{".ptzhtml"} eq "");
+
+ if($hash->{".ptzhtml"} ne "") {
+ return $hash->{".ptzhtml"};
+ } else {
+ return undef;
+ }
+
+}
+
######################################################################################
# initiale Startroutinen nach Restart FHEM
######################################################################################
@@ -3552,7 +3601,7 @@ sub SSCam_camop ($) {
$url = "http://$serveraddr:$serverport/webapi/$apistmpath?api=$apistm&version=$apistmmaxver&method=EventStream&eventId=$hash->{HELPER}{CAMLASTRECID}×tamp=1&_sid=$sid";
}
- # Liveview-Link in Hash speichern -> Anzeige über SSCam_FWview, in Reading setzen für Linkversand
+ # Liveview-Link in Hash speichern -> Anzeige über SSCam_FWsummaryFn, in Reading setzen für Linkversand
$hash->{HELPER}{LINK} = $url;
Log3($name, 4, "$name - Set Streaming-URL: $url");
@@ -4622,8 +4671,10 @@ sub SSCam_camop_parse ($) {
readingsBulkUpdate($hash,"Errorcode","none");
readingsBulkUpdate($hash,"Error","none");
readingsEndUpdate($hash, 1);
-
-
+
+ # spezifische Attribute für PTZ-Cams verfügbar machen
+ SSCam_addptzattr($name);
+
# Logausgabe
Log3($name, $verbose, "$name - PTZ Presets of camera $camname retrieved");
@@ -4991,7 +5042,7 @@ return($hash,$success);
}
###############################################################################
-# Test ob MODEL=CAM (sonst ist es SVS)
+# Test ob MODEL=SVS (sonst ist es eine Cam)
###############################################################################
sub SSCam_IsModelCam($){
my ($hash)= @_;
@@ -5114,6 +5165,142 @@ sub SSCam_getclhash ($;$$) {
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) = @_;
+ 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 .= "\n";
+ 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.$name=set $name $cmd";
+ $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;
+}
+
###############################################################################
# Schnappschußgalerie zusammenstellen
###############################################################################
@@ -5279,6 +5466,7 @@ sub SSCam_experror {
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)
@@ -5312,8 +5500,8 @@ sub SSCam_experror {
There is a distinction between the definition of a camera-device and the definition of a Surveillance Station (SVS)
- device. Dependend on the kind of the defined device the internal MODEL will be set to CAM or SVS and a proper
- subset of the described set/get-commands are assigned to the device.
+ device. Dependend on the kind 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).
@@ -5368,12 +5556,19 @@ sub SSCam_experror {
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 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:
@@ -5457,11 +5652,12 @@ sub SSCam_experror {
They can be selected in the drop-down-menu of the particular 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> createPTZcontrol (valid for PTZ-CAM)
+ A separate PTZ-control panel will be created (weblink-device). 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 a weblink-device
+ the properties of the control panel can be affected.
@@ -5474,6 +5670,15 @@ sub SSCam_experror {
+
+ - 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)
@@ -6157,6 +6362,52 @@ http(s)://<hostname><port>/webapi/entry.cgi?api=SYNO.SurveillanceSta
- 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 use of PTZ-control panel in detail view off or on (default: on).
- rectime
determines the recordtime when a recording starts. If rectime = 0 an endless recording will be started. If
@@ -6347,6 +6598,7 @@ http(s)://<hostname><port>/webapi/entry.cgi?api=SYNO.SurveillanceSta
- 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)
+ - stellt ein Paneel zur Kamera-Steuerung zur Verfügung (bei PTZ-Kameras)
@@ -6362,6 +6614,8 @@ http(s)://<hostname><port>/webapi/entry.cgi?api=SYNO.SurveillanceSta
Vorbereitung
+
+
Dieses Modul nutzt das Perl-Modul JSON.
Auf Debian-Linux basierenden Systemen kann es installiert werden mit:
@@ -6378,14 +6632,15 @@ http(s)://<hostname><port>/webapi/entry.cgi?api=SYNO.SurveillanceSta
MIME::Base64
Time::HiRes
HttpUtils (FHEM-Modul)
+
Definition
Bei der Definition wird zwischen einer Kamera-Definition und der Definition einer Surveillance Station (SVS)
- unterschieden. Abhängig von der Art des definierten Devices wird das Internal MODEL auf CAM oder SVS gesetzt und eine
- passende Teilmenge der beschriebenen set/get-Befehle dem Device zugewiesen.
+ 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).
@@ -6437,12 +6692,20 @@ http(s)://<hostname><port>/webapi/entry.cgi?api=SYNO.SurveillanceSta
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.
+ 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:
@@ -6527,14 +6790,15 @@ http(s)://<hostname><port>/webapi/entry.cgi?api=SYNO.SurveillanceSta
Drop-Down-Menü des jeweiligen Devices zur Auswahl zur Verfügung.
- - 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> createPTZcontrol (gilt für PTZ-CAM)
+ Es wird ein separates PTZ-Steuerungspaneel (weblink) erstellt. Es wird der aktuelle Raum des Kameradevice zugewiesen sofern
+ dort gesetzt.
+ Mit den "ptzPanel_.*"-Attributen bzw. den spezifischen Attributen des entstandenen Weblink-Devices
+ können die Eigenschaften des PTZ-Paneels beeinflusst werden.
-
+
- set <name> createSnapGallery (gilt für CAM)
@@ -6544,6 +6808,15 @@ http(s)://<hostname><port>/webapi/entry.cgi?api=SYNO.SurveillanceSta
+
+ - 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)
@@ -7185,7 +7458,7 @@ http(s)://<hostname><port>/webapi/entry.cgi?api=SYNO.SurveillanceSta
- 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
- CREDENTIALS - der Wert ist "Set" wenn die Credentials gesetzt wurden
- - MODEL - Unterscheidung von Kamera-Device (CAM) und Surveillance Station Device (SVS)
+ - 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
@@ -7242,7 +7515,53 @@ http(s)://<hostname><port>/webapi/entry.cgi?api=SYNO.SurveillanceSta
- 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 wird ein(1)- bzw. ausgeschaltet(0) (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