Dim up /down on a specifik time - Printable Version +- Logic Machine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8) +--- Thread: Dim up /down on a specifik time (/showthread.php?tid=5198) |
Dim up /down on a specifik time - TimmiA - 11.01.2024 Hello everyone. I have searched the library and cant seem to find the matching script needed. I need af script for controlling some lights over some fish tanks. I am thinking that E.G. at 7 am i have scheduled script wich will write a 1% into a gr.add (1/1/1) and then after 3 seconds it will raise my gr.addr (1/1/1) with 1% again and so on until til hits my wished end point at 80% I also need the opposite script at E.G. 10 am the lights will shut down again. Starting from former 80% end point and dimming down 1% every 3 seconds til we hit the big zero. anyone who is up for the task of helping me? Thank you in advance Timmi Andersen Denmark RE: Dim up /down on a specifik time - Erwin van der Zwart - 11.01.2024 Just create 2 scheduled script at the desired times and use this: Code: -- UP RE: Dim up /down on a specifik time - RomansP - 11.01.2024 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 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 RE: Dim up /down on a specifik time - Erwin van der Zwart - 11.01.2024 Also possible but then i would change Code: value = grp.getvalue(light_tank_addr) RE: Dim up /down on a specifik time - TimmiA - 12.01.2024 (11.01.2024, 15:47)Erwin van der Zwart Wrote: Just create 2 scheduled script at the desired times and use this: Hi Erwin. That worked wonders. Thank You. (12.01.2024, 08:47)TimmiA Wrote:OK so i wanted to make it a bit more usable with changeable inputs.(11.01.2024, 15:47)Erwin van der Zwart Wrote: Just create 2 scheduled script at the desired times and use this: 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 |