2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-22 20:24:36 +00:00

improve valveCtrl

git-svn-id: https://svn.fhem.de/fhem/trunk@4823 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
martinp876 2014-02-06 19:23:26 +00:00
parent 1a528a4b34
commit 98720cb6a1
2 changed files with 27 additions and 19 deletions

View File

@ -3605,7 +3605,8 @@ sub CUL_HM_valvePosUpdt(@) {#update valve position periodically to please valve
$hash->{helper}{vd}{nextM} = $tn+$nextTimer; $hash->{helper}{vd}{nextM} = $tn+$nextTimer;
$hash->{helper}{vd}{msgCnt} = $msgCnt; $hash->{helper}{vd}{msgCnt} = $msgCnt;
if ($hash->{helper}{vd}{cmd}){ if ($hash->{helper}{vd}{cmd}){
if ($hash->{helper}{vd}{typ} == 1){ if ( $hash->{helper}{vd}{typ} == 1
&& ReadingsVal($name,"valveCtrl","init") ne "init"){
CUL_HM_PushCmdStack($hash,sprintf("%02X%s%s%s" CUL_HM_PushCmdStack($hash,sprintf("%02X%s%s%s"
,$msgCnt ,$msgCnt
,$hash->{helper}{vd}{cmd} ,$hash->{helper}{vd}{cmd}
@ -3634,6 +3635,11 @@ sub CUL_HM_valvePosTmr(@) {#calc next vd wakeup
my $hash = CUL_HM_id2Hash($vId); my $hash = CUL_HM_id2Hash($vId);
my $name = $hash->{NAME}; my $name = $hash->{NAME};
if ($hash->{helper}{vd}{typ} == 1){ if ($hash->{helper}{vd}{typ} == 1){
if (ReadingsVal($name,"valveCtrl","init") eq "init") {
$hash->{helper}{vd}{next} = $hash->{helper}{vd}{nextF};
CUL_HM_UpdtReadSingle($hash,"valveCtrl","ready",1);
}
else {
my $pn = CUL_HM_id2Name($hash->{helper}{vd}{id}); my $pn = CUL_HM_id2Name($hash->{helper}{vd}{id});
my $ackTime = ReadingsTimestamp($pn, "ValvePosition", ""); my $ackTime = ReadingsTimestamp($pn, "ValvePosition", "");
my $vc; my $vc;
@ -3655,6 +3661,7 @@ sub CUL_HM_valvePosTmr(@) {#calc next vd wakeup
if(ReadingsVal($name,"valveCtrl","") ne $vc); if(ReadingsVal($name,"valveCtrl","") ne $vc);
$hash->{helper}{vd}{ackT} = $ackTime; $hash->{helper}{vd}{ackT} = $ackTime;
} }
}
InternalTimer($hash->{helper}{vd}{next},"CUL_HM_valvePosUpdt","valvePos:$vId",0); InternalTimer($hash->{helper}{vd}{next},"CUL_HM_valvePosUpdt","valvePos:$vId",0);
} }
sub CUL_HM_weather(@) {#periodically send weather data sub CUL_HM_weather(@) {#periodically send weather data

View File

@ -434,6 +434,7 @@ my $K_actDetID = '000000'; # id of actionDetector
# Blind 9:00 10:00 20:00 # Blind 9:00 10:00 20:00
# BL1TPBU 02:01 21:FF # BL1TPBU 02:01 21:FF
# Dim1TPBU 02:01 21:FF 22:00 # Dim1TPBU 02:01 21:FF 22:00
# TC-IT 16:00
#Keymatic 3.3 unknown, seen 1 here #Keymatic 3.3 unknown, seen 1 here
#--- list 1, Channel level------------------ #--- list 1, Channel level------------------