mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-15 22:26:04 +00:00
49_SSCamSTRM: new attr hideDisplayName regarding to Forum #88667
git-svn-id: https://svn.fhem.de/fhem/trunk@16877 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
d3dcaf2069
commit
0782f4ecb9
@ -1,5 +1,6 @@
|
||||
# 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_SSCamSTRM: new attr hideDisplayName regarding to Forum #88667
|
||||
- bugfix: 49_SSCam: global vars
|
||||
- bugfix: 88_HMCCU: fixed rpcServerAddr attribute and update of sysvar dpt
|
||||
- change: 49_SSCam: V5.2.0, support longpoll refresh of SSCamSTRM-Devices
|
||||
|
@ -27,6 +27,7 @@
|
||||
#########################################################################################################################
|
||||
# Versions History:
|
||||
#
|
||||
# 5.2.2 16.06.2018 compatibility to SSCamSTRM V 1.1.0
|
||||
# 5.2.1 14.06.2018 design change of SSCam_StreamDev, change in event generation for SSCam_StreamDev, fix global vars
|
||||
# 5.2.0 14.06.2018 support longpoll refresh of SSCamSTRM-Devices
|
||||
# 5.1.0 13.06.2018 more control elements (Start/Stop Recording, Take Snapshot) in func SSCam_StreamDev
|
||||
@ -234,7 +235,7 @@ use Time::HiRes;
|
||||
use HttpUtils;
|
||||
# no if $] >= 5.017011, warnings => 'experimental';
|
||||
|
||||
my $SSCamVersion = "5.2.1";
|
||||
my $SSCamVersion = "5.2.2";
|
||||
|
||||
# Aufbau Errorcode-Hashes (siehe Surveillance Station Web API)
|
||||
my %SSCam_errauthlist = (
|
||||
@ -5774,7 +5775,8 @@ sub SSCam_StreamDev($$$) {
|
||||
my $hlslfw = (ReadingsVal($camname,"CamStreamFormat","MJPEG") eq "HLS")?"live_fw_hls,":undef;
|
||||
my $StmKey = ReadingsVal($camname,"StmKey",undef);
|
||||
|
||||
$ret = "<div class=\"makeTable wide\">";
|
||||
$ret = "";
|
||||
#$ret .= "<div class=\"makeTable wide\">";
|
||||
$ret .= '<table class="block wide internals">';
|
||||
$ret .= '<tbody>';
|
||||
$ret .= '<tr class="odd">';
|
||||
@ -5937,7 +5939,7 @@ sub SSCam_StreamDev($$$) {
|
||||
$ret .= '</tr>';
|
||||
$ret .= '</tbody>';
|
||||
$ret .= '</table>';
|
||||
$ret .= '</div>';
|
||||
#$ret .= '</div>';
|
||||
|
||||
return $ret;
|
||||
}
|
||||
@ -5963,19 +5965,14 @@ sub composegallery ($;$$) {
|
||||
|
||||
my $ha = AttrVal($name, "snapGalleryHtmlAttr", AttrVal($name, "htmlattr", 'width="500" height="325"'));
|
||||
|
||||
# falls "composegallery" durch ein mit "createSnapGallery" angelegtes Device aufgerufen wird
|
||||
# falls "composegallery" durch ein SSCamSTRM-Device aufgerufen wird
|
||||
my $devWlink = "";
|
||||
if ($strmdev) {
|
||||
if($defs{$strmdev}{TYPE} ne "SSCamSTRM") {
|
||||
# Abfrage wegen Kompatibilität zu "alten" compose mit weblink-Modul
|
||||
my $sdalias = AttrVal($strmdev, "alias", $strmdev); # Linktext als Aliasname oder Devicename setzen
|
||||
$devWlink = "<a href=\"/fhem?detail=$strmdev\">$sdalias</a><br>";
|
||||
}
|
||||
my $wlha = AttrVal($strmdev, "htmlattr", undef);
|
||||
$ha = (defined($wlha))?$wlha:$ha; # htmlattr vom weblink-Device übernehmen falls von wl-Device aufgerufen und gesetzt
|
||||
$ha = (defined($wlha))?$wlha:$ha; # htmlattr vom SSCamSTRM-Device übernehmen falls von SSCamSTRM-Device aufgerufen und gesetzt
|
||||
}
|
||||
|
||||
# wenn Weblink genutzt wird und attr "snapGalleryBoost" nicht gesetzt ist -> Warnung in Gallerie ausgeben
|
||||
# wenn SSCamSTRM-device genutzt wird und attr "snapGalleryBoost" nicht gesetzt ist -> Warnung in Gallerie ausgeben
|
||||
my $sgbnote = " ";
|
||||
if($strmdev && !AttrVal($name,"snapGalleryBoost",0)) {
|
||||
$sgbnote = "<b>CAUTION</b> - No snapshots can be retrieved. Please set the attribute \"snapGalleryBoost=1\" in device <a href=\"/fhem?detail=$name\">$name</a>" if ($lang eq "EN");
|
||||
|
@ -28,6 +28,7 @@
|
||||
#########################################################################################################################
|
||||
# Versions History:
|
||||
#
|
||||
# 1.1.0 16.06.2018 attr hideDisplayName regarding to Forum #88667
|
||||
# 1.0.1 14.06.2018 commandref revised
|
||||
# 1.0.0 14.06.2018 switch to longpoll refresh
|
||||
# 0.4 13.06.2018 new attribute "noDetaillink" (deleted in V1.0.0)
|
||||
@ -41,19 +42,20 @@ package main;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
my $SSCamSTRMVersion = "1.0.1";
|
||||
my $SSCamSTRMVersion = "1.1.0";
|
||||
|
||||
################################################################
|
||||
sub SSCamSTRM_Initialize($) {
|
||||
my ($hash) = @_;
|
||||
|
||||
$hash->{DefFn} = "SSCamSTRM_Define";
|
||||
$hash->{AttrList} = "disable:1,0 forcePageRefresh:1,0 htmlattr ";
|
||||
$hash->{AttrList} = "disable:1,0 forcePageRefresh:1,0 htmlattr hideDisplayName:1,0 ";
|
||||
$hash->{FW_summaryFn} = "SSCamSTRM_FwFn";
|
||||
$hash->{FW_detailFn} = "SSCamSTRM_FwFn";
|
||||
$hash->{AttrFn} = "SSCamSTRM_Attr";
|
||||
$hash->{FW_hideDisplayName} = 1; # Forum 88667
|
||||
# $hash->{FW_addDetailToSummary} = 1;
|
||||
# $hash->{FW_atPageEnd} = 1; # Achtung, kein Longpoll
|
||||
# $hash->{FW_atPageEnd} = 1; # wenn 1 -> kein Longpoll ohne informid in HTML-Tag
|
||||
}
|
||||
|
||||
|
||||
@ -72,11 +74,8 @@ sub SSCamSTRM_Define($$) {
|
||||
|
||||
$hash->{VERSION} = $SSCamSTRMVersion;
|
||||
$hash->{LINK} = $link;
|
||||
if($hash->{MODEL} =~ /switched|mjpeg/) {
|
||||
$attr{$name}{alias} = "<span></span>";
|
||||
} else {
|
||||
$attr{$name}{alias} = ".";
|
||||
}
|
||||
|
||||
$attr{$name}{comment} = "when using the device in a Dashboard, set \"attr $name alias <span></span>\" ";
|
||||
|
||||
readingsSingleUpdate($hash,"state", "initialized", 1); # Init für "state"
|
||||
|
||||
@ -116,7 +115,11 @@ sub SSCamSTRM_FwFn($$$$) {
|
||||
|
||||
$link = AnalyzePerlCommand(undef, $link) if($link =~ m/^{(.*)}$/s);
|
||||
|
||||
my $alias = AttrVal($d, "alias", $d); # Linktext als Aliasname oder Devicename setzen
|
||||
my $dlink = "<a href=\"/fhem?detail=$d\">$alias</a><br>";
|
||||
|
||||
my $ret = "";
|
||||
$ret .= "<span>$dlink </span>" if(!AttrVal($d,"hideDisplayName",0));
|
||||
$ret .= $link;
|
||||
|
||||
return $ret;
|
||||
@ -187,6 +190,11 @@ Dependend of the Streaming-Device state, different buttons are provided to start
|
||||
</li>
|
||||
<br>
|
||||
|
||||
<li><b>hideDisplayName</b><br>
|
||||
hide the device/alias name (link to detail view)
|
||||
</li>
|
||||
<br>
|
||||
|
||||
<a name="htmlattr"></a>
|
||||
<li><b>htmlattr</b><br>
|
||||
HTML attributes to be used for Streaming device e.g.: <br><br>
|
||||
@ -264,6 +272,11 @@ Abhängig vom Zustand des Streaming-Devices werden zum Start von Aktionen unters
|
||||
</li>
|
||||
<br>
|
||||
|
||||
<li><b>hideDisplayName</b><br>
|
||||
verbirgt den Device/Alias-Namen (Link zur Detailansicht)
|
||||
</li>
|
||||
<br>
|
||||
|
||||
<a name="htmlattr"></a>
|
||||
<li><b>htmlattr</b><br>
|
||||
HTML-Attribute zur Darstellungsänderung des SSCam Streaming Device z.B.: <br><br>
|
||||
|
Loading…
x
Reference in New Issue
Block a user