mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-02-25 03:44:52 +00:00
76_SolarForecast: add random period get message file
git-svn-id: https://svn.fhem.de/fhem/trunk@29639 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
1544d92733
commit
8b3fe89265
@ -1,5 +1,6 @@
|
|||||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
# 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
|
# Do not insert empty lines here, update check depends on it
|
||||||
|
- change: 76_SolarForecast: add random period get message file
|
||||||
- bugfix: 36_Shelly: setting of attribute slat_control
|
- bugfix: 36_Shelly: setting of attribute slat_control
|
||||||
- feature: 76_SolarForecast: new special reading todayConsumption
|
- feature: 76_SolarForecast: new special reading todayConsumption
|
||||||
- feature: 36_Shelly: Slat Control / Roller Gen2+
|
- feature: 36_Shelly: Slat Control / Roller Gen2+
|
||||||
|
@ -160,6 +160,7 @@ BEGIN {
|
|||||||
|
|
||||||
# Versions History intern
|
# Versions History intern
|
||||||
my %vNotesIntern = (
|
my %vNotesIntern = (
|
||||||
|
"1.45.4" => "08.02.2025 change constant GMFILEREPEAT + new constant GMFILERANDOM ",
|
||||||
"1.45.3" => "06.02.2025 __readDataWeather: if no values of hour 01 (00:00+) use val of hour 24 of day before ".
|
"1.45.3" => "06.02.2025 __readDataWeather: if no values of hour 01 (00:00+) use val of hour 24 of day before ".
|
||||||
"new special reading todayConsumption ",
|
"new special reading todayConsumption ",
|
||||||
"1.45.2" => "05.02.2025 aiAddRawData: temp, con, wcc, rr1c, rad1h = undef if no value in pvhistory, fix isWeatherDevValid ".
|
"1.45.2" => "05.02.2025 aiAddRawData: temp, con, wcc, rr1c, rad1h = undef if no value in pvhistory, fix isWeatherDevValid ".
|
||||||
@ -396,7 +397,8 @@ use constant CARECYCLEDEF => 20;
|
|||||||
use constant BATSOCCHGDAY => 5; # Batterie: prozentuale SoC Anpassung pro Tag
|
use constant BATSOCCHGDAY => 5; # Batterie: prozentuale SoC Anpassung pro Tag
|
||||||
|
|
||||||
use constant GMFBLTO => 30; # Timeout Aholen Message File aus contrib
|
use constant GMFBLTO => 30; # Timeout Aholen Message File aus contrib
|
||||||
use constant GMFILEREPEAT => 4600; # Wiederholungsuntervall Abholen Message File aus contrib
|
use constant GMFILEREPEAT => 4200; # Base Wiederholungsuntervall Abholen Message File aus contrib
|
||||||
|
use constant GMFILERANDOM => 8400; # Random AddOn zu GMFILEREPEAT
|
||||||
use constant IDXLIMIT => 900000; # Notification System: Indexe > IDXLIMIT sind reserviert für Steuerungsaufgaben
|
use constant IDXLIMIT => 900000; # Notification System: Indexe > IDXLIMIT sind reserviert für Steuerungsaufgaben
|
||||||
|
|
||||||
use constant AITRBLTO => 7200; # KI Training BlockingCall Timeout
|
use constant AITRBLTO => 7200; # KI Training BlockingCall Timeout
|
||||||
@ -1575,9 +1577,9 @@ sub Define {
|
|||||||
reloadCacheFiles ($params);
|
reloadCacheFiles ($params);
|
||||||
singleUpdateState ( {hash => $hash, state => 'initialized', evt => 1} );
|
singleUpdateState ( {hash => $hash, state => 'initialized', evt => 1} );
|
||||||
|
|
||||||
$readyfnlist{$name} = $hash; # Registrierung in Ready-Schleife
|
$readyfnlist{$name} = $hash; # Registrierung in Ready-Schleife
|
||||||
InternalTimer (gettimeofday() + $whistrepeat + int(rand(300)), "FHEM::SolarForecast::periodicWriteMemcache", $hash, 0); # Einstieg periodisches Schreiben historische Daten
|
InternalTimer (gettimeofday() + $whistrepeat + int(rand(300)), "FHEM::SolarForecast::periodicWriteMemcache", $hash, 0); # Einstieg periodisches Schreiben historische Daten
|
||||||
InternalTimer (gettimeofday() + 120 + int(rand(300)), "FHEM::SolarForecast::getMessageFileNonBlocking", $hash, 0);
|
InternalTimer (gettimeofday() + 120 + int(rand(2700)), "FHEM::SolarForecast::getMessageFileNonBlocking", $hash, 0);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -12665,11 +12667,11 @@ return $hdv;
|
|||||||
# Energieverbrauch des Hauses in History speichern
|
# Energieverbrauch des Hauses in History speichern
|
||||||
################################################################
|
################################################################
|
||||||
sub _saveEnergyConsumption {
|
sub _saveEnergyConsumption {
|
||||||
my $paref = shift;
|
my $paref = shift;
|
||||||
my $name = $paref->{name};
|
my $name = $paref->{name};
|
||||||
my $day = $paref->{day};
|
my $day = $paref->{day};
|
||||||
my $chour = $paref->{chour};
|
my $chour = $paref->{chour};
|
||||||
my $debug = $paref->{debug};
|
my $debug = $paref->{debug};
|
||||||
|
|
||||||
my $hod = sprintf "%02d", ($chour + 1);
|
my $hod = sprintf "%02d", ($chour + 1);
|
||||||
my $pvrl = ReadingsNum ($name, 'Today_Hour'.$hod.'_PVreal', 0); # Reading enthält die Summe aller Inverterdevices
|
my $pvrl = ReadingsNum ($name, 'Today_Hour'.$hod.'_PVreal', 0); # Reading enthält die Summe aller Inverterdevices
|
||||||
@ -12685,7 +12687,7 @@ sub _saveEnergyConsumption {
|
|||||||
$batout += ReadingsNum ($name, 'Today_Hour'.$hod.'_BatOut_'.$bn, 0);
|
$batout += ReadingsNum ($name, 'Today_Hour'.$hod.'_BatOut_'.$bn, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
my $ppreal = 0;
|
my $ppreal = 0;
|
||||||
|
|
||||||
for my $prn (1..MAXPRODUCER) { # V1.32.0 : Erzeugung sonstiger Producer (01..03) hinzufügen
|
for my $prn (1..MAXPRODUCER) { # V1.32.0 : Erzeugung sonstiger Producer (01..03) hinzufügen
|
||||||
$prn = sprintf "%02d", $prn;
|
$prn = sprintf "%02d", $prn;
|
||||||
@ -13165,7 +13167,7 @@ sub entryGraphic {
|
|||||||
my $clegend = $paref->{clegend};
|
my $clegend = $paref->{clegend};
|
||||||
$m = $paref->{modulo} % 2;
|
$m = $paref->{modulo} % 2;
|
||||||
|
|
||||||
if ($legendtxt && ($clegend eq 'top')) {
|
if ($legendtxt && $clegend eq 'top') {
|
||||||
$ret .= "<tr class='$htr{$m}{cl}'>";
|
$ret .= "<tr class='$htr{$m}{cl}'>";
|
||||||
$ret .= "<td colspan='".($maxhours+2)."' align='center' style='padding-left: 10px; padding-top: 5px; padding-bottom: 5px; word-break: normal'>";
|
$ret .= "<td colspan='".($maxhours+2)."' align='center' style='padding-left: 10px; padding-top: 5px; padding-bottom: 5px; word-break: normal'>";
|
||||||
$ret .= $legendtxt;
|
$ret .= $legendtxt;
|
||||||
@ -16520,7 +16522,7 @@ sub getMessageFileNonBlocking {
|
|||||||
my $name = $hash->{NAME};
|
my $name = $hash->{NAME};
|
||||||
|
|
||||||
RemoveInternalTimer ($hash, "FHEM::SolarForecast::getMessageFileNonBlocking");
|
RemoveInternalTimer ($hash, "FHEM::SolarForecast::getMessageFileNonBlocking");
|
||||||
InternalTimer (gettimeofday() + GMFILEREPEAT, "FHEM::SolarForecast::getMessageFileNonBlocking", $hash, 0);
|
InternalTimer (gettimeofday() + GMFILEREPEAT + int(rand(GMFILERANDOM)), "FHEM::SolarForecast::getMessageFileNonBlocking", $hash, 0);
|
||||||
|
|
||||||
my (undef, $disabled, $inactive) = controller ($name);
|
my (undef, $disabled, $inactive) = controller ($name);
|
||||||
return if($disabled || $inactive);
|
return if($disabled || $inactive);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user