diff --git a/fhem/FHEM/10_ZWave.pm b/fhem/FHEM/10_ZWave.pm
index 1e4b39406..cc9662cf1 100755
--- a/fhem/FHEM/10_ZWave.pm
+++ b/fhem/FHEM/10_ZWave.pm
@@ -258,7 +258,8 @@ my %zwave_class = (
ZIP_PORTAL => { id => '61' },
DOOR_LOCK => { id => '62', # V2
set => { doorLockOperation => 'ZWave_DoorLockOperationSet($hash, "%s")',
- doorLockConfiguration =>'ZWave_DoorLockConfigSet($hash, "%s")' },
+ doorLockConfiguration =>
+ 'ZWave_DoorLockConfigSet($hash, "%s")' },
get => { doorLockOperation => '02',
doorLockConfiguration => '05'},
parse => { "..6203(.*)" => 'ZWave_DoorLockOperationReport($hash, $1)',
@@ -1524,22 +1525,33 @@ sub
ZWave_DoorLockConfigSet($$)
{
# 0x62 V1, V2
- # userinput: operationType_dez, handles, seconds_dez
+ # userinput: operationType, ohandles, ihandles, seconds_dez
my ($hash, $arg) = @_;
my $name = $hash->{NAME};
- my @param = split (" ", $arg);
- return ("wrong arg, need: operationType handles timeoutSeconds","")
- if(@param != 3);
-
- return ("wrong operationType: only 1 or 2 allowed","")
- if (($param[0] < 1) || ($param[0] > 2));
-
- return("wrong timeout: 1 - 15239 seconds allowed","")
- if ((($param[2]) < 1) || ($param[2]) > 253*60+59);
+ if ($arg !~ m/\b(.+)\b \b([01]{4})\b \b([01]{4})\b \b([0-9]+)$/) {
+ #~ Log3 $name, 1, "$name: doorLockConfigurationSet wrong ".
+ #~ "format, see commandref: $arg";
+ return ("doorLockConfigurationSet: wrong format, see commandref","");
+ }
+ my $oT;
+ if (lc($1) eq "constant") {
+ $oT = 1;
+ } elsif (lc($1) eq "timed") {
+ $oT = 2;
+ } else {
+ return ("wrong operationType: only [constant|timed] is allowed","");
+ }
+
+ my $handles = ((oct("0b".$2))<<4 | oct("0b".$3));
+
+ if (($4 < 1) || ($4) > 15239) { # max. 253 * 60 + 59 seconds
+ return ("doorLockConfigurationSet: 1-15238 seconds allowed","");
+ }
+
return ("", sprintf("04%02x%02x%02x%02x",
- $param[0],$param[1], int($param[2] / 60) ,($param[2] % 60)));
+ $oT,$handles, int($4 / 60) ,($4 % 60)));
}
sub
@@ -3604,13 +3616,15 @@ s2Hex($)
FF = Door secured
Note: open/close can be used as an alias for 00/FF.
-