Autocreating plots bug fixed

git-svn-id: https://svn.fhem.de/fhem/trunk@3999 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig
2013-10-04 05:15:46 +00:00
parent e0b74401fd
commit 0de175b5c5
2 changed files with 3 additions and 1 deletions

View File

@@ -73,6 +73,7 @@ SVG_Define($$)
$hash->{GPLOTFILE} = $2; $hash->{GPLOTFILE} = $2;
$hash->{LOGFILE} = ($3 ? $3 : "CURRENT"); $hash->{LOGFILE} = ($3 ? $3 : "CURRENT");
$hash->{STATE} = "initialized"; $hash->{STATE} = "initialized";
$hash->{LOGDEVICE} =~ s/^fileplot //; # Autocreate bug.
return undef; return undef;
} }
@@ -491,6 +492,7 @@ SVG_substcfg($$$$$$)
$attr{global}{verbose} = 0; # Else the filenames will be Log'ged $attr{global}{verbose} = 0; # Else the filenames will be Log'ged
my $ldt = $defs{$defs{$wl}{LOGDEVICE}}{TYPE}; my $ldt = $defs{$defs{$wl}{LOGDEVICE}}{TYPE};
$ldt = "" if(!defined($ldt));
if($file eq "CURRENT" && $ldt eq "FileLog") { if($file eq "CURRENT" && $ldt eq "FileLog") {
$file = $defs{$defs{$wl}{LOGDEVICE}}{currentlogfile}; $file = $defs{$defs{$wl}{LOGDEVICE}}{currentlogfile};
$file =~ s+.*/++; $file =~ s+.*/++;

View File

@@ -220,7 +220,7 @@ autocreate_Notify($$)
$wlname .= "_$wnr" if($wnr > 1); $wlname .= "_$wnr" if($wnr > 1);
$wnr++; $wnr++;
delete($defs{$wlname}); # If we are re-creating it with createlog. delete($defs{$wlname}); # If we are re-creating it with createlog.
$cmd = "$wlname SVG fileplot $flname:$gplotfile:CURRENT"; $cmd = "$wlname SVG $flname:$gplotfile:CURRENT";
Log3 $me, 2, "autocreate: define $cmd"; Log3 $me, 2, "autocreate: define $cmd";
$ret = CommandDefine(undef, $cmd); $ret = CommandDefine(undef, $cmd);
if($ret) { if($ret) {