Switch off at specific time

Moderator: leecollings

Post Reply
Ritmeester
Posts: 53
Joined: Thursday 06 March 2014 18:30
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Switch off at specific time

Post by Ritmeester »

Simple question. This LED strip must go on with Sunset and go off at 01:00 hours in the night.

I can’t find such as:

and go Off at 01:00
2016-09-13_17-34-48.png
2016-09-13_17-34-48.png (17.45 KiB) Viewed 2220 times
mrf68

Re: Switch off at specific time

Post by mrf68 »

Simple answer:

Create a second script: if led strip is on and time = 01:00 then set led strip= off.

Or am I missing something?
Ritmeester
Posts: 53
Joined: Thursday 06 March 2014 18:30
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Switch off at specific time

Post by Ritmeester »

Thanks.

But I can´t do this in the same script?
User avatar
Egregius
Posts: 2592
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: Switch off at specific time

Post by Egregius »

Use timers for such simple things.
Ritmeester
Posts: 53
Joined: Thursday 06 March 2014 18:30
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Switch off at specific time

Post by Ritmeester »

Nice, but how ?
mrf68

Re: Switch off at specific time

Post by mrf68 »

Ritmeester wrote:Thanks.

But I can´t do this in the same script?
You can do it in the same script, use the else if functionality, it's in the blockly with the "+" sign.
SweetPants

Re: Switch off at specific time

Post by SweetPants »

As Egregius said, just use switch timers, much easier
oliviers
Posts: 73
Joined: Wednesday 16 September 2015 22:10
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: Paris area, France
Contact:

Re: Switch off at specific time

Post by oliviers »

Well, in the swich widget, click on "planning", and create two events ...
- One to turn the strip on at sunset
- One to turn it off at 1:00am...

It's that simple.... No need for scripts or Blockry or ....

Or did we all miss something here???

Oliviers
Paris area
Raspberry Pi 4 - RFXComm 433 - IrTrans - Zwave
User avatar
Egregius
Posts: 2592
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: Switch off at specific time

Post by Egregius »

Ritmeester wrote:Nice, but how ?
Click on the timers button of the switch and add actions as desired.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest