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
#5
(11.01.2024, 15:47)Erwin van der Zwart Wrote: Just create 2 scheduled script at the desired times and use this:
Code:
-- UP
output = '1/1/1'
for i = grp.getvalue(output) + 1, 80, 1 do
  grp.write(output, i)
  os.sleep(3)
end
 
 
-- DOWN
output = '1/1/1'
for i = grp.getvalue(output) - 1, 0, -1 do
  grp.write(output, i)
  os.sleep(3)
end

Hi Erwin. 
That worked wonders. Thank You.  Big Grin

(12.01.2024, 08:47)TimmiA Wrote:
(11.01.2024, 15:47)Erwin van der Zwart Wrote: Just create 2 scheduled script at the desired times and use this:
Code:
-- UP
output = '1/1/1'
for i = grp.getvalue(output) + 1, 80, 1 do
  grp.write(output, i)
  os.sleep(3)
end
 
 
-- DOWN
output = '1/1/1'
for i = grp.getvalue(output) - 1, 0, -1 do
  grp.write(output, i)
  os.sleep(3)
end

Hi Erwin. 
That worked wonders. Thank You.  Big Grin
OK so i wanted to make it a bit more usable with changeable inputs.
Can i get a rewrite on this?

-- get value of object with group address 1/1/1
value_sek = grp.getvalue('32/1/4')
value_niv = grp.getvalue('32/1/5')
value_end = grp.getvalue('32/1/3')
start = grp.getvalue('32/1/1')

if start == true then
 
-- UP
output = '32/1/2'
for i = grp.getvalue(output) 'value_niv', 'value_end', 1 do
  grp.write(output, i)
  os.sleep('value_sek')
end

Thank You in advance
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 TimmiA - 12.01.2024, 08:47

Forum Jump: