consolidate TC commands, remove day-temp, night-temp,party-temp,decalcDay - all represented by registers anyhow
git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@4010 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
@@ -223,6 +223,9 @@ sub CUL_HM_updateConfig($){
|
||||
$hash->{helper}{role}{chn} = 1 if (length($id) == 6); #tc special
|
||||
$attr{$name}{stateFormat} = "last:trigLast" if ($chn eq "03");
|
||||
}
|
||||
elsif ($md eq "HM-CC-RT-DN"){
|
||||
$attr{$name}{stateFormat} = "last:trigLast" if ($chn eq "03");
|
||||
}
|
||||
elsif ("dimmer" eq $st) {#setup virtual dimmer channels
|
||||
my $mId = CUL_HM_getMId($hash);
|
||||
#configure Dimmer virtual channel assotiation
|
||||
@@ -2104,12 +2107,7 @@ sub CUL_HM_Set($@) {
|
||||
|
||||
#convert 'old' commands to current methodes like regSet and regBulk...
|
||||
# Unify the interface
|
||||
if($cmd =~ m/^(day|night|party)-temp$/){ #
|
||||
$a[2] = ($a[2] eq "off")?5.5:(($a[2] eq "on")?30:$a[2]);
|
||||
splice @a,1,0,"regSet";# make hash,regSet,reg,value
|
||||
($chn,$isChannel) = ("02","true");#force chn 02
|
||||
}
|
||||
elsif($cmd eq "sign"){
|
||||
if( $cmd eq "sign"){
|
||||
splice @a,1,0,"regSet";# make hash,regSet,reg,value
|
||||
}
|
||||
elsif($cmd eq "unpair"){
|
||||
@@ -2143,9 +2141,11 @@ sub CUL_HM_Set($@) {
|
||||
|
||||
@a = ($a[0],"regBulk","RegL_01:",split(" ",$l1.$l2));
|
||||
}
|
||||
elsif($cmd =~ m /(displayMode|displayTemp|displayTempUnit|controlMode|decalcDay)/) {
|
||||
splice @a,1,3, ("regSet",$a[1],$a[2]);
|
||||
push @postCmds,"++803F$id${dst}0204".sprintf("%02X",CUL_HM_secSince2000());
|
||||
elsif($cmd =~ m /(displayMode|displayTemp|displayTempUnit|controlMode)/) {
|
||||
if ($md eq "HM-CC-TC"){#controlMode different for RT
|
||||
splice @a,1,3, ("regSet",$a[1],$a[2]);
|
||||
push @postCmds,"++803F$id${dst}0204".sprintf("%02X",CUL_HM_secSince2000());
|
||||
}
|
||||
}
|
||||
elsif($cmd eq "partyMode") { ################################################
|
||||
my $days = $a[3];
|
||||
@@ -2686,34 +2686,34 @@ sub CUL_HM_Set($@) {
|
||||
}
|
||||
CUL_HM_PushCmdStack($hash,$msg) if ($msg);
|
||||
}
|
||||
elsif($cmd =~ m/^(mode|mode-manu|mode-party)$/) { ###########################
|
||||
my $mode = length($a[1]<5)?$a[1]:substr($a[1],5);
|
||||
if (length$a[1] > 4){
|
||||
splice @a,2,0,substr($a[1],5);
|
||||
$a[3] = ($a[3] eq "off")?4.5:($a[3] eq "on"?30.5:$a[3]);
|
||||
elsif($cmd =~ m/^(controlMode|controlManu|controlParty)$/) { ################
|
||||
my $mode = $a[1];
|
||||
if ($cmd ne "controlMode"){
|
||||
$mode = substr($a[1],7);
|
||||
$a[2] = ($a[2] eq "off")?4.5:($a[2] eq "on"?30.5:$a[2]);
|
||||
}
|
||||
return "select one of auto,boost,comfort,lower of mode_manu, mode_party"
|
||||
if ($a[2] !~ m/^(auto|manu|party|boost|comfort|lower)$/);
|
||||
return "select of mode [auto|boost|comfort|lower] or mode-manu, mode-party"
|
||||
if ($mode !~ m/^(auto|manu|party|boost|comfort|lower)$/);
|
||||
my ($temp,$party);
|
||||
if ($a[2] =~ m/^(auto|boost|comfort|lower)$/){
|
||||
return "no additional params for $a[2]" if ($a[3]);
|
||||
if ($mode =~ m/^(auto|boost|comfort|lower)$/){
|
||||
return "no additional params for $mode" if ($a[3]);
|
||||
}
|
||||
if($a[2] eq "manu"){
|
||||
if($mode eq "manu"){
|
||||
return "temperatur for manu 4.5 to 30.5 C"
|
||||
if (!$a[3] || $a[3] < 4.5 || $a[3] > 30.5);
|
||||
$temp = $a[3]*2;
|
||||
if (!$a[2] || $a[2] < 4.5 || $a[2] > 30.5);
|
||||
$temp = $a[2]*2;
|
||||
}
|
||||
elsif($a[2] eq "party"){
|
||||
elsif($mode eq "party"){
|
||||
return "use party <temp> <from-time> <from-date> <to-time> <to-date>\n"
|
||||
."temperatur: 5 to 30 C\n"
|
||||
."date format: party 10 03.8.13 11:30 5.8.13 12:00"
|
||||
if (!$a[3] || $a[3] < 5 || $a[3] > 30 || !$a[7] );
|
||||
$temp = $a[3]*2;
|
||||
if (!$a[2] || $a[2] < 5 || $a[2] > 30 || !$a[6] );
|
||||
$temp = $a[2]*2;
|
||||
# party format 03.8.13 11:30 5.8.13 12:00
|
||||
my ($sd,$sm,$sy) = split('\.',$a[4]);
|
||||
my ($sh,$smin) = split(':' ,$a[5]);
|
||||
my ($ed,$em,$ey) = split('\.',$a[6]);
|
||||
my ($eh,$emin) = split(':' ,$a[7]);
|
||||
my ($sd,$sm,$sy) = split('\.',$a[3]);
|
||||
my ($sh,$smin) = split(':' ,$a[4]);
|
||||
my ($ed,$em,$ey) = split('\.',$a[5]);
|
||||
my ($eh,$emin) = split(':' ,$a[6]);
|
||||
|
||||
return "wrong start day $sd" if ($sd < 0 || $sd > 31);
|
||||
return "wrong start month $sm" if ($sm < 0 || $sm > 12);
|
||||
@@ -2733,8 +2733,8 @@ sub CUL_HM_Set($@) {
|
||||
$sh,$sd,$sy,$eh,$ed,$ey,($sm*16+$em));
|
||||
}
|
||||
my %mCmd = (auto=>0,manu=>1,party=>2,boost=>3,comfort=>4,lower=>5);
|
||||
readingsSingleUpdate($hash,"mode","set_".$a[2],1);
|
||||
my $msg = '8'.($mCmd{$a[2]}).$chn;
|
||||
readingsSingleUpdate($hash,"mode","set_".$mode,1);
|
||||
my $msg = '8'.($mCmd{$mode}).$chn;
|
||||
$msg .= sprintf("%02X",$temp) if ($temp);
|
||||
$msg .= $party if ($party);
|
||||
CUL_HM_PushCmdStack($hash,'++'.$flag.'11'.$id.$dst.$msg);
|
||||
@@ -5196,9 +5196,6 @@ sub CUL_HM_putHash($) {# provide data for HMinfo
|
||||
<br></li>
|
||||
<li>Climate-Control (HM-CC-TC)
|
||||
<ul>
|
||||
<li><B>day-temp <temp></B><br></li>
|
||||
<li><B>night-temp <temp></B><br></li>
|
||||
<li><B>party-temp <temp></B><br></li>
|
||||
<li><B>desired-temp <temp></B><br>
|
||||
Set different temperatures. <temp> must be between 6 and 30
|
||||
Celsius, and precision is half a degree.</li>
|
||||
@@ -5227,12 +5224,12 @@ sub CUL_HM_putHash($) {# provide data for HMinfo
|
||||
|
||||
<li>Climate-Control (HM-CC-RT-DN)
|
||||
<ul>
|
||||
<li><B>mode <auto|boost|comfort|lower></B><br></li>
|
||||
<li><B>mode_manu <temp></B><br></li>
|
||||
<li><B>mode_party <temp><startDate><startTime><endDate><endTime></B><br>
|
||||
<li><B>controlMode <auto|boost|comfort|lower></B><br></li>
|
||||
<li><B>controlManu <temp></B><br></li>
|
||||
<li><B>controlParty <temp><startDate><startTime><endDate><endTime></B><br>
|
||||
set control mode to party, define temp and timeframe.<br>
|
||||
example:<br>
|
||||
<code>set mode_party 15 03.8.13 20:30 5.8.13 11:30</code></li>
|
||||
<code>set controlParty 15 03.8.13 20:30 5.8.13 11:30</code></li>
|
||||
<li><B>systime</B><br>
|
||||
set time in climate channel to system time</li>
|
||||
<li><B>desired-temp <temp></B><br>
|
||||
@@ -5579,7 +5576,6 @@ sub CUL_HM_putHash($) {# provide data for HMinfo
|
||||
displayTemp [setpoint|actual]<br>
|
||||
displayTempUnit [fahrenheit|celsius]<br>
|
||||
controlMode [manual|auto|central|party]<br>
|
||||
decalcDay [Sat|Sun|Mon|Tue|Wed|Thu|Fri]<br>
|
||||
tempValveMode [Auto|Closed|Open|unknown]<br>
|
||||
param-change offset=$o1, value=$v1<br>
|
||||
ValveErrorPosition_for_$dname $vep %<br>
|
||||
|
||||
@@ -339,8 +339,8 @@ my %culHmRegDefShLg = (# register that are available for short AND long button p
|
||||
CtRefOn =>{a=> 28.0,s=>0.4,l=>3,min=>0 ,max=>5 ,c=>'lit' ,f=>'' ,u=>'' ,d=>0,t=>"Jmp on condition from refOn" ,lit=>{geLo=>0,geHi=>1,ltLo=>2,ltHi=>3,between=>4,outside=>5}},
|
||||
CtRefOff =>{a=> 28.4,s=>0.4,l=>3,min=>0 ,max=>5 ,c=>'lit' ,f=>'' ,u=>'' ,d=>0,t=>"Jmp on condition from refOff" ,lit=>{geLo=>0,geHi=>1,ltLo=>2,ltHi=>3,between=>4,outside=>5}},
|
||||
|
||||
CtrlRc =>{a=> 46 ,s=>0.4,l=>3,min=>0 ,max=>6 ,c=>'lit' ,f=>'' ,u=>'' ,d=>0,t=>"Jmp on condition from refOff" ,lit=>{no=>0,tempSh=>1,auto=>2,auto_tempSh=>3,manu_tempSh=>4,boost=>5,toggle=>6}},
|
||||
TempRC =>{a=> 45 ,s=>0.6,l=>3,min=>5 ,max=>30 ,c=>'' ,f=>2 ,u=>'C' ,d=>0,t=>"Jmp on condition from refOff"},
|
||||
CtrlRc =>{a=> 46 ,s=>0.4,l=>3,min=>0 ,max=>6 ,c=>'lit' ,f=>'' ,u=>'' ,d=>0,t=>"set mode and/or temperature" ,lit=>{no=>0,tempOnly=>1,auto=>2,autoAndTemp=>3,manuAndTemp=>4,boost=>5,toggle=>6}},
|
||||
TempRC =>{a=> 45 ,s=>0.6,l=>3,min=>5 ,max=>30 ,c=>'' ,f=>2 ,u=>'C' ,d=>0,t=>"temperature re<72>ated to CtrlRc reg"},
|
||||
);
|
||||
|
||||
my %culHmRegDefine = (
|
||||
@@ -380,10 +380,10 @@ my %culHmRegDefine = (
|
||||
confBtnTime =>{a=> 21.0,s=>1.0,l=>0,min=>1 ,max=>255 ,c=>'' ,f=>'' ,u=>'min' ,d=>0,t=>"255=permanent"},
|
||||
#repeater
|
||||
compMode =>{a=> 23.0,s=>0.1,l=>0,min=>0 ,max=>1 ,c=>'lit' ,f=>'' ,u=>'' ,d=>1,t=>"compatibility moden" ,lit=>{off=>0,on=>1}},
|
||||
localResDis =>{a=> 24.0,s=>1.0,l=>0,min=>1 ,max=>1 ,c=>'lit' ,f=>'' ,u=>'' ,d=>0,t=>"local reset disable" ,lit=>{off=>0,on=>1}},
|
||||
globalBtnLock =>{a=> 25.0,s=>1.0,l=>0,min=>1 ,max=>255 ,c=>'lit' ,f=>'' ,u=>'' ,d=>0,t=>"global button lock" ,lit=>{off=>0,on=>200}},
|
||||
modusBtnLock =>{a=> 26.0,s=>1.0,l=>0,min=>1 ,max=>255 ,c=>'lit' ,f=>'' ,u=>'' ,d=>0,t=>"mode button lock" ,lit=>{off=>0,on=>200}},
|
||||
paramSel =>{a=> 27.0,s=>1.0,l=>0,min=>0 ,max=>4 ,c=>'lit' ,f=>'' ,u=>'' ,d=>1,t=>"data transfered to peer" ,lit=>{off=>0,T1=>1,T2=>2,T1_T2=>3,T2_T1=>4}},
|
||||
localResDis =>{a=> 24.0,s=>1.0,l=>0,min=>1 ,max=>1 ,c=>'lit' ,f=>'' ,u=>'' ,d=>0,t=>"local reset disable" ,lit=>{off=>0,on=>1}},
|
||||
globalBtnLock =>{a=> 25.0,s=>1.0,l=>0,min=>1 ,max=>255 ,c=>'lit' ,f=>'' ,u=>'' ,d=>0,t=>"global button lock" ,lit=>{off=>0,on=>200}},
|
||||
modusBtnLock =>{a=> 26.0,s=>1.0,l=>0,min=>1 ,max=>255 ,c=>'lit' ,f=>'' ,u=>'' ,d=>0,t=>"mode button lock" ,lit=>{off=>0,on=>200}},
|
||||
paramSel =>{a=> 27.0,s=>1.0,l=>0,min=>0 ,max=>4 ,c=>'lit' ,f=>'' ,u=>'' ,d=>1,t=>"data transfered to peer" ,lit=>{off=>0,T1=>1,T2=>2,T1_T2=>3,T2_T1=>4}},
|
||||
RS485IdleTime =>{a=> 29.0,s=>1.0,l=>0,min=>0 ,max=>255 ,c=>'' ,f=>'' ,u=>'s' ,d=>0,t=>"Idle Time"},
|
||||
#un-identified List0
|
||||
# addr Dec!!
|
||||
@@ -540,8 +540,8 @@ my %culHmRegDefine = (
|
||||
controlMode =>{a=> 1.3,s=>0.2,l=>5,min=>0 ,max=>3 ,c=>'lit' ,f=>'' ,u=>'' ,d=>1,t=>"" ,lit=>{manual=>0,auto=>1,central=>2,party=>3}},
|
||||
decalcDay =>{a=> 1.5,s=>0.3,l=>5,min=>0 ,max=>7 ,c=>'lit' ,f=>'' ,u=>'' ,d=>1,t=>"Decalc weekday" ,lit=>{Sat=>0,Sun=>1,Mon=>2,Tue=>3,Wed=>4,Thu=>5,Fri=>6}},
|
||||
mdTempValve =>{a=> 2.6,s=>0.2,l=>5,min=>0 ,max=>2 ,c=>'lit' ,f=>'' ,u=>'' ,d=>1,t=>"" ,lit=>{auto=>0,close=>1,open=>2}},
|
||||
"day-temp" =>{a=> 3 ,s=>0.6,l=>5,min=>6 ,max=>30 ,c=>'' ,f=>2 ,u=>'C' ,d=>1,t=>"comfort temp value"},
|
||||
"night-temp" =>{a=> 4 ,s=>0.6,l=>5,min=>6 ,max=>30 ,c=>'' ,f=>2 ,u=>'C' ,d=>1,t=>"comfort temp value"},
|
||||
"day-temp" =>{a=> 3 ,s=>0.6,l=>5,min=>6 ,max=>30 ,c=>'' ,f=>2 ,u=>'C' ,d=>1,t=>"comfort or day temperatur"},
|
||||
"night-temp" =>{a=> 4 ,s=>0.6,l=>5,min=>6 ,max=>30 ,c=>'' ,f=>2 ,u=>'C' ,d=>1,t=>"lower or night temperatur"},
|
||||
tempWinOpen =>{a=> 5 ,s=>0.6,l=>5,min=>6 ,max=>30 ,c=>'' ,f=>2 ,u=>'C' ,d=>1,t=>"Temperature for Win open !chan 3 only!"},
|
||||
"party-temp" =>{a=> 6 ,s=>0.6,l=>5,min=>6 ,max=>30 ,c=>'' ,f=>2 ,u=>'C' ,d=>1,t=>"Temperature for Party"},
|
||||
decalMin =>{a=> 8 ,s=>0.3,l=>5,min=>0 ,max=>50 ,c=>'' ,f=>0.1 ,u=>'min' ,d=>1,t=>"Decalc min"},
|
||||
@@ -554,8 +554,8 @@ my %culHmRegDefine = (
|
||||
valveOffset =>{a=> 9 ,s=>0.5,l=>5,min=>0 ,max=>25 ,c=>'' ,f=>'' ,u=>'%' ,d=>1,t=>"Valve offset"}, # size actually 0.5
|
||||
valveErrorPos =>{a=> 10 ,s=>1 ,l=>5,min=>0 ,max=>99 ,c=>'' ,f=>'' ,u=>'%' ,d=>1,t=>"Valve position when error"},# size actually 0.7
|
||||
|
||||
tempComfort =>{a=> 1 ,s=>0.6,l=>7,min=>15 ,max=>30 ,c=>'' ,f=>'2' ,u=>'C' ,d=>1,t=>"comfort temperatur"},
|
||||
tempLowering =>{a=> 2 ,s=>0.6,l=>7,min=>5 ,max=>25 ,c=>'' ,f=>'2' ,u=>'C' ,d=>1,t=>"lowering temperatur"},
|
||||
dayTemp =>{a=> 1 ,s=>0.6,l=>7,min=>15 ,max=>30 ,c=>'' ,f=>'2' ,u=>'C' ,d=>1,t=>"comfort or day temperatur"},
|
||||
nightTemp =>{a=> 2 ,s=>0.6,l=>7,min=>5 ,max=>25 ,c=>'' ,f=>'2' ,u=>'C' ,d=>1,t=>"lower or night temperatur"},
|
||||
tempMin =>{a=> 3 ,s=>0.6,l=>7,min=>4.5,max=>14.5 ,c=>'' ,f=>'2' ,u=>'C' ,d=>1,t=>"minimum temperatur"},
|
||||
tempMax =>{a=> 4 ,s=>0.6,l=>7,min=>15 ,max=>30.5 ,c=>'' ,f=>'2' ,u=>'C' ,d=>1,t=>"maximum temperatur"},
|
||||
winOpnTemp =>{a=> 5 ,s=>0.6,l=>7,min=>5 ,max=>30 ,c=>'' ,f=>'2' ,u=>'C' ,d=>1,t=>"lowering temp whenWindow is opened"},
|
||||
@@ -1030,15 +1030,9 @@ $culHmModelSets{"HM-OU-CM-PCB"} = $culHmModelSets{"HM-OU-CFM-PL"};
|
||||
#%{$culHmModelSets{"HM-RC-19-SW"}} = %{$culHmModelSets{"HM-RC-19"}}; copy
|
||||
|
||||
my %culHmChanSets = (
|
||||
"HM-CC-TC00" =>{ "day-temp" =>"[on|off|6.0..30.0]",
|
||||
"night-temp" =>"[on|off|6.0..30.0]",
|
||||
"party-temp" =>"[on|off|6.0..30.0]",
|
||||
"desired-temp" =>"[on|off|6.0..30.0]",
|
||||
sysTime =>"" },
|
||||
"HM-CC-TC00" =>{ "desired-temp" =>"[on|off|6.0..30.0]"
|
||||
,sysTime =>"" },
|
||||
"HM-CC-TC02" =>{ peerChan =>" 0 <actChn> ... single [set|unset] [actor|remote|both]"
|
||||
,"day-temp" =>"[on|off|6.0..30.0]"
|
||||
,"night-temp" =>"[on|off|6.0..30.0]"
|
||||
,"party-temp" =>"[on|off|6.0..30.0]"
|
||||
,"desired-temp" =>"[on|off|6.0..30.0]"
|
||||
,tempListSat =>"HH:MM temp ..."
|
||||
,tempListSun =>"HH:MM temp ..."
|
||||
@@ -1052,7 +1046,6 @@ my %culHmChanSets = (
|
||||
,displayTemp =>"[actual|setpoint]"
|
||||
,displayTempUnit=>"[celsius|fahrenheit]"
|
||||
,controlMode =>"[manual|auto|central|party]"
|
||||
,decalcDay =>"day",
|
||||
,sysTime =>"" },
|
||||
"HM-SEC-WIN01" =>{ stop =>"",
|
||||
level =>"<level> <relockDly> <speed>..."},
|
||||
@@ -1068,9 +1061,9 @@ my %culHmChanSets = (
|
||||
,toggle =>""},
|
||||
"HM-CC-RT-DN00" =>{ sysTime =>""},
|
||||
"HM-CC-RT-DN02" =>{ sysTime =>""},
|
||||
"HM-CC-RT-DN04" =>{ mode => "[auto|boost|comfort|lower]"
|
||||
,"mode-manu" => "[on|off|5.0..30.0]"
|
||||
,"mode-party" => "<temp> <startDate> <startTime> <enddate> <endTime>"
|
||||
"HM-CC-RT-DN04" =>{ controlMode => "[auto|boost|comfort|lower]"
|
||||
,controlManu => "[on|off|5.0..30.0]"
|
||||
,controlParty => "<temp> <startDate> <startTime> <enddate> <endTime>"
|
||||
,tempListSat =>"HH:MM temp ..."
|
||||
,tempListSun =>"HH:MM temp ..."
|
||||
,tempListMon =>"HH:MM temp ..."
|
||||
|
||||
Reference in New Issue
Block a user