Page 1 of 1
how to correct logfile [graphic]
Posted: Monday 27 February 2023 22:27
by BartSr
Hi,
Today I was playing with some DzVents functions to update incremental counter.
Complete wrong values popped up (my fault).
Most I could revert but the only thing which remains is the 7-day log graphic. See below.
I checked the Domoticz database-tables but could not find these values.(over 1.000.000 liter water consumption)
Any suggestion?
KR
-Bart
Re: how to correct logfile [graphic]
Posted: Tuesday 28 February 2023 11:12
by willemd
7 day log, so the top graph? Those values are normally in the "meter" (=shortlog) table (or "percentage", or on of the others without "calendar", depending on the type of device).
But devicestatus will also show the totals including those values.
Before you mess directly with the database, CREATE A BACKUP. It is easy to make a typo.....
If this is a device you recently created, then it is easier to remove it and re-create it.
Re: how to correct logfile [graphic]
Posted: Tuesday 28 February 2023 13:43
by waltervl
Normally you can delete incorrect values with Shift-click on the value and a to be delete popup will be shown.
There is also an API call for this
https://www.domoticz.com/wiki/Domoticz_ ... og_entries
Re: how to correct logfile [graphic]
Posted: Wednesday 01 March 2023 22:00
by BartSr
Q Willemd
I carefully looked up the table 'devicestatus' but couldnoy find any values which made sense for the far to high values. I get the feeling that there are several values in that table which are mulitplied, added or similar. That result is then in the graphic. I went throug the code, at least I tries, but my knowledge is far to less to be aable to follow the code.
@waltervl
This strange values cannot be deleted using left-shift + left mouse. Ther pops up a messsage to confirm the value will be deleted but once confirmed nothing happens.
Re: how to correct logfile [graphic]
Posted: Thursday 02 March 2023 10:22
by willemd
The meter table will show the data at 5 minute intervals. There you should be able to see the high value and delete it.
The devicestatus will just show the latest value in the field svalue. What I meant was is that if you delete values from the meter table, then of course the latest total as shown in the devicestatus will no longer match the sum of the values in the meter and meter_calendar table. Update of the devicestatus is best avoided.
Update of values older than one day in meter and meter_calendar table is not a problem as such, but the follow-on effects to today can cause mismatches, depending on the updates.