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.

Too long since last update
#2
Hi,

I think you need something like this:

Code:
123456789
output = false max_timestamp = os.time() - 7200 -- 2 hours in seconds for _, object in ipairs(grp.tag('temperature')) do  if object.updatetime < max_timestamp then    output = true    break  end end grp.checkwrite('1/1/1', output)

BR,

Erwin
Reply


Messages In This Thread
Too long since last update - by chriscroko - 20.10.2018, 11:29
RE: Too long since last update - by Erwin van der Zwart - 20.10.2018, 16:46

Forum Jump: