From 41559ebe2261d0e463dc5e2a496c7c79ab58a36a Mon Sep 17 00:00:00 2001 From: nasseeder1 Date: Fri, 19 May 2023 18:29:59 +0000 Subject: [PATCH] 76_SolarForecast: contrib 0.79.1 git-svn-id: https://svn.fhem.de/fhem/trunk@27593 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/contrib/DS_Starter/76_SolarForecast.pm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/fhem/contrib/DS_Starter/76_SolarForecast.pm b/fhem/contrib/DS_Starter/76_SolarForecast.pm index 975f9a1ed..1fa2bbb7f 100644 --- a/fhem/contrib/DS_Starter/76_SolarForecast.pm +++ b/fhem/contrib/DS_Starter/76_SolarForecast.pm @@ -2112,6 +2112,7 @@ sub _getRoofTopData { ## statische SolCast API Kennzahlen bereitstellen ################################################### my %seen; + my $debug = AttrVal ($name, 'ctrlDebug', 'none'); my @as = map { $data{$type}{$name}{solcastapi}{'?IdPair'}{$_}{apikey}; } keys %{$data{$type}{$name}{solcastapi}{'?IdPair'}}; my @unique = grep { !$seen{$_}++ } @as; my $upc = scalar @unique; # Anzahl unique API Keys @@ -2123,6 +2124,13 @@ sub _getRoofTopData { $data{$type}{$name}{solcastapi}{'?All'}{'?All'}{solCastAPIcallMultiplier} = $mpk; $data{$type}{$name}{solcastapi}{'?All'}{'?All'}{todayMaxAPIcalls} = $madr; + + if($debug =~ /solcastAPIcall/x) { + Log3 ($name, 1, "$name DEBUG> SolCast API Call - count unique API Keys: $upc"); + Log3 ($name, 1, "$name DEBUG> SolCast API Call - all strings count: $asc"); + Log3 ($name, 1, "$name DEBUG> SolCast API Call - max possible daily API calls: $asc"); + Log3 ($name, 1, "$name DEBUG> SolCast API Call - Requestmultiplier: $mpk"); + } ##