mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-20 01:06: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,25 +144,22 @@ HMS_Parse($$)
|
|||||||
|
|
||||||
@txt = ( "water_detect", "battery");
|
@txt = ( "water_detect", "battery");
|
||||||
@sfx = ( "", "");
|
@sfx = ( "", "");
|
||||||
|
my $status = hex(substr($val, 1, 1));
|
||||||
# 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.
|
|
||||||
$v[0] = "off";
|
$v[0] = "off";
|
||||||
if ( $status & 1 ) { $v[0] = "on"; }
|
if ( $status & 1 ) { $v[0] = "on"; }
|
||||||
$val = "Water Detect: $v[0]";
|
$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.
|
} elsif ($type eq "HMS100TFK") { # By Peter P.
|
||||||
|
|
||||||
@txt = ( "switch_detect", "battery");
|
@txt = ( "switch_detect", "battery");
|
||||||
@sfx = ( "", "");
|
@sfx = ( "", "");
|
||||||
# Battery-low condition detect is not yet properly implemented.
|
|
||||||
my $status = hex(substr($val, 1, 1));
|
my $status = hex(substr($val, 1, 1));
|
||||||
$v[0] = ($status ? "on" : "off");
|
$v[0] = ($status ? "on" : "off");
|
||||||
$v[1] = "off";
|
|
||||||
$val = "Switch Detect: $v[0]";
|
$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") {
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user