From 47b042c50d705df73ced070aa3437f43eb9a8046 Mon Sep 17 00:00:00 2001 From: martinp876 <> Date: Mon, 22 Jul 2013 10:12:15 +0000 Subject: [PATCH] update CFM-LED handling git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@3472 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- FHEM/10_CUL_HM.pm | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/FHEM/10_CUL_HM.pm b/FHEM/10_CUL_HM.pm index 7a212b6df..43fafff94 100755 --- a/FHEM/10_CUL_HM.pm +++ b/FHEM/10_CUL_HM.pm @@ -2375,11 +2375,13 @@ sub CUL_HM_Set($@) { } elsif($md eq "HM-OU-CFM-PL"){ my %color = (redL =>18,greenL =>34,orangeL =>50, - redS =>17,greenS =>33,orangeS =>49); + redS =>17,greenS =>33,orangeS =>49, + pause=>01); my @itemList = split(',',$a[2]); my $repeat = (defined $a[3] && $a[3] =~ m/^(\d+)$/)?$a[3]:1; my $itemCnt = int(@itemList); - return "no more then 12 entries please" if ($itemCnt>12); + return "no more then 10 entries please" if ($itemCnt>10); + return "at least one entry must be entered" if ($itemCnt<1); return "repetition $repeat out of range [1..255]" if($repeat < 1 || $repeat > 255); # @@ -2391,8 +2393,11 @@ sub CUL_HM_Set($@) { $msgBytes .= sprintf("%02X",$color{$led}); } # need to fill up empty locations for LED channel - $msgBytes = substr($msgBytes."000000000000000000000000",0,28); + $msgBytes = substr($msgBytes."000000000000000000",0,(10+2)*2); CUL_HM_PushCmdStack($hash,'++'.$flag.'11'.$id.$dst.'80'.$chn.$msgBytes); + CUL_HM_PushCmdStack($hash,'++'.$flag.'11'.$id.$dst.'80'.$chn. + "010101010000000000000000") + if ($itemCnt == 1); } else{ return "device for command cannot be identified"; @@ -4564,7 +4569,7 @@ sub CUL_HM_putHash($) {# provide data for HMinfo
  • OutputUnit (HM-OU-CFM-PL)
    • led <color>[,<color>..] [<repeat>..]
      - Possible colors are [redL|greenL|yellowL|redS|greenS|yellowS]. A + Possible colors are [redL|greenL|yellowL|redS|greenS|yellowS|pause]. A sequence of colors can be given separating the color entries by ','. White spaces must not be used in the list. 'S' indicates short and 'L' long ilumination.