Time based Lights Control

Hello, I have to realize a clock for turning lights ON and OFF with the possibility at any time to set the lights to ON and wait for the timer to turn them off and the other way around.

Example.
Light 1
Time on 10.00
Time off 15.00

if I turn them ON at 9.00 manually, i must be able to turn them on and they will turn off at 15.00
If I turn them OFF manually at 14.00 I have to be able to turn them off etc.

Can anyone can help me?

simple rule to turn them on at 10.00 and another rule to turn them off at 15.00 you will still have manual control at other times.

I cant realize a rule to turn ON at a time chosed by user

I suggest searching the forum for Alarm Clock examples.

Are you looking for something like this rule below? It’s simple example of changing the temperature setpoint of my thermostats at 15:00 each day of the week, excluding the weekends.

rule "SCHEDULED: Reset the Thermostats"
when
    Time cron "0 0 15 * * ? *"
then
if(Weekend.state == ON) return;
    Livingroom_HRT4ZW_Setpoint.sendCommand(21)
    Landing_HRT4ZW_Setpoint.sendCommand(20)
end

Since this is a request fo rhlep, I’ve moved it from the Tutorials & Examples category into Scripts & Rules.

I think you m\ay have mixed up some ons and offs in your description, which is making it hard to tell what you want to accomplish. More specific detail would be helpful for us to understand the issue.

See Creating Capabilities with Rule Templates: Time of Day

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.