mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-02-08 05:15:10 +00:00
battery for OT2
git-svn-id: https://svn.fhem.de/fhem/trunk@4945 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
31893cadeb
commit
f3b8f634a2
@ -1130,6 +1130,7 @@ sub CUL_HM_Parse($$) {##############################
|
|||||||
push @entities,CUL_HM_UpdtReadBulk($chnHash,1,$statemsg,
|
push @entities,CUL_HM_UpdtReadBulk($chnHash,1,$statemsg,
|
||||||
"temperature:$t")
|
"temperature:$t")
|
||||||
if ($chnHash);
|
if ($chnHash);
|
||||||
|
push @event, "battery:".(hex(substr($p,0,4))&0x80?"low":"ok");
|
||||||
}
|
}
|
||||||
elsif ($md !~ m/^(S550IA|HM-WDS30-T-O)$/){#skip temp-only sens
|
elsif ($md !~ m/^(S550IA|HM-WDS30-T-O)$/){#skip temp-only sens
|
||||||
my $h = hex(substr($p,4,2));
|
my $h = hex(substr($p,4,2));
|
||||||
@ -1145,6 +1146,7 @@ sub CUL_HM_Parse($$) {##############################
|
|||||||
}
|
}
|
||||||
elsif ($mTp eq "53"){
|
elsif ($mTp eq "53"){
|
||||||
my ($mChn,@dat) = unpack 'A2(A6)*',$p;
|
my ($mChn,@dat) = unpack 'A2(A6)*',$p;
|
||||||
|
push @event, "battery:".(hex($mChn)&0x80?"low":"ok");
|
||||||
foreach (@dat){
|
foreach (@dat){
|
||||||
my ($a,$d) = unpack 'A2A4',$_;
|
my ($a,$d) = unpack 'A2A4',$_;
|
||||||
$d = hex($d);
|
$d = hex($d);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user