mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 18:59:33 +00:00
10_ZWave.pm: color_contrl changes, crc16 patch (Forum #36050)
git-svn-id: https://svn.fhem.de/fhem/trunk@8428 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
cead6f31ca
commit
fc21209156
@ -102,18 +102,10 @@ my %zwave_class = (
|
||||
ccStatus => '03', # no more args
|
||||
},
|
||||
set => { # Forum #36050
|
||||
resettoWhiteWarm => '050a00ff0101020003000400',
|
||||
# 100% warm, minimal cold, otherwise bulb is dimmed
|
||||
resettoWhiteCold => '050a000001ff020003000400',
|
||||
resettoRed => '050a0000010002ff03000400', # 100% red
|
||||
resettoGreen => '050a00000100020003ff0400', # 100% green
|
||||
resettoBlue => '050a000001000200030004ff', # 100% blue
|
||||
resettoYellow => '050A00000100027f037f0400', # 50% red, 50% green
|
||||
},
|
||||
parse => { "043302(.*)" => 'ccCapabilityGetResponse:$1', #answer to ccCapabilityGet
|
||||
"043304(.*)" => 'ccStatusResponse:$1', },
|
||||
},
|
||||
|
||||
rgb => '050a0000010002%02x03%02x04%02x',
|
||||
wcrgb => '050a00%02x01%02x02%02x03%02x04%02x', },
|
||||
parse => { "043302(.*)"=> 'ccCapabilityGetResponse:$1',
|
||||
"043304(.*)"=> 'ccStatusResponse:$1', }, },
|
||||
ZIP_ADV_CLIENT => { id => '34', },
|
||||
METER_PULSE => { id => '35', },
|
||||
BASIC_TARIFF_INFO => { id => '36', },
|
||||
@ -337,6 +329,7 @@ my %zwave_cmdArgs = (
|
||||
set => {
|
||||
dim => "slider,0,1,99",
|
||||
indicatorDim => "slider,0,1,99",
|
||||
rgb => "colorpicker,RGB",
|
||||
},
|
||||
get => {
|
||||
},
|
||||
@ -455,6 +448,14 @@ ZWave_Cmd($$@)
|
||||
}
|
||||
}
|
||||
|
||||
if($type eq "set" && $cmd eq "rgb") {
|
||||
if($a[0] =~ m/0-9A-F/i && $a[0] =~ /^(..)(..)(..)$/) {
|
||||
@a = (hex($1), hex($2), hex($3));
|
||||
} else {
|
||||
return "set rgb: a 6-digit hex number is required";
|
||||
}
|
||||
}
|
||||
|
||||
if(!$cmdList{$cmd}) {
|
||||
my @list;
|
||||
foreach my $cmd (sort keys %cmdList) {
|
||||
@ -1327,6 +1328,11 @@ ZWave_Parse($$@)
|
||||
$arg = sprintf("%s%02x%s", $1, hex($2) & 0x7f, $3);
|
||||
}
|
||||
|
||||
if($arg =~ /^..5601(.*)..../) { # CRC_16_ENCAP: Unwrap encapsulated command
|
||||
#Log3 $ioName, 4, "CRC FIX, MSG: ($1)"; # see Forum #23494
|
||||
$arg = sprintf("%02x$1", length($1)/2);
|
||||
}
|
||||
|
||||
my ($baseHash, $baseId, $ep) = ("",$id,"");
|
||||
if($arg =~ /^..6006(..)(.*)/) { # MULTI_CHANNEL CMD_ENCAP, V1, Forum #36126
|
||||
$ep = $1;
|
||||
@ -1665,6 +1671,18 @@ s2Hex($)
|
||||
Parameters are: groupId, sceneId, dimmingDuration.
|
||||
</li>
|
||||
|
||||
<br><br><b>Class COLOR_CONTROL</b>
|
||||
<li>rgb<br>
|
||||
Set the color of the device as a 6 digit RGB Value (RRGGBB), each color is
|
||||
specified with a value from 00 to ff.</li>
|
||||
<li>wcrgb<br>
|
||||
Used for sending warm white, cold white, red, green and blue values
|
||||
to device. Values must be decimal (0 - 255) and separated by blanks.
|
||||
<ul>
|
||||
set <name> wcrgb 0 255 0 0 0 (setting full cold white)<br>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<br><br><b>Class THERMOSTAT_MODE</b>
|
||||
<li>tmOff</li>
|
||||
<li>tmCooling</li>
|
||||
|
Loading…
Reference in New Issue
Block a user