mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-08 01:14:19 +00:00
76_SolarForecast: contrib 1.1.0
git-svn-id: https://svn.fhem.de/fhem/trunk@28168 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
85cff665de
commit
dc0c52b3f8
@ -9556,8 +9556,8 @@ sub _beamGraphicFirstHour {
|
||||
|
||||
my $day;
|
||||
|
||||
my $t = NexthoursVal ($hash, "NextHour00", "starttime", '0000-00-00 24');
|
||||
my ($year,$month,$day_str,$thishour) = $t =~ m/(\d{4})-(\d{2})-(\d{2})\s(\d{2})/x;
|
||||
my $stt = NexthoursVal ($hash, "NextHour00", "starttime", '0000-00-00 24');
|
||||
my ($year,$month,$day_str,$thishour) = $stt =~ m/(\d{4})-(\d{2})-(\d{2})\s(\d{2})/x;
|
||||
my ($val1,$val2,$val3,$val4) = (0,0,0,0);
|
||||
|
||||
$thishour++;
|
||||
@ -9597,7 +9597,7 @@ sub _beamGraphicFirstHour {
|
||||
$val3 = CircularVal ($hash, $hfcg->{0}{time_str}, 'gcons', 0);
|
||||
$val4 = CircularVal ($hash, $hfcg->{0}{time_str}, 'confc', 0);
|
||||
|
||||
$hfcg->{0}{weather} = CircularVal ($hash, $hfcg->{0}{time_str}, "weatherid", 999);
|
||||
$hfcg->{0}{weather} = CircularVal ($hash, $hfcg->{0}{time_str}, 'weatherid', 999);
|
||||
#$val4 = (ReadingsVal($name,"ThisHour_IsConsumptionRecommended",'no') eq 'yes' ) ? $icon : 999;
|
||||
}
|
||||
|
||||
@ -9662,14 +9662,14 @@ sub _beamGraphicRemainingHours {
|
||||
$hfcg->{$i}{wcc} = HistoryVal ($hash, $ds, $hfcg->{$i}{time_str}, 'wcc', '-');
|
||||
}
|
||||
else {
|
||||
$nh = sprintf('%02d', $i + $offset);
|
||||
$nh = sprintf '%02d', $i + $offset;
|
||||
}
|
||||
}
|
||||
else {
|
||||
$nh = sprintf('%02d', $i);
|
||||
$nh = sprintf '%02d', $i;
|
||||
}
|
||||
|
||||
if (defined($nh)) {
|
||||
if (defined $nh) {
|
||||
$val1 = NexthoursVal ($hash, 'NextHour'.$nh, 'pvfc', 0);
|
||||
$val4 = NexthoursVal ($hash, 'NextHour'.$nh, 'confc', 0);
|
||||
$hfcg->{$i}{weather} = NexthoursVal ($hash, 'NextHour'.$nh, 'weatherid', 999);
|
||||
@ -9772,8 +9772,7 @@ sub _beamGraphic {
|
||||
my $ii = 0;
|
||||
|
||||
for my $i (0..($maxhours * 2) - 1) { # gleiche Bedingung wie oben
|
||||
next if(!$show_night && defined($hfcg->{$i}{weather})
|
||||
&& ($hfcg->{$i}{weather} > 99)
|
||||
next if(!$show_night && $hfcg->{$i}{weather} > 99
|
||||
&& !$hfcg->{$i}{beam1}
|
||||
&& !$hfcg->{$i}{beam2});
|
||||
$ii++;
|
||||
@ -10044,7 +10043,7 @@ sub __weatherOnBeam {
|
||||
|
||||
$hfcg->{$i}{weather} = 999 if(!defined $hfcg->{$i}{weather});
|
||||
|
||||
debugLog ($paref, 'graphic', "weather id beam (from left) number >$i<: $hfcg->{$i}{weather}") if($ii < $maxhours);
|
||||
debugLog ($paref, 'graphic', "weather id beam number >$i< (start hour $hfcg->{$i}{time_str}): $hfcg->{$i}{weather}") if($ii < $maxhours);
|
||||
|
||||
if (!$show_night && $hfcg->{$i}{weather} > 99
|
||||
&& !$hfcg->{$i}{beam1}
|
||||
@ -10507,7 +10506,10 @@ return $ret;
|
||||
#
|
||||
###############################################################################
|
||||
sub formatVal6 {
|
||||
my ($v,$kw,$w) = @_;
|
||||
my $v = shift;
|
||||
my $kw = shift;
|
||||
my $w = shift;
|
||||
|
||||
my $n = ' '; # positive Zahl
|
||||
|
||||
if ($v < 0) {
|
||||
@ -10519,7 +10521,7 @@ sub formatVal6 {
|
||||
$v = sprintf "%.1f",($v / 1000);
|
||||
$v += 0; # keine 0.0 oder 6.0 etc
|
||||
|
||||
return ($n eq '-') ? ($v*-1) : $v if defined($w) ;
|
||||
return ($n eq '-') ? ($v * -1) : $v if(defined $w);
|
||||
|
||||
my $t = $v - int($v); # Nachkommstelle ?
|
||||
|
||||
@ -10544,7 +10546,7 @@ sub formatVal6 {
|
||||
}
|
||||
}
|
||||
|
||||
return ($n eq '-') ? ($v*-1) : $v if defined($w);
|
||||
return ($n eq '-') ? ($v * -1) : $v if(defined $w);
|
||||
|
||||
# Werte bleiben in Watt
|
||||
if (!$v) { return ' '; } ## no critic "Cascading" # keine Anzeige bei Null
|
||||
@ -14546,6 +14548,22 @@ to ensure that the system configuration is correct.
|
||||
</ul>
|
||||
<br>
|
||||
|
||||
<ul>
|
||||
<a id="SolarForecast-set-consumerNewPlanning"></a>
|
||||
<li><b>consumerNewPlanning <Consumer number> </b> <br><br>
|
||||
|
||||
The existing planning of the specified consumer is deleted. <br>
|
||||
The new planning is carried out immediately, taking into account the parameters set in the consumerXX attribute.
|
||||
<br><br>
|
||||
|
||||
<ul>
|
||||
<b>Beispiel: </b> <br>
|
||||
set <name> consumerNewPlanning 01 <br>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<br>
|
||||
|
||||
<ul>
|
||||
<a id="SolarForecast-set-consumerImmediatePlanning"></a>
|
||||
<li><b>consumerImmediatePlanning <Consumer number> </b> <br><br>
|
||||
@ -16390,6 +16408,22 @@ die ordnungsgemäße Anlagenkonfiguration geprüft werden.
|
||||
</ul>
|
||||
<br>
|
||||
|
||||
<ul>
|
||||
<a id="SolarForecast-set-consumerNewPlanning"></a>
|
||||
<li><b>consumerNewPlanning <Verbrauchernummer> </b> <br><br>
|
||||
|
||||
Es wird die vorhandene Planung des angegebenen Verbrauchers gelöscht. <br>
|
||||
Die Neuplanung wird unter Berücksichtigung der im consumerXX Attribut gesetzten Parameter sofort vorgenommen.
|
||||
<br><br>
|
||||
|
||||
<ul>
|
||||
<b>Beispiel: </b> <br>
|
||||
set <name> consumerNewPlanning 01 <br>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<br>
|
||||
|
||||
<ul>
|
||||
<a id="SolarForecast-set-consumerImmediatePlanning"></a>
|
||||
<li><b>consumerImmediatePlanning <Verbrauchernummer> </b> <br><br>
|
||||
|
Loading…
x
Reference in New Issue
Block a user