mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 09:16:53 +00:00
10_ZWave.pm: parse get association result (Forum #43768)
git-svn-id: https://svn.fhem.de/fhem/trunk@9840 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
8707224425
commit
92f899a1cf
@ -325,8 +325,7 @@ my %zwave_class = (
|
|||||||
associationRequestAll => 'ZWave_associationRequest($hash,"")' },
|
associationRequestAll => 'ZWave_associationRequest($hash,"")' },
|
||||||
get => { association => "02%02x",
|
get => { association => "02%02x",
|
||||||
associationGroups => "05" },
|
associationGroups => "05" },
|
||||||
parse => { "..8503(..)(..)..(.*)" =>
|
parse => { "..8503(..)(..)..(.*)" => 'ZWave_assocGroup($homeId,$1,$2,$3)',
|
||||||
'sprintf("assocGroup_%d:Max %d Nodes %d", hex($1), hex($2), hex($3))',
|
|
||||||
"..8506(..)" => '"assocGroups:".hex($1)' },
|
"..8506(..)" => '"assocGroups:".hex($1)' },
|
||||||
init => { ORDER=>10, CMD=> '"set $NAME associationAdd 1 $CTRLID"' } },
|
init => { ORDER=>10, CMD=> '"set $NAME associationAdd 1 $CTRLID"' } },
|
||||||
VERSION => { id => '86',
|
VERSION => { id => '86',
|
||||||
@ -1872,6 +1871,19 @@ ZWave_sensorbinaryV2Parse($$)
|
|||||||
":".$value;
|
":".$value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub
|
||||||
|
ZWave_assocGroup($$$$)
|
||||||
|
{
|
||||||
|
my ($homeId, $gId, $max, $nodes) = @_;
|
||||||
|
my %list = map { $defs{$_}{nodeIdHex} => $_ }
|
||||||
|
grep { $defs{$_}{homeId} && $defs{$_}{homeId} eq $homeId }
|
||||||
|
keys %defs;
|
||||||
|
$nodes = join(" ",
|
||||||
|
map { $list{$_} ? $list{$_} : "UNKNOWN_".hex($_); }
|
||||||
|
($nodes =~ m/../g));
|
||||||
|
return sprintf("assocGroup_%d:Max %d Nodes %s", hex($gId),hex($max), $nodes);
|
||||||
|
}
|
||||||
|
|
||||||
##############################################
|
##############################################
|
||||||
# SECURITY (start)
|
# SECURITY (start)
|
||||||
##############################################
|
##############################################
|
||||||
|
Loading…
x
Reference in New Issue
Block a user