2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 18:59:33 +00:00

CUL_HM: update rgbw

git-svn-id: https://svn.fhem.de/fhem/trunk@12675 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
martinp876 2016-11-27 15:46:42 +00:00
parent 2228e4c219
commit 037d16f3c8
2 changed files with 8 additions and 5 deletions

View File

@ -4539,7 +4539,7 @@ sub CUL_HM_Set($@) {#+++++++++++++++++ set command+++++++++++++++++++++++++++++
$lvl = $lvlMin + $lvl*($lvlMax-$lvlMin)/100; # relativ to range
$lvl = ($lvl > $lvlMax)?$lvlMax:(($lvl <= $lvlMin)?0:$lvl);
}
if ($st eq "dimmer"){# at least blind cannot stand ramp time...
if ($st =~ m /(dimmer|rgb)/){# at least blind cannot stand ramp time...
if (!$a[3]){
$tval = "FFFF";
$duration = 0;
@ -4563,7 +4563,7 @@ sub CUL_HM_Set($@) {#+++++++++++++++++ set command+++++++++++++++++++++++++++++
# store desiredLevel in and its Cmd in case we have to repeat
my $plvl = ($lvl eq "old")?"C9"
:sprintf("%02X",(($lvlInv)?100-$lvl :$lvl)*2);
if (($tval && $tval ne "FFFF") || $lvl eq "old"){
if (($tval ne "FFFF") || $lvl eq "old"){
delete $hash->{helper}{dlvl};#stop desiredLevel supervision
}
else{
@ -4758,8 +4758,11 @@ sub CUL_HM_Set($@) {#+++++++++++++++++ set command+++++++++++++++++++++++++++++
}
elsif($cmd eq "brightCol") { ################################################
my (undef,undef,$bright,$colVal,$duration,$ramp) = @a; #date prepared extention to entdate
return "please enter the duration in seconds"
if (!defined $duration || $duration !~ m/^[+-]?\d+(\.\d+)?$/);
return "cmd requires brightness[0..100] step 0.5, color[0..100] step 0.5, duration, ramptime" if (!defined $ramp);
return "please enter the duration in seconds" if (!defined $duration || $duration !~ m/^[+-]?\d+(\.\d+)?$/);
($bright,$colVal) = (int($bright*2),int($colVal*2));# convert percent to [0..200]
return "obey range for brightness[0..100] color[0..100]" if ( $bright < 0 or $bright > 200
or $colVal < 0 or $colVal > 200);
my $tval = CUL_HM_encodeTime16($duration);# onTime 0.0..85825945.6, 0=forever
$ramp = CUL_HM_encodeTime16($ramp);

View File

@ -1796,7 +1796,7 @@ $culHmModelSets{"HM-Sen-Wa-Od"} = $culHmModelSets{"HM-SEC-SD"};
,statusRequest =>""
,peerIODev =>"[IO] -btn- [set|unset]... not for future use"
}
,"HM-LC-RGBW-WM02" =>{ brightCol =>"-bright- -colVal- -duration- -ramp- ..."}
,"HM-LC-RGBW-WM02" =>{ brightCol =>"-bright[0-100]- -colVal[0-100]- -duration- -ramp- ..."}
,"HM-LC-RGBW-WM03" =>{ brightAuto =>"-bright- -colProg- -min- -max- -duration- -ramp- ..."}
,"HM-Sec-Sir-WM01" =>{ on =>""
,off =>""