diff --git a/fhem/fhem.pl b/fhem/fhem.pl index 339d66b38..64d86ffa9 100755 --- a/fhem/fhem.pl +++ b/fhem/fhem.pl @@ -1404,7 +1404,7 @@ WriteStatefile() $stateFile = ResolveDateWildcards($stateFile, @t); if(!open(SFH, ">$stateFile")) { - my $msg = "WriteStateFile: Cannot open $stateFile: $!"; + my $msg = "WriteStatefile: Cannot open $stateFile: $!"; Log 1, $msg; return $msg; } @@ -2166,16 +2166,16 @@ CommandList($$) my $str = ""; if($param =~ m/^-r *(.*)$/) { - my $arg = ($1 ? $1 : ".*"); - foreach my $d (devspec2array($arg,$cl)) { - if(!defined($defs{$d})) { - $str .= "No device named $d found"; - last; - } + my @list = devspec2array($1 ? $1 : ".*", $cl); + foreach my $d (sort @list) { + return "No device named $d found" if(!defined($defs{$d})); $str .= "\n" if($str); my @a = GetDefAndAttr($d); $str .= join("\n", @a)."\n" if(@a); - @a = GetAllReadings($d); + } + foreach my $d (sort @list) { + $str .= "\n" if($str); + my @a = GetAllReadings($d); $str .= join("\n", @a)."\n" if(@a); } return $str; diff --git a/fhem/www/pgm2/fhemweb.js b/fhem/www/pgm2/fhemweb.js index b7ec84b0d..844d0fb26 100644 --- a/fhem/www/pgm2/fhemweb.js +++ b/fhem/www/pgm2/fhemweb.js @@ -600,7 +600,7 @@ FW_rawDef() $("#content").append('
'+ '