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.

Grow light time control script
#3
Create a scheduled script that runs every minute:
Code:
function tomin(t)
  return t.hour * 60 + t.min
end

ontime = grp.getvalue('31/1/13')
offtime = grp.getvalue('31/1/14')
now = tomin(os.date('*t'))

on = tomin(ontime) <= now and now <= tomin(offtime)
grp.checkwrite('31/1/15', on)
Make sure that you are running the latest firmware. There was a bug that causes grp.getvalue() to return nil in rare cases.

See this for a possible cause that Schedulers are not visible: https://forum.logicmachine.net/showthrea...3#pid28493
Reply


Messages In This Thread
Grow light time control script - by clue9 - 29.04.2023, 23:19
RE: Grow light time control script - by clue9 - 30.04.2023, 22:49
RE: Grow light time control script - by admin - 01.05.2023, 07:43
RE: Grow light time control script - by clue9 - 01.05.2023, 09:53
RE: Grow light time control script - by admin - 01.05.2023, 10:29
RE: Grow light time control script - by clue9 - 01.05.2023, 20:19

Forum Jump: