diff --git a/fhem/CHANGED b/fhem/CHANGED index 6204effd1..a14bd8502 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: V7.6.0, The PTZ panel is completed by "Preset" and + "Patrol" dropdown lists (for PTZ cams only) - feature: 49_SSCamSTRM: click on content in stream device or snap gallery opens a popup window - new: 70_LaMetric2: add official module for LaMetric Smart Clock diff --git a/fhem/FHEM/49_SSCam.pm b/fhem/FHEM/49_SSCam.pm index 37cfa3fe7..1566870bf 100644 --- a/fhem/FHEM/49_SSCam.pm +++ b/fhem/FHEM/49_SSCam.pm @@ -45,6 +45,7 @@ use HttpUtils; # Versions History intern our %SSCam_vNotesIntern = ( + "7.6.0" => "02.12.2018 sub SSCam_ptzpanel completed by Preset and Patrol, minor fixes ", "7.5.0" => "02.12.2018 sub SSCam_StreamDev and SSCam_composegallery changed to use popup window ", "7.4.1" => "26.11.2018 sub composegallery deleted, SSCam_composegallery changed to get information for SSCam_refresh ", "7.4.0" => "24.11.2018 new set command \"createReadingsGroup\", versionNotes can process lists like \"2,6\", changed compatibility check, use SnapId when get information after took snapshot and sscam state-event ", @@ -96,6 +97,9 @@ our %SSCam_vNotesIntern = ( # Versions History extern our %SSCam_vNotesExtern = ( + "7.6.0" => "02.12.2018 The PTZ panel is completed by \"Preset\" and \"Patrol\" (only for PTZ cameras) ", + "7.5.0" => "02.12.2018 A click on suitable content in a stream- or snapgallery device opens a popup window. ". + "The popup size can be adjusted by attribute \"popupWindowSize\". ", "7.4.0" => "20.11.2018 new command \"createReadingsGroup\". By this command a ReadingsGroup with a name of your choice (or use the default name) can be created. ". "Procedure changes of taking snapshots avoid inaccuracies if camera names in SVS very similar. ", "7.3.2" => "12.11.2018 fix Warning if 'livestreamprefix' is set to DEF, COMPATIBILITY set to 8.2.2 ", @@ -268,6 +272,8 @@ use vars qw($FW_ME); # webname (default is fhem), used by 97_GROUP/weblink use vars qw($FW_subdir); # Sub-path in URL, used by FLOORPLAN/weblink use vars qw($FW_room); # currently selected room use vars qw($FW_detail); # currently selected device for detail view +use vars qw($FW_wname); # Web instance +sub FW_pH(@); # add href sub SSCam_Initialize($) { my ($hash) = @_; @@ -6046,6 +6052,8 @@ sub SSCam_ptzpanel($;$$) { my $hash = $defs{$name}; my $iconpath = AttrVal("$name","ptzPanel_iconPath","www/images/sscam"); my $iconprefix = AttrVal("$name","ptzPanel_iconPrefix","black_btn_"); + my $valPresets = ReadingsVal("$name","Presets",""); + my $valPatrols = ReadingsVal("$name","Patrols",""); my $rowisset = 0; my $ptz_ret; my $row; @@ -6101,6 +6109,61 @@ sub SSCam_ptzpanel($;$$) { $ptz_ret .= ""; $ptz_ret .= ""; + ######################## + # add Preset & Patrols + + my ($Presets,$Patrols,$fn); + my $cmdPreset = "goPreset"; + my $cmdPatrol = "runPatrol"; + + foreach $fn (sort keys %{$data{webCmdFn}}) { + no strict "refs"; + $Presets = &{$data{webCmdFn}{$fn}}($FW_wname,$name,"",$cmdPreset,$valPresets); + use strict "refs"; + last if(defined($Presets)); + } + if($Presets) { + $Presets =~ s,^]*>(.*)$,$1,; + # Log3($name, 1, "$name - commandArgs: $Presets"); + } else { + $Presets = FW_pH "cmd.$name=set $name $cmdPreset", $cmdPreset, 0, "", 1, 1; + } + + foreach $fn (sort keys %{$data{webCmdFn}}) { + no strict "refs"; + $Patrols = &{$data{webCmdFn}{$fn}}($FW_wname,$name,"",$cmdPatrol,$valPatrols); + use strict "refs"; + last if(defined($Patrols)); + } + + + # Rahmenklasse + $ptz_ret .= "
"; + $ptz_ret .= ""; + $ptz_ret .= ""; + $ptz_ret .= '"; + $ptz_ret .= ""; + $ptz_ret .= "
'; + + # Dropdown Klasse + $ptz_ret .= ""; + $ptz_ret .= ""; + $ptz_ret .= ""; + $ptz_ret .= ""; + $ptz_ret .= "
Preset:
$Presets
"; + + $ptz_ret .= ""; + $ptz_ret .= ""; + $ptz_ret .= ""; + $ptz_ret .= ""; + $ptz_ret .= "
Patrol:
$Patrols
"; + + # Rahmenklasse end + $ptz_ret .= "
"; + $ptz_ret .= "
"; + + ##################### + if ($rowisset) { return $ptz_ret; } else { @@ -6231,7 +6294,8 @@ sub SSCam_StreamDev($$$) { 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 $pws = AttrVal($strmdev, "popupWindowSize", ''); # Größe eines Popups + my $pws = AttrVal($strmdev, "popupWindowSize", ""); # Größe eines Popups + $pws =~ s/"//g if($pws); my $StmKey = ReadingsVal($camname,"StmKey",undef); $ret = ""; @@ -6284,6 +6348,7 @@ sub SSCam_StreamDev($$$) { Your browser does not support the audio element. "; $ret .= ""; + $ret .= "" if(AttrVal($camname,"ptzPanel_use",1)); } } elsif($fmt =~ /generic/) { @@ -6357,6 +6422,8 @@ sub SSCam_StreamDev($$$) { $ret .= ""; + $ret .= ""; + $ret .= "" if(AttrVal($camname,"ptzPanel_use",1)); } } elsif ($wltype =~ /iframe/) { @@ -6373,6 +6440,7 @@ sub SSCam_StreamDev($$$) { Your browser does not support the audio element. "; $ret .= ""; + $ret .= "" if(AttrVal($camname,"ptzPanel_use",1)); } } elsif ($wltype =~ /video/) { @@ -6391,6 +6459,7 @@ sub SSCam_StreamDev($$$) { Your browser does not support the audio element. "; $ret .= ""; + $ret .= "" if(AttrVal($camname,"ptzPanel_use",1)); } } elsif($wltype =~ /base64img/) { $ret .= "')\">
"; @@ -6480,7 +6549,8 @@ sub SSCam_composegallery ($;$$) { my $imgdosnap = ""; my $ha = AttrVal($name, "snapGalleryHtmlAttr", AttrVal($name, "htmlattr", 'width="500" height="325"')); - my $pws = AttrVal($strmdev, "popupWindowSize", ""); # Größe eines Popups + my $pws = AttrVal($strmdev, "popupWindowSize", ""); # Größe eines Popups + $pws =~ s/"//g if($pws); # falls "SSCam_composegallery" durch ein SSCamSTRM-Device aufgerufen wird my $devWlink = ""; @@ -6637,6 +6707,7 @@ sub SSCam_experror { 49_SSCam: Fragen, Hinweise, Neuigkeiten und mehr rund um dieses Modul.

Prerequisites

+ Define @@ -7747,7 +7824,11 @@ attr <name> genericStrmHtmlTag <video $HTMLATTR controls autoplay>
  • ptzPanel_use
    Switch the usage of a PTZ-control panel in detail view respectively a created StreamDevice off or on - (default: on).

  • + (default: on).
    + The PTZ panel use its own icons. + Thereby the system find the icons, in FHEMWEB device the attribute "iconPath" has to be completed by "sscam" + (e.g. "attr WEB iconPath default:fhemSVG:openautomation:sscam"). +
  • rectime
    @@ -7999,7 +8080,13 @@ attr <name> genericStrmHtmlTag <video $HTMLATTR controls autoplay> Data::Dumper
    MIME::Base64
    Time::HiRes
    - HttpUtils (FHEM-Modul)

    + HttpUtils (FHEM-Modul) + +

    + Das PTZ-Paneel (nur PTZ Kameras) in SSCam benutzt einen eigenen Satz Icons. + Damit das System sie findet, ist im FHEMWEB Device das Attribut "iconPath" um "sscam" zu ergänzen + (z.B. "attr WEB iconPath default:fhemSVG:openautomation:sscam"). +

    @@ -9120,7 +9207,11 @@ attr <name> genericStrmHtmlTag <video $HTMLATTR controls autoplay>
  • ptzPanel_use
    Die Anzeige des PTZ-Steuerungspaneels in der Detailanzeige bzw. innerhalb eines generierten Streamdevice wird - ein- bzw. ausgeschaltet (default ein).

  • + ein- bzw. ausgeschaltet (default ein).
    + Das PTZ-Panel benutzt einen eigenen Satz Icons. + Damit das System sie finden kann, ist im FHEMWEB Device das Attribut "iconPath" um "sscam" zu ergänzen + (z.B. "attr WEB iconPath default:fhemSVG:openautomation:sscam"). +
  • rectime
    diff --git a/fhem/FHEM/49_SSCamSTRM.pm b/fhem/FHEM/49_SSCamSTRM.pm index 39bf5cd43..0b485cbaa 100644 --- a/fhem/FHEM/49_SSCamSTRM.pm +++ b/fhem/FHEM/49_SSCamSTRM.pm @@ -280,7 +280,7 @@ Dependend of the Streaming-Device state, different buttons are provided to start


  • @@ -292,7 +292,7 @@ Dependend of the Streaming-Device state, different buttons are provided to start

    @@ -395,7 +395,7 @@ Abhängig vom Zustand des Streaming-Devices werden zum Start von Aktionen unters


    @@ -407,7 +407,7 @@ Abhängig vom Zustand des Streaming-Devices werden zum Start von Aktionen unters