diff --git a/fhem/FHEM/00_HMLAN.pm b/fhem/FHEM/00_HMLAN.pm
index ac3a69d3e..552a69941 100755
--- a/fhem/FHEM/00_HMLAN.pm
+++ b/fhem/FHEM/00_HMLAN.pm
@@ -542,7 +542,9 @@ sub HMLAN_secSince2000() {#####################################################
HMLAN
- The HMLAN is the fhem module for the eQ-3 HomeMatic LAN Configurator.
+ The HMLAN is the fhem module for the eQ-3 HomeMatic LAN Configurator.
+ A description on how to use hmCfgUsb
+ can be found follwing the link.
The fhem module will emulate a CUL device, so the CUL_HM
module can be used to define HomeMatic devices.
diff --git a/fhem/FHEM/10_CUL_HM.pm b/fhem/FHEM/10_CUL_HM.pm
index 339f65afe..a7255f0f4 100755
--- a/fhem/FHEM/10_CUL_HM.pm
+++ b/fhem/FHEM/10_CUL_HM.pm
@@ -2041,11 +2041,10 @@ sub CUL_HM_Set($@) {
#read full 8 bit!!!
my $rName = CUL_HM_id2Name($dst.$lChn);
$rName =~ s/_chn:.*//;
- my $curVal = CUL_HM_getRegFromStore($rName,
- $addr,$list,$peerId.$peerChn);
- return "cannot calculate value. Please issue set $name getConfig first"
- if (!$curVal ||$curVal eq "invalid");
- $curVal =~ s/set_//; # set is not relevant, we take it as given
+ my $curVal = CUL_HM_getRegFromStore($rName,$addr,$list,$peerId.$peerChn);
+ return "cannot calculate value. Please issue set $name getConfig first"
+ if ($curVal !~ m/^(set_|)(\d+)$/);
+ $curVal = $2; # we expect one byte in int, strap 'set_' possibly
$data = ($curVal & (~($mask<<$bit)))|($data<<$bit);
$addrData.=sprintf("%02X%02X",$addr,$data);
}
@@ -2122,7 +2121,7 @@ sub CUL_HM_Set($@) {
}
elsif($cmd =~ m/^(up|down|pct)$/) { #########################################
my ($lvl,$tval,$rval) = ($a[2],"","");
- if ($cmd ne "pct"){#dim [|up|down] ... [ontime] [ramptime]
+ if ($cmd ne "pct"){#dim [] ... [ontime] [ramptime]
$lvl = 10 if (!defined $a[2]); #set default step
$lvl = -1*$lvl if ($cmd eq "down");
$lvl += CUL_HM_getChnLvl($name);
@@ -3232,27 +3231,28 @@ sub CUL_HM_getRegFromStore($$$$@) {#read a register from backup data
$size = int($size)*8 + ($size*10)%10;
$conversion = $reg->{c}; #unconvert formula
$factor = $reg->{f};
- $unit = $reg->{u};
+ $unit = " ".$reg->{u};
}
- $regLN = ((CUL_HM_getAttrInt($name,"expert") == 2)?"":".")
+
+ if(!$regLN){
+ $regLN = ((CUL_HM_getAttrInt($name,"expert") == 2)?"":".")
.sprintf("RegL_%02X:",$list)
.($peerId?CUL_HM_peerChName($peerId,
substr(CUL_HM_name2Id($name),0,6),
- CUL_HM_IOid($hash)):"")
- if(!$regLN);
+ CUL_HM_IOid($hash)):"");
+ $regLN =~ s/broadcast//;
+ }
my $data=0;
my $convFlg = "";# confirmation flag - indicates data not confirmed by device
for (my $size2go = $size;$size2go>0;$size2go -=8){
my $addrS = sprintf("%02X",$addr);
-
my ($dReadS,$dReadR) = (undef,"");
$dReadS = $1 if( $hash->{helper}{shadowReg}
&& $hash->{helper}{shadowReg}{$regLN}
&& $hash->{helper}{shadowReg}{$regLN} =~ m/$addrS:(..)/);
$dReadR = $1 if( $hash->{READINGS}{$regLN}
- &&$hash->{READINGS}{$regLN}{VAL} =~ m/$addrS:(..)/);
-
+ &&$hash->{READINGS}{$regLN}{VAL} =~ m/$addrS:(..)/);
my $dRead = $dReadR;
if (defined $dReadS){
$convFlg = "set_" if ($dReadR ne $dReadS);
@@ -3270,16 +3270,12 @@ sub CUL_HM_getRegFromStore($$$$@) {#read a register from backup data
if (!$conversion){ ;# do nothing
} elsif($conversion eq "factor"){$data /= $factor;
} elsif($conversion eq "lit" ){$data = $reg->{litInv}{$data}?$reg->{litInv}{$data}:"undef lit";
-# } elsif(defined($reg->{lit})) {
-# foreach (keys%{$reg->{lit}}){
-# if ($data == $reg->{lit}{$_}){$data = $_; last; }
-# }
} elsif($conversion eq "fltCvT"){$data = CUL_HM_CvTflt($data);
} elsif($conversion eq "m10s3" ){$data = ($data+3)/10;
} elsif($conversion eq "hex" ){$data = sprintf("0x%X",$data);
} else { return " conversion undefined - please contact admin";
}
- return $convFlg.$data.' '.$unit;
+ return $convFlg.$data.$unit;
}
sub CUL_HM_updtRegDisp($$$) {
my($hash,$list,$peerId)=@_;
@@ -4006,9 +4002,6 @@ sub CUL_HM_putHash($) {# provide data for HMinfo
Universal commands (available to most hm devices):
-
actiondetect <[hhh:mm]|off>
- outdated command. This functionality is started by entering or modify of the attribute actCycle. see attribure section for details
-
clear <[readings|msgEvents]>
A set of variables can be removed.
@@ -4082,9 +4075,11 @@ sub CUL_HM_putHash($) {# provide data for HMinfo
Read serial number from device and write it to attribute serialNr.
inhibit [on|off]
- Block / unblock all directly peered remotes and the hardware buttons of the
- device. If inhibit set on, the channel status can be controlled only by
- FHEM.
+ Block / unblock all changes to the actor channel, i.e. actor state is frozen
+ untill inhibit is set off again. Inhibit can be executed on any actor channel
+ but obviously not on sensors - would not make any sense.
+ Practically it can be used to suspend any notifies as well as peered channel action
+ temporarily without the need to delete them.
Examples:
# Block operation
@@ -4200,17 +4195,17 @@ sub CUL_HM_putHash($) {# provide data for HMinfo
on-for-timer <sec> -
set the switch on for the given seconds [0-85825945]. Note:
- off-for-timer like FS20 is not supported. It needs to be programmed
- on link level.
+ off-for-timer like FS20 is not supported. It may to be programmed
+ thru channel register.
on-till <time> - set the switch on for the given end time.
set <name> on-till 20:32:10
Currently a max of 24h is supported with endtime.
@@ -4221,7 +4216,8 @@ sub CUL_HM_putHash($) {# provide data for HMinfo
[on|off] is relevant only for devices with direct buttons per channel.
Those are available for dimmer and blind-actor, usually not for switches
-
toggle - toggle the switch.
+
toggle - toggle the Actor. It will switch from any current
+ level to off or from off to 100%
@@ -4229,7 +4225,7 @@ sub CUL_HM_putHash($) {# provide data for HMinfo
Dimmer may support virtual channels. Those are autocrated if applicable. Usually there are 2 virtual channels
in addition to the primary channel. Virtual dimmer channels are inactive by default but can be used in
in parallel to the primay channel to control light.
- Virtual channels have default naming SW_V. e.g. Dimmer_SW1_V1 and Dimmer_SW1_V2.
+ Virtual channels have default naming SW<channel>_V<no>. e.g. Dimmer_SW1_V1 and Dimmer_SW1_V2.
Dimmer virtual channels are completely different from FHEM virtual buttons and actors but
are part of the HM device. Documentation and capabilities for virtual channels is out of scope.
@@ -4240,15 +4236,20 @@ sub CUL_HM_putHash($) {# provide data for HMinfo
On-time is analog "on-for-timer".
Ramp-time default is 2.5s, 0 means instantanous
-
pct [<ontime>] [<ramptime>] - set actor to a desired level. Optional ontime and ramptime could be given
+
up [changeValue] [<ontime>] [<ramptime>] dim up one step
+
down [changeValue] [<ontime>] [<ramptime>] dim up one step
+ changeValue is optional an gives the level to be changed up or down in percent. Granularity is 0.5%, default is 10%.
+ ontime is optional an gives the duration of the level to be kept. '0' means forever and is default.
+ ramptime is optional an defines the change speed to reach the new level. It is meaningful only for dimmer.
+
@@ -4337,7 +4338,7 @@ sub CUL_HM_putHash($) {# provide data for HMinfo
press [long|short]
@@ -4347,7 +4348,7 @@ sub CUL_HM_putHash($) {# provide data for HMinfo
-
smokeDetector
+
smokeDetector
Note: All these commands work right now only if you have more then one
smoekDetector, and you peered them to form a group. For issuing the
commands you have to use the master of this group, and currently you
@@ -4363,7 +4364,7 @@ sub CUL_HM_putHash($) {# provide data for HMinfo
alarmOff - switch off the alarm
-
4Dis (HM-PB-4DIS-WM)
+
4Dis (HM-PB-4DIS-WM)
text <btn_no> [on|off] <text1> <text2>
Set the text on the display of the device. To this purpose issue
@@ -4384,31 +4385,32 @@ sub CUL_HM_putHash($) {# provide data for HMinfo
Climate-Control (HM-CC-TC)
-
day-temp <tmp>
- night-temp <tmp>
- party-temp <tmp>
- desired-temp <tmp>
- Set different temperatures. Temp must be between 6 and 30
+
day-temp <temp>
+
night-temp <temp>
+
party-temp <temp>
+
desired-temp <temp>
+ Set different temperatures. <temp> must be between 6 and 30
Celsius, and precision is half a degree.
tempListFri HH:MM temp ... 24:00 temp
Specify a list of temperature intervals. Up to 24 intervals can be
specified for each week day, the resolution is 10 Minutes. The
last time spec must always be 24:00.
- Example: set th tempListSat 06:00 19 23:00 22.5 24:00 19
- Meaning: until 6:00 temperature shall be 19, from then until 23:00 temperature shall be
- 22.5, thereafter until midnight, 19 degrees celsius is desired.
systime
+ Example: until 6:00 temperature shall be 19, from then until 23:00 temperature shall be
+ 22.5, thereafter until midnight, 19 degrees celsius is desired.
+ set th tempListSat 06:00 19 23:00 22.5 24:00 19
+
+
displayMode [temp-only|temp-hum]
+
displayTemp [actual|setpoint]
+
displayTempUnit [celsius|fahrenheit]
+
controlMode [manual|auto|central|party]
+
decalcDay <day>
+
systime
set time in climate channel to system time
@@ -4421,10 +4423,8 @@ sub CUL_HM_putHash($) {# provide data for HMinfo
For Expert all LEDs can be set individual by providing a 8-digit hex number to the device.
ilum <brightness><duration>
<brightness> [0-15] of backlight.
- <duration> [0-127] in sec. 0 is permanent 'on'.
-
-
-
+ <duration> [0-127] in sec. 0 is permanent 'on'.
+
OutputUnit (HM-OU-CFM-PL)
led <color>[,<color>..] [<repeat>..]
@@ -4453,8 +4453,7 @@ sub CUL_HM_putHash($) {# provide data for HMinfo
-
-
+
HM-RC-19xxx
alarm <count>
@@ -4512,10 +4511,7 @@ sub CUL_HM_putHash($) {# provide data for HMinfo
Unlocked the door so that the door can be opened.
[sec]: Sets the delay in seconds after the lock automatically locked
again. 0 - 65535 seconds
-
-
-
-
+
winMatic
winMatic provides 2 channels, one for the window control and a second
for the accumulator.
@@ -4530,8 +4526,8 @@ sub CUL_HM_putHash($) {# provide data for HMinfo
stop movement
-
HM-Sys-sRP-Pl
- setRepeat => "[no1..36] [bdcast-yes|no]"
+
HM-Sys-sRP-Pl
+ setup the repeater's entries. Up to 36entries can be applied.
setRepeat <entry> <sender> <receiver> <broadcast>
<entry> [1..36] entry number in repeater table. The repeater can handle up to 36 entries.
@@ -4540,12 +4536,12 @@ sub CUL_HM_putHash($) {# provide data for HMinfo
<broadcast> [yes|no] determines whether broadcast from this ID shall be repeated
short application:
- setRepeat setAll 0 0 0
+ setRepeat setAll 0 0 0
will rewrite the complete list to the deivce. Data will be taken from attribut repPeer.
attribut repPeer is formated:
src1:dst1:[y/n],src2:dst2:[y/n],src2:dst2:[y/n],...
- up to 36entries can be applied.
-
+
+
@@ -4716,7 +4712,7 @@ sub CUL_HM_putHash($) {# provide data for HMinfo
Generated events:
-
HM-CC-TC:
+
HM-CC-TC
T: $t H: $h
battery:[low|ok]
measured-temp $t
@@ -4739,7 +4735,7 @@ sub CUL_HM_putHash($) {# provide data for HMinfo
ValveOffset $of %
time-request
-
HM-CC-VD:
+
HM-CC-VD
$vp %
battery:[critical|low|ok]
motorErr:[ok|blocked|loose|adjusting range too small|opening|closing|stop]
@@ -4750,42 +4746,42 @@ sub CUL_HM_putHash($) {# provide data for HMinfo
operState:[errorTargetNotMet|onTarget|adjusting] # operational condition
operStateErrCnt:$cnt # number of failed settings
HM-OU-LED16
color $value # hex - for device only
$value # hex - for device only
color [off|red|green|orange] # for channel
[off|red|green|orange] # for channel
motionDetector
brightness:$b
alive
motion on (to $dest)
@@ -4820,7 +4816,7 @@ sub CUL_HM_putHash($) {# provide data for HMinfo
battery [low|ok]
devState_raw.$d1 $d2
-
remote/pushButton/outputUnit
+
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
Btn$x onShort
@@ -4836,21 +4832,21 @@ sub CUL_HM_putHash($) {# provide data for HMinfo
Btn$x onLongRelease $counter (to $dest)
Btn$x offLongRelease $counter (to $dest)
-
remote/pushButton
+
remote/pushButton
battery [low|ok]
trigger [Long|Short]_$no trigger event from channel
smokeDetector
[off|smoke-Alarm|alive] # for team leader
[off|smoke-forward|smoke-alarm] # for team members
[normal|added|addedStrong] #HM-CC-SCD
@@ -4859,7 +4855,7 @@ sub CUL_HM_putHash($) {# provide data for HMinfo
smoke_detect on from $src
test:from $src
-
threeStateSensor
+
threeStateSensor
[open|tilted|closed]]
[wet|damp|dry] #HM-SEC-WDS only
cover [open|closed] #HM-SEC-WDS only
@@ -4869,7 +4865,7 @@ sub CUL_HM_putHash($) {# provide data for HMinfo
contact [wet|damp|dry] #HM-SEC-WDS only
sabotageError [on|off] #HM-SEC-SC and HM-Sec-RHS only
-
winMatic
+
winMatic
[locked|$value]
motorError [no|TurnError|TiltError]
direction [no|up|down|undefined]
@@ -4879,7 +4875,7 @@ sub CUL_HM_putHash($) {# provide data for HMinfo
airing [inactiv|$value]
contact tesed