mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 06:39:11 +00:00
HMS100-FIT added
git-svn-id: https://svn.fhem.de/fhem/trunk@222 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
c2a4ab45b9
commit
51d6e237c0
@ -172,7 +172,7 @@ FHT_Set($@)
|
||||
$allcmd .=" " if($allcmd);
|
||||
$allcmd .= $cmd;
|
||||
|
||||
return "Unknown argument $cmd, choose one of " . join(" ", sort keys %c2bset)
|
||||
return "Unknown argument $cmd, choose one of " . join(" ",sort keys %c2bset)
|
||||
if(!defined($c2bset{$cmd}));
|
||||
return "\"set $name\" needs a parameter"
|
||||
if(@a < 1);
|
||||
|
@ -13,6 +13,7 @@ my %codes = (
|
||||
"5" => "HMS100TFK",
|
||||
"6" => "HMS100MG",
|
||||
"8" => "HMS100CO",
|
||||
"e" => "HMS100FIT",
|
||||
);
|
||||
|
||||
my %defptr;
|
||||
@ -30,14 +31,15 @@ HMS_Initialize($)
|
||||
# 810e04d70213a001b16d000003000000 RM100-2
|
||||
# 810e047f0214a001a81f000001000000 HMS100TFK
|
||||
# 810e048f0295a0010155000001000000 HMS100TFK (jumper)
|
||||
# 810e04330216a001b4c5000001000000 HMS100MG
|
||||
# 810e04330216a001b4c5000001000000 HMS100MG
|
||||
# 810e04210218a00186e0000000000000 HMS100CO
|
||||
# 810e0448029ea00132d5000000000000 FI-Trenner
|
||||
|
||||
$hash->{Match} = "^810e04....(1|5|9)[0-8]a001";
|
||||
$hash->{Match} = "^810e04....(1|5|9).a001";
|
||||
$hash->{DefFn} = "HMS_Define";
|
||||
$hash->{UndefFn} = "HMS_Undef";
|
||||
$hash->{ParseFn} = "HMS_Parse";
|
||||
$hash->{AttrList} = "do_not_notify:0,1 showtime:0,1 model;hms100-t,hms100-tf,hms100-wd,hms100-mg,hms100-tfk,rm100-2,hms100-co loglevel:0,1,2,3,4,5,6";
|
||||
$hash->{AttrList} = "do_not_notify:0,1 showtime:0,1 model;hms100-t,hms100-tf,hms100-wd,hms100-mg,hms100-tfk,rm100-2,hms100-co,hms100-fit loglevel:0,1,2,3,4,5,6";
|
||||
}
|
||||
|
||||
#####################################
|
||||
@ -196,6 +198,19 @@ HMS_Parse($$)
|
||||
if ($status & 1) { $v[0] = "on"; }
|
||||
$val = "CO Detect: $v[0]";
|
||||
|
||||
} elsif ($type eq "HMS100FIT") { # By PAN
|
||||
|
||||
@txt = ( "fi_triggered", "battery");
|
||||
@sfx = ( "", "");
|
||||
|
||||
# Battery-low condition detect is not yet properly
|
||||
# implemented.
|
||||
my $status = hex(substr($val, 1, 1));
|
||||
$v[0] = ($status != "0") ? "on" : "off";
|
||||
$v[1] = "off";
|
||||
if ($status & 1) { $v[0] = "on"; }
|
||||
$val = "FI triggered: $v[0]";
|
||||
|
||||
} else {
|
||||
|
||||
Log 4, "HMS Device $dev (Unknown type: $type)";
|
||||
|
@ -22,7 +22,7 @@ sub
|
||||
notify_Define($$)
|
||||
{
|
||||
my ($hash, $def) = @_;
|
||||
my ($type, $name, $re, $command) = split("[ \t]+", $def, 4);
|
||||
my ($name, $type, $re, $command) = split("[ \t]+", $def, 4);
|
||||
|
||||
if(!$command) {
|
||||
if($hash->{OLDDEF}) { # Called from modify, where command is optional
|
||||
|
Loading…
Reference in New Issue
Block a user