2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 18:59:33 +00:00

76_SMAPortal: contrib 1.5.3

git-svn-id: https://svn.fhem.de/fhem/trunk@19040 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
nasseeder1 2019-03-26 17:40:00 +00:00
parent fd16dbc27b
commit c4b3a9aba2

View File

@ -128,6 +128,7 @@ BEGIN {
readingsBulkUpdate
readingsBulkUpdateIfChanged
readingsBeginUpdate
readingsDelete
readingsEndUpdate
ReadingsVal
RemoveInternalTimer
@ -141,6 +142,7 @@ BEGIN {
# Versions History intern
our %vNotesIntern = (
"1.5.3" => "26.03.2019 delete L1_ErrorMessages, L1_WarningMessages if no errors or warnings occur ",
"1.5.2" => "25.03.2019 prevent module from deactivation in case of unavailable Meta.pm ",
"1.5.1" => "24.03.2019 fix \$VAR1 problem Forum: #27667.msg922983.html#msg922983 ",
"1.5.0" => "23.03.2019 add consumer data ",
@ -641,7 +643,7 @@ sub ParseData($) {
readingsBeginUpdate($hash);
my ($FeedIn_done,$GridConsumption_done,$PV_done,$AutarkyQuote_done,$SelfConsumption_done) = (0,0,0,0,0);
my ($SelfConsumptionQuote_done,$SelfSupply_done) = (0,0);
my ($SelfConsumptionQuote_done,$SelfSupply_done,$errMsg,$warnMsg) = (0,0,0,0);
for my $k (keys %$livedata_content) {
my $new_val = "";
if (defined $livedata_content->{$k}) {
@ -673,6 +675,8 @@ sub ParseData($) {
$SelfConsumption_done = 1 if($k =~ /^SelfConsumption$/);
$SelfConsumptionQuote_done = 1 if($k =~ /^SelfConsumptionQuote$/);
$SelfSupply_done = 1 if($k =~ /^SelfSupply$/);
$errMsg = 1 if($k =~ /^ErrorMessages$/);
$warnMsg = 1 if($k =~ /^WarningMessages$/);
}
}
}
@ -684,9 +688,11 @@ sub ParseData($) {
readingsBulkUpdate($hash, "L1_SelfConsumption", 0) if(!$SelfConsumption_done);
readingsBulkUpdate($hash, "L1_SelfConsumptionQuote", 0) if(!$SelfConsumptionQuote_done);
readingsBulkUpdate($hash, "L1_SelfSupply", 0) if(!$SelfSupply_done);
readingsEndUpdate($hash, 1);
readingsDelete($hash,"L1_ErrorMessages") if(!$errMsg);
readingsDelete($hash,"L1_WarningMessages") if(!$warnMsg);
if ($forecast_content && $forecast_content !~ m/undefined/i) {
# Auswertung der Forecast Daten
extractForecastData($hash,$forecast_content);