diff --git a/fhem/FHEM/00_HMLAN.pm b/fhem/FHEM/00_HMLAN.pm index 5f8b98b96..8f976acf2 100755 --- a/fhem/FHEM/00_HMLAN.pm +++ b/fhem/FHEM/00_HMLAN.pm @@ -251,28 +251,34 @@ sub HMLAN_Attr(@) {############################################################ elsif($aName eq "logIDs"){ if ($cmd eq "set"){ if ($init_done){ - my @ids = split",",$aVal; - my @idName; - if (grep /sys/,@ids){ - push @idName,"sys"; - $defs{$name}{helper}{log}{sys}=1; + if ($aVal){ + my @ids = split",",$aVal; + my @idName; + if (grep /sys/,@ids){ + push @idName,"sys"; + $defs{$name}{helper}{log}{sys}=1; + } + else{ + $defs{$name}{helper}{log}{sys}=0; + } + if (grep /all/,@ids){ + push @idName,"all"; + $defs{$name}{helper}{log}{all}=1; + } + else{ + $defs{$name}{helper}{log}{all}=0; + $_=substr(CUL_HM_name2Id($_),0,6) foreach(grep !/^$/,@ids); + $_="" foreach(grep !/^[A-F0-9]{6}$/,@ids); + @ids = HMLAN_noDup(@ids); + push @idName,CUL_HM_id2Name($_) foreach(@ids); + } + $attr{$name}{$aName} = join(",",@idName); + @{$defs{$name}{helper}{log}{ids}}=grep !/^(sys|all)$/,@ids; } else{ - $defs{$name}{helper}{log}{sys}=0; + $attr{$name}{$aName} = ""; + @{$defs{$name}{helper}{log}{ids}}=(); } - if (grep /all/,@ids){ - push @idName,"all"; - $defs{$name}{helper}{log}{all}=1; - } - else{ - $defs{$name}{helper}{log}{all}=0; - $_=substr(CUL_HM_name2Id($_),0,6) foreach(grep !/^$/,@ids); - $_="" foreach(grep !/^[A-F0-9]{6}$/,@ids); - @ids = HMLAN_noDup(@ids); - push @idName,CUL_HM_id2Name($_) foreach(@ids); - } - $attr{$name}{$aName} = join(",",@idName); - @{$defs{$name}{helper}{log}{ids}}=grep !/^(sys|all)$/,@ids; } else{ $defs{$name}{helper}{attrPend} = 1; diff --git a/fhem/FHEM/98_HMinfo.pm b/fhem/FHEM/98_HMinfo.pm index 172cbcf83..8c8efb4a8 100644 --- a/fhem/FHEM/98_HMinfo.pm +++ b/fhem/FHEM/98_HMinfo.pm @@ -1131,12 +1131,18 @@ sub HMinfo_GetFn($@) {######################################################### $ret = $cmd." done:" .HMinfo_peerCheck(@entities); } elsif($cmd eq "configCheck"){##check peers and register---------------------- - my $id = ++$hash->{nb}{cnt}; - my $bl = BlockingCall("HMinfo_configCheck", join(",",("$name;$id;$hash->{CL}{NAME}",$opt,$filter)), - "HMinfo_bpPost", 30, - "HMinfo_bpAbort", "$name:0"); - $hash->{nb}{$id}{$_} = $bl->{$_} foreach (keys %{$bl}); - $ret = ""; + if ($hash->{CL}){ + my $id = ++$hash->{nb}{cnt}; + my $bl = BlockingCall("HMinfo_configCheck", join(",",("$name;$id;$hash->{CL}{NAME}",$opt,$filter)), + "HMinfo_bpPost", 30, + "HMinfo_bpAbort", "$name:0"); + $hash->{nb}{$id}{$_} = $bl->{$_} foreach (keys %{$bl}); + $ret = ""; + } + else{ + $ret = HMinfo_configCheck (join(",",("$name;;",$opt,$filter))); + $ret =~s/-ret-/\n/g; + } } elsif($cmd eq "templateChk"){##template: see if it applies ------------------ my $id = ++$hash->{nb}{cnt};