mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
76_SolarForecast: contrib 1.50.2
git-svn-id: https://svn.fhem.de/fhem/trunk@29837 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
ce3f6042b7
commit
84837c5c5e
@ -160,7 +160,8 @@ BEGIN {
|
|||||||
|
|
||||||
# Versions History intern
|
# Versions History intern
|
||||||
my %vNotesIntern = (
|
my %vNotesIntern = (
|
||||||
"1.50.2" => "09.04.2025 take inverter cap into account if no strings key is set, ctrlSpecialReadings: new option tomorrowConsumptionForecast ",
|
"1.50.2" => "09.04.2025 take inverter cap into account if no strings key is set, ctrlSpecialReadings: new option tomorrowConsumptionForecast ".
|
||||||
|
"plant check: pront out module version in header ",
|
||||||
"1.50.1" => "07.04.2025 new pvCorrectionFactor_Auto option 'on_complex_api_ai' to use average of AI + API forecast if AI Hit ".
|
"1.50.1" => "07.04.2025 new pvCorrectionFactor_Auto option 'on_complex_api_ai' to use average of AI + API forecast if AI Hit ".
|
||||||
"some code changes ",
|
"some code changes ",
|
||||||
"1.50.0" => "05.04.2025 changes V 1.49.1 - 1.49.6 as new major release ",
|
"1.50.0" => "05.04.2025 changes V 1.49.1 - 1.49.6 as new major release ",
|
||||||
@ -4925,8 +4926,9 @@ sub ___setOpenMeteoAPIcallKeyData {
|
|||||||
my $dac = StatusAPIVal ($hash, 'OpenMeteo', '?All', 'todayDoneAPIcalls', 0);
|
my $dac = StatusAPIVal ($hash, 'OpenMeteo', '?All', 'todayDoneAPIcalls', 0);
|
||||||
my $asc = CurrentVal ($hash, 'allstringscount', 1);
|
my $asc = CurrentVal ($hash, 'allstringscount', 1);
|
||||||
|
|
||||||
my $drr = OMETMAXREQ - $dar;
|
my $drr = OMETMAXREQ - $dar; # verbleibende Requests
|
||||||
$drr = 0 if($drr < 0);
|
$drr = 0 if($drr < 0);
|
||||||
|
my $rac = $drr / ($cequ * $asc); # verbleibende Calls
|
||||||
|
|
||||||
$data{$name}{statusapi}{OpenMeteo}{'?All'}{todayRemainingAPIrequests} = $drr;
|
$data{$name}{statusapi}{OpenMeteo}{'?All'}{todayRemainingAPIrequests} = $drr;
|
||||||
$data{$name}{statusapi}{OpenMeteo}{'?All'}{currentAPIinterval} = OMETEOREPDEF;
|
$data{$name}{statusapi}{OpenMeteo}{'?All'}{currentAPIinterval} = OMETEOREPDEF;
|
||||||
@ -4937,8 +4939,8 @@ sub ___setOpenMeteoAPIcallKeyData {
|
|||||||
my $ets = timestringToTimestamp ($edate);
|
my $ets = timestringToTimestamp ($edate);
|
||||||
my $rmdif = $ets - int $t;
|
my $rmdif = $ets - int $t;
|
||||||
|
|
||||||
if ($drr) {
|
if ($rac) {
|
||||||
my $optrep = $rmdif / ($drr / ($cequ * $asc));
|
my $optrep = sprintf "%.0f", ($rmdif / $rac);
|
||||||
$optrep = OMETEOREPDEF if($optrep < OMETEOREPDEF);
|
$optrep = OMETEOREPDEF if($optrep < OMETEOREPDEF);
|
||||||
|
|
||||||
$data{$name}{statusapi}{OpenMeteo}{'?All'}{currentAPIinterval} = $optrep;
|
$data{$name}{statusapi}{OpenMeteo}{'?All'}{currentAPIinterval} = $optrep;
|
||||||
@ -19697,6 +19699,9 @@ sub checkPlantConfig {
|
|||||||
my $lang = AttrVal ($name, 'ctrlLanguage', AttrVal ('global', 'language', DEFLANG));
|
my $lang = AttrVal ($name, 'ctrlLanguage', AttrVal ('global', 'language', DEFLANG));
|
||||||
my $pcf = ReadingsVal ($name, 'pvCorrectionFactor_Auto', 'off');
|
my $pcf = ReadingsVal ($name, 'pvCorrectionFactor_Auto', 'off');
|
||||||
my $raname = AttrVal ($name, 'setupRadiationAPI', '');
|
my $raname = AttrVal ($name, 'setupRadiationAPI', '');
|
||||||
|
my $version = InternalVal ($name, 'FVERSION', '');
|
||||||
|
$version =~ /:v(.*)-s/xs;
|
||||||
|
$version = $1 ? $1 : '-';
|
||||||
my ($acu, $aln) = isAutoCorrUsed ($name);
|
my ($acu, $aln) = isAutoCorrUsed ($name);
|
||||||
|
|
||||||
my $ok = FW_makeImage ('10px-kreis-gruen.png', '');
|
my $ok = FW_makeImage ('10px-kreis-gruen.png', '');
|
||||||
@ -20264,7 +20269,7 @@ sub checkPlantConfig {
|
|||||||
## Ausgabe
|
## Ausgabe
|
||||||
############
|
############
|
||||||
my $out = qq{<html>};
|
my $out = qq{<html>};
|
||||||
$out .= qq{<b>}.$hqtxt{plntck}{$lang}.qq{ - Model: $hash->{MODEL} </b> <br><br>};
|
$out .= qq{<b>}.$hqtxt{plntck}{$lang}.qq{ - Module Version: $version, Model: $hash->{MODEL} </b> <br><br>};
|
||||||
|
|
||||||
$out .= qq{<table class="roomoverview" style="text-align:left; border:1px solid; padding:5px; border-spacing:5px; margin-left:auto; margin-right:auto;">};
|
$out .= qq{<table class="roomoverview" style="text-align:left; border:1px solid; padding:5px; border-spacing:5px; margin-left:auto; margin-right:auto;">};
|
||||||
$out .= qq{<tr style="font-weight:bold;">};
|
$out .= qq{<tr style="font-weight:bold;">};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user