improved status decoding for HM-CC-VD in 10_CUL_HM.pm

git-svn-id: https://fhem.svn.sourceforge.net/svnroot/fhem/trunk/fhem@1320 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
oskarfessel
2012-03-06 12:29:06 +00:00
parent 983641b809
commit 00cebf7f37
2 changed files with 21 additions and 15 deletions

View File

@@ -491,15 +491,20 @@ CUL_HM_Parse($$)
# CMD:8202 SRC:13F251 DST:15B50D 010100002A # CMD:8202 SRC:13F251 DST:15B50D 010100002A
# status ACK to controlling HM-CC-TC # status ACK to controlling HM-CC-TC
if($cmd eq "8202" && $p =~ m/^(..)(..)(..)(..)/) { if($cmd eq "8202" && $p =~ m/^(..)(..)(..)(..)/) {
my ( $vp, $d1) = my ( $vp, $st) =
(hex($3), $4); (hex($3), hex($4));
$vp = int($vp)/2; # valve position in % $vp = int($vp)/2; # valve position in %
push @event, "actuator:$vp %"; push @event, "actuator:$vp %";
# I think this is too much info: # Status-Byte Auswertung
# if($d1 eq "10") { push @event, "actuator:movement_open"; push @event, "motor:opening" if($st&0x10);
# } elsif($d1 eq "20") { push @event, "actuator:movement_close"; push @event, "motor:closing" if($st&0x20);
# } push @event, "motor:blocked" if($st&0x06) == 2;
push @event, "motor:loose" if($st&0x06) == 4;
push @event, "motor:adjusting range too small" if($st&0x06) == 6;
push @event, "motor:ok" if($st&0x06) == 0;
push @event, "battery:low" if($st&0x08);
push @event, "battery:ok" if(($st&0x08) == 0);
} }
# CMD:A010 SRC:13F251 DST:5D24C9 0401000000000509000A070000 # CMD:A010 SRC:13F251 DST:5D24C9 0401000000000509000A070000

View File

@@ -3048,17 +3048,18 @@ A line ending with \ will be concatenated with the next one, so long lines
temperature $t<br> temperature $t<br>
humidity $h<br> humidity $h<br>
actuator $vp %<br> actuator $vp %<br>
desired-temp: $t<br> desired-temp $t<br>
tempList$wd: hh:mm $t hh:mm $t ...<br> desired-temp-ack $t<br>
ValveErrorPosition $dname: $vep %<br> tempList$wd hh:mm $t hh:mm $t ...<br>
ValveOffset $dname: $of %<br> ValveErrorPosition $dname $vep %<br>
windowopentemp-$tchan: $t (sensor:$tdev)<br> ValveOffset $dname $of %<br>
windowopentemp-$tchan $t (sensor:$tdev)<br>
<li>HM-CC-VD:<br> <li>HM-CC-VD:<br>
actuator $vp %<br> actuator $vp %<br>
actuator:movement_open<br> motor [opening|closing|blocked|loose|adjusting range too small|ok]<br>
actuator:movement_close<br> battery [low|ok]<br>
ValveErrorPosition:$vep %<br> ValveErrorPosition $vep %<br>
ValveOffset $dname: $of %<br> ValveOffset $dname $of %<br>
<li>KFM100:<br> <li>KFM100:<br>
rawValue $v<br> rawValue $v<br>
Sequence $s<br> Sequence $s<br>