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.

energy data
#1
How can I retrieve the energy consumption curve data? 
I have created curves for energy consumption ( kWh in counter mode ) and i would like to display daily consumption as well as the consumption for the past 3 days. I would also like to do the same for months and years."

I have this script but only day work 


require('trends')

os_date = os.date("*t")
os_end_date = {
  year = os_date.year,
  month = os_date.month,
  day = os_date.day + 1
  }
 

dates = {
  ['start'] = { year = os_date.year, month = os_date.month, day = os_date.day },
  ['end'] = { year = os_end_date.year, month = os_end_date.month, day = os_end_date.day },
}
--log(dates)
 
-- fetch current value
day = trends.fetchone(' Main ', dates)
--log(day)
grp.update('2/1/1', day)

month = trends.fetch(' Main ', dates)
--log(month)
grp.update('2/1/2', month)
Reply


Messages In This Thread
energy data - by busta - 21.03.2024, 08:16
RE: energy data - by admin - 21.03.2024, 08:49
RE: energy data - by busta - 21.03.2024, 10:12
RE: energy data - by admin - 21.03.2024, 10:18

Forum Jump: