10_ZWave.pm: take homeId into account for AssignIoPort (Forum #40594)

git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@9219 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig
2015-09-09 20:09:44 +00:00
parent df39832669
commit 2bf12ec6a6

View File

@@ -480,7 +480,13 @@ ZWave_Define($$)
$hash->{id} = $id; $hash->{id} = $id;
$modules{ZWave}{defptr}{"$homeId $id"} = $hash; $modules{ZWave}{defptr}{"$homeId $id"} = $hash;
AssignIoPort($hash); # FIXME: should take homeId into account my $proposed;
if($init_done) { # Use the right device while inclusion is running
for my $p (devspec2array("TYPE=ZWDongle|FHEM2FHEM")) {
$proposed = $p if($defs{$p}{homeId} && $defs{$p}{homeId} eq $homeId);
}
}
AssignIoPort($hash, $proposed);
if(@a) { # Autocreate: set the classes, execute the init calls if(@a) { # Autocreate: set the classes, execute the init calls
ZWave_SetClasses($homeId, $id, undef, $a[0]); ZWave_SetClasses($homeId, $id, undef, $a[0]);