From 2034f4ec9a65a65c58ff90d0bbd2b3784b55b4f4 Mon Sep 17 00:00:00 2001 From: unimatrix27 <> Date: Thu, 8 Mar 2012 08:50:18 +0000 Subject: [PATCH] added possibility to set a Ramp-Time for the Homematic Dimmers. Standard Ramp Time set to 0.5 seconds. Updated commandref accordingly. git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@1328 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- FHEM/10_CUL_HM.pm | 13 ++++++++----- docs/commandref.html | 6 +++++- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/FHEM/10_CUL_HM.pm b/FHEM/10_CUL_HM.pm index 0f1fc2367..3d212614c 100755 --- a/FHEM/10_CUL_HM.pm +++ b/FHEM/10_CUL_HM.pm @@ -872,7 +872,7 @@ sub CUL_HM_Set($@) { my ($hash, @a) = @_; - my ($ret, $tval); + my ($ret, $tval, $rval); #added rval for ramptime by unimatrix return "no set value specified" if(@a < 2); @@ -981,12 +981,16 @@ CUL_HM_Set($@) } elsif($cmd eq "pct") { ############################################## $a[1] = 100 if ($a[1] > 100); - my $cmd = sprintf("++A011%s%s02%s%02X0000", $id, $dst, $chn, $a[1]*2); + if(@a == 2) {$tval="";$rval="0000";} if(@a > 2) { ($tval,$ret) = CUL_HM_encodeTime16($a[2]); Log 1, $ret if($ret); - $cmd .= $tval; } + if(@a > 3) { + ($rval,$ret) = CUL_HM_encodeTime16($a[3]); + Log 1, $ret if($ret); + } + my $cmd = sprintf("++A011%s%s02%s%02X%s%s", $id, $dst, $chn, $a[1]*2,$rval,$tval); CUL_HM_PushCmdStack($hash, $cmd); } elsif($cmd eq "text") { ############################################# @@ -1593,8 +1597,7 @@ my %culHmBits = ( "A011;p01=02" => { txt => "SET" , params => { CHANNEL => "02,2", VALUE => "04,2", - RAMPTIME => "06,2", - ONTIME => "08,2", + RAMPTIME => '06,4,$val=CUL_HM_decodeTime16($val)', DURATION => '10,4,$val=CUL_HM_decodeTime16($val)', } }, "A03E" => { txt => "SWITCH", params => { DST => "00,6", diff --git a/docs/commandref.html b/docs/commandref.html index 6b2cae64c..452c86cf2 100644 --- a/docs/commandref.html +++ b/docs/commandref.html @@ -2927,9 +2927,13 @@ A line ending with \ will be concatenated with the next one, so long lines