2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-13 23:36:37 +00:00

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@1328 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
unimatrix27 2012-03-08 08:50:18 +00:00
parent 28e4020546
commit 8dd8f494aa
2 changed files with 13 additions and 6 deletions

View File

@ -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",

View File

@ -2927,9 +2927,13 @@ A line ending with \ will be concatenated with the next one, so long lines
<li>dimmer, blindActuator
<ul>
<li>0 - 100 with a resolution of 0.5:<br>
set the dimmer / blindActuator to the given value (in percent).
set the dimmer / blindActuator to the given value (in percent).<br>
as a second optional parameter you can give the On-Time in seconds (analog "on-for-timer"). 0 means infinite<br>
as a third optional parameter you can give the Ramp-Time in seconds (steps of 0.1) for a "slow-dim". 0 means instant. Default: 0.5<br></li>
<li>on / off<br>
this corresponds to 100 or 0 %.
<li>toggle - toggle the dimmer between off and the last on-value</li>
<li>on-for-timer sec - set the dimmer on for the given seconds. Redundant with 0-100 and on/off for compatability purposes</li>
</ul></li>
<br>