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.

Help example on simple light controll, lux
#6
(22.12.2018, 17:54)Daniel Wrote: Try this

Code:
lux = grp.getvalue('1/1/1')
setpoint = grp.getvalue('1/1/2')
output = '1/1/3'
hysteresis = 20 --in %

 
Limit_ON = setpoint - ((hysteresis/100)*setpoint)
Limit_OFF = setpoint + ((hysteresis/100)*setpoint)
 
if (lux >= Limit_OFF) then
   grp.checkwrite(output, false)
elseif  (lux <= Limit_ON) then
     grp.checkwrite(output, true)
end

I would like to replace the hysteresis from this script for a time period. So let's say i want an hysteresis for 30 minutes how can this be done?
Reply


Messages In This Thread
RE: Help example on simple light controll, lux - by Joep - 14.03.2024, 09:21

Forum Jump: