mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 18:59:33 +00:00
49_SSCam: contrib 8.9.0
git-svn-id: https://svn.fhem.de/fhem/trunk@18512 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
a9ddca1d60
commit
a6a4369da1
@ -47,6 +47,8 @@ use Encode;
|
|||||||
|
|
||||||
# Versions History intern
|
# Versions History intern
|
||||||
our %SSCam_vNotesIntern = (
|
our %SSCam_vNotesIntern = (
|
||||||
|
"8.9.1" => "05.02.2019 sub SSCam_snaplimsize changed ",
|
||||||
|
"8.9.0" => "05.02.2019 new streaming device type \"lastsnap\" ",
|
||||||
"8.8.1" => "04.02.2019 fix need attr snapGalleryBoost / snapGallerySize for ending a snap by telegramBot ",
|
"8.8.1" => "04.02.2019 fix need attr snapGalleryBoost / snapGallerySize for ending a snap by telegramBot ",
|
||||||
"8.8.0" => "03.02.2019 send snapshots integrated by telegram ",
|
"8.8.0" => "03.02.2019 send snapshots integrated by telegram ",
|
||||||
"8.7.2" => "30.01.2019 code change for snapCams (SVS) ",
|
"8.7.2" => "30.01.2019 code change for snapCams (SVS) ",
|
||||||
@ -126,6 +128,8 @@ our %SSCam_vNotesIntern = (
|
|||||||
|
|
||||||
# Versions History extern
|
# Versions History extern
|
||||||
our %SSCam_vNotesExtern = (
|
our %SSCam_vNotesExtern = (
|
||||||
|
"8.9.0" => "05.02.2019 A new streaming device type \"lastsnap\" was implemented. You can create such device with \"set ... createStreamDev lastsnap\". ".
|
||||||
|
"This streaming device shows the newest snapshot which was taken. ",
|
||||||
"8.8.0" => "01.02.2019 Snapshots can now be sent by telegramBot ",
|
"8.8.0" => "01.02.2019 Snapshots can now be sent by telegramBot ",
|
||||||
"8.7.0" => "27.01.2019 SMTP Email delivery of recordings implemented. You can send a recording after it was created subsequentely ".
|
"8.7.0" => "27.01.2019 SMTP Email delivery of recordings implemented. You can send a recording after it was created subsequentely ".
|
||||||
"with the integrated Email client. You have to store SMTP credentials with \"smtpcredentials\" before. ",
|
"with the integrated Email client. You have to store SMTP credentials with \"smtpcredentials\" before. ",
|
||||||
@ -573,7 +577,7 @@ sub SSCam_Attr($$$$) {
|
|||||||
if($cmd eq "set") {
|
if($cmd eq "set") {
|
||||||
$do = ($aVal eq "Icon")?1:2;
|
$do = ($aVal eq "Icon")?1:2;
|
||||||
}
|
}
|
||||||
$do = 0 if($cmd eq "del");
|
$do = 0 if($cmd eq "del");
|
||||||
|
|
||||||
if ($do == 0) {
|
if ($do == 0) {
|
||||||
delete($hash->{HELPER}{".SNAPHASH"}) if(AttrVal($name,"snapGalleryBoost",0)); # Snaphash nur löschen wenn Snaps gepollt werden
|
delete($hash->{HELPER}{".SNAPHASH"}) if(AttrVal($name,"snapGalleryBoost",0)); # Snaphash nur löschen wenn Snaps gepollt werden
|
||||||
@ -726,7 +730,7 @@ sub SSCam_Set($@) {
|
|||||||
(AttrVal($name, "snapGalleryBoost",0)?(AttrVal($name,"snapGalleryNumber",undef) || AttrVal($name,"snapGalleryBoost",0))?"snapGallery:noArg ":"snapGallery:$SSCAM_snum ":" ").
|
(AttrVal($name, "snapGalleryBoost",0)?(AttrVal($name,"snapGalleryNumber",undef) || AttrVal($name,"snapGalleryBoost",0))?"snapGallery:noArg ":"snapGallery:$SSCAM_snum ":" ").
|
||||||
"createReadingsGroup ".
|
"createReadingsGroup ".
|
||||||
"createSnapGallery:noArg ".
|
"createSnapGallery:noArg ".
|
||||||
"createStreamDev:generic,hls,mjpeg,switched ".
|
"createStreamDev:generic,hls,lastsnap,mjpeg,switched ".
|
||||||
((ReadingsVal("$name", "CapPTZPan", "false") ne "false") ? "createPTZcontrol:noArg ": "").
|
((ReadingsVal("$name", "CapPTZPan", "false") ne "false") ? "createPTZcontrol:noArg ": "").
|
||||||
"enable:noArg ".
|
"enable:noArg ".
|
||||||
"disable:noArg ".
|
"disable:noArg ".
|
||||||
@ -828,7 +832,7 @@ sub SSCam_Set($@) {
|
|||||||
|
|
||||||
Log3($name, 4, "$name - Trigger snapshots - Number: $num, Lag: $lag");
|
Log3($name, 4, "$name - Trigger snapshots - Number: $num, Lag: $lag");
|
||||||
$hash->{HELPER}{SNAPBYSTRMDEV} = 1 if ($prop2 && $prop2 =~ /STRM/); # $prop wird mitgegeben durch Snap by SSCamSTRM-Device
|
$hash->{HELPER}{SNAPBYSTRMDEV} = 1 if ($prop2 && $prop2 =~ /STRM/); # $prop wird mitgegeben durch Snap by SSCamSTRM-Device
|
||||||
|
|
||||||
my $emtxt = AttrVal($name, "snapEmailTxt", "");
|
my $emtxt = AttrVal($name, "snapEmailTxt", "");
|
||||||
my $at = join(" ",@a);
|
my $at = join(" ",@a);
|
||||||
if($at =~ /snapEmailTxt:/) {
|
if($at =~ /snapEmailTxt:/) {
|
||||||
@ -1012,6 +1016,15 @@ sub SSCam_Set($@) {
|
|||||||
return $ret if($ret);
|
return $ret if($ret);
|
||||||
my $c = "The device needs to set attribute \"hlsStrmObject\" in camera device \"$name\" to a valid HLS videostream";
|
my $c = "The device needs to set attribute \"hlsStrmObject\" in camera device \"$name\" to a valid HLS videostream";
|
||||||
CommandAttr($hash->{CL},"$livedev comment $c");
|
CommandAttr($hash->{CL},"$livedev comment $c");
|
||||||
|
}
|
||||||
|
if($prop =~ /lastsnap/) {
|
||||||
|
$livedev = "SSCamSTRM.$name.lastsnap";
|
||||||
|
$ret = CommandDefine($hash->{CL},"$livedev SSCamSTRM {SSCam_StreamDev('$name','$livedev','lastsnap')}");
|
||||||
|
return $ret if($ret);
|
||||||
|
my $c = "The device shows the last snapshot of camera device \"$name\". \n".
|
||||||
|
"If you always want to see the newest snapshot, please set attribute \"pollcaminfoall\" in camera device \"$name\".\n".
|
||||||
|
"Set also attribute \"snapGallerySize = Full\" in camera device \"$name\" to retrieve snapshots in original resolution.";
|
||||||
|
CommandAttr($hash->{CL},"$livedev comment $c");
|
||||||
}
|
}
|
||||||
if($prop =~ /switched/) {
|
if($prop =~ /switched/) {
|
||||||
$livedev = "SSCamSTRM.$name.switched";
|
$livedev = "SSCamSTRM.$name.switched";
|
||||||
@ -5165,10 +5178,11 @@ sub SSCam_camop_parse ($) {
|
|||||||
) {
|
) {
|
||||||
|
|
||||||
Log3($name, $verbose, "$name - Snapinfos of camera $camname retrieved");
|
Log3($name, $verbose, "$name - Snapinfos of camera $camname retrieved");
|
||||||
|
$hash->{HELPER}{".LASTSNAP"} = $data->{data}{data}[0]{imageData}; # aktuellster Snap zur Anzeige im StreamDev "lastsnap"
|
||||||
|
|
||||||
my %snaps = ( 0 => {'createdTm' => 'n.a.', 'fileName' => 'n.a.','snapid' => 'n.a.'} ); # Hilfshash
|
my %snaps = ( 0 => {'createdTm' => 'n.a.', 'fileName' => 'n.a.','snapid' => 'n.a.'} ); # Hilfshash
|
||||||
my ($k,$l) = (0,0);
|
my ($k,$l) = (0,0);
|
||||||
if(exists($data->{data}{data}[0]{createdTm})) {
|
if(exists($data->{data}{data}[0]{createdTm})) {
|
||||||
while ($data->{'data'}{'data'}[$k]) {
|
while ($data->{'data'}{'data'}[$k]) {
|
||||||
if($data->{'data'}{'data'}[$k]{'camName'} ne $camname) {
|
if($data->{'data'}{'data'}[$k]{'camName'} ne $camname) {
|
||||||
$k += 1;
|
$k += 1;
|
||||||
@ -5188,7 +5202,7 @@ sub SSCam_camop_parse ($) {
|
|||||||
Log3($name,4, "$name - Snap [$l]: ID => $data->{data}{data}[$k]{id}, File => $data->{data}{data}[$k]{fileName}, Created => $createdTm");
|
Log3($name,4, "$name - Snap [$l]: ID => $data->{data}{data}[$k]{id}, File => $data->{data}{data}[$k]{fileName}, Created => $createdTm");
|
||||||
$l += 1;
|
$l += 1;
|
||||||
$k += 1;
|
$k += 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
my @as;
|
my @as;
|
||||||
@ -5323,7 +5337,7 @@ sub SSCam_camop_parse ($) {
|
|||||||
SSCam_closeTrans($hash); # Transaktion beenden
|
SSCam_closeTrans($hash); # Transaktion beenden
|
||||||
delete($hash->{HELPER}{GETSNAPGALLERY}); # Steuerbit getsnapgallery statt getsnapinfo
|
delete($hash->{HELPER}{GETSNAPGALLERY}); # Steuerbit getsnapgallery statt getsnapinfo
|
||||||
|
|
||||||
##### Fall abhängige Eventgenerierung #####
|
######## fallabhängige Eventgenerierung ########
|
||||||
if ($hash->{HELPER}{SNAPBYSTRMDEV} || $hash->{HELPER}{LSNAPBYSTRMDEV}) {
|
if ($hash->{HELPER}{SNAPBYSTRMDEV} || $hash->{HELPER}{LSNAPBYSTRMDEV}) {
|
||||||
# Snap durch SSCamSTRM-Device ausgelöst
|
# Snap durch SSCamSTRM-Device ausgelöst
|
||||||
SSCam_refresh($hash,0,0,1); # kein Room-Refresh, kein SSCam-state-Event, SSCamSTRM-Event
|
SSCam_refresh($hash,0,0,1); # kein Room-Refresh, kein SSCam-state-Event, SSCamSTRM-Event
|
||||||
@ -5335,6 +5349,26 @@ sub SSCam_camop_parse ($) {
|
|||||||
} else {
|
} else {
|
||||||
SSCam_refresh($hash,0,0,0); # kein Room-Refresh, SSCam-state-Event, SSCamSTRM-Event
|
SSCam_refresh($hash,0,0,0); # kein Room-Refresh, SSCam-state-Event, SSCamSTRM-Event
|
||||||
}
|
}
|
||||||
|
# longpoll für alle Streamingdevices v. Typ "lastsnap"
|
||||||
|
my @lsnapstrms = devspec2array("TYPE=SSCamSTRM:FILTER=PARENT=$name:FILTER=MODEL=lastsnap");
|
||||||
|
if(scalar(@lsnapstrms) >= 1) {
|
||||||
|
foreach (@lsnapstrms) {
|
||||||
|
if($defs{$_}) {
|
||||||
|
$hash->{HELPER}{STRMDEV} = $_;
|
||||||
|
SSCam_refresh($hash,0,0,1); # kein Room-Refresh, kein SSCam-state-Event, SSCamSTRM-Event
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
# longpoll für alle Streamingdevices v. Typ "snapgallery"
|
||||||
|
@lsnapstrms = devspec2array("TYPE=SSCamSTRM:FILTER=PARENT=$name:FILTER=MODEL=snapgallery");
|
||||||
|
if(scalar(@lsnapstrms) >= 1) {
|
||||||
|
foreach (@lsnapstrms) {
|
||||||
|
if($defs{$_}) {
|
||||||
|
$hash->{HELPER}{STRMDEV} = $_;
|
||||||
|
SSCam_refresh($hash,0,0,1); # kein Room-Refresh, kein SSCam-state-Event, SSCamSTRM-Event
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} elsif ($OpMode eq "runliveview" && $hash->{HELPER}{RUNVIEW} =~ m/^live_.*hls$/) {
|
} elsif ($OpMode eq "runliveview" && $hash->{HELPER}{RUNVIEW} =~ m/^live_.*hls$/) {
|
||||||
# HLS Streaming wurde aktiviert
|
# HLS Streaming wurde aktiviert
|
||||||
@ -6465,7 +6499,7 @@ sub SSCam_refresh($$$$) {
|
|||||||
my $sr = $hash->{HELPER}{STRMROOM}?$hash->{HELPER}{STRMROOM}:"\"n.a.\""; # Raum aus dem das SSCamSTRM-Device die Funktion aufrief
|
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)
|
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});
|
$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");
|
Log3($name, 4, "$name - SSCam_refresh - caller: $sd, callerroom: $sr, detail: $sl, pload: $pload, forcePageRefresh: $fpr, event_STRMdev: $lpoll_strm");
|
||||||
|
|
||||||
# Page-Reload
|
# Page-Reload
|
||||||
if($pload && $hash->{HELPER}{STRMROOM} && $hash->{HELPER}{STRMDETAIL}) {
|
if($pload && $hash->{HELPER}{STRMROOM} && $hash->{HELPER}{STRMDETAIL}) {
|
||||||
@ -6544,8 +6578,14 @@ sub SSCam_snaplimsize ($) {
|
|||||||
} else {
|
} else {
|
||||||
$hash->{HELPER}{GETSNAPGALLERY} = 1;
|
$hash->{HELPER}{GETSNAPGALLERY} = 1;
|
||||||
$slim = AttrVal($name,"snapGalleryNumber",$SSCam_slim); # Anzahl der abzurufenden Snaps
|
$slim = AttrVal($name,"snapGalleryNumber",$SSCam_slim); # Anzahl der abzurufenden Snaps
|
||||||
my $sg = AttrVal($name,"snapGallerySize","Icon"); # Auflösung Image
|
# my $sg = AttrVal($name,"snapGallerySize","Icon"); # Auflösung Image
|
||||||
$ssize = ($sg eq "Icon")?1:2;
|
# $ssize = ($sg eq "Icon")?1:2;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(AttrVal($name,"snapGallerySize","Icon") eq "Full") {
|
||||||
|
$ssize = 2; # Full Size
|
||||||
|
} else {
|
||||||
|
$ssize = 1; # Icon Size
|
||||||
}
|
}
|
||||||
|
|
||||||
if($hash->{HELPER}{CANSENDSNAP} || $hash->{HELPER}{CANTELESNAP}) {
|
if($hash->{HELPER}{CANSENDSNAP} || $hash->{HELPER}{CANTELESNAP}) {
|
||||||
@ -6558,6 +6598,12 @@ sub SSCam_snaplimsize ($) {
|
|||||||
$hash->{HELPER}{GETSNAPGALLERY} = 1; # Steuerbit für Snap-Galerie bzw. Daten mehrerer Schnappschüsse abrufen
|
$hash->{HELPER}{GETSNAPGALLERY} = 1; # Steuerbit für Snap-Galerie bzw. Daten mehrerer Schnappschüsse abrufen
|
||||||
}
|
}
|
||||||
|
|
||||||
|
my @strmdevs = devspec2array("TYPE=SSCamSTRM:FILTER=PARENT=$name:FILTER=MODEL=lastsnap");
|
||||||
|
if(scalar(@strmdevs) >= 1) {
|
||||||
|
Log3($name, 4, "$name - Streaming devs of type \"lastsnap\": @strmdevs");
|
||||||
|
# $ssize = 2; # Full Size für Darstellung in SSCamSTRM Typ "lastsnap"
|
||||||
|
}
|
||||||
|
|
||||||
return ($slim,$ssize);
|
return ($slim,$ssize);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -7012,6 +7058,21 @@ sub SSCam_StreamDev($$$) {
|
|||||||
$ret .= "<td></td>" if(AttrVal($camname,"ptzPanel_use",0));
|
$ret .= "<td></td>" if(AttrVal($camname,"ptzPanel_use",0));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} elsif ($fmt =~ /lastsnap/) {
|
||||||
|
$link = $hash->{HELPER}{".LASTSNAP"};
|
||||||
|
my $gattr = (AttrVal($camname,"snapGallerySize","Icon") eq "Full")?$ha:"";
|
||||||
|
if($link) {
|
||||||
|
$ret .= "<td><img src='data:image/jpeg;base64,$link' $gattr onClick=\"FW_okDialog('<img src=data:image/jpeg;base64,$link $pws>')\"><br>";
|
||||||
|
$ret .= "<a onClick=\"FW_cmd('$FW_ME$FW_subdir?XHR=1&$cmddosnap')\" onmouseover=\"Tip('$ttsnap')\" onmouseout=\"UnTip()\">$imgdosnap </a>";
|
||||||
|
$ret .= "</td>";
|
||||||
|
$streamHash->{HELPER}{STREAM} = "<img src=data:image/jpeg;base64,$link $pws>"; # Stream für "get <SSCamSTRM-Device> popupStream" speichern
|
||||||
|
$streamHash->{HELPER}{STREAMACTIVE} = 1 if($link); # Statusbit wenn ein Stream aktiviert ist
|
||||||
|
} else {
|
||||||
|
$cause = "no snapshot available to display";
|
||||||
|
$cause = "kein Schnappschuss zur Anzeige vorhanden" if(AttrVal("global","language","EN") =~ /DE/i);
|
||||||
|
$ret .= "<td> <br> <b> $cause </b> <br><br></td>";
|
||||||
|
}
|
||||||
|
|
||||||
} elsif ($fmt =~ /generic/) {
|
} elsif ($fmt =~ /generic/) {
|
||||||
my $htag = AttrVal($camname,"genericStrmHtmlTag","");
|
my $htag = AttrVal($camname,"genericStrmHtmlTag","");
|
||||||
if( $htag =~ m/^\s*(.*)\s*$/s ) {
|
if( $htag =~ m/^\s*(.*)\s*$/s ) {
|
||||||
@ -7373,7 +7434,7 @@ sub SSCam_composegallery ($;$$) {
|
|||||||
}
|
}
|
||||||
$header .= $sgbnote;
|
$header .= $sgbnote;
|
||||||
|
|
||||||
my $gattr = (AttrVal($name,"snapGallerySize","Icon") eq "Full")?$ha:" ";
|
my $gattr = (AttrVal($name,"snapGallerySize","Icon") eq "Full")?$ha:"";
|
||||||
my @as = sort{$a<=>$b}keys%{$allsnaps};
|
my @as = sort{$a<=>$b}keys%{$allsnaps};
|
||||||
|
|
||||||
# Ausgabetabelle erstellen
|
# Ausgabetabelle erstellen
|
||||||
@ -8713,7 +8774,7 @@ return ($str);
|
|||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<a name="SSCamcreateStreamDev"></a>
|
<a name="SSCamcreateStreamDev"></a>
|
||||||
<li><b> set <name> createStreamDev [generic | mjpeg | switched] </b> (valid for CAM)</li> <br>
|
<li><b> set <name> createStreamDev [generic | hls | lastsnap | mjpeg | switched] </b> (valid for CAM)</li> <br>
|
||||||
|
|
||||||
A separate Streaming-Device (type SSCamSTRM) will be created. This device can be used as a discrete device in a dashboard
|
A separate Streaming-Device (type SSCamSTRM) will be created. This device can be used as a discrete device in a dashboard
|
||||||
for example.
|
for example.
|
||||||
@ -8725,6 +8786,7 @@ return ($str);
|
|||||||
<colgroup> <col width=10%> <col width=90%> </colgroup>
|
<colgroup> <col width=10%> <col width=90%> </colgroup>
|
||||||
<tr><td>generic </td><td>- the streaming device playback a content determined by attribute "genericStrmHtmlTag" </td></tr>
|
<tr><td>generic </td><td>- the streaming device playback a content determined by attribute "genericStrmHtmlTag" </td></tr>
|
||||||
<tr><td>hls </td><td>- the streaming device playback a permanent HLS video stream </td></tr>
|
<tr><td>hls </td><td>- the streaming device playback a permanent HLS video stream </td></tr>
|
||||||
|
<tr><td>lastsnap </td><td>- the streaming device playback the newest snapshot </td></tr>
|
||||||
<tr><td>mjpeg </td><td>- the streaming device playback a permanent MJPEG video stream (Streamkey method) </td></tr>
|
<tr><td>mjpeg </td><td>- the streaming device playback a permanent MJPEG video stream (Streamkey method) </td></tr>
|
||||||
<tr><td>switched </td><td>- playback of different streaming types. Buttons for mode control are provided. </td></tr>
|
<tr><td>switched </td><td>- playback of different streaming types. Buttons for mode control are provided. </td></tr>
|
||||||
</table>
|
</table>
|
||||||
@ -8768,6 +8830,15 @@ attr <name> genericStrmHtmlTag <video $HTMLATTR controls autoplay>
|
|||||||
</pre>
|
</pre>
|
||||||
The variables $HTMLATTR, $NAME are placeholder and absorb the attribute "htmlattr" (if set) respectively the SSCam-Devicename.
|
The variables $HTMLATTR, $NAME are placeholder and absorb the attribute "htmlattr" (if set) respectively the SSCam-Devicename.
|
||||||
</ul>
|
</ul>
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
<b>Streaming device "lastsnap"</b> <br><br>
|
||||||
|
|
||||||
|
This type of streaming device playback the last (newest) snapshot.
|
||||||
|
As default the snapshot is retrieved in a reduced resolution. In order to use the original resolution, the attribute
|
||||||
|
<b>"snapGallerySize = Full"</b> has to be set in the associated camera device (compare Internal PARENT).
|
||||||
|
There also the attribute "pollcaminfoall" should be set to retrieve the newest snapshot regularly.
|
||||||
|
<br>
|
||||||
</ul>
|
</ul>
|
||||||
<br><br>
|
<br><br>
|
||||||
|
|
||||||
@ -10401,7 +10472,7 @@ attr <name> genericStrmHtmlTag <video $HTMLATTR controls autoplay>
|
|||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<a name="SSCamcreateStreamDev"></a>
|
<a name="SSCamcreateStreamDev"></a>
|
||||||
<li><b> set <name> createStreamDev [generic | hls | mjpeg | switched] </b> (gilt für CAM)</li> <br>
|
<li><b> set <name> createStreamDev [generic | hls | lastsnap | mjpeg | switched] </b> (gilt für CAM)</li> <br>
|
||||||
|
|
||||||
Es wird ein separates Streaming-Device (Typ SSCamSTRM) erstellt. Dieses Device kann z.B. als separates Device
|
Es wird ein separates Streaming-Device (Typ SSCamSTRM) erstellt. Dieses Device kann z.B. als separates Device
|
||||||
in einem Dashboard genutzt werden.
|
in einem Dashboard genutzt werden.
|
||||||
@ -10413,6 +10484,7 @@ attr <name> genericStrmHtmlTag <video $HTMLATTR controls autoplay>
|
|||||||
<colgroup> <col width=10%> <col width=90%> </colgroup>
|
<colgroup> <col width=10%> <col width=90%> </colgroup>
|
||||||
<tr><td>generic </td><td>- das Streaming-Device gibt einen durch das Attribut "genericStrmHtmlTag" bestimmten Content wieder </td></tr>
|
<tr><td>generic </td><td>- das Streaming-Device gibt einen durch das Attribut "genericStrmHtmlTag" bestimmten Content wieder </td></tr>
|
||||||
<tr><td>hls </td><td>- das Streaming-Device gibt einen permanenten HLS Datenstrom wieder </td></tr>
|
<tr><td>hls </td><td>- das Streaming-Device gibt einen permanenten HLS Datenstrom wieder </td></tr>
|
||||||
|
<tr><td>lastsnap </td><td>- das Streaming-Device zeigt den neuesten Schnappschuß an </td></tr>
|
||||||
<tr><td>mjpeg </td><td>- das Streaming-Device gibt einen permanenten MJPEG Kamerastream wieder (Streamkey Methode) </td></tr>
|
<tr><td>mjpeg </td><td>- das Streaming-Device gibt einen permanenten MJPEG Kamerastream wieder (Streamkey Methode) </td></tr>
|
||||||
<tr><td>switched </td><td>- Wiedergabe unterschiedlicher Streamtypen. Drucktasten zur Steuerung werden angeboten. </td></tr>
|
<tr><td>switched </td><td>- Wiedergabe unterschiedlicher Streamtypen. Drucktasten zur Steuerung werden angeboten. </td></tr>
|
||||||
</table>
|
</table>
|
||||||
@ -10455,9 +10527,18 @@ attr <name> genericStrmHtmlTag <video $HTMLATTR controls autoplay>
|
|||||||
</pre>
|
</pre>
|
||||||
Die Variablen $HTMLATTR, $NAME sind Platzhalter und übernehmen ein gesetztes Attribut "htmlattr" bzw. den SSCam-Devicenamen.
|
Die Variablen $HTMLATTR, $NAME sind Platzhalter und übernehmen ein gesetztes Attribut "htmlattr" bzw. den SSCam-Devicenamen.
|
||||||
</ul>
|
</ul>
|
||||||
</ul>
|
|
||||||
<br><br>
|
<br><br>
|
||||||
|
|
||||||
|
<b>Streaming Device "lastsnap"</b> <br><br>
|
||||||
|
|
||||||
|
Dieser Typ gibt den neuesten Schnappschuß wieder. Der Schnappschuss wird per default als Icon, d.h. in einer verminderten
|
||||||
|
Auflösung abgerufen. Um die Originalauflösung zu verwenden, ist im zugehörigen Kameradevice (Internal PARENT) das Attribut
|
||||||
|
<b>"snapGallerySize = Full"</b> zu setzen.
|
||||||
|
Dort sollte ebenfalls das Attribut "pollcaminfoall" gesetzt sein, um regelmäßig die neuesten Schnappschußdaten abzurufen.
|
||||||
|
<br>
|
||||||
|
<br><br>
|
||||||
|
</ul>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li><b> set <name> createPTZcontrol </b> (gilt für PTZ-CAM)</li> <br>
|
<li><b> set <name> createPTZcontrol </b> (gilt für PTZ-CAM)</li> <br>
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
########################################################################################################################
|
########################################################################################################################
|
||||||
# $Id: 49_SSCamSTRM.pm 18007 2018-12-19 21:29:11Z DS_Starter $
|
# $Id: 49_SSCamSTRM.pm 17997 2018-12-17 23:40:00Z DS_Starter $
|
||||||
#########################################################################################################################
|
#########################################################################################################################
|
||||||
# 49_SSCamSTRM.pm
|
# 49_SSCamSTRM.pm
|
||||||
#
|
#
|
||||||
# (c) 2018 by Heiko Maaz
|
# (c) 2018-2019 by Heiko Maaz
|
||||||
# forked from 98_weblink.pm by Rudolf König
|
# forked from 98_weblink.pm by Rudolf König
|
||||||
# e-mail: Heiko dot Maaz at t-online dot de
|
# e-mail: Heiko dot Maaz at t-online dot de
|
||||||
#
|
#
|
||||||
@ -34,6 +34,7 @@ use warnings;
|
|||||||
|
|
||||||
# Versions History intern
|
# Versions History intern
|
||||||
our %SSCamSTRM_vNotesIntern = (
|
our %SSCamSTRM_vNotesIntern = (
|
||||||
|
"2.3.0" => "04.02.2019 SSCamSTRM_Rename / SSCamSTRM_Copy added, Streaming device can now be renamed or copied ",
|
||||||
"2.2.1" => "19.12.2018 commandref revised ",
|
"2.2.1" => "19.12.2018 commandref revised ",
|
||||||
"2.2.0" => "13.12.2018 load sscam_hls.js, sscam_tooltip.js from pgm2 for HLS Streaming support and tooltips ",
|
"2.2.0" => "13.12.2018 load sscam_hls.js, sscam_tooltip.js from pgm2 for HLS Streaming support and tooltips ",
|
||||||
"2.1.0" => "11.12.2018 switch \"popupStream\" from get to set ",
|
"2.1.0" => "11.12.2018 switch \"popupStream\" from get to set ",
|
||||||
@ -81,6 +82,8 @@ sub SSCamSTRM_Initialize($) {
|
|||||||
"popupStreamFW:$fwd ".
|
"popupStreamFW:$fwd ".
|
||||||
"popupStreamTo:OK,1,2,3,4,5,6,7,8,9,10,15,20,25,30,40,50,60 ".
|
"popupStreamTo:OK,1,2,3,4,5,6,7,8,9,10,15,20,25,30,40,50,60 ".
|
||||||
$readingFnAttributes;
|
$readingFnAttributes;
|
||||||
|
$hash->{RenameFn} = "SSCamSTRM_Rename";
|
||||||
|
$hash->{CopyFn} = "SSCamSTRM_Copy";
|
||||||
$hash->{FW_summaryFn} = "SSCamSTRM_FwFn";
|
$hash->{FW_summaryFn} = "SSCamSTRM_FwFn";
|
||||||
$hash->{FW_detailFn} = "SSCamSTRM_FwFn";
|
$hash->{FW_detailFn} = "SSCamSTRM_FwFn";
|
||||||
$hash->{AttrFn} = "SSCamSTRM_Attr";
|
$hash->{AttrFn} = "SSCamSTRM_Attr";
|
||||||
@ -114,6 +117,28 @@ sub SSCamSTRM_Define($$) {
|
|||||||
return undef;
|
return undef;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
################################################################
|
||||||
|
sub SSCamSTRM_Rename($$) {
|
||||||
|
my ($new_name,$old_name) = @_;
|
||||||
|
my $hash = $defs{$new_name};
|
||||||
|
|
||||||
|
$hash->{DEF} =~ s/$old_name/$new_name/g;
|
||||||
|
$hash->{LINK} =~ s/$old_name/$new_name/g;
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
################################################################
|
||||||
|
sub SSCamSTRM_Copy($$) {
|
||||||
|
my ($old_name,$new_name) = @_;
|
||||||
|
my $hash = $defs{$new_name};
|
||||||
|
|
||||||
|
$hash->{DEF} =~ s/$old_name/$new_name/g;
|
||||||
|
$hash->{LINK} =~ s/$old_name/$new_name/g;
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
################################################################
|
################################################################
|
||||||
sub SSCamSTRM_Set($@) {
|
sub SSCamSTRM_Set($@) {
|
||||||
my ($hash, @a) = @_;
|
my ($hash, @a) = @_;
|
||||||
|
Loading…
Reference in New Issue
Block a user