mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-03 16:56:54 +00:00
fhem.pl: Report $defs without type in the central devspec2array
98_SVG.pm: defend against deleted LOGDEVICE. Forum #25397 git-svn-id: https://svn.fhem.de/fhem/trunk@6498 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
61eef3271d
commit
384244ddd6
@ -136,7 +136,6 @@ SVG_FwFn($$$$)
|
|||||||
{
|
{
|
||||||
my ($FW_wname, $d, $room, $pageHash) = @_; # pageHash is set for summaryFn.
|
my ($FW_wname, $d, $room, $pageHash) = @_; # pageHash is set for summaryFn.
|
||||||
my $hash = $defs{$d};
|
my $hash = $defs{$d};
|
||||||
my $ld = $defs{$hash->{LOGDEVICE}};
|
|
||||||
my $ret = "";
|
my $ret = "";
|
||||||
|
|
||||||
if(AttrVal($FW_wname, "plotmode", "SVG") eq "jsSVG") {
|
if(AttrVal($FW_wname, "plotmode", "SVG") eq "jsSVG") {
|
||||||
@ -771,8 +770,8 @@ SVG_showLog($)
|
|||||||
my $gplot_pgm = "$FW_gplotdir/$type.gplot";
|
my $gplot_pgm = "$FW_gplotdir/$type.gplot";
|
||||||
|
|
||||||
my ($err, $cfg, $plot, $flog) = SVG_readgplotfile($wl, $gplot_pgm);
|
my ($err, $cfg, $plot, $flog) = SVG_readgplotfile($wl, $gplot_pgm);
|
||||||
if($err) {
|
if($err || !$defs{$d}) {
|
||||||
my $msg = "Cannot read $gplot_pgm";
|
my $msg = ($defs{$d} ? "Cannot read $gplot_pgm" : "No Logdevice $d");
|
||||||
Log3 $FW_wname, 1, $msg;
|
Log3 $FW_wname, 1, $msg;
|
||||||
|
|
||||||
if($pm =~ m/SVG/) { # FW_fatal for SVG:
|
if($pm =~ m/SVG/) { # FW_fatal for SVG:
|
||||||
@ -975,7 +974,7 @@ SVG_render($$$$$$$$$)
|
|||||||
|
|
||||||
$SVG_RET="";
|
$SVG_RET="";
|
||||||
my $SVG_ss = AttrVal($parent_name, "smallscreen", 0);
|
my $SVG_ss = AttrVal($parent_name, "smallscreen", 0);
|
||||||
return $SVG_RET if(!defined($dp));
|
return $SVG_RET if(!defined($dp) || $dp eq "");
|
||||||
|
|
||||||
my $nr_axis = AttrVal($parent_name,"nrAxis","1,1");
|
my $nr_axis = AttrVal($parent_name,"nrAxis","1,1");
|
||||||
my ($nr_left_axis,$nr_right_axis,$use_left_axis,$use_right_axis) =
|
my ($nr_left_axis,$nr_right_axis,$use_left_axis,$use_right_axis) =
|
||||||
|
@ -1009,6 +1009,10 @@ devspec2array($)
|
|||||||
}
|
}
|
||||||
|
|
||||||
my $hash = $defs{$d};
|
my $hash = $defs{$d};
|
||||||
|
if(!$hash->{TYPE}) {
|
||||||
|
Log 1, "Error: $d has no TYPE";
|
||||||
|
next;
|
||||||
|
}
|
||||||
my $val = $hash->{$n};
|
my $val = $hash->{$n};
|
||||||
if(!defined($val)) {
|
if(!defined($val)) {
|
||||||
my $r = $hash->{READINGS};
|
my $r = $hash->{READINGS};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user