mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-15 22:26:04 +00:00
Correction & change by Klaus Bueker.
git-svn-id: https://svn.fhem.de/fhem/trunk@410 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
213c349f07
commit
bb106c95a5
@ -144,27 +144,24 @@ HMS_Parse($$)
|
||||
|
||||
@txt = ( "water_detect", "battery");
|
||||
@sfx = ( "", "");
|
||||
|
||||
# Battery-low condition detect is not yet properly
|
||||
# implemented. As soon as my WD's batteries get low
|
||||
# I am willing to supply a patch ;-) SEP7-RIPE, 2006/05/13
|
||||
my $status = hex(substr($msg, 10, 1)); #Battery low condition
|
||||
$v[1] = (($status & 4) ? "empty" : "ok"); # bit is set if Voltage < 2.5 V.
|
||||
my $status = hex(substr($val, 1, 1));
|
||||
$v[0] = "off";
|
||||
if ( $status & 1 ) { $v[0] = "on"; }
|
||||
$val = "Water Detect: $v[0]";
|
||||
$status = hex(substr($msg, 10, 1)); #Battery low condition
|
||||
$v[1] = (($status & 4) ? "empty" : "ok"); # bit is set if Voltage < 2.5 V.
|
||||
|
||||
} elsif ($type eq "HMS100TFK") { # By Peter P.
|
||||
|
||||
@txt = ( "switch_detect", "battery");
|
||||
@sfx = ( "", "");
|
||||
# Battery-low condition detect is not yet properly implemented.
|
||||
my $status = hex(substr($val, 1, 1));
|
||||
$v[0] = ($status ? "on" : "off");
|
||||
$v[1] = "off";
|
||||
$val = "Switch Detect: $v[0]";
|
||||
$status = hex(substr($msg, 10, 1)); #Battery low condition
|
||||
$v[1] = (($status & 4) ? "empty" : "ok"); # bit is set if Voltage < 2.5 V.
|
||||
|
||||
} elsif($type eq "RM100-2") {
|
||||
} elsif($type eq "RM100-2") {
|
||||
|
||||
@txt = ( "smoke_detect", "battery");
|
||||
@sfx = ( "", "");
|
||||
|
Loading…
x
Reference in New Issue
Block a user