mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-01 20:20:10 +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/fhem@1328 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
a7a92349f7
commit
2034f4ec9a
@ -872,7 +872,7 @@ sub
|
|||||||
CUL_HM_Set($@)
|
CUL_HM_Set($@)
|
||||||
{
|
{
|
||||||
my ($hash, @a) = @_;
|
my ($hash, @a) = @_;
|
||||||
my ($ret, $tval);
|
my ($ret, $tval, $rval); #added rval for ramptime by unimatrix
|
||||||
|
|
||||||
return "no set value specified" if(@a < 2);
|
return "no set value specified" if(@a < 2);
|
||||||
|
|
||||||
@ -981,12 +981,16 @@ CUL_HM_Set($@)
|
|||||||
|
|
||||||
} elsif($cmd eq "pct") { ##############################################
|
} elsif($cmd eq "pct") { ##############################################
|
||||||
$a[1] = 100 if ($a[1] > 100);
|
$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) {
|
if(@a > 2) {
|
||||||
($tval,$ret) = CUL_HM_encodeTime16($a[2]);
|
($tval,$ret) = CUL_HM_encodeTime16($a[2]);
|
||||||
Log 1, $ret if($ret);
|
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);
|
CUL_HM_PushCmdStack($hash, $cmd);
|
||||||
|
|
||||||
} elsif($cmd eq "text") { #############################################
|
} elsif($cmd eq "text") { #############################################
|
||||||
@ -1593,8 +1597,7 @@ my %culHmBits = (
|
|||||||
"A011;p01=02" => { txt => "SET" , params => {
|
"A011;p01=02" => { txt => "SET" , params => {
|
||||||
CHANNEL => "02,2",
|
CHANNEL => "02,2",
|
||||||
VALUE => "04,2",
|
VALUE => "04,2",
|
||||||
RAMPTIME => "06,2",
|
RAMPTIME => '06,4,$val=CUL_HM_decodeTime16($val)',
|
||||||
ONTIME => "08,2",
|
|
||||||
DURATION => '10,4,$val=CUL_HM_decodeTime16($val)', } },
|
DURATION => '10,4,$val=CUL_HM_decodeTime16($val)', } },
|
||||||
"A03E" => { txt => "SWITCH", params => {
|
"A03E" => { txt => "SWITCH", params => {
|
||||||
DST => "00,6",
|
DST => "00,6",
|
||||||
|
@ -2927,9 +2927,13 @@ A line ending with \ will be concatenated with the next one, so long lines
|
|||||||
<li>dimmer, blindActuator
|
<li>dimmer, blindActuator
|
||||||
<ul>
|
<ul>
|
||||||
<li>0 - 100 with a resolution of 0.5:<br>
|
<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>
|
<li>on / off<br>
|
||||||
this corresponds to 100 or 0 %.
|
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>
|
</ul></li>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user