From 3e603350fd0fae077890232cc55446e7c4d4711a Mon Sep 17 00:00:00 2001 From: martinp876 Date: Sun, 21 Dec 2014 18:04:16 +0000 Subject: [PATCH] 10_CUL_HM: Dis_WM55 text - displayWM git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@7291 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/10_CUL_HM.pm | 51 +++++++++++++++++++++++++++++++++++++++++- fhem/FHEM/HMConfig.pm | 2 +- 2 files changed, 51 insertions(+), 2 deletions(-) diff --git a/fhem/FHEM/10_CUL_HM.pm b/fhem/FHEM/10_CUL_HM.pm index 6ccd8a7d9..4a82c8060 100755 --- a/fhem/FHEM/10_CUL_HM.pm +++ b/fhem/FHEM/10_CUL_HM.pm @@ -3905,6 +3905,31 @@ sub CUL_HM_Set($@) {#+++++++++++++++++ set command+++++++++++++++++++++++++++++ } CUL_HM_PushCmdStack($hash,$msg) if ($msg); } + elsif($cmd eq "displayWM" ) { ################################################# + # textNo color icon + my %color=(white=>0,red=>1,orange=>2,yellow=>3,green=>4,blue=>5); + my %icon=(off=>0,on=>1,open=>2,closed=>3,error=>4,ok=>5,noIcon=>99); + my %btn=(txt01_1=>0 ,txt01_2=>1 ,txt02_1=>2 ,txt02_2=>3 ,txt03_1=>4 ,txt03_2=>5, + txt04_1=>6 ,txt04_2=>7 ,txt05_1=>8 ,txt05_2=>9 ,txt06_1=>10,txt06_2=>11, + txt07_1=>12,txt07_2=>13,txt08_1=>14,txt08_2=>15,txt09_1=>16,txt09_2=>17, + txt10_1=>18,txt10_2=>19); + + + my $msg = "800102"; + my $param = (scalar(@a)-2); + return "not enough parameter - always use txtNo, color and icon in a set" + if($param %3); + for (my $cnt=2;$cnt<$param;$cnt+=3){ + return "color wrong ".$a[$cnt+1]." use:".join(",",sort keys %color) if (!defined $color{$a[$cnt+1]}); + return "icon wrong " .$a[$cnt+2]." use:".join(",",sort keys %icon) if (!defined $icon {$a[$cnt+2]}); + return "text wrong " .$a[$cnt+0]." use:".join(",",sort keys %btn) if (!defined $btn {$a[$cnt+0]}); + $msg .= sprintf("12%02X11%02X",$btn{$a[$cnt+0]}+0x80,$color{$a[$cnt+1]}+0x80); + $msg .= sprintf("13%02X",$icon{$a[$cnt+2]}+0x80) if ($icon{$a[$cnt+2]} != 99 ); + $msg .= ($cnt<$param-1)?"0A":"0A03"; + CUL_HM_PushCmdStack($hash,'++'.$flag.'11'.$id.$dst.$msg); + $msg = "8001"; + } + } elsif($cmd =~ m/^(controlMode|controlManu|controlParty)$/) { ################ my $mode = $a[2]; @@ -8123,6 +8148,18 @@ sub CUL_HM_tempListTmpl(@) { ##################################################
+
  • HM-Dis-WM55 +
    +
  • keyMatic


  • - +
  • HM-Dis-WM55 +
    +
  • +
  • keyMatic