2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 18:59:33 +00:00

10_CUL_HM: allow prefIO list

git-svn-id: https://svn.fhem.de/fhem/trunk@7047 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
martinp876 2014-11-23 09:52:33 +00:00
parent 551833a16f
commit f0bac012cb
2 changed files with 21 additions and 20 deletions

View File

@ -740,7 +740,8 @@ sub CUL_HM_Attr(@) {#################################
return "use $attrName only for devices" if (!$hash->{helper}{role}{dev});
my ($ioCCU,$prefIO) = split(":",$attrVal,2);
$hash->{helper}{io}{vccu} = $ioCCU;
$hash->{helper}{io}{prefIO} = $prefIO;
my @prefIOA = split(",",$prefIO);
$hash->{helper}{io}{prefIO} = \@prefIOA;
}
else{
$hash->{helper}{io}{vccu} = "";
@ -6005,7 +6006,7 @@ sub CUL_HM_getRegFromStore($$$$@) {#read a register from backup data
} elsif($conv eq "fltCvT60"){$data = CUL_HM_CvTflt60($data);
} elsif($conv eq "min2time"){$data = CUL_HM_min2time($data);
} elsif($conv eq "m10s3" ){$data = ($data+3)/10;
} elsif($conv eq "hex" ){$data = sprintf("0x%X",$data);
} elsif($conv eq "hex" ){$data = sprintf("0x%06X",$data);#06 only for paired to. Currently not used by others
} else { return " conv undefined - please contact admin";
}
$data /= $factor if ($factor);# obey factor after possible conversion
@ -6859,7 +6860,7 @@ sub CUL_HM_assignIO($){ #check and assign IO
return;
}
my ($ioCCU,$prefIO) = ($hash->{helper}{io}{vccu},$hash->{helper}{io}{prefIO});
my $ioCCU = $hash->{helper}{io}{vccu};
if ( defined $defs{$ioCCU} && AttrVal($ioCCU,"model","") eq "CCU-FHEM"
&& ref($defs{$ioCCU}{helper}{io}{ioList}) eq 'ARRAY'){
my @ioccu = @{$defs{$ioCCU}{helper}{io}{ioList}};
@ -6867,7 +6868,7 @@ sub CUL_HM_assignIO($){ #check and assign IO
$hash->{helper}{mRssi}{io}{$a} }
grep {defined $hash->{helper}{mRssi}{io}{$_}} @ioccu)
,(grep {!defined $hash->{helper}{mRssi}{io}{$_}} @ioccu));
unshift @ios,$prefIO if ($prefIO);# set prefIO to first choice
unshift @ios,@{$hash->{helper}{io}{prefIO}} if ($hash->{helper}{io}{prefIO});# set prefIO to first choice
foreach my $iom (@ios){
if ( !$defs{$iom}
|| $defs{$iom}{STATE} eq "disconnected"
@ -8335,12 +8336,13 @@ sub CUL_HM_tempListTmpl(@) { ##################################################
CCU will take care of the assignment to the best suitable IO. It is necessary that a
virtual CCU is defined and all relevant IO devices are assigned to it. Upon sending the CCU will
check which IO is operational and has the best RSSI performance for this device.<br>
Optional a prefered IO can be added. In case this IO is operational it willge selected regardless
Optional a prefered IO - perfIO can be given. In case this IO is operational it will be selected regardless
of rssi values. <br>
Example:<br>
<ul><code>
attr myDevice1 IOgrp vccu<br>
attr myDevice2 IOgrp vccu:prefIO<br>
attr myDevice2 IOgrp vccu:prefIO1,prefIO2,prefIO3<br>
</code></ul>
</li>
<li><a name="#CUL_HMlevelRange">levelRange</a><br>
@ -9572,7 +9574,7 @@ sub CUL_HM_tempListTmpl(@) { ##################################################
Beispiel:<br>
<ul><code>
attr myDevice1 IOgrp vccu<br>
attr myDevice2 IOgrp vccu:prefIO<br>
attr myDevice2 IOgrp vccu:prefIO1,prefIO2,prefIO3<br>
</code></ul>
</li>
<li><a name="#CUL_HMlevelRange">levelRange</a><br>

View File

@ -126,12 +126,11 @@ my $K_actDetID = '000000'; # id of actionDetector
,"0033" => {name=>"KS550LC" ,st=>'THSensor' ,cyc=>'00:10' ,rxt=>'c:w' ,lst=>'p,1' ,chn=>"",}
,"0034" => {name=>"HM-PBI-4-FM" ,st=>'pushButton' ,cyc=>'' ,rxt=>'c' ,lst=>'1,4' ,chn=>"Btn:1:4",} # HM Push Button Interface
,"0035" => {name=>"HM-PB-4-WM" ,st=>'pushButton' ,cyc=>'' ,rxt=>'c' ,lst=>'1,4' ,chn=>"Btn:1:4",}
,"0036" => {name=>"HM-PB-2-WM" ,st=>'pushButton' ,cyc=>'' ,rxt=>'c' ,lst=>'1,4' ,chn=>"Btn:1:2",} # RC file - see also 0BF
,
,"0036" => {name=>"HM-PB-2-WM" ,st=>'pushButton' ,cyc=>'' ,rxt=>'c' ,lst=>'1,4' ,chn=>"Btn:1:2",} # RC file - see also 0BF
,"0037" => {name=>"HM-RC-19" ,st=>'remote' ,cyc=>'' ,rxt=>'c:b' ,lst=>'1,4:1p.2p.3p.4p.5p.6p.7p.8p.9p.10p.11p.12p.13p.14p.15p.16p'
, ,chn=>"Btn:1:17,Disp:18:18",}
,chn=>"Btn:1:17,Disp:18:18",}
,"0038" => {name=>"HM-RC-19-B" ,st=>'remote' ,cyc=>'' ,rxt=>'c:b' ,lst=>'1,4:1p.2p.3p.4p.5p.6p.7p.8p.9p.10p.11p.12p.13p.14p.15p.16p'
, ,chn=>"Btn:1:17,Disp:18:18",}
,chn=>"Btn:1:17,Disp:18:18",}
,"0039" => {name=>"HM-CC-TC" ,st=>'thermostat' ,cyc=>'00:10' ,rxt=>'c:w:f' ,lst=>'p:2p,5:2.3p,6:2',chn=>"Weather:1:1,Climate:2:2,WindowRec:3:3",}
,"003A" => {name=>"HM-CC-VD" ,st=>'thermostat' ,cyc=>'28:00' ,rxt=>'c:w' ,lst=>'p,5' ,chn=>"",}
,"003B" => {name=>"HM-RC-4-B" ,st=>'remote' ,cyc=>'' ,rxt=>'c' ,lst=>'1,4' ,chn=>"Btn:1:4",}
@ -153,7 +152,7 @@ my $K_actDetID = '000000'; # id of actionDetector
,"004B" => {name=>"HM-Sec-Cen" ,st=>'AlarmControl' ,cyc=>'' ,rxt=>'' ,lst=>'1,3' ,chn=>"",}
,"004C" => {name=>"HM-RC-12-SW" ,st=>'remote' ,cyc=>'' ,rxt=>'c' ,lst=>'1,4' ,chn=>"Btn:1:12",},
,"004D" => {name=>"HM-RC-19-SW" ,st=>'remote' ,cyc=>'' ,rxt=>'c:b' ,lst=>'1,4:1p.2p.3p.4p.5p.6p.7p.8p.9p.10p.11p.12p.13p.14p.15p.16p'
, ,chn=>"Btn:1:17,Disp:18:18",}
,chn=>"Btn:1:17,Disp:18:18",}
,"004E" => {name=>"HM-LC-DDC1-PCB" ,st=>'switch' ,cyc=>'' ,rxt=>'' ,lst=>'1,3' ,chn=>"",} # door drive controller 1-channel (PCB)
,"004F" => {name=>"HM-SEN-MDIR-SM" ,st=>'motionDetector' ,cyc=>'' ,rxt=>'c:w:l' ,lst=>'1,4' ,chn=>"",}
,"0050" => {name=>"HM-SEC-SFA-SM" ,st=>'switch' ,cyc=>'' ,rxt=>'' ,lst=>'1,3' ,chn=>"Siren:1:1,Flash:2:2",}
@ -220,7 +219,7 @@ my $K_actDetID = '000000'; # id of actionDetector
,"0093" => {name=>"Schueco_263-158" ,st=>'THSensor' ,cyc=>'00:10' ,rxt=>'c:w:f' ,lst=>'p' ,chn=>"",} #
,"0094" => {name=>"IS-WDS-TH-OD-S-R3" ,st=>'THSensor' ,cyc=>'00:10' ,rxt=>'c:w' ,lst=>'p' ,chn=>"",} #
,"0095" => {name=>"HM-CC-RT-DN" ,st=>'thermostat' ,cyc=>'00:10' ,rxt=>'c:w:f' ,lst=>'p:1p.2p.4p.5p.6p,3:3p.6p,1,7:3p.4'
, ,chn=>"Weather:1:1,Climate:2:2,WindowRec:3:3,Clima:4:4,ClimaTeam:5:5,remote:6:6"} #
,chn=>"Weather:1:1,Climate:2:2,WindowRec:3:3,Clima:4:4,ClimaTeam:5:5,remote:6:6"} #
,"0096" => {name=>"WDF-solar" ,st=>'blindActuatorSol' ,cyc=>'' ,rxt=>'b' ,lst=>'1,3' ,chn=>"win:1:1,blind:2:3",} #
,"009B" => {name=>"Schueco_263-xxx" ,st=>'tipTronic' ,cyc=>'28:00' ,rxt=>'c:w' ,lst=>'1:1.2,3:1p.3p',chn=>"act:1:1,sen:2:2,sec:3:3",} #
,"009F" => {name=>"HM-Sen-Wa-Od" ,st=>'sensor' ,cyc=>'28:00' ,rxt=>'c:w' ,lst=>'1,4' ,chn=>"",} #capacitive filling level sensor
@ -236,9 +235,9 @@ my $K_actDetID = '000000'; # id of actionDetector
,"00A9" => {name=>"HM-PB-6-WM55" ,st=>'remote' ,cyc=>'' ,rxt=>'c:w:l' ,lst=>'1,4' ,chn=>"Btn:1:6",}
,"00AB" => {name=>"HM-LC-SW4-BA-PCB" ,st=>'switch' ,cyc=>'' ,rxt=>'b' ,lst=>'1,3' ,chn=>"Sw:1:4",}
,"00AC" => {name=>"HM-ES-PMSw1-Pl" ,st=>'powerMeter' ,cyc=>'00:10' ,rxt=>'' ,lst=>'1:2.3.4.5.6,3:1p,4:3p.4p.5p.6p'
, ,chn=>"Sw:1:1,Pwr:2:2,SenPwr:3:3,SenI:4:4,SenU:5:5,SenF:6:6"}
,chn=>"Sw:1:1,Pwr:2:2,SenPwr:3:3,SenI:4:4,SenU:5:5,SenF:6:6"}
,"00AD" => {name=>"HM-TC-IT-WM-W-EU" ,st=>'thermostat' ,cyc=>'00:10' ,rxt=>'c:b' ,lst=>'p:1p.2p.6p.7p,3:3p.6p,1,7:2,8:2,9:2'
, ,chn=>"Weather:1:1,Climate:2:2,WindowRec:3:3,remote:6:6,SwitchTr:7:7",}
,chn=>"Weather:1:1,Climate:2:2,WindowRec:3:3,remote:6:6,SwitchTr:7:7",}
,"00AF" => {name=>"HM-OU-CM-PCB" ,st=>'outputUnit' ,cyc=>'' ,rxt=>'' ,lst=>'3' ,chn=>"",}
,"00B1" => {name=>"HM-SEC-SC-2" ,st=>'threeStateSensor' ,cyc=>'28:00' ,rxt=>'c:w' ,lst=>'1,4' ,chn=>"",}
,"00B2" => {name=>"HM-SEC-WDS-2" ,st=>'threeStateSensor' ,cyc=>'28:00' ,rxt=>'c:w' ,lst=>'1,4' ,chn=>"",}
@ -253,7 +252,7 @@ my $K_actDetID = '000000'; # id of actionDetector
,"00BB" => {name=>"HM-LC-Dim2T-SM-2" ,st=>'dimmer' ,cyc=>'' ,rxt=>'' ,lst=>'1,3' ,chn=>"Sw:1:2,Sw1_V:3:4,Sw2_V:5:6",}#
,"00BC" => {name=>"HM-WDS40-TH-I-2" ,st=>'THSensor' ,cyc=>'00:10' ,rxt=>'c:f' ,lst=>'p' ,chn=>"",}, #:w todo should be wakeup, does not react
,"00BD" => {name=>"HM-CC-RT-DN-BoM" ,st=>'thermostat' ,cyc=>'00:10' ,rxt=>'c:w:f' ,lst=>'p:1p.2p.4p.5p.6p,3:3p.6p,1,7:3p.4'
, ,chn=>"Weather:1:1,Climate:2:2,WindowRec:3:3,Clima:4:4,ClimaTeam:5:5,remote:6:6"} #
,chn=>"Weather:1:1,Climate:2:2,WindowRec:3:3,Clima:4:4,ClimaTeam:5:5,remote:6:6"} #
,"00BE" => {name=>"HM-MOD-Re-8" ,st=>'switch' ,cyc=>'' ,rxt=>'b' ,lst=>'3' ,chn=>"Sw:1:8",}
,"00BF" => {name=>"HM-PB-2-FM" ,st=>'pushButton' ,cyc=>'' ,rxt=>'c' ,lst=>'1,4' ,chn=>"Btn:1:2",}
,"004A" => {name=>"HM-SEC-MDIR" ,st=>'motionDetector' ,cyc=>'00:20' ,rxt=>'c:w:l' ,lst=>'1,4' ,chn=>"",}
@ -274,7 +273,7 @@ my $K_actDetID = '000000'; # id of actionDetector
,"00D2" => {name=>"HM-LC-Bl1-FM-2" ,st=>'blindActuator' ,cyc=>'' ,rxt=>'' ,lst=>'1,3' ,chn=>"",} # radio-controlled blind actuator 1-channel (flush-mount)
,"00D3" => {name=>"HM-Dis-WM55" ,st=>'pushButton' ,cyc=>'' ,rxt=>'c' ,lst=>'1' ,chn=>"Dis:1:2",}
,"00D7" => {name=>"HM-ES-PMSw1-Pl-DN-R1" ,st=>'powerMeter' ,cyc=>'00:10' ,rxt=>'' ,lst=>'1:2.3.4.5.6,3:1p,4:3p.4p.5p.6p'
, ,chn=>"Sw:1:1,Pwr:2:2,SenPwr:3:3,SenI:4:4,SenU:5:5,SenF:6:6"}
,chn=>"Sw:1:1,Pwr:2:2,SenPwr:3:3,SenI:4:4,SenU:5:5,SenF:6:6"}
,"00D8" => {name=>"HM-LC-Sw1-Pl-DN-R1" ,st=>'switch' ,cyc=>'' ,rxt=>'' ,lst=>'1,3' ,chn=>"",}
,"00D9" => {name=>"HM-MOD-Em-8" ,st=>'remote' ,cyc=>'' ,rxt=>'b' ,lst=>'1,4' ,chn=>"Btn:1:8",}
,"00DA" => {name=>"HM-RC-8" ,st=>'remote' ,cyc=>'' ,rxt=>'c:w:l' ,lst=>'1,4' ,chn=>"Btn:1:8",}
@ -283,11 +282,11 @@ my $K_actDetID = '000000'; # id of actionDetector
,"00DD" => {name=>"HM-PB-4DIS-WM-2" ,st=>'pushButton' ,cyc=>'' ,rxt=>'c:w:l' ,lst=>'1,4' ,chn=>"Btn:1:20",}
,"00DE" => {name=>"HM-ES-TX-WM" ,st=>'powerSensor' ,cyc=>'00:10' ,rxt=>'c:w:l' ,lst=>'1' ,chn=>"",}
,"00E3" => {name=>"HM-ES-PMSw1-Pl-DN-R3" ,st=>'powerMeter' ,cyc=>'00:10' ,rxt=>'' ,lst=>'1:2.3.4.5.6,3:1p,4:3p.4p.5p.6p'
, ,chn=>"Sw:1:1,Pwr:2:2,SenPwr:3:3,SenI:4:4,SenU:5:5,SenF:6:6"}
,chn=>"Sw:1:1,Pwr:2:2,SenPwr:3:3,SenI:4:4,SenU:5:5,SenF:6:6"}
,"00E4" => {name=>"HM-ES-PMSw1-Pl-DN-R4" ,st=>'powerMeter' ,cyc=>'00:10' ,rxt=>'' ,lst=>'1:2.3.4.5.6,3:1p,4:3p.4p.5p.6p'
, ,chn=>"Sw:1:1,Pwr:2:2,SenPwr:3:3,SenI:4:4,SenU:5:5,SenF:6:6"}
,chn=>"Sw:1:1,Pwr:2:2,SenPwr:3:3,SenI:4:4,SenU:5:5,SenF:6:6"}
,"00E5" => {name=>"HM-ES-PMSw1-Pl-DN-R5" ,st=>'powerMeter' ,cyc=>'00:10' ,rxt=>'' ,lst=>'1:2.3.4.5.6,3:1p,4:3p.4p.5p.6p'
, ,chn=>"Sw:1:1,Pwr:2:2,SenPwr:3:3,SenI:4:4,SenU:5:5,SenF:6:6"}
,chn=>"Sw:1:1,Pwr:2:2,SenPwr:3:3,SenI:4:4,SenU:5:5,SenF:6:6"}
,"00E6" => {name=>"HM-LC-Sw1-Pl-DN-R2" ,st=>'switch' ,cyc=>'' ,rxt=>'' ,lst=>'1,3' ,chn=>"",}
,"00E7" => {name=>"HM-LC-Sw1-Pl-DN-R3" ,st=>'switch' ,cyc=>'' ,rxt=>'' ,lst=>'1,3' ,chn=>"",}
,"00E8" => {name=>"HM-LC-Sw1-Pl-DN-R4" ,st=>'switch' ,cyc=>'' ,rxt=>'' ,lst=>'1,3' ,chn=>"",}
@ -415,7 +414,7 @@ my $K_actDetID = '000000'; # id of actionDetector
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=>"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 repated to CtrlRc reg"},
TempRC =>{a=> 45 ,s=>0.6,l=>3,min=>5 ,max=>30 ,c=>'' ,f=>2 ,u=>'C' ,d=>0,t=>"temperature if required by CtrlRc reg"},
);
%culHmRegDefine = (