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.

Dim up /down on a specifik time
#3
Hello Timmi !

You will need two scheduled scripts - one for turning ON , second for turning OFF

For turning on
Minute 0
Hour 7
Day of the month *
Month of the year - every month
Day of the week - every day
active (should be checked)

And here is a script for turning ON
Code:
local light_tank_addr = '1/1/1' -- should be scale object

local value = grp.getvalue(light_tank_addr)

while value < 80 do
  grp.write(light_tank_addr, value + 1)
  os.sleep(3)
  value = grp.getvalue(light_tank_addr)
end

For turning off
Minute 0
Hour 10
Day of the month *
Month of the year - every month
Day of the week - every day
active (should be checked)

And here is a script for turning OFF
Code:
local light_tank_addr = '1/1/1' -- should be scale object

local value = grp.getvalue(light_tank_addr)

while value > 0 do
  grp.write(light_tank_addr, value - 1)
  os.sleep(3)
  value = grp.getvalue(light_tank_addr)
end
Reply


Messages In This Thread
Dim up /down on a specifik time - by TimmiA - 11.01.2024, 14:39
RE: Dim up /down on a specifik time - by RomansP - 11.01.2024, 15:51

Forum Jump: