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):
The result is empty table 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 analysis
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)
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)
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 analysis
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)