Hi,
I am using a SVG plot for the power drained from the grid (smart meter data).
However, when I drain nothing during the afternoon, the SVG plot will connect the dots making the plot confusing.
Is there a way to avoid this ?
2023-04-09 20_57_02-Home, Sweet Home — Mozilla Firefox.jpg
Hi @lex99,
please check whether steps, histeps or fsteps fit better than lines.
Regards
Gisbert
Hi,
Unfortunately, it all give similar results, with some variations, but the big block at the time where the data is zero is still there.
Hi @lex99,
please check the log-file with the values in the time frame you are interested in and verify that all data values are zero.
Please post the SVG-Device here (Copy for Forum).
Regards
Gisbert
ZitatUnfortunately, it all give similar results, with some variations, but the big block at the time where the data is zero is still there.
The issue is, that there is no zero there, the data is just missing.
In order to see zeroes, you have to generate them, so the code in SVG.pm knows, where to start drawing them.
This can be done in FHEM with a reoccuring task (e.g. at every 10 Minutes), which generates a zero via the trigger or setreading FHEM command, if the last received data is older then say 5 Minutes (see the perl ReadingsAge function).
@Rudi: are there any intentions to add a "set ... addLog" command into FileLog similar to the solution in DbLog? This could be very helpful in such cases.
Zitat@Rudi: are there any intentions to add a "set ... addLog" command into FileLog similar to the solution in DbLog?
Not yet, as I dont yet see the advantage compared to setreading or trigger.
Feel free to enlighten me.
setreading and trigger will both start the complete notify loop, addLog does not start this loop.
In most cases of "missing values in the logfile" the notify loop is not needed (or wanted).
I see, but I am not yet convinced, that the overhead in such cases makes a noticeable difference.
Zitat von: rudolfkoenig am 10 April 2023, 11:19:44This can be done in FHEM with a reoccuring task (e.g. at every 10 Minutes), which generates a zero via the trigger or setreading FHEM command, if the last received data is older then say 5 Minutes (see the perl ReadingsAge function).
FileLog already offers an addLog mechanism which can be configured by attribute:
<a id="FileLog-attr-addLog"></a>
<li>addLog<br>
This attribute takes a comma-separated list of
devspec:reading:maxInterval triples. You may use regular expressions
for reading. The last value of the reading will be written to the
logfile, if after maxInterval seconds no event for this device/reading
has arrived.
</li><br>
Not the same philosophy as in DbLog, but helpful in similar problems like in this thread.