diff --git a/fhem/FHEM/10_CUL_HM.pm b/fhem/FHEM/10_CUL_HM.pm
index 386980bc2..64db4eefb 100755
--- a/fhem/FHEM/10_CUL_HM.pm
+++ b/fhem/FHEM/10_CUL_HM.pm
@@ -1865,6 +1865,8 @@ sub CUL_HM_Set($@) {
elsif($cmd eq "peerBulk") { #################################################
$state = "";
my $pL = $a[2];
+ return "unknown action: $a[3] - use set or unset" if ($a[3] && $a[3] !~ m/^(set|unset)/);
+ my $set = ($a[3] eq "unset")?"02":"01";
foreach my $peer (split(',',$pL)){
next if ($peer =~ m/^self/);
my $pID = CUL_HM_peerChId($peer,$dst,$id);
@@ -1876,7 +1878,7 @@ sub CUL_HM_Set($@) {
($culHmChanSets{$md.$chn} &&$culHmChanSets{$md.$chn}{peerChan}) ){
$pCh2 = "00"; # button behavior
}
- CUL_HM_PushCmdStack($hash,'++'.$flag.'01'.$id.$dst.$chn.'01'.
+ CUL_HM_PushCmdStack($hash,'++'.$flag.'01'.$id.$dst.$chn.$set.
substr($pID,0,6).$pCh1.$pCh2);
}
}
@@ -2913,7 +2915,7 @@ sub CUL_HM_pushConfig($$$$$$$$) {#generate messages to cnfig data to register
my ($hash,$src,$dst,$chn,$peerAddr,$peerChn,$list,$content) = @_;
my $flag = CUL_HM_getFlag($hash);
my $tl = length($content);
-# $chn = $list?sprintf("%02X",$chn):"00";# channel = 00 for List 0
+
$chn = sprintf("%02X",$chn);
$peerChn = sprintf("%02X",$peerChn);
$list = sprintf("%02X",$list);
@@ -4085,25 +4087,29 @@ sub CUL_HM_putHash($) {# provide data for HMinfo
certain status information is also not reported. Paring is on device
level. Channels cannot be paired to central separate from the device.
See also getPair and
- unpair.
+ unpair.
Don't confuse pair (to a central) with peer (channel to channel) with
peerChan.
-
peerBulk
- peerBulk will add peer channels to the channel. All channels in the
- list will be added. This includes that the parameter and behavior
- defined for this 'link' will return to the defaults. peerBulk is only
- meant to add peers. More suffisticated funktionality as provided by
- peerChan is not supported. peerBulk
- will only add channels in 'single' button mode.
- Also note that peerBulk will not delete any existing peers, just add
- and re-add given peers.
- Main purpose of this command is the usage for re-store data to a
- device. It is recommended to restore register configuration utilising
- regBulk
+
+ peerBulk <peerch1,peerch2,...> [set|unset]
+ peerBulk will add peer channels to the channel. All peers in the
+ list will be added.
+ peering sets the configuration of this link to its defaults. As peers are not
+ added in pairs default will be as defined for 'single' by HM for this device.
+ More suffisticated funktionality is provided by
+ peerChan.
+ peerBulk will not delete existing peers, just handle the given peerlist.
+ Other already installed peers will not be touched.
+ peerBulk may be used to remove peers using unset option while default ist set.
+
+ Main purpose of this command is to re-store data to a device.
+ It is recommended to restore register configuration utilising
+ regBulk subsequent.
Example:
set myChannel peerBulk 12345601,
set myChannel peerBulk self01,self02,FB_Btn_04,FB_Btn_03,
+ set myChannel peerBulk 12345601 unset # remove peer 123456 channel 01
regRaw [List0|List1|List2|List3|List4] <addr> <data>
@@ -4600,6 +4606,17 @@ sub CUL_HM_putHash($) {# provide data for HMinfo
returns a list of register that are decoded by FHEM for this device.
Note that there could be more register implemented for a device.
+
+ saveConfig <file>
+ stores peers and register to the file.
+ Stored will be the data as available in fhem. It is necessary to read the information from the device prior to the save.
+ The command supports device-level action. I.e. if executed on a device also all related channel entities will be stored implicitely.
+ Storage to the file will be cumulative. If an entity is stored multiple times to the same file data will be appended. User can identify time of storage in the file if necessary.
+ Content of the file can be used to restore device configuration. It will restore all peers and all register to the entity.
+ Constrains/Restrictions:
+ prior to rewrite data to an entity it is necessary to pair the device with FHEM.
+ restore will not delete any peered channels, it will just add peer channels.
+
@@ -4685,19 +4702,6 @@ sub CUL_HM_putHash($) {# provide data for HMinfo
Generated events:
- - KS550/HM-WDS100-C6-O:
- T: $t H: $h W: $w R: $r IR: $ir WD: $wd WDR: $wdr S: $s B: $b
- temperature $t
- humidity $h
- windSpeed $w
- windDirection $wd
- windDirRange $wdr
- rain $r
- isRaining $ir
- sunshine $s
- brightness $b
- unknown $p
-
- HM-CC-TC:
T: $t H: $h
measured-temp $t
@@ -4731,21 +4735,18 @@ sub CUL_HM_putHash($) {# provide data for HMinfo
operState:[errorTargetNotMet|onTarget|adjusting] # operational condition
operStateErrCnt:$cnt # number of failed settings
- - KFM100:
- $v
- $cv,$unit
- rawValue:$v
- Sequence:$seq
- content:$cv,$unit
+ - HM-CC-SCD
+ [normal|added|addedStrong]
+ battery [low|ok]
- - HM-LC-BL1-PB-FM:
- motor: [opening|closing]
-
- HM-SEC-SFA-SM:
powerError [on|off]
sabotageError [on|off]
battery: [critical|low|ok]
+ - HM-LC-BL1-PB-FM:
+ motor: [opening|closing]
+
- HM-LC-SW1-BA-PCB:
battery: [low|ok]
@@ -4758,10 +4759,35 @@ sub CUL_HM_putHash($) {# provide data for HMinfo
- HM-OU-CFM-PL
[on|off|$val]
- - switch/dimmer/blindActuator:
- $val
- powerOn [on|off|$val]
- [unknown|motor|dim] [up|down|stop]:$val
+ - HM-Sen-Wa-Od
+ $level%
+ level $level%
+
+ - KFM100:
+ $v
+ $cv,$unit
+ rawValue:$v
+ Sequence:$seq
+ content:$cv,$unit
+
+ - KS550/HM-WDS100-C6-O:
+ T: $t H: $h W: $w R: $r IR: $ir WD: $wd WDR: $wdr S: $s B: $b
+ temperature $t
+ humidity $h
+ windSpeed $w
+ windDirection $wd
+ windDirRange $wdr
+ rain $r
+ isRaining $ir
+ sunshine $s
+ brightness $b
+ unknown $p
+
+ - THSensor and HM-WDC7000
+ T: $t H: $h AP: $ap
+ temperature $t
+ humidity $h
+ airpress $ap #HM-WDC7000 only
- dimmer:
overload [on|off]
@@ -4769,6 +4795,16 @@ sub CUL_HM_putHash($) {# provide data for HMinfo
reduced [on|off]
dim: [up|down|stop]
+ - motionDetector
+ brightness:$b
+ alive
+ motion on (to $dest)
+ motionCount $cnt _next:$nextTr"-"[0x0|0x1|0x2|0x3|15|30|60|120|240|0x9|0xa|0xb|0xc|0xd|0xe|0xf]
+ cover [closed|open] # not for HM-Sec-MDIR
+ sabotageError [on|off] # only HM-Sec-MDIR
+ battery [low|ok]
+ devState_raw.$d1 $d2
+
- remote/pushButton/outputUnit
(to $dest) is added if the button is peered and does not send to broadcast
Release is provided for peered channels only
@@ -4794,14 +4830,10 @@ sub CUL_HM_putHash($) {# provide data for HMinfo
Btn$x toggle (to $dest)
battery: [low|ok]
- - motionDetector
- brightness:$b
- alive
- motion on (to $dest)
- motionCount $cnt _next:$nextTr"-"[0x0|0x1|0x2|0x3|15|30|60|120|240|0x9|0xa|0xb|0xc|0xd|0xe|0xf]
- cover [closed|open]
- battery [low|ok]
- devState_raw.$d1 $d2
+ - switch/dimmer/blindActuator:
+ $val
+ powerOn [on|off|$val]
+ [unknown|motor|dim] [up|down|stop]:$val
- smokeDetector
[off|smoke-Alarm|alive] # for team leader
@@ -4820,12 +4852,7 @@ sub CUL_HM_putHash($) {# provide data for HMinfo
battery [low|ok]
contact [open|tilted|closed]
contact [wet|damp|dry] #HM-SEC-WDS only
-
- - THSensor and HM-WDC7000
- T: $t H: $h AP: $ap
- temperature $t
- humidity $h
- airpress $ap #HM-WDC7000 only
+ sabotageError [on|off] #HM-SEC-SC and HM-Sec-RHS only
- winMatic
[locked|$value]
@@ -4845,14 +4872,6 @@ sub CUL_HM_putHash($) {# provide data for HMinfo
lock [unlocked|locked]
[unlocked|locked|uncertain]
- - HM-CC-SCD
- [normal|added|addedStrong]
- battery [low|ok]
-
- - HM-Sen-Wa-Od
- $level%
- level $level%
-
diff --git a/fhem/FHEM/HMConfig.pm b/fhem/FHEM/HMConfig.pm
index afd5f05d5..ea4081759 100644
--- a/fhem/FHEM/HMConfig.pm
+++ b/fhem/FHEM/HMConfig.pm
@@ -186,7 +186,8 @@ my %culHmModel=(
"00A2" => {name=>"ROTO_ZEL-STG-RM-FZS-2" ,st=>'switch' ,cyc=>'' ,rxt=>'' ,lst=>'1,3' ,chn=>"",}, #radio-controlled socket adapter switch actuator 1-channel
"00A3" => {name=>"HM-LC-Dim1L-Pl-2" ,st=>'dimmer' ,cyc=>'' ,rxt=>'' ,lst=>'1,3' ,chn=>"",},
"00A4" => {name=>"HM-LC-Dim1T-Pl-2" ,st=>'dimmer' ,cyc=>'' ,rxt=>'' ,lst=>'1,3' ,chn=>"",},
- "00A7" => {name=>"HM-Sen-RD-O" ,st=>'' ,cyc=>'' ,rxt=>'' ,lst=>'1:1,4:1' ,chn=>"Rain:1:1,Sw:2:2",} ,
+ "00A7" => {name=>"HM-Sen-RD-O" ,st=>'' ,cyc=>'' ,rxt=>'' ,lst=>'1:1,4:1' ,chn=>"Rain:1:1,Sw:2:2",},
+ "00A9" => {name=>"HM-PB-6-WM55" ,st=>'remote' ,cyc=>'' ,rxt=>'c' ,lst=>'1,4' ,chn=>"Btn:1:6",},
#263 167 HM Smoke Detector Schueco
);