mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-08 01:14:19 +00:00
10_ZWave.pm: implement mcCreateAll (Forum #48445)
git-svn-id: https://svn.fhem.de/fhem/trunk@10677 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
c1d2d55abf
commit
ae71894b83
@ -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.</li>
|
||||
|
||||
<br><br><b>Class MULTI_CHANNEL</b>
|
||||
<li>mcCreateAll<br>
|
||||
Create a FHEM device for all channels. This command is executed after
|
||||
inclusion of a new device.
|
||||
</li>
|
||||
|
||||
<br><br><b>Class MULTI_CHANNEL_ASSOCIATION</b>
|
||||
<li>mcaAdd groupId node1 node2 ... 0 node1 endPoint1 node2 endPoint2 ...<br>
|
||||
Add a list of node or node:endpoint associations. The latter can be used to
|
||||
|
Loading…
x
Reference in New Issue
Block a user