FHEM Forum

FHEM => Frontends => SVG / Plots / logProxy => Thema gestartet von: Klaus Rubik am 25 Februar 2015, 09:17:29

Titel: [gelöst] Perl Warnings bei 98_SVG.pm
Beitrag von: Klaus Rubik am 25 Februar 2015, 09:17:29
Hallo,

ich bekomme seit ca. 8. Februar immer wieder folgende Perl Warnings im FHEM-Log:

2015.02.25 09:00:19 1: PERL WARNING: Use of uninitialized value $nr_right_axis in multiplication (*) at ./FHEM/98_SVG.pm line 1260.
2015.02.25 09:00:19 1: PERL WARNING: Use of uninitialized value $use_right_axis in addition (+) at ./FHEM/98_SVG.pm line 1331.
2015.02.25 09:00:19 1: PERL WARNING: Use of uninitialized value $nr_right_axis in multiplication (*) at ./FHEM/98_SVG.pm line 1343.
2015.02.25 09:00:19 1: PERL WARNING: Use of uninitialized value $use_right_axis in addition (+) at ./FHEM/98_SVG.pm line 1629.
2015.02.25 09:04:59 1: PERL WARNING: Use of uninitialized value $nr_right_axis in multiplication (*) at ./FHEM/98_SVG.pm line 1260.
2015.02.25 09:04:59 1: PERL WARNING: Use of uninitialized value $use_right_axis in addition (+) at ./FHEM/98_SVG.pm line 1331.
2015.02.25 09:04:59 1: PERL WARNING: Use of uninitialized value $nr_right_axis in multiplication (*) at ./FHEM/98_SVG.pm line 1343.
2015.02.25 09:04:59 1: PERL WARNING: Use of uninitialized value $use_right_axis in addition (+) at ./FHEM/98_SVG.pm line 1629.


Ich weiß, dass es nur warnings sind und ich sie ignorieren könnte, aber sie müllen halt das Log zu :(

Der Fehler scheint aus folgender SVG Definition zu kommen:

define SVG_FHEMserverSpannung SVG FileLog_FHEMserver:SVG_FHEMserverSpannung:CURRENT
attr SVG_FHEMserverSpannung nrAxis 3
attr SVG_FHEMserverSpannung room System
attr SVG_FHEMserverSpannung title "FHEM Server Energie Min $data{min1}, Max $data{max1}, Last $data{currval1}"


Die dazugehörige gplot-Datei:
# Created by FHEM/98_SVG.pm, 2015-02-06 10:44:07
set terminal png transparent size <SIZE> crop
set output '<OUT>.png'
set xdata time
set timefmt "%Y-%m-%d_%H:%M:%S"
set xlabel " "
set title '<TL>'
set ytics
set y2tics
set grid
set ylabel "Strom (mA)"
set y2label "Spannung (V)"
set y2range [0:6]
set y3label "Battery Capacity in %"
set y3range [0:100]
set y4range [0:1]

#FileLog_FHEMserver 9:FHEMserver.power_ac_text\x3a::
#FileLog_FHEMserver 12:FHEMserver.power_ac_text\x3a::
#FileLog_FHEMserver 9:FHEMserver.power_battery_text\x3a::
#FileLog_FHEMserver 12:FHEMserver.power_battery_text\x3a::
#FileLog_FHEMserver 17:FHEMserver.power_battery_text\x3a::
#FileLog_FHEMserver 4:FHEMserver.power_ac_stat\x3a::
#FileLog_FHEMserver 4:FHEMserver.power_battery_stat\x3a::

plot "<IN>" using 1:2 axes x1y2 title 'Spannung (AC)' ls l0 lw 1 with lines,\
     "<IN>" using 1:2 axes x1y1 title 'Strom (AC)' ls l1 lw 1 with lines,\
     "<IN>" using 1:2 axes x1y2 title 'Spannung (DC Battery)' ls l2 lw 1 with lines,\
     "<IN>" using 1:2 axes x1y1 title 'Strom (DC Battery)' ls l3 lw 1 with lines,\
     "<IN>" using 1:2 axes x1y3 title 'Ladezustand in %' ls l5 lw 1 with lines,\
     "<IN>" using 1:2 axes x1y4 title 'AC Online' ls l1fill lw 1 with steps,\
     "<IN>" using 1:2 axes x1y4 title 'Battery Online' ls l0fill lw 1 with steps


Woran liegt das?

Gruß

Klaus
Titel: Antw:Perl Warnings bei 98_SVG.pm
Beitrag von: justme1968 am 25 Februar 2015, 10:25:21
das nrAxis attribut erwartet zwei mit komma getrennte werte. du gibst hier jeweils die anzahl der achsen auf der linken bzw rechten seite des plots an.

der fall das nur ein wert gesetzt wird wird nicht abgefangen.

gruss
  andre
Titel: Antw:Perl Warnings bei 98_SVG.pm
Beitrag von: Klaus Rubik am 25 Februar 2015, 10:53:46
Hallo Andre,

danke für denHinweis, das war die Lösung!

DANKE!!!

Klaus