[gelöst] Zwei Plots in einem Raum verursachen Fehler (dblog/logproxy)

Begonnen von Omega, 08 März 2017, 11:49:06

Vorheriges Thema - Nächstes Thema

Omega

Ich bin bei der Umstellung auf dblog und habe zunächst 2 Plots angepasst. Wenn ich die Plots auf verschiedene Räume aufteile, ist alles ok, keine Fehlermeldung, die Daten sind immer sofort da.

Habe ich beide Plots in einem Raum, bekomme ich beim Aufruf mal im 1. Plot, mal im 2. einen grauen Hintergrund mit einem traurigen Smiley und den Hinweis: <ip> hat keine Daten gesendet und im Log stehen – teilweise auch mehrfach - folgende Fehlerhinweise (ohne Timestamp):

Can't use string ("") as a SCALAR ref while "strict refs" in use at ./FHEM/98_logProxy.pm line 486.

Und manchmal auch die Meldung:

2017.03.08 11:31:30 1: PERL WARNING: Argument "undef" isn't numeric in subtraction (-) at ./FHEM/99_Utils.pm line 115.


Und hier die lists zu den Plots und den dazugehörigen gplot-Dateien

Internals:
   DEF        myDbLog:SVG_Gasverbrauch_Gesamt_1:HISTORY
   GPLOTFILE  SVG_Gasverbrauch_Gesamt_1
   LOGDEVICE  myDbLog
   LOGFILE    HISTORY
   NAME       SVG_Gasverbrauch_Gesamt_1
   NOTIFYDEV  global
   NR         197
   STATE      initialized
   TYPE       SVG
Attributes:
   captionLeft 1
   fixedrange month
   label      (0,int(maxNum($data{max1},$data{max2}))+1)::(0,int(maxNum($data{max3}))+1)
   plotsize   1024,480
   room       Plots
   title      sprintf("Gasverbrauch pro Tag in m³ und €: Gesamt m³: %0.1f --- Gesamt € %0.2f -___- Durchschnitt m³: %0.2f --- Durchschnitt €: %0.2f", $data{sum1}, $data{sum1}*9.4585275*0.0532, $data{avg1}, $data{avg1}*9.4585275*0.0532)


und die dazugehörige .gplot:
# Created by FHEM/98_SVG.pm, 2017-03-06 17:16:18
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 y2tics
set ylabel "Verbrauch in â,¬"
set y2label "Gasverbrauch in m³"
set yrange [0:<L2>]
set y2range [0:<L1>]

#lp DbLog:myDbLog,offset=-60*60*1:mys_103_Gasverbrauch_Gesamt:appCountsPerDay:::$val=($val/=100)
#lp DbLog:myDbLog,offset=-60*60*1:mys_103_Gasverbrauch_WW:appCountsPerDay:::$val=($val/=100)
#lp DbLog:myDbLog,offset=-60*60*1:mys_103_Gasverbrauch_Gesamt:appCountsPerDay:::$val=($val/100*9.4585275*0.0532)

plot "<IN>" using 1:2 axes x1y2 title 'Verbrauch gesamt m³' ls l0 lw 3 with bars,\
     "<IN>" using 1:2 axes x1y2 title 'davon Verbrauch WW-Erzeugung m³' ls l2fill lw 1 with bars,\
     "<IN>" using 1:2 axes x1y1 title 'Verbrauch Gesamt in â,¬' ls l1fill lw 3 with bars






Internals:
   CFGFN
   DEF        myDbLog:SVG_Gasverbrauch_Heizung_1:HISTORY
   GPLOTFILE  SVG_Gasverbrauch_Heizung_1
   LOGDEVICE  myDbLog
   LOGFILE    HISTORY
   NAME       SVG_Gasverbrauch_Heizung_1
   NOTIFYDEV  global
   NR         398
   STATE      initialized
   TYPE       SVG
Attributes:
   captionLeft 1
   comment    Achtung! Nicht mit dem SVG-Editor bearbeiten wg. 2. Y-Achse
   fixedrange month
   label      (0,int(maxNum($data{max2}))+1)::(0,int(maxNum($data{max1},$data{max2}))+1)::(0,minNum($data{min3}-0.5))::(0,maxNum($data{max3})+1)
   nrAxis     1,2
   plotsize   1024,480
   room       Plots
   title      "Gasverbrauch zur Wärmeerzeugung pro Tag: Gesamt $data{sum1} m³, Durchschnitt/Tag $data{avg1} m³ -- Stand: $data{currdate1}"



und die dazugehörige .gplot:
# Created by FHEM/98_SVG.pm, 2017-03-06 17:16:18
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 y2tics
set ylabel "Verbrauch in â,¬"
set y2label "Gasverbrauch in m³"
set yrange [0:<L1>]
set y2range [0:<L2>]
set y3label "Durchschnittstemperatur"
set y3range [<L3>:<L4>]

#lp DbLog:myDbLog,offset=-60*60*1:mys_103_Gasverbrauch_Heizung:appCountsPerDay:::$val=($val/=100)
#lp DbLog:myDbLog,offset=-60*60*1:mys_103_Gasverbrauch_Heizung:appCountsPerDay:::$val=($val/100*9.4585275*0.0532)
#lp DbLog:myDbLog,offset=-60*60*12:Vitocrossal:Temp-Aussen-gedaempft_avg_day:::

plot "<IN>" using 1:2 axes x1y2 title 'Gasverbrauch nur Heizung' ls l0 lw 3 with bars,\
     "<IN>" using 1:2 axes x1y1 title 'Gasverbrauch Heizung in â,¬' ls l1fill lw 3 with bars,\
     "<IN>" using 1:2 axes x1y3 title 'Durchschnittstemperatur' ls l5 lw 3 with cubic


Es muss doch wie bei Filelogs möglich sein, mehrere Plots in einem Raum unterzubringen.
LG
Holger

Aus einem anderen Beitrag bin ich auf das attr plotfork aufmerksam gemacht worden. Standardmäßig steht es wohl auf 1. Ich habe es auf 0 gesetzt  --> alle Fehlermeldungen während der Ploterstellung sind weg. Schalte ich plotfork wieder auf 1, sind die Fehler wieder da - also reproduzierbar.
NUC6i3SYH (FHEM 5.8 in VM)
Homematic: HMLAN, HMUSB, HM-Sec-SD, HM-CC-RT-DN, HM-TC-IT, ... + diverse weitere
LaCrosseGateway, ESPEasy
ZWave