From 369e3aa32a983bb0ab89eff971f6c1db4aa96c80 Mon Sep 17 00:00:00 2001 From: nasseeder1 Date: Sun, 4 Jul 2021 19:59:59 +0000 Subject: [PATCH] 49_SSCam: new value 8.2.8-xxxx for attr simu_SVSversion git-svn-id: https://svn.fhem.de/fhem/trunk@24703 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 1 + fhem/FHEM/49_SSCam.pm | 99 ++++++++++++++++++++++--------------------- 2 files changed, 51 insertions(+), 49 deletions(-) diff --git a/fhem/CHANGED b/fhem/CHANGED index 46ebee943..38a7ff281 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -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_SSCam: new value 8.2.8-xxxx for attr simu_SVSversion - bugfix: 76_SMAInverter:fix ETOTAL/LOADTOTAL bug - feature: 76_SMAInverter: hide unavailable data - feature: 76_SMAInverter: AC Voltage and AC Curren read fixed diff --git a/fhem/FHEM/49_SSCam.pm b/fhem/FHEM/49_SSCam.pm index cd13a5417..e2b0a92c7 100644 --- a/fhem/FHEM/49_SSCam.pm +++ b/fhem/FHEM/49_SSCam.pm @@ -184,6 +184,7 @@ BEGIN { # Versions History intern my %vNotesIntern = ( + "9.10.0" => "03.07.2021 change getApiSites_Parse for better simu_SVSversion, new value 8.2.8-xxxx for attr simu_SVSversion ", "9.9.0" => "21.05.2021 new get command saveLastSnap ", "9.8.5" => "22.02.2021 remove sscam_tooltip.js, substitute /fhem by \$FW_ME ", "9.8.4" => "20.02.2021 sub Define minor fix ", @@ -628,6 +629,30 @@ my %sdswfn = ( # Fun "hls" => {fn => "__switchedHLS" }, ); +my %hsimu = ( # Funktionshash Version Simulation + "71xxxx-simu" => {AUTH => "4", EXTREC => "2", CAM => "8", SNAPSHOT => "1", PTZ => "4", + PRESET => "1", SVSINFO => "5", CAMEVENT => "1", EVENT => "5", VIDEOSTM => "1", + EXTEVT => "1", STM => "1", LOG => "1", REC => "4" }, + "72xxxx-simu" => {AUTH => "6", EXTREC => "3", CAM => "8", SNAPSHOT => "1", PTZ => "5", + PRESET => "1", SVSINFO => "6", CAMEVENT => "1", EVENT => "5", VIDEOSTM => "1", + EXTEVT => "1", STM => "1", LOG => "1", REC => "4" }, + "800xxxx-simu" => {AUTH => "6", EXTREC => "3", CAM => "9", SNAPSHOT => "1", PTZ => "5", + PRESET => "1", SVSINFO => "6", CAMEVENT => "1", EVENT => "5", VIDEOSTM => "1", + EXTEVT => "1", STM => "1", LOG => "1", REC => "6" }, + "815xxxx-simu" => {AUTH => "6", EXTREC => "3", CAM => "9", SNAPSHOT => "1", PTZ => "5", + PRESET => "1", SVSINFO => "6", CAMEVENT => "1", EVENT => "5", VIDEOSTM => "1", + EXTEVT => "1", STM => "1", HMODE => "1", LOG => "3", AUDIOSTM => "2", + VIDEOSTMS => "1", REC => "6" }, + "820xxxx-simu" => {AUTH => "6", EXTREC => "3", CAM => "9", SNAPSHOT => "1", PTZ => "5", + PRESET => "1", SVSINFO => "6", CAMEVENT => "1", EVENT => "5", VIDEOSTM => "1", + EXTEVT => "1", STM => "1", HMODE => "1", LOG => "3", AUDIOSTM => "2", + VIDEOSTMS => "1", REC => "6" }, + "828xxxx-simu" => {AUTH => "6", EXTREC => "3", CAM => "9", SNAPSHOT => "1", PTZ => "6", + PRESET => "1", SVSINFO => "8", CAMEVENT => "1", EVENT => "5", VIDEOSTM => "1", + EXTEVT => "1", STM => "1", HMODE => "1", LOG => "3", AUDIOSTM => "2", + VIDEOSTMS => "1", REC => "6" }, +); + # Standardvariablen und Forward-Deklaration my $defSlim = 3; # default Anzahl der abzurufenden Schnappschüsse mit snapGallery my $defColumns = 3; # default Anzahl der Spalten einer snapGallery @@ -829,7 +854,7 @@ sub Initialize { "session:SurveillanceStation,DSM ". "showPassInLog:1,0 ". "showStmInfoFull:1,0 ". - "simu_SVSversion:7.2-xxxx,7.1-xxxx,8.0.0-xxxx,8.1.5-xxxx,8.2.0-xxxx ". + "simu_SVSversion:7.1-xxxx,7.2-xxxx,8.0.0-xxxx,8.1.5-xxxx,8.2.0-xxxx,8.2.8-xxxx ". "videofolderMap ". "webCmd ". $readingFnAttributes; @@ -5285,7 +5310,7 @@ sub getApiSites_Parse { Log3($name, 4, "$name - installed SVS version is: $actvs"); - if(AttrVal($name,"simu_SVSversion",0)) { + if (AttrVal($name,"simu_SVSversion",0)) { my @vl = split (/\.|-/x,AttrVal($name, "simu_SVSversion", "")); $actvs = $vl[0]; $actvs .= $vl[1]; @@ -5293,16 +5318,17 @@ sub getApiSites_Parse { $actvs .= "-simu"; } - # Downgrades für nicht kompatible API-Versionen. Hier nur nutzen wenn API zentral downgraded werden soll + ### Downgrades für nicht kompatible API-Versionen. Hier nur nutzen wenn API zentral downgraded werden soll + ########################################################################################################### Log3($name, 4, "$name - ------- Begin of adaption section -------"); - my @sims; + my @adapts; - # push @sims, "CAM:8"; - # push @sims, "PTZ:4"; + # push @adapts, "CAM:8"; + # push @adapts, "PTZ:4"; - for my $esim (@sims) { - my($k,$v) = split ":", $esim; + for my $ada (@adapts) { + my($k,$v) = split ":", $ada; $hash->{HELPER}{API}{$k}{VER} = $v; $hash->{HELPER}{API}{$k}{MOD} = "yes"; Log3($name, 4, "$name - Version of $hash->{HELPER}{API}{$k}{NAME} adapted to: $hash->{HELPER}{API}{$k}{VER}"); @@ -5310,49 +5336,17 @@ sub getApiSites_Parse { Log3($name, 4, "$name - ------- End of adaption section -------"); - # Simulation älterer SVS-Versionen + ### Simulation älterer SVS-Versionen + ##################################### Log3($name, 4, "$name - ------- Begin of simulation section -------"); if (AttrVal($name, "simu_SVSversion", undef)) { - my @mods; Log3($name, 4, "$name - SVS version $actvs will be simulated"); - - if ($actvs =~ /^71/x) { - push @mods, "CAM:8"; - push @mods, "AUTH:4"; - push @mods, "EXTREC:2"; - push @mods, "PTZ:4"; - } - elsif ($actvs =~ /^72/x) { - push @mods, "CAM:8"; - push @mods, "AUTH:6"; - push @mods, "EXTREC:3"; - push @mods, "PTZ:5"; - } - elsif ($actvs =~ /^800/x) { - push @mods, "CAM:9"; - push @mods, "AUTH:6"; - push @mods, "EXTREC:3"; - push @mods, "PTZ:5"; - } - elsif ($actvs =~ /^815/x) { - push @mods, "CAM:9"; - push @mods, "AUTH:6"; - push @mods, "EXTREC:3"; - push @mods, "PTZ:5"; - } - elsif ($actvs =~ /^820/x) { - # ab API v2.8 kein "SYNO.SurveillanceStation.VideoStream", "SYNO.SurveillanceStation.AudioStream", - # "SYNO.SurveillanceStation.Streaming" mehr enthalten - push @mods, "VIDEOSTMS:0"; - push @mods, "AUDIOSTM:0"; - } - - for my $elem (@mods) { - my($k,$v) = split ":", $elem; - $hash->{HELPER}{API}{$k}{VER} = $v; + + for my $k (sort keys %{$hsimu{$actvs}}) { + $hash->{HELPER}{API}{$k}{VER} = $hsimu{$actvs}{$k}; $hash->{HELPER}{API}{$k}{MOD} = "yes"; - Log3($name, 4, "$name - Version of $hash->{HELPER}{API}{$k}{NAME} adapted to: $hash->{HELPER}{API}{$k}{VER}"); + Log3($name, 4, "$name - Version of $hash->{HELPER}{API}{$k}{NAME} adapted to: $hash->{HELPER}{API}{$k}{VER}"); } } @@ -13455,7 +13449,11 @@ attr <name> genericStrmHtmlTag <img $HTMLATTR
  • simu_SVSversion
    - simulates another SVS version. (only a lower version than the installed one is possible !)

  • + A logical "downgrade" to the specified SVS version is performed. The attribute is useful to temporarily eliminate + incompatibilities that may occur when updating/upgrading Synology Surveillance Station. + Incompatibilities should be reported to the maitainer in a timely manner. + +
  • smtpHost <Hostname>
    @@ -15478,8 +15476,11 @@ attr <name> genericStrmHtmlTag <img $HTMLATTR
  • simu_SVSversion
    - Simuliert eine andere SVS-Version. (es ist nur eine niedrigere als die installierte SVS - Version möglich !)

  • + Es wird ein logisches "Downgrade" auf die angegebene SVS-Version ausgeführt. Das Attribut ist hilfreich um eventuell + bei einem Update/Upgrade der Synology Surveillance Station auftretende Inkompatibilitäten temporär zu eliminieren. + Auftretende Inkompatibilitäten sollten zeitnah dem Maitainer mitgeteilt werden. + +
  • smtpHost <Hostname>