From c0ed3304e7311235a79e47a3026545dee78063af Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Thu, 6 Mar 2014 20:06:00 +0000 Subject: [PATCH] fhem.pl: set IODev attribute as proposed in the Forum#21023 git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@5154 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem.pl | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/fhem.pl b/fhem.pl index aeaac50f3..fd81f0ece 100755 --- a/fhem.pl +++ b/fhem.pl @@ -443,6 +443,11 @@ $attr{global}{motd} = "$sc_text\n\n" if(!$attr{global}{motd} || $attr{global}{motd} =~ m/^$sc_text/); $init_done = 1; +foreach my $d (keys %defs) { + if(defined($defs{$d}{IODev}) && $defs{$d}{IODev} == 0) { + Log 3, "No I/O device found for $defs{$d}{NAME}"; + } +} DoTrigger("global", "INITIALIZED", 1); $attr{global}{motd} .= "Running with root privileges." @@ -1558,7 +1563,15 @@ AssignIoPort($;$) } } } - Log 3, "No I/O device found for $hash->{NAME}" if(!$hash->{IODev}); + if($hash->{IODev}) { + $attr{$hash->{NAME}}{IODev} = $hash->{IODev}{NAME}; + } else { + if($init_done) { + Log 3, "No I/O device found for $hash->{NAME}" + } else { + $hash->{IODev} = 0; + } + } }