mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 20:17:45 +00:00
76_SolarForecast.pm: contrib 0.46.0
git-svn-id: https://svn.fhem.de/fhem/trunk@24464 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
e67bb25dec
commit
8e08c4d67e
@ -1294,10 +1294,6 @@ sub Attr {
|
|||||||
readingsSingleUpdate($hash, "state", $val, 1);
|
readingsSingleUpdate($hash, "state", $val, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if($aName eq "icon") {
|
|
||||||
$_[2] = "consumerAdviceIcon";
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($cmd eq "set") {
|
if ($cmd eq "set") {
|
||||||
if ($aName eq "interval") {
|
if ($aName eq "interval") {
|
||||||
unless ($aVal =~ /^[0-9]+$/x) {return "The value for $aName is not valid. Use only figures 0-9 !";}
|
unless ($aVal =~ /^[0-9]+$/x) {return "The value for $aName is not valid. Use only figures 0-9 !";}
|
||||||
@ -1366,18 +1362,18 @@ sub _attrconsumer { ## no critic "not used"
|
|||||||
else {
|
else {
|
||||||
my $day = strftime "%d", localtime(time); # aktueller Tag (range 01 to 31)
|
my $day = strftime "%d", localtime(time); # aktueller Tag (range 01 to 31)
|
||||||
my $type = $hash->{TYPE};
|
my $type = $hash->{TYPE};
|
||||||
my ($no) = $aName =~ /consumer([0-9]+)/xs;
|
my ($co) = $aName =~ /consumer([0-9]+)/xs;
|
||||||
|
|
||||||
deleteReadingspec ($hash, "consumer${no}.*");
|
deleteReadingspec ($hash, "consumer${co}.*");
|
||||||
|
|
||||||
for my $i (1..24) { # Consumer aus History löschen
|
for my $i (1..24) { # Consumer aus History löschen
|
||||||
delete $data{$type}{$name}{pvhist}{$day}{sprintf("%02d",$i)}{"csmt${no}"};
|
delete $data{$type}{$name}{pvhist}{$day}{sprintf("%02d",$i)}{"csmt${co}"};
|
||||||
delete $data{$type}{$name}{pvhist}{$day}{sprintf("%02d",$i)}{"csme${no}"};
|
delete $data{$type}{$name}{pvhist}{$day}{sprintf("%02d",$i)}{"csme${co}"};
|
||||||
}
|
}
|
||||||
|
|
||||||
delete $data{$type}{$name}{pvhist}{$day}{99}{"csmt${no}"};
|
delete $data{$type}{$name}{pvhist}{$day}{99}{"csmt${co}"};
|
||||||
delete $data{$type}{$name}{pvhist}{$day}{99}{"csme${no}"};
|
delete $data{$type}{$name}{pvhist}{$day}{99}{"csme${co}"};
|
||||||
delete $data{$type}{$name}{consumers}{$no}; # Consumer Hash Verbraucher löschen
|
delete $data{$type}{$name}{consumers}{$co}; # Consumer Hash Verbraucher löschen
|
||||||
}
|
}
|
||||||
|
|
||||||
InternalTimer(gettimeofday()+5, "FHEM::SolarForecast::createNotifyDev", $hash, 0);
|
InternalTimer(gettimeofday()+5, "FHEM::SolarForecast::createNotifyDev", $hash, 0);
|
||||||
@ -2317,8 +2313,9 @@ sub _manageConsumerData {
|
|||||||
my $startts = ConsumerVal ($hash, $c, "planswitchon", "");
|
my $startts = ConsumerVal ($hash, $c, "planswitchon", "");
|
||||||
my $stopts = ConsumerVal ($hash, $c, "planswitchoff", "");
|
my $stopts = ConsumerVal ($hash, $c, "planswitchoff", "");
|
||||||
|
|
||||||
my (undef,undef,undef,$starttime) = timestampToTimestring ($startts) if($startts);
|
my ($starttime,$stoptime);
|
||||||
my (undef,undef,undef,$stoptime) = timestampToTimestring ($stopts) if($stopts);
|
(undef,undef,undef,$starttime) = timestampToTimestring ($startts) if($startts);
|
||||||
|
(undef,undef,undef,$stoptime) = timestampToTimestring ($stopts) if($stopts);
|
||||||
|
|
||||||
$data{$type}{$name}{consumers}{$c}{state} = $costate;
|
$data{$type}{$name}{consumers}{$c}{state} = $costate;
|
||||||
|
|
||||||
@ -2370,7 +2367,8 @@ sub __calcEnergyPieces {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for my $h (1..$hours) {
|
for my $h (1..$hours) {
|
||||||
my $he = $epiecef if($h == 1 ); # kalk. Energieverbrauch Startstunde
|
my $he;
|
||||||
|
$he = $epiecef if($h == 1 ); # kalk. Energieverbrauch Startstunde
|
||||||
$he = $epiecem if($h > 1 && $h < $hours); # kalk. Energieverbrauch Folgestunde(n)
|
$he = $epiecem if($h > 1 && $h < $hours); # kalk. Energieverbrauch Folgestunde(n)
|
||||||
$he = $epiecel if($h == $hours ); # kalk. Energieverbrauch letzte Stunde
|
$he = $epiecel if($h == $hours ); # kalk. Energieverbrauch letzte Stunde
|
||||||
|
|
||||||
@ -6443,21 +6441,21 @@ Ein/Ausschaltzeiten sowie deren Ausführung vom SolarForecast Modul übernehmen
|
|||||||
|
|
||||||
=for :application/json;q=META.json 76_SolarForecast.pm
|
=for :application/json;q=META.json 76_SolarForecast.pm
|
||||||
{
|
{
|
||||||
"abstract": "Visualization of solar predictions for PV systems",
|
"abstract": "Creation of solar predictions for PV systems",
|
||||||
"x_lang": {
|
"x_lang": {
|
||||||
"de": {
|
"de": {
|
||||||
"abstract": "Visualisierung von solaren Vorhersagen für PV Anlagen"
|
"abstract": "Erstellung solarer Vorhersagen von PV Anlagen"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"sma",
|
"inverter",
|
||||||
"photovoltaik",
|
"photovoltaik",
|
||||||
"electricity",
|
"electricity",
|
||||||
"portal",
|
"forecast",
|
||||||
"smaportal",
|
|
||||||
"graphics",
|
"graphics",
|
||||||
"longpoll",
|
"Autarky",
|
||||||
"refresh"
|
"Consumer",
|
||||||
|
"PV"
|
||||||
],
|
],
|
||||||
"version": "v1.1.1",
|
"version": "v1.1.1",
|
||||||
"release_status": "testing",
|
"release_status": "testing",
|
||||||
@ -6475,6 +6473,13 @@ Ein/Ausschaltzeiten sowie deren Ausführung vom SolarForecast Modul übernehmen
|
|||||||
"requires": {
|
"requires": {
|
||||||
"FHEM": 5.00918799,
|
"FHEM": 5.00918799,
|
||||||
"perl": 5.014,
|
"perl": 5.014,
|
||||||
|
"POSIX": 0,
|
||||||
|
"GPUtils": 0,
|
||||||
|
"Encode": 0,
|
||||||
|
"utf8": 0,
|
||||||
|
"JSON": 4.020,
|
||||||
|
"Data::Dumper": 0,
|
||||||
|
"FHEM::SynoModules::SMUtils": 1.220,
|
||||||
"Time::HiRes": 0
|
"Time::HiRes": 0
|
||||||
},
|
},
|
||||||
"recommends": {
|
"recommends": {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user