mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-23 02:31:53 +00:00
KFM100 battery state
git-svn-id: https://svn.fhem.de/fhem/trunk@6504 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
1d2940085e
commit
f9e6851d60
@ -1470,8 +1470,10 @@ sub CUL_HM_Parse($$) {#########################################################
|
|||||||
}
|
}
|
||||||
elsif($md eq "KFM-Sensor") { ################################################
|
elsif($md eq "KFM-Sensor") { ################################################
|
||||||
if ($mTp eq "53"){
|
if ($mTp eq "53"){
|
||||||
if($p =~ m/.14(.)0200(..)(..)(..)/) {
|
if($p =~ m/(..)4(.)0200(..)(..)(..)/) {
|
||||||
my ($seq, $k_v1, $k_v2, $k_v3) = (hex($1),$2,hex($3),hex($4));
|
my ($chn,$seq, $k_v1, $k_v2, $k_v3) = (hex($1),hex($2),$3,hex($4),hex($5));
|
||||||
|
push @evtEt,[$shash,1,"battery:".($chn & 0x80?"low":"ok")];
|
||||||
|
|
||||||
my $v = 128-$k_v2; # FIXME: calibrate
|
my $v = 128-$k_v2; # FIXME: calibrate
|
||||||
$v += 256 if(!($k_v3 & 1));
|
$v += 256 if(!($k_v3 & 1));
|
||||||
push @evtEt,[$shash,1,"rawValue:$v"];
|
push @evtEt,[$shash,1,"rawValue:$v"];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user