diff --git a/fhem/contrib/DS_Starter/76_SMAPortal.pm b/fhem/contrib/DS_Starter/76_SMAPortal.pm index 359d2bb29..f55195655 100644 --- a/fhem/contrib/DS_Starter/76_SMAPortal.pm +++ b/fhem/contrib/DS_Starter/76_SMAPortal.pm @@ -161,6 +161,7 @@ use vars qw($FW_ME); # webname (default is fh # Versions History intern our %vNotesIntern = ( + "2.3.1" => "13.06.2019 switch Credentials read from RAM to verbose 4, changed W/h->Wh and kW/h->kWh in PortalAsHtml ", "2.3.0" => "12.06.2019 add set on,off,automatic cmd for controlled devices ", "2.2.0" => "10.06.2019 relocate RestOfDay and Tomorrow data from level 3 to level 2, change readings to start all with uppercase, ". "add consumer energy data of current day/month/year, new attribute \"verbose5Data\" ", @@ -526,7 +527,7 @@ sub getcredentials ($$) { my $logpw = AttrVal($name, "showPassInLog", "0") == 1 ? $passwd : "********"; - Log3($name, 3, "$name - Credentials read from RAM: $username $logpw"); + Log3($name, 4, "$name - Credentials read from RAM: $username $logpw"); } else { Log3($name, 1, "$name - Credentials not set in RAM !"); @@ -1875,7 +1876,7 @@ sub PortalAsHtml ($$) { $html_end = AttrVal($wlname, 'htmlEnd', undef); # beliebige HTML Strings die nach der Grafik ausgegeben werden $type = AttrVal($wlname, 'layoutType', 'pv'); - $kw = AttrVal($wlname, 'W/kW', 'W'); + $kw = AttrVal($wlname, 'Wh/kWh', 'Wh'); $height = AttrNum($wlname, 'beamHeight', 200); $width = AttrNum($wlname, 'beamWidth', 6); # zu klein ist nicht problematisch @@ -1904,20 +1905,20 @@ sub PortalAsHtml ($$) { my $pvRe = ReadingsNum($name,"L2_RestOfDay-PV", 0); my $pvTo = ReadingsNum($name,"L2_Tomorrow-PV", 0); - if ($kw eq 'kW') { - $co4h = sprintf("%.1f" , $co4h/1000)." kW"; - $coRe = sprintf("%.1f" , $coRe/1000)." kW"; - $coTo = sprintf("%.1f" , $coTo/1000)." kW"; - $pv4h = sprintf("%.1f" , $pv4h/1000)." kW"; - $pvRe = sprintf("%.1f" , $pvRe/1000)." kW"; - $pvTo = sprintf("%.1f" , $pvTo/1000)." kW"; + if ($kw eq 'kWh') { + $co4h = sprintf("%.1f" , $co4h/1000)." kWh"; + $coRe = sprintf("%.1f" , $coRe/1000)." kWh"; + $coTo = sprintf("%.1f" , $coTo/1000)." kWh"; + $pv4h = sprintf("%.1f" , $pv4h/1000)." kWh"; + $pvRe = sprintf("%.1f" , $pvRe/1000)." kWh"; + $pvTo = sprintf("%.1f" , $pvTo/1000)." kWh"; } else { - $co4h .= " W"; - $coRe .= " W"; - $coTo .= " W"; - $pv4h .= " W"; - $pvRe .= " W"; - $pvTo .= " W"; + $co4h .= " Wh"; + $coRe .= " Wh"; + $coTo .= " Wh"; + $pv4h .= " Wh"; + $pvRe .= " Wh"; + $pvTo .= " Wh"; } # Headerzeile generieren @@ -1932,8 +1933,8 @@ sub PortalAsHtml ($$) { if ($header) { my ($h1,$h2); if(AttrVal("global","language","EN") eq "DE") { - $h1 = "Prognose [pv] - nächste 4 Stunden: $pv4h/h / Rest des Tages: $pvRe/h / Morgen: $pvTo/h"; - $h2 = "Prognose [co] - nächste 4 Stunden: $co4h/h / Rest des Tages: $coRe/h / Morgen: $coTo/h"; + $h1 = "Prognose [pv] - nächste 4 Stunden: $pv4h / Rest des Tages: $pvRe / Morgen: $pvTo"; + $h2 = "Prognose [co] - nächste 4 Stunden: $co4h / Rest des Tages: $coRe / Morgen: $coTo"; my ($year, $month, $day, $hour, $min, $sec) = $lup =~ /(\d+)-(\d\d)-(\d\d)\s+(.*)/; $lup = "$3.$2.$1 $4"; $lupt = "letzte Aktualisierung:"; @@ -2378,7 +2379,7 @@ sub formatVal6($$;$) { $v = abs($v); } - if ($kw eq 'kW') { # bei Anzeige in kW muss weniger aufgefüllt werden + if ($kw eq 'kWh') { # bei Anzeige in kWh muss weniger aufgefüllt werden $v = sprintf('%.1f',($v/1000)); $v += 0; # keine 0.0 oder 6.0 etc diff --git a/fhem/contrib/DS_Starter/76_SMAPortalSPG.pm b/fhem/contrib/DS_Starter/76_SMAPortalSPG.pm index 2ae2965f4..c91f1e7f6 100644 --- a/fhem/contrib/DS_Starter/76_SMAPortalSPG.pm +++ b/fhem/contrib/DS_Starter/76_SMAPortalSPG.pm @@ -4,7 +4,6 @@ # 76_SMAPortalSPG.pm # # (c) 2019 by Heiko Maaz e-mail: Heiko dot Maaz at t-online dot de -# forked from 98_weblink.pm by Rudolf König # # This Module is used by module 76_SMAPortal to create graphic devices. # It can't be used standalone without any SMAPortal-Device. @@ -35,6 +34,7 @@ eval "use FHEM::Meta;1" or my $modMetaAbsent = 1; # Versions History intern our %SMAPortalSPG_vNotesIntern = ( + "1.1.0" => "13.06.2019 commandRef revised, changed attribute W/kW to Wh/kWh ", "1.0.0" => "03.06.2019 initial Version " ); @@ -68,7 +68,7 @@ sub SMAPortalSPG_Initialize($) { "spaceSize ". "suggestIcon ". "layoutType:pv,co,pvco,diff ". - "W/kW:W,kW ". + "Wh/kWh:Wh,kWh ". "weatherColor:colorpicker,RGB ". $readingFnAttributes; $hash->{RenameFn} = "SMAPortalSPG_Rename"; @@ -262,14 +262,244 @@ return; 1; =pod -=item summary Definition of grapic devices by the SMAPortal module +=item summary Definition of graphic devices by the SMAPortal module =item summary_DE Erstellung von Grafik-Devices durch das SMAPortal-Modul =begin html

SMAPortalSPG

- Is coming soon. +
+The module SMAPortalSPG is a device module attuned to the module SMAPortal for definition of graphic devices.
+ + =end html =begin html_DE @@ -286,7 +516,7 @@ Das Modul SMAPortalSPG ist ein mit SMAPortal abgestimmtes Gerätemodul zur Defin

@@ -313,7 +543,7 @@ Das Modul SMAPortalSPG ist ein mit SMAPortal abgestimmtes Gerätemodul zur Defin