diff --git a/fhem/CHANGED b/fhem/CHANGED index 42a85e68f..2b243df55 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. + - change: 50_SSFile: compatibility to DSM7 - bugfix: 93_DbRep: Forum: topic,53584.msg1167044.html#msg1167044 - change: 49_SSCam: set compatibility to SVS version 8.2.9 - bugfix: 76_SMAInverter:fix ETOTAL/LOADTOTAL bug diff --git a/fhem/FHEM/50_SSFile.pm b/fhem/FHEM/50_SSFile.pm index 2557c26e6..1ebc0e09e 100644 --- a/fhem/FHEM/50_SSFile.pm +++ b/fhem/FHEM/50_SSFile.pm @@ -145,6 +145,7 @@ BEGIN { # Versions History intern my %vNotesIntern = ( + "1.0.1" => "18.07.2021 compatibility to DSM7 ", "1.0.0" => "25.05.2021 ready for check in ", "0.8.1" => "24.05.2021 fix FHEM crash when malfomed JSON is received ". "Forum: https://forum.fhem.de/index.php/topic,115371.msg1158531.html#msg1158531 ", @@ -202,6 +203,10 @@ my %hmodep = ( # Ha deleteRemoteObj => { fn => \&_parsedeleteRemoteObject, doevt => 1 }, ); +my %hvada = ( # Funktionshash Version Adaption + "a01" => {AUTH => "6", LIST => "1", UPLOAD => "2" }, +); + # Versions History extern my %vNotesExtern = ( "0.6.0" => "30.10.2020 A new Set command Upload is integrated and the fillup upload queue routine is running asynchronously.
". @@ -1495,19 +1500,17 @@ sub getApiSites_parse { ## no critic 'complex return; } - # 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 $adavs = "a01"; # adaptierte Version - my @sims; - - push @sims, "LIST:1"; - push @sims, "UPLOAD:2"; - - for my $esim (@sims) { - my($k,$v) = split ":", $esim; - $data{$type}{$name}{fileapi}{$k}{VER} = $v; - $data{$type}{$name}{fileapi}{$k}{MOD} = "yes"; - Log3($name, 4, "$name - Version of $data{$type}{$name}{fileapi}{$k}{NAME} adapted to: $data{$type}{$name}{fileapi}{$k}{VER}"); + if($adavs) { + for my $av (sort keys %{$hvada{$adavs}}) { + $data{$type}{$name}{fileapi}{$av}{VER} = $hvada{$adavs}{$av}; + $data{$type}{$name}{fileapi}{$av}{MOD} = "yes"; + Log3($name, 4, "$name - Version of $data{$type}{$name}{fileapi}{$av}{NAME} adapted to: $data{$type}{$name}{fileapi}{$av}{VER}"); + } } Log3($name, 4, "$name - ------- End of adaption section -------"); @@ -1516,7 +1519,7 @@ sub getApiSites_parse { ## no critic 'complex Log3 ($name, 4, "$name - API completed:\n".Dumper $data{$type}{$name}{fileapi}); - if ($opmode eq "apiInfo") { # API Infos in Popup anzeigen + if ($opmode eq "apiInfo") { # API Infos in Popup anzeigen showAPIinfo ($hash, $data{$type}{$name}{fileapi}); # übergibt Referenz zum instanziierten API-Hash) readingsSingleUpdate ($hash, "state", "done", 1); checkSendRetry ($name, 0, $queueStartFn);