2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-23 02:31:53 +00:00

ZWLib: fix zwlib_parseNodeInfo (Forum #53444)

git-svn-id: https://svn.fhem.de/fhem/trunk@11464 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2016-05-16 11:22:35 +00:00
parent 615c12a25b
commit dbe1d0c4c6
2 changed files with 2 additions and 2 deletions

View File

@ -398,8 +398,7 @@ ZWDongle_Get($@)
$msg = join(" ", @list); $msg = join(" ", @list);
} elsif($cmd eq "nodeInfo") { ############################ } elsif($cmd eq "nodeInfo") { ############################
my $id = sprintf("%02x", $r[6]); if($r[6] == 0) {
if($id eq "00") {
$msg = "node $a[0] is not present"; $msg = "node $a[0] is not present";
} else { } else {
$msg = zwlib_parseNodeInfo(@r); $msg = zwlib_parseNodeInfo(@r);

View File

@ -207,6 +207,7 @@ zwlib_parseNodeInfo(@)
my @list; my @list;
my @type5 = qw( CONTROLLER STATIC_CONTROLLER SLAVE ROUTING_SLAVE); my @type5 = qw( CONTROLLER STATIC_CONTROLLER SLAVE ROUTING_SLAVE);
push @list, $type5[$r[5]-1] if($r[5]>0 && $r[5] <= @type5); push @list, $type5[$r[5]-1] if($r[5]>0 && $r[5] <= @type5);
my $id = sprintf("%02x", $r[6]);
push @list, $zw_type6{$id} if($zw_type6{$id}); push @list, $zw_type6{$id} if($zw_type6{$id});
push @list, ($r[2] & 0x80) ? "listening" : "sleeping"; push @list, ($r[2] & 0x80) ? "listening" : "sleeping";
push @list, "frequentListening:" . ($r[3] & ( 0x20 | 0x40 )); push @list, "frequentListening:" . ($r[3] & ( 0x20 | 0x40 ));