diff --git a/fhem/FHEM/10_ZWave.pm b/fhem/FHEM/10_ZWave.pm index fff325da5..e79a3b94f 100755 --- a/fhem/FHEM/10_ZWave.pm +++ b/fhem/FHEM/10_ZWave.pm @@ -249,12 +249,14 @@ my %zwave_class = ( => 'ZWave_plusInfoParse($1,$2,$3,$4,$5)'} }, ZIP_GATEWAY => { id => '5f' }, MULTI_CHANNEL => { id => '60', # Version 2, aka MULTI_INSTANCE + set => { mcCreateAll => 'ZWave_mcCreateAll($hash,"")' }, get => { mcEndpoints => "07", mcCapability=> "09%02x"}, parse => { "^046008(..)(..)" => '"mcEndpoints:total ".hex($2).'. '(hex($1)&0x80 ? ", dynamic":"").'. '(hex($1)&0x40 ? ", identical":", different")', - "^..600a(.*)"=> 'ZWave_mcCapability($hash, $1)' } }, + "^..600a(.*)"=> 'ZWave_mcCapability($hash, $1)' }, + init => { ORDER=>49, CMD => '"set $NAME mcCreateAll"' } }, ZIP_PORTAL => { id => '61' }, DOOR_LOCK => { id => '62', # V2 set => { doorLockOperation => 'ZWave_DoorLockOperationSet($hash, "%s")', @@ -1604,6 +1606,22 @@ ZWave_mcCapability($$) return "mcCapability_$chid:".join(" ", @classes); } +sub +ZWave_mcCreateAll($$) +{ + my ($hash, $data) = @_; + if(!$data) { # called by the user + $zwave_parseHook{"$hash->{nodeIdHex}:046008...."} = \&ZWave_mcCreateAll; + return("", "07"); + } + $data =~ m/^046008(..)(..)/; + my $nGrp = hex($2); + for(my $c = 2; $c <= $nGrp; $c++) { + ZWave_Get($hash, $hash->{NAME}, "mcCapability", $c); + } + return undef; +} + sub ZWave_mfsAddClasses($$) { @@ -3709,6 +3727,12 @@ s2Hex($) The command will reset ALL accumulated values, it is not possible to choose a single value. +

Class MULTI_CHANNEL +
  • mcCreateAll
    + Create a FHEM device for all channels. This command is executed after + inclusion of a new device. +
  • +

    Class MULTI_CHANNEL_ASSOCIATION
  • mcaAdd groupId node1 node2 ... 0 node1 endPoint1 node2 endPoint2 ...
    Add a list of node or node:endpoint associations. The latter can be used to