mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-03 23:06:37 +00:00
HM-CC-TC/VD added (first steps, read-only)
git-svn-id: https://svn.fhem.de/fhem/trunk@861 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
546a823698
commit
62eadd9eac
@ -75,8 +75,8 @@ my %culHmModel=(
|
|||||||
"0036" => "HM-PB-2-WM",
|
"0036" => "HM-PB-2-WM",
|
||||||
"0037" => "HM-RC-19",
|
"0037" => "HM-RC-19",
|
||||||
"0038" => "HM-RC-19-B",
|
"0038" => "HM-RC-19-B",
|
||||||
"0039" => "HM-CC-TC",
|
"0039" => "HM-CC-TC", # Parse only
|
||||||
"003A" => "HM-CC-VD",
|
"003A" => "HM-CC-VD", # Actuator, battery/etc missing
|
||||||
"003B" => "HM-RC-4-B",
|
"003B" => "HM-RC-4-B",
|
||||||
"003C" => "HM-WDS20-TH-O",
|
"003C" => "HM-WDS20-TH-O",
|
||||||
"003D" => "HM-WDS10-TH-O",
|
"003D" => "HM-WDS10-TH-O",
|
||||||
@ -238,6 +238,7 @@ CUL_HM_Parse($$)
|
|||||||
|
|
||||||
my $st = AttrVal($name, "subType", "");
|
my $st = AttrVal($name, "subType", "");
|
||||||
my $model = AttrVal($name, "model", "");
|
my $model = AttrVal($name, "model", "");
|
||||||
|
my $tn = TimeNow();
|
||||||
|
|
||||||
if($cmd eq "8002") { # Ack
|
if($cmd eq "8002") { # Ack
|
||||||
if($shash->{cmdStack}) { # Send next msg from the stack
|
if($shash->{cmdStack}) { # Send next msg from the stack
|
||||||
@ -363,7 +364,7 @@ CUL_HM_Parse($$)
|
|||||||
|
|
||||||
my ( $t, $h, $r, $w, $wd, $s, $b ) =
|
my ( $t, $h, $r, $w, $wd, $s, $b ) =
|
||||||
(hex($1), hex($2), hex($3), hex($4), hex($5), hex($6), hex($7));
|
(hex($1), hex($2), hex($3), hex($4), hex($5), hex($6), hex($7));
|
||||||
my $tsgn = ($t & 0x4000); # not tested
|
my $tsgn = ($t & 0x4000);
|
||||||
$t = ($t & 0x3fff)/10;
|
$t = ($t & 0x3fff)/10;
|
||||||
$t = sprintf("%0.1f", $t-1638.4) if($tsgn);
|
$t = sprintf("%0.1f", $t-1638.4) if($tsgn);
|
||||||
my $ir = $r & 0x8000;
|
my $ir = $r & 0x8000;
|
||||||
@ -389,6 +390,34 @@ CUL_HM_Parse($$)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} elsif($model eq "HM-CC-TC") {
|
||||||
|
|
||||||
|
if($cmd eq "8670" && $p =~ m/^(....)(..)/) {
|
||||||
|
my ( $t, $h) =
|
||||||
|
(hex($1), hex($2));
|
||||||
|
my $tsgn = ($t & 0x4000);
|
||||||
|
$t = ($t & 0x3fff)/10;
|
||||||
|
$t = sprintf("%0.1f", $t-1638.4) if($tsgn);
|
||||||
|
push @event, "state:T: $t H: $h";
|
||||||
|
push @event, "temperature:$t";
|
||||||
|
push @event, "humidity:$h";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if($cmd eq "A258" && $p =~ m/^(..)(..)/) {
|
||||||
|
my ( $d1, $vp) =
|
||||||
|
(hex($1), hex($2));
|
||||||
|
$vp = int($vp/2.56+0.5); # Ventil position in %
|
||||||
|
push @event, "actuator:$vp %";
|
||||||
|
|
||||||
|
if($dhash) { # Wont trigger
|
||||||
|
$dhash->{STATE} = "state:$vp %";
|
||||||
|
$dhash->{READINGS}{STATE}{TIME} = $tn;
|
||||||
|
$dhash->{READINGS}{STATE}{VAL} = "$vp %";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
} elsif($st eq "KFM" && $model eq "KFM-Sensor") {
|
} elsif($st eq "KFM" && $model eq "KFM-Sensor") {
|
||||||
|
|
||||||
if($p =~ m/814(.)0200(..)(..)(..)/) {
|
if($p =~ m/814(.)0200(..)(..)(..)/) {
|
||||||
@ -404,7 +433,6 @@ CUL_HM_Parse($$)
|
|||||||
|
|
||||||
#push @event, "unknownMsg:$p" if(!@event);
|
#push @event, "unknownMsg:$p" if(!@event);
|
||||||
|
|
||||||
my $tn = TimeNow();
|
|
||||||
my @changed;
|
my @changed;
|
||||||
for(my $i = 0; $i < int(@event); $i++) {
|
for(my $i = 0; $i < int(@event); $i++) {
|
||||||
next if($event[$i] eq "");
|
next if($event[$i] eq "");
|
||||||
|
@ -52,6 +52,9 @@ my %flogpar = (
|
|||||||
"CUL_HM_KS550.*"
|
"CUL_HM_KS550.*"
|
||||||
=> { GPLOT => "ks300:Temp/Rain,ks300_2:Wind/Hum,",
|
=> { GPLOT => "ks300:Temp/Rain,ks300_2:Wind/Hum,",
|
||||||
FILTER => "%NAME:T:.*" },
|
FILTER => "%NAME:T:.*" },
|
||||||
|
"CUL_HM_HM-CC-TC.*"
|
||||||
|
=> { GPLOT => "hms:Temp/Hum,",
|
||||||
|
FILTER => "%NAME:T:.*" },
|
||||||
);
|
);
|
||||||
|
|
||||||
# Do not create FileLog for the following devices.
|
# Do not create FileLog for the following devices.
|
||||||
@ -230,6 +233,7 @@ autocreate_Notify($$)
|
|||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# TODO: fix it if the device is renamed.
|
||||||
sub
|
sub
|
||||||
CommandCreateLog($$)
|
CommandCreateLog($$)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user