From 94e5aecb913e508d832de7dcc8c7fcdcefe30db6 Mon Sep 17 00:00:00 2001 From: nasseeder1 Date: Mon, 10 Feb 2020 21:28:42 +0000 Subject: [PATCH] 77_SMAEM: fix Perl warning if no frequence is delivered git-svn-id: https://svn.fhem.de/fhem/trunk@21170 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 1 + fhem/FHEM/77_SMAEM.pm | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/fhem/CHANGED b/fhem/CHANGED index dd95d7a88..500f211f9 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. + - bugfix: 77_SMAEM: fix Perl warning if no frequence is delivered - bugfix: 93_DbRep: fix Perl warning - feature: 70_DENON_AVR: added more surround modes (thx Shadow3561) - bugfix: 70_Pushsafer: fix availableMessages reading diff --git a/fhem/FHEM/77_SMAEM.pm b/fhem/FHEM/77_SMAEM.pm index 4e40f7eb5..e07a8c17f 100644 --- a/fhem/FHEM/77_SMAEM.pm +++ b/fhem/FHEM/77_SMAEM.pm @@ -3,7 +3,7 @@ # # Copyright notice # -# (c) 2016-2019 Copyright: Volker Kettenbach +# (c) 2016-2020 Copyright: Volker Kettenbach # e-mail: volker at kettenbach minus it dot de # # Credits: @@ -36,6 +36,7 @@ eval "use FHEM::Meta;1" or my $modMetaAbsent = 1; # Versions History by DS_Starter our %SMAEM_vNotesIntern = ( + "4.0.1" => "10.02.2020 fix perl warning Forum: https://forum.fhem.de/index.php/topic,51569.msg1021988.html#msg1021988", "4.0.0" => "16.12.2019 change module to OBIS metric resolution, change Readings Lx_THD to Lx_Strom, FirmwareVersion to SoftwareVersion ". "new attribute \"noCoprocess\", many internal code changes ", "3.5.0" => "14.12.2019 support of SMA Homemanager 2.0 >= 2.03.4.R, attribute \"serialNumber\", ". @@ -622,7 +623,7 @@ sub SMAEM_DoParse ($) { my $cosphi = $obis->{"1:13.4.0"}/1000; push(@row_array, $ps."CosPhi ".sprintf("%.3f",$cosphi)."\n"); - my $grid_freq = $obis->{"1:14.4.0"}/1000; + my $grid_freq = $obis->{"1:14.4.0"}/1000 if($obis->{"1:14.4.0"}); push(@row_array, $ps."GridFreq ".$grid_freq."\n") if($grid_freq); push(@row_array, $ps."SoftwareVersion ".$obis->{"144:0.0.0"}."\n");