This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Reading trends from RRD in Lua
#3
Thanks Erwin,

but I know about this API and I am using it, but it is very low-level and e.g. it hasn't timestamp only some values which are from start to end and also I've tested that fetch is not working properly when you try to  get the data from some range and also fetchone has some bugs or isn't accomplished like library from old-trends.

The other problem with current version of trend API which I've found is that when I want check only data from monday 12:00 to tuesday 7:00 I must download full monday and tuesday and doing whole calculation on not small table in Lua. And also when I want try something like this(fetching only a part of day):
Code:
require('trends')
name = 'Słońce_Azymut'
dates = {}
dates['start'] = { year = 2017, month = 4, day = 6, hour=7}
dates['end'] = { year = 2017, month = 4, day = 6, hour=12}
-- resolution (in seconds) is optional
-- default trend resolution is used when not set
resolution = 3600 -- hourly data
res, a, b = trends.fetch(name, dates, resolution)

log(res)
The result is empty tableSad A working way is when I download data from day=6 to day=7 and then I must do whole job in Lua.

http://forum.logicmachine.net/showthread...ght=trends

For me it would be perfect if I can analyse freely and reliably data from trends, so I can check freely every trend and find e.g. yearly maximum or how much time object crossed the limit and exactly when etc..

Perfect would be if this would be like in SQL because for me this is the best way for such analysisWink

I think also good option would be a tool for convert rrd db to SQL(but this I can do by converting whole data from Trend API, try to add to this data some timestamp and save it in .csv and then import such table to DB Browser)
Reply


Messages In This Thread
Reading trends from RRD in Lua - by buuuudzik - 06.04.2017, 16:53
RE: Reading trends from RRD in Lua - by buuuudzik - 06.04.2017, 18:21
RE: Reading trends from RRD in Lua - by iJAF - 07.07.2022, 17:09

Forum Jump: