Page 1 of 1

maxHours and maxMinutes don't work correctly (for me)

Posted: Friday 28 December 2018 9:22
by papoo
hello
i want to log 36 hours of data temperature in history.
i try

Code: Select all

    data = { 								
        temperatures    = { history = true, maxHours = 36 },

    },
and

Code: Select all

    data = { 								
        temperatures    = { history = true, maxMinutes = 2160 },

    },
but only 100 items are in the data file
i try also

Code: Select all

    data = { 								
        temperatures    = { history = true, maxHours = 36, maxMinutes = 2 },
    },
for test, same result.

maybe i don't use this function correctly?

domoticz v4.10267

edit : sorry i don't use the bugs subforum. you can move this post.

Re: maxHours and maxMinutes don't work correctly (for me)

Posted: Friday 28 December 2018 10:13
by waaren
papoo wrote: Friday 28 December 2018 9:22 I want to log 36 hours of data temperature in history but only 100 items are in the data file.
The limit of 100 is hardcoded. Probably because of potential response / performance issues. You can easily lift this limit by modifying the file
domoticz/dzVents/runtime/HistoricalStorage.lua
and change in line 2

Code: Select all

local MAXLIMIT = 100
to a number that you require.

Please note
1. Depending on your system / systemload this might lead to noticeable delays but I have not seen any significant dropdown on my RPI-3 (Debian stretch and using berryboot for rerouting filestorage IO over network to NAS) during my tests.
2. The file domoticz/dzVents/runtime/HistoricalStorage.lua will be overwritten with every domoticz update.

Re: maxHours and maxMinutes don't work correctly (for me)

Posted: Friday 28 December 2018 20:15
by papoo
Thank's waaren
if i define maxItems = 13000
the data exceed 100
i try

Code: Select all

temperatures    = { history = true, maxItems = 13000, maxHours = 36 },
to see if dzvents limit the 36 lasts hours