mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-03 04:36:36 +00:00
- bugfix: 62_EMEM.pm: changed reading energy_total_kWh to energy_kWh_w, added energy_kWh (formerly energy_total_kWh)
- changed em1010.pl accordingly, added em1000em doc for getDevStatus reply from device - minor changes in fhem.html git-svn-id: https://svn.fhem.de/fhem/trunk@144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
26e434aa55
commit
f693a6b452
@ -376,6 +376,8 @@
|
||||
- feature: added 93_DbLog.pm, database logging facility (Boris, 30.12.)
|
||||
- feature: webfrontend/pgm2 converted to a FHEM module
|
||||
- bugfix: 99_SUNRISE_EL.pm: may schedule double events
|
||||
- bugfix: 62_EMEM.pl, contrib/em1010.pl: correct readings for energy_kWh
|
||||
and energy_kWh_w (Boris, 06.01.08)
|
||||
|
||||
- TODO
|
||||
emem -2.5kW / getDevData for emwz -1
|
||||
|
@ -50,22 +50,30 @@ EMEM_GetStatus($)
|
||||
}
|
||||
|
||||
my $pulses=w($d,13);
|
||||
my $pulses_max= w($d,15);
|
||||
my $iec = 1000;
|
||||
my $cur_power = $pulses / 100;
|
||||
my $cur_power_max = $pulses_max / 100;
|
||||
|
||||
if($cur_power > 30) { # 20Amp x 3 Phase
|
||||
my $msg = "EMEM Bogus reading: curr. power is reported to be $cur_power setting to -1";
|
||||
my $msg = "EMEM Bogus reading: curr. power is reported to be $cur_power, setting to -1";
|
||||
Log GetLogLevel($name,2), $msg;
|
||||
#return $msg;
|
||||
$cur_power = -1.0;
|
||||
}
|
||||
if($cur_power_max > 30) { # 20Amp x 3 Phase
|
||||
$cur_power_max = -1.0;
|
||||
}
|
||||
|
||||
my %vals;
|
||||
$vals{"5min_pulses"} = $pulses;
|
||||
$vals{"5min_pulses_max"} = $pulses_max;
|
||||
$vals{"energy_kWh_h"} = sprintf("%0.3f", dw($d,33) / $iec);
|
||||
$vals{"energy_today_kWh_d"} = sprintf("%0.3f", dw($d,37) / $iec);
|
||||
$vals{"energy_total_kWh"} = sprintf("%0.3f", dw($d,41) / $iec);
|
||||
$vals{"energy_kWh_d"} = sprintf("%0.3f", dw($d,37) / $iec);
|
||||
$vals{"energy_kWh_w"} = sprintf("%0.3f", dw($d,41) / $iec);
|
||||
$vals{"energy_kWh"} = sprintf("%0.3f", dw($d, 7) / $iec);
|
||||
$vals{"power_kW"} = sprintf("%.3f", $cur_power);
|
||||
$vals{"power_kW_max"} = sprintf("%.3f", $cur_power_max);
|
||||
$vals{"alarm_PA_W"} = w($d,45);
|
||||
$vals{"price_CF"} = sprintf("%.3f", w($d,47)/10000);
|
||||
|
||||
@ -84,7 +92,7 @@ EMEM_GetStatus($)
|
||||
}
|
||||
|
||||
$hash->{STATE} = "$cur_power kW";
|
||||
Log GetLogLevel($name,4), "EMEM $name: $cur_power kW / $vals{energy_kWh_h} kWh/h";
|
||||
Log GetLogLevel($name,4), "EMEM $name: $cur_power kW / $vals{energy_kWh} kWh";
|
||||
|
||||
return $hash->{STATE};
|
||||
}
|
||||
|
@ -185,3 +185,11 @@
|
||||
No more need for a webserver for basic WEB administration. For HTTPS or
|
||||
password you still need apache or the like.
|
||||
One step closer for complete fhem on the FritzBox.
|
||||
|
||||
- Boris Sun Jan 06 13:35:00 CET 2008
|
||||
- bugfix: 62_EMEM.pm: changed reading energy_total_kWh to energy_kWh_w,
|
||||
added energy_kWh (formerly energy_total_kWh)
|
||||
- changed em1010.pl accordingly, added em1000em doc for getDevStatus reply from
|
||||
device
|
||||
- minor changes in fhem.html
|
||||
|
@ -105,6 +105,17 @@ DbLog_ParseEvent($$)
|
||||
($type eq "M232Counter") ||
|
||||
($type eq "EMEM")) {
|
||||
}
|
||||
# FS20
|
||||
elsif($type eq "FS20") {
|
||||
@parts= split(/ /,$value);
|
||||
my $reading= $parts[0]; if(!defined($reading)) { $reading= ""; }
|
||||
$value= join(" ", shift @parts);
|
||||
if($reading =~ m(^dim*%$)) {
|
||||
$value= substr($reading,3,length($reading)-4);
|
||||
$reading= "dim";
|
||||
$unit= "%";
|
||||
}
|
||||
}
|
||||
# FHT
|
||||
elsif($type eq "FHT") {
|
||||
if($reading =~ m(-temp)) { $value=~ s/ \(Celsius\)//; $unit= "°C"; }
|
||||
|
@ -251,18 +251,22 @@ getDevStatus()
|
||||
return;
|
||||
}
|
||||
my $pulses=w($d,13);
|
||||
my $pulses_max=w($d,15);
|
||||
my $ec=w($d,49) / 10;
|
||||
my $cur_energy=0;
|
||||
my $cur_power=0;
|
||||
my $cur_power_max=0;
|
||||
my $sum_h_energy=0;
|
||||
my $sum_d_energy=0;
|
||||
my $sum_w_energy=0;
|
||||
my $total_energy=0;
|
||||
my $iec=0;
|
||||
|
||||
printf(" Readings (off 02): %d\n", w($d,2));
|
||||
printf(" Nr devs (off 05): %d\n", b($d,6));
|
||||
printf(" puls/5min (off 13): %d\n", $pulses);
|
||||
printf(" Startblk (off 18): %d\n", b($d,18)+13);
|
||||
printf(" Readings (off 2): %d\n", w($d,2));
|
||||
printf(" Nr devs (off 6): %d\n", b($d,6));
|
||||
printf(" puls/5min (off 13): %d\n", $pulses);
|
||||
printf(" puls.max/5min (off 15): %d\n", $pulses_max);
|
||||
#printf(" Startblk (off 18): %d\n", b($d,18)+13);
|
||||
#for (my $lauf = 19; $lauf < 45; $lauf += 2) {
|
||||
# printf(" t wert (off $lauf): %d\n", w($d,$lauf));
|
||||
#}
|
||||
@ -272,6 +276,7 @@ getDevStatus()
|
||||
# Sensor 5..
|
||||
$iec = 1000;
|
||||
$cur_power = $pulses / 100;
|
||||
$cur_power_max = $pulses_max / 100;
|
||||
} else {
|
||||
# Sensor 1..4
|
||||
$iec = $ec;
|
||||
@ -279,16 +284,19 @@ getDevStatus()
|
||||
$cur_power = $cur_energy / 5 * 60; # 5minute interval scaled to 1h
|
||||
printf(" cur.energy(off ): %.3f kWh\n", $cur_energy);
|
||||
}
|
||||
$sum_h_energy= dw($d,33) / $iec; # 33= pulses this our
|
||||
$sum_h_energy= dw($d,33) / $iec; # 33= pulses this hour
|
||||
$sum_d_energy= dw($d,37) / $iec; # 37= pulses today
|
||||
$total_energy= dw($d,41) / $iec; # 41= pulses total
|
||||
printf(" cur.power (off ): %.3f kW avr.\n", $cur_power);
|
||||
printf(" energy(off 33): %.3f kWh/h\n", $sum_h_energy);
|
||||
printf(" energy(off 37): %.3f kWh/d\n", $sum_d_energy);
|
||||
printf(" ttl energy(off 41): %.3f kWh (total)\n", $total_energy);
|
||||
printf(" Alarm PA (off 45): %d W\n", w($d,45));
|
||||
printf(" Price CF (off 47): %0.2f (EUR/KWH)\n", w($d,47)/10000);
|
||||
printf(" R/KW EC (off 49): %d\n", $ec);
|
||||
$sum_w_energy= dw($d,41) / $iec; # 41= pulses this week
|
||||
$total_energy= dw($d, 7) / $iec; # 7= pulses total
|
||||
printf(" cur.power ( ): %.3f kW\n", $cur_power);
|
||||
printf(" cur.power max ( ): %.3f kW\n", $cur_power_max);
|
||||
printf(" energy h (off 33): %.3f kWh (h)\n", $sum_h_energy);
|
||||
printf(" energy d (off 37): %.3f kWh (d)\n", $sum_d_energy);
|
||||
printf(" energy w (off 41): %.3f kWh (w)\n", $sum_w_energy);
|
||||
printf(" total energy (off 7): %.3f kWh (total)\n", $total_energy);
|
||||
printf(" Alarm PA (off 45): %d W\n", w($d,45));
|
||||
printf(" Price CF (off 47): %0.2f EUR/kWh\n", w($d,47)/10000);
|
||||
printf(" R/kW EC (off 49): %d\n", $ec);
|
||||
hexdump($d);
|
||||
}
|
||||
|
||||
|
@ -15,28 +15,31 @@ Formerly known as fhz1000.pl
|
||||
|
||||
<h2>News (as of =DATE=, Version =VERS=)</h2>
|
||||
<ul>
|
||||
<li>feature: added archivedir/archivecmd to the the main logfile
|
||||
<li>feature: 99_Sunrise_EL.pm (does not need any Date modules)
|
||||
<li>bugfix: seldom xmllist error resulting in corrupt xml (Martin/Peter, 4.9)
|
||||
<li>bugfix: FHT mode holiday_short added (9.9, Dirk)
|
||||
<li>bugfix: Modifying a device from its own trigger crashes (Klaus, 10.9)
|
||||
<li>feature: webpgm2 output reformatted
|
||||
<li>feature: webpgm2 displaying multiple plots
|
||||
<li>feature: FHT lime-protection code discovered by Dirk (7.10)
|
||||
<li>feature: softwarebuffer for FHT devices (Dirk 17.10)
|
||||
<li>feature: FHT low temperatur warning and offset (Dirk 17.10)
|
||||
<li>feature: added archivedir/archivecmd to the the main logfile</li>
|
||||
<li>feature: 99_Sunrise_EL.pm (does not need any Date modules)</li>
|
||||
<li>bugfix: seldom xmllist error resulting in corrupt xml (Martin/Peter, 4.9)</li>
|
||||
<li>bugfix: FHT mode holiday_short added (9.9, Dirk)</li>
|
||||
<li>bugfix: Modifying a device from its own trigger crashes (Klaus, 10.9)</li>
|
||||
<li>feature: webpgm2 output reformatted</li>
|
||||
<li>feature: webpgm2 displaying multiple plots</li>
|
||||
<li>feature: FHT lime-protection code discovered by Dirk (7.10)</li>
|
||||
<li>feature: softwarebuffer for FHT devices (Dirk 17.10)</li>
|
||||
<li>feature: FHT low temperatur warning and offset (Dirk 17.10)</li>
|
||||
<li>change: change FHT state into warnings (Dirk 17.10)<br>
|
||||
NOTE: you'll get an undefined type state & undefined type
|
||||
unknown_85 message after upgrade, this will disappear at the
|
||||
second start.</li>
|
||||
<li>feature: Softwarebuffer code simplified (Rudi 22.11)
|
||||
<li>bugfix: bug #12327 doppeltes my
|
||||
<li>bugfix: set STATE from trigger
|
||||
<li>bugfix: readings state vs STATE problem (xmllist/trigger)
|
||||
<li>change: SUNRISE doc changed (99_SUNRISE.pm -> 99_SUNRISE_EL.pm)
|
||||
<li>feature: support for the M232 ELV device (Boris, 25.11)
|
||||
<li>feature: alternativ Quad-based numbers for the FS20 (Matthias, 24.11)
|
||||
<li>feature: dummy type added (contrib/99_dummy.pm)
|
||||
<li>feature: Softwarebuffer code simplified (Rudi 22.11)</li>
|
||||
<li>bugfix: bug #12327 doppeltes my</li>
|
||||
<li>bugfix: set STATE from trigger</li>
|
||||
<li>bugfix: readings state vs STATE problem (xmllist/trigger)</li>
|
||||
<li>change: SUNRISE doc changed (99_SUNRISE.pm -> 99_SUNRISE_EL.pm)</li>
|
||||
<li>feature: support for the M232 ELV device (Boris, 25.11)</li>
|
||||
<li>feature: alternativ Quad-based numbers for the FS20 (Matthias, 24.11)</li>
|
||||
<li>feature: dummy type added (contrib/99_dummy.pm)</li>
|
||||
<li>feature: added database logging facility (93_DbLog.pm) (Boris, 29.12)</li>
|
||||
<li>feature: support for %NAME, %EVENT, %TYPE parameters in notify definition (Boris, 29.12)</li>
|
||||
<li>bugfix: 62_EMEM.pm: energy_total_kWh renamed to energy_kWh_w, energy_kWh added (Boris, 6.1)</li>
|
||||
</ul>
|
||||
|
||||
</ul>
|
||||
@ -70,7 +73,7 @@ Currently implemented features:<br>
|
||||
<li>reading EM1000WZ/EM1000EM data via an attached EM1010PC</li>
|
||||
<li>reading attached SCIVT devices</li>
|
||||
<li>reading attached M232 devices</li>
|
||||
<li>logging events to files (or database), with regexp filters</li>
|
||||
<li>logging events to files or databases, with regexp filters</li>
|
||||
<li>notifying external programs or internal modules when receiving certain
|
||||
events</li>
|
||||
<li>timed commands (e.g. switching a lamp on from sunset till midnight)</li>
|
||||
|
Loading…
x
Reference in New Issue
Block a user