Hallo,
seit dem heutigen FHEM-Update sind meine Jahres-Plots um ein Jahr verschoben.
Der Plot mit Startdatum 1.1.2018 liefert mir jetzt das Jahr 2017
Internals:
DEF fl_piko_monthly:Piko_Pv_mon_sum:CURRENT
GPLOTFILE Piko_Pv_mon_sum
LOGDEVICE fl_piko_monthly
LOGFILE CURRENT
NAME wl_Stromprod_m18
NOTIFYDEV global
NR 1559
STATE initialized
TYPE SVG
Attributes:
fixedrange year
group 1_Photovoltaik
label "( Min $data{min1}, Max $data{max1}, Avg $data{avg1}, Peak $data{max2} - Total $data{sum1} kWh )"
room _Plots->Haus_Year
sortby P_82
startDate 2018-01-01
könnte es vielleicht mit dem Fix r16236 vom 2018-02-20 zusammenhängen?
Danke
Didi
Kann ich leider nicht nachvollziehen, bei mir schaut es ok aus, sowohl historisch, als auch das aktuelle Jahr.
Ist 98_SVG.pm wirklich aktuell? In r16236 wurde genau deswegen ein "year++" eingefuegt.
Falls ja:
Was liefert "attr fl_piko_monthly verbose 5" im FHEM-Log?
Was steht im "Show preprocessed input"?
Was passiert mit "startDate 2017-01-01" ?
hallo,
das 98_SVG.pm ist aktuell:
##############################################
# $Id: 98_SVG.pm 16236 2018-02-20 21:54:24Z rudolfkoenig $
package main;
....
"attr fl_piko_monthly verbose 5" liefert:
2018.02.26 06:57:33 4: fl_piko_monthly get: Input file /opt/fhem/log/Piko_monthly.data, from:2000-01-01 to:2018-02-26
2018.02.26 06:57:32 4: fl_piko_monthly get: Input file /opt/fhem/log/Piko_monthly.data, from:2000-01-01 to:2018-02-26
2018.02.26 06:57:32 4: fl_piko_monthly get: Input file /opt/fhem/log/Piko_monthly.data, from:2000-01-01 to:2018-02-26
2018.02.26 06:57:32 4: fl_piko_monthly get: Input file /opt/fhem/log/Piko_monthly.data, from:2000-01-01 to:2018-02-26
2018.02.26 06:57:32 4: fl_piko_monthly get: Input file /opt/fhem/log/Piko_monthly.data, from:2000-01-01 to:2018-02-26
2018.02.26 06:57:32 4: fl_piko_monthly get: Input file /opt/fhem/log/Piko_monthly.data, from:2000-01-01 to:2018-02-26
"Show preprocessed input" zeigt:
get LogProxy CURRENT INT 2017-01-01_00:00:00 2018-01-01_23:59:59 FileLog:fl_piko_monthly:12:piko_mon.*:0: FileLog:fl_piko_monthly:6:piko_mon.*:0: FileLog:fl_piko_monthly,extend=100:12:piko_mon.*:0: Func:gplot_piko("m")
2017-01-31_23:59:50 324.2
2017-02-28_23:59:50 267.5
2017-03-31_23:59:50 545.3
2017-04-30_23:59:50 522.5
2017-05-31_23:59:50 700
2017-06-30_23:59:50 677.6
2017-07-31_23:59:50 370
2017-08-31_23:59:50 660.2
2017-09-30_23:59:50 354.9
2017-10-31_23:59:50 434
2017-11-30_23:59:50 217.6
2017-12-31_23:59:50 276.6
#12:piko_mon.*:0:
2017-01-31_23:59:50 4948.0
2017-02-28_23:59:50 5476.0
2017-03-31_23:59:50 5580.0
2017-04-30_23:59:50 5614.0
2017-05-31_23:59:50 5495.0
2017-06-30_23:59:50 5276.0
2017-07-31_23:59:50 5158.0
2017-08-31_23:59:50 5004.0
2017-09-30_23:59:50 5290.0
2017-10-31_23:59:50 5280.0
2017-11-30_23:59:50 4900.0
2017-12-31_23:59:50 4230.0
#6:piko_mon.*:0:
2017-01-01_00:00:00 305
2017-01-31_23:59:50 324.2
2017-02-28_23:59:50 267.5
2017-03-31_23:59:50 545.3
2017-04-30_23:59:50 522.5
2017-05-31_23:59:50 700
2017-06-30_23:59:50 677.6
2017-07-31_23:59:50 370
2017-08-31_23:59:50 660.2
2017-09-30_23:59:50 354.9
2017-10-31_23:59:50 434
2017-11-30_23:59:50 217.6
2017-12-31_23:59:50 276.6
#12:piko_mon.*:0:
2018-02-28_07:00:49 178
#Func:gplot_piko("m")
"startDate 2017-01-01" zeigt den Plot vom Jahr 2016
hier noch mein gplot-file:
# Created by FHEM/98_SVG.pm, 2018-02-07 19:31:43
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 'Photovoltaik <L1>'
set ytics
set y2tics
set grid ytics
set ylabel "Produktion (kWh)"
set y2label "P-max (W)"
set yrange [0:800]
set y2range [0:6000]
#LogProxy FileLog:fl_piko_monthly:12:piko_mon.*:0:
#LogProxy FileLog:fl_piko_monthly:6:piko_mon.*:0:
#LogProxy FileLog:fl_piko_monthly,extend=100:12:piko_mon.*:0:
#LogProxy Func:gplot_piko("m")
plot "<IN>" using 1:2 axes x1y1 notitle ls l1fill lw 1 with bars,\
"<IN>" using 1:2 axes x1y2 title 'Peak Leistung' ls l0 lw 3 with points,\
"<IN>" using 1:2 axes x1y1 title 'Produktion' ls l1 lw 0.5 with fsteps,\
"<IN>" using 1:2 axes x1y1 notitle ls l1fill_stripe lw 1 with bars
Danke für die schnelle Reaktion Rudi!
lg Didi
ich hab nochwas gefunden:
irgengwie hängt es mit dem Attribute "endPlotToday" vom FHEMWEB zusammen.
Bei "1" sehe ich das Jahr davor, bei "0" das Jahr laut "startDate"
Zitat2018.02.26 06:57:33 4: fl_piko_monthly get: Input file /opt/fhem/log/Piko_monthly.data, from:2000-01-01 to:2018-02-26
2000-01-01 ist sehr merkwuerdig, mit r16236 und der erwaehnten Einstellung (fixedrange year & startDate 2018-01-01) kriege ich "from:2018-01-01_00:00:00 to:2018-12-31_23:59:59".
Und wenn ich "attr WEB endPlotToday" hinzufuege, dann "from:2017-01-01_00:00:00 to:2018-01-01_23:59:59", was man mit etwas Fantasie auch als halbwegs richtig einstufen koennte.
Ich gebe zu, ich habe bisher nicht daran gedacht, dass man diese drei Attribute gleichzeitig aktiviert, und bin nicht sicher, dass ich diese Kombination unterstuetzen moechte.
Vermutlich sollte man endPlotToday nur bei den Plots setzen, wo das sinnvoll ist, und in der FHEMWEB Instanz entfernen.
danke!
ich werd es so machen ...
Hallo!
Ich weiß, dies ist ein alter Thread, aber ich habe ein ähnliches Problem:
define WEB FHEMWEB 8083 global
attr WEB endPlotNow 1
attr WEB endPlotNowByHour 1
Dann sieht der Plot so aus (hört unerwartet kurz vor Mitternacht des 31.10. auf, obwohl auch danach alle Daten vorhanden sind):
1.png
Also habe ich die Parameter probehalber anders eingestellt:
define WEB FHEMWEB 8083 global
attr WEB endPlotNow 0
attr WEB endPlotNowByHour 0
Dann sieht der Plot so aus:
2.png
Ich möchte aber, dass der Plot bis zur aktuell vollen Stunde angezeigt wird, was bis gestern (31.10.2023) auch noch funktionierte. Seit dem 01.11. (ohne, dass ich etwas verändert habe), hört der Plot kurz vor Mitternacht des 31.10. auf. Und wenn ich - wie im 2. Code-Schnipsel gezeigt - die Parameter ändere, fehlen mir halt die Plots der vorherigen Stunden, was ich ja eigentlich nicht so haben wollte.
Was übersehe ich? Herzlichen Dank für Deine/Eure Hilfe!
hi
hast du im FileLog ein monatiches logfile und das Attribute "createGluedFile" nicht auf "1" ?
Hi didi-fritz!
Dankeschön für's Augenöffnen! 🤗 Klar, ich habe das Mythz Logile nach dem Muster /opt/fhem/log/Mythz-%Y-%m.log angelegt - und schlicht vergessen, dass dann für jeden Monat natürlich ein separates Logfile erstellt wird. 🫢
Allerdings ist mir jetzt nicht klar, ob/wie ich das nachträglich setzen muss, damit ich z.B. die letzten 24h oder 48h im Plot sehe. Jetzt sehen die entsprechenden Abschnitte meiner fhem.cfg so aus:
##### Log file
# Fake FileLog entry, to access the fhem log from FHEMWEB
define Logfile FileLog /opt/fhem/log/fhem-%Y-%m.log fakelog
attr Logfile createGluedFile 1
attr Logfile archivedir /opt/fhem/log/archive/
attr Logfile nrarchive 2
##### Web
define WEB FHEMWEB 8083 global
attr WEB endPlotNow 0
attr WEB endPlotNowByHour 0
attr WEB endPlotToday 0
Damit sieht der Plot jetzt (14:18 Uhr) so aus:
3.png
Ich hätte es aber lieber so, dass der Plot bis zur nächsten vollen Stunde geht (und mir dafür insgesamt die letzten ca. 24h [oder gar 48h] anzeigt). Wenn ich dafür endPlotNowByHour 1 setze, sieht der Plot aber für mich unerwartet immer noch so aus (trotz nach wie vor auch gesetztem createGluedFile 1).
Und wenn ich zusätzlich endPlotNow 1 setze, sieht der Plot (ebenfalls unerwartet) so aus:
4.png
Heißt das, dass das createGluedFile 1 nachträglich nicht funktioniert? Wie bekomme ich es jetzt noch hin, einen 24h- oder 48h-Plot über die Monatsgrenze Oktober/November hinweg darzustellen?
Nochmals herzlichen Dank für Deine/Eure Hilfe! 👍
PS:
Gibt's einen "Trick", die schwarze Null-Linie stets über die gesamte Plot-Linie zu zeichnen?
hast du "createGluedFile 1" beim Mythz-Logile auch gesetzt?
Oje, nein, nur für das fhem Logfile, was natürlich Unsinn war. Kaum habe ich es korrigiert, sieht alles aus wie gewünscht. 😁
Herzlichen Dank! 👍
PS:
Ich habe es über das WebUI gesetzt, frage mich aber, ob/ wie ich das evtl. bereits in fhem.cfg festlegen kann.