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

Easy to use, 100% Lua-based event scripting framework.

Moderator: leecollings

Post Reply
User avatar
papoo
Posts: 126
Joined: Friday 22 January 2016 22:14
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10
Location: France
Contact:

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

Post 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.
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

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

Post 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.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
User avatar
papoo
Posts: 126
Joined: Friday 22 January 2016 22:14
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10
Location: France
Contact:

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

Post 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
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest