diff --git a/fhem/FHEM/10_CUL_HM.pm b/fhem/FHEM/10_CUL_HM.pm index 8dfe25496..749f635dd 100755 --- a/fhem/FHEM/10_CUL_HM.pm +++ b/fhem/FHEM/10_CUL_HM.pm @@ -2692,7 +2692,7 @@ sub CUL_HM_Set($@) { my ($lChn,$peerId,$peerChn) = ($chn,"000000","00"); if (($list == 3) ||($list == 4) # peer is necessary for list 3/4 - ||($list == 7 && $peerChnIn)){# and possible for List 7 + ||($peerChnIn)) {# and if requested by user return "Peer not specified" if ($peerChnIn eq ""); $peerId = CUL_HM_peerChId($peerChnIn,$dst,$id); $peerChn = ((length($peerId) == 8)?substr($peerId,6,2):"01"); @@ -2770,7 +2770,7 @@ sub CUL_HM_Set($@) { my $tval = CUL_HM_encodeTime16($duration);# onTime 0.0..85825945.6, 0=forever return "timer value to low" if ($tval eq "0000"); CUL_HM_PushCmdStack($hash,"++$flag"."11$id$dst"."02$chn"."C80000$tval"); - $hash = $chnHash; # report to channel if defined + $hash = $chnHash; # report to channel if defined } elsif($cmd eq "lock") { ##################################################### CUL_HM_PushCmdStack($hash,'++'.$flag.'11'.$id.$dst.'800100FF'); # LEVEL_SET @@ -3152,7 +3152,10 @@ sub CUL_HM_Set($@) { $hash->{helper}{vd}{idh} = hex(substr($dst,2,2))*20077; $hash->{helper}{vd}{idl} = hex(substr($dst,4,2))*256; $hash->{helper}{vd}{msgCnt} = 1; - CUL_HM_valvePosUpdt("valvePos:$dst$chn") if (!$hash->{helper}{virtTC}); + if (!$hash->{helper}{virtTC}){ + $hash->{helper}{virtTC} = "03"; + CUL_HM_valvePosUpdt("valvePos:$dst$chn"); + }; $hash->{helper}{virtTC} = "03"; $state = "ValveAdjust:$vp %"; } @@ -3244,7 +3247,7 @@ sub CUL_HM_Set($@) { } CUL_HM_PushCmdStack($pHash, sprintf("++%s40%s%s%02X%02X", $peerFlag,$dst,$peer, - hex($chn)+(($mode && $mode eq "long")?64:0), + hex($chn)+(($mode eq "long")?64:0), $pressCnt)); if ($rxt & 0x80){#burstConditional @@ -3489,16 +3492,21 @@ sub CUL_HM_valvePosUpdt(@) {#update valve position periodically to please valve my $vp = ReadingsVal($name,"valvePosTC","15 %"); $vp =~ s/ %//; $vp *=2.56; + my $tn = gettimeofday(); + my $delta = int((gettimeofday() - $hash->{helper}{vd}{next})*1000); +# Log 1,"VD-timing ##### diff:$delta"; + Log 1,"VD-timing Critical ##### diff:$delta" if ($delta >100); foreach my $peer (sort(split(',',AttrVal($name,"peerIDs","")))) { next if (length($peer) != 8); $peer = substr($peer,0,6); CUL_HM_PushCmdStack($hash,sprintf("%02XA258%s%s%s%02X",$msgCnt,$vDevId ,$peer,$hash->{helper}{virtTC},$vp)); } + $hash->{helper}{vd}{next} = $tn+$nextTimer; $hash->{helper}{vd}{msgCnt} = $msgCnt; $hash->{helper}{virtTC} = "00"; CUL_HM_ProcessCmdStack($hash); - InternalTimer(gettimeofday()+$nextTimer,"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 my($in ) = @_; diff --git a/fhem/FHEM/HMConfig.pm b/fhem/FHEM/HMConfig.pm index 709b71752..19525fb9c 100644 --- a/fhem/FHEM/HMConfig.pm +++ b/fhem/FHEM/HMConfig.pm @@ -608,7 +608,7 @@ my $K_actDetID = '000000'; # id of actionDetector mdTempValve =>{a=> 2.6,s=>0.2,l=>5,min=>0 ,max=>2 ,c=>'lit' ,f=>'' ,u=>'' ,d=>1,t=>"" ,lit=>{auto=>0,close=>1,open=>2}}, "day-temp" =>{a=> 3 ,s=>0.6,l=>5,min=>6 ,max=>30 ,c=>'' ,f=>2 ,u=>'C' ,d=>1,t=>"comfort or day temperatur"}, "night-temp" =>{a=> 4 ,s=>0.6,l=>5,min=>6 ,max=>30 ,c=>'' ,f=>2 ,u=>'C' ,d=>1,t=>"lower or night temperatur"}, - tempWinOpen =>{a=> 5 ,s=>0.6,l=>5,min=>6 ,max=>30 ,c=>'' ,f=>2 ,u=>'C' ,d=>1,t=>"Temperature for Win open !chan 3 only!"}, + tempWinOpen =>{a=> 5 ,s=>0.6,l=>5,min=>6 ,max=>30 ,c=>'' ,f=>2 ,u=>'C' ,d=>1,t=>"Temperature for Win open"}, "party-temp" =>{a=> 6 ,s=>0.6,l=>5,min=>6 ,max=>30 ,c=>'' ,f=>2 ,u=>'C' ,d=>1,t=>"Temperature for Party"}, decalMin =>{a=> 8 ,s=>0.3,l=>5,min=>0 ,max=>50 ,c=>'' ,f=>0.1 ,u=>'min' ,d=>1,t=>"Decalc min"}, decalHr =>{a=> 8.3,s=>0.5,l=>5,min=>0 ,max=>23 ,c=>'' ,f=>'' ,u=>'h' ,d=>1,t=>"Decalc hour"},