2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 18:59:33 +00:00

98_ArduCounter.pm: small bugfix

git-svn-id: https://svn.fhem.de/fhem/trunk@20520 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
StefanStrobel 2019-11-16 14:46:19 +00:00
parent 878d2f1391
commit 26159692e5

View File

@ -85,10 +85,12 @@
# 2019-08-10 fix parsing of levels at devVerbose >= 25
# 2019-08-12 fix documentation of keepalive attributes, add parsing of RSSI,
# add missing attributes if they don't match the running device config
# 2019-1ß-13 fix a bug where calc counters are not created when readingPulsesPerKWh$pinName is specified instead of readingPulsesPerKWh$pin
#
#
# ideas / todo:
#
# - optimize configureDevice (not set attributes / defaults dont match running config -> check all attrs ...)
# - max time for interpolation as attribute
# - detect level threasholds automatically for analog input, track drift
#
@ -110,7 +112,7 @@ use strict;
use warnings;
use Time::HiRes qw(gettimeofday);
my $ArduCounter_Version = '6.18 - 12.8.2019';
my $ArduCounter_Version = '6.19 - 13.10.2019';
my %ArduCounter_sets = (
@ -1311,7 +1313,7 @@ sub ArduCounter_HandleCounters($$$$$$$$)
my $rlname = AduCounter_AttrVal($hash, "long$pinName", "readingNameLongCount$pinName", "readingNameLongCount$pin");
my $riname = AduCounter_AttrVal($hash, "interpolatedLong$pinName", "readingNameInterpolatedCount$pinName", "readingNameInterpolatedCount$pin");
my $rccname = AduCounter_AttrVal($hash, "calcCounter$pinName", "readingNameCalcCount$pinName", "readingNameCalcCount$pin");
my $ppk = AduCounter_AttrVal($hash, 0, "readingPulsesPerKWh$pin", "pulsesPerKWh");
my $ppk = AduCounter_AttrVal($hash, 0, "readingPulsesPerKWh$pin", "readingPulsesPerKWh$pinName", "pulsesPerKWh");
my $lName = ArduCounter_LogPinDesc($hash, $pin);
my $longCount = ReadingsVal($name, $rlname, 0); # alter long count Wert