From 9efc0469f13edfb119b44307374c837ad23d5c3e Mon Sep 17 00:00:00 2001
From: rudolfkoenig <>
Date: Mon, 20 Jan 2020 19:15:42 +0000
Subject: [PATCH] 10_ZWave.pm: less strict ControlColor parsing (reported by
goap)
git-svn-id: https://svn.fhem.de/fhem/trunk@21025 2b470e98-0d58-463d-a4d8-8e2adae1ed80
---
fhem/FHEM/10_ZWave.pm | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/fhem/FHEM/10_ZWave.pm b/fhem/FHEM/10_ZWave.pm
index 7e7604887..8fddf04eb 100644
--- a/fhem/FHEM/10_ZWave.pm
+++ b/fhem/FHEM/10_ZWave.pm
@@ -151,7 +151,8 @@ my %zwave_class = (
rgb => '05050000010002%02x03%02x04%02x', # Forum #44014
wcrgb => '050500%02x01%02x02%02x03%02x04%02x' },
parse => { "043302(..)(..)"=> 'ZWave_ccCapability($1,$2)',
- "043304(..)(.*)"=> '"ccStatus_".hex($1).":".hex($2)' } },
+ "0.3304(..)(..)(.*)"=> '"ccStatus_".hex($1).":".hex($2)',
+ "..3304(..)(..)(.*)"=> 'ZWave_ccParse(hex($1),hex($2))' } },
ZIP_ADV_CLIENT => { id => '34' },
METER_PULSE => { id => '35' },
BASIC_TARIFF_INFO => { id => '36' },
@@ -2545,6 +2546,15 @@ ZWave_doorLLRParse($$)
}
}
+sub
+ZWave_ccParse($$)
+{
+ my ($ch,$val) = @_;
+ my @ccLabel = ("WarmWhite","ColdWhite","Red","Green","Blue",
+ "Amber","Cyan","Purple","Indexed");
+ my $l = ($ch > @ccLabel-1 ? "unknown":$ccLabel[$ch]);
+ return "cc$l:$val";
+}
sub
ZWave_ccColorSet($)
@@ -7111,6 +7121,9 @@ ZWave_firmwareUpdateParse($$$)
Class COLOR_CONTROL