Logic Machine Forum
different value throughout the day - 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: different value throughout the day (/showthread.php?tid=1439)

Pages: 1 2


RE: different value throughout the day - admin - 09.07.2023

You can simply put else because there are only two possible states. But a better solution is to use a scheduler with sunrise and sunset events instead of a fixed time.


RE: different value throughout the day - nikola2704 - 10.07.2023

(09.07.2023, 08:46)Erwin van der Zwart Wrote: elseif now.hour >= 22 and now.hour < 7 then…

This is impossible, a value can never be greater as 22 AND at the same time lower as 7 (:

Use: elseif now.hour >= 22 or now.hour < 7 then


Thanks for the info. The thing is that i want to send a 0 between 22:00 and 7:00 or even 7:30 , and between 7:30  and 22:00 a 1.


That's why i tried first in shedulers @ main object Day/Night and there 2 events for day 7:30 ON and other 22:00 OFF. But this doesn't seems to work for some reason.




RE: different value throughout the day - admin - 10.07.2023

You have mapped scheduler control and on/off to the same group address. Once scheduler sends off it turns itself off and you need to manually turn it on afterwards. Remove 10/0/2 from on/off object and it will work correctly.


RE: different value throughout the day - nikola2704 - 10.07.2023

(09.07.2023, 10:38)admin Wrote: You can simply put else because there are only two possible states. But a better solution is to use a scheduler with sunrise and sunset events instead of a fixed time.


Thanks for the replay. Just reacted to Erwin. The shedulers seems to be a better solution either, but with fixed times for the dressing room. This option is temporary because we don't have a door between the room and dressing, and when we go to the toilet at night, the lights are going on. For garden light, sunset and sunrise is a better option indeed.

(10.07.2023, 13:09)admin Wrote: You have mapped scheduler control and on/off to the same group address. Once scheduler sends off it turns itself off and you need to manually turn it on afterwards. Remove 10/0/2 from on/off object and it will work correctly.


Ok, great. It works not like a charm! Thank you a lot. Sometimes it's just a small thing that can make it difficult, especially when you are a starter


RE: different value throughout the day - giose - 01.04.2024

Hi to all,
i have a problem, in LM I made a scheduler where at sunrise it gives a value of 100% to the dimming address (2/2/26), and at sunset it gives it a value of 50%.
The problem is that when sunrise or sunset comes, it correctly changes my dimming but yet it turns the light on!
I just want it to change the dimmer value for me, so if i turn on the light (switch address 2/0/26) during the day, the light is at 100%, and instead i turn it on at night it is at 50%.
how do i do this without it turning on my lights by itself?


RE: different value throughout the day - admin - 02.04.2024

For this to work you need to reprogram your switch or your dimmer so there's no direct group address link between them. Then you need an event script attached to the switch which will send a specific value depending on the day/night mode.