Condition: ON at sunset, Off at specific time

I want to combine 2 vera scenes. The first is to turn on ligths at sunset and the other scene is to turn them off at 0:30.

Well Iā€™d do it as two groups in one Reactor

One group would take the sunset from the Day or night plugin to turn the lights on
The other group would be triggered at 00:30 and turn the lights off.

In fact I think you could do it in one where the group goes true when time is after sunset and before 00:30 and false outside of those conditions. The logic would be a little more involved due to getting sunset time and the 0000 crossover

C

Awwwwā€¦ you made me spit my coffeeā€¦

Why? Reactor has sunrise/sunset conditions built in, and has since its earliest days. And it gives twilight times in addition to just sunrise and sunset.

One group for everything, as you said, is the way to go:

Group ā€œSunset to 12:30amā€ ā€“ OR

  • Sunrise/Sunset after sunset (add a positive or negative offset if you wish)
  • Date/Time before 00:30

It should be pretty obvious how this works, although itā€™s worth noting that daily-recurring time conditions (Date/Time conditions without date parts, and all Sunrise/Sunset and Weekday conditions) reset automatically at midnight. So putting the two together in an ā€œORā€ group accomplishes the midnight crossing. More about that here: Date/Time Conditions in Reactor Documentation

3 Likes

Patrick Rigney is the JoĆ£o Dias of our Vera kingdom. Reactor is our Tasker!

4 Likes

Oh dear me! Has it! I am so sorry! Inherently I knew this as Iā€™m bloody using it.

I guess I owe you a coffee and a keyboard at this point.

C

2 Likes

My phone, actually, survived it quite well. :slight_smile: Iā€™d trade rounds of coffee or beer, any time!

1 Like

First one is mine :slight_smile:
C

1 Like

Not sure if it helps for the cross over but the old PLEG trick was to use the opposite time and combine it with NOT.
for example, sunset and before 00:30 becomes NOT( Sunrise and after 00:30) which avoids the crossover.
And yes, I nearly spilt my tea when I read about the Day/Night PIā€¦:slight_smile:

1 Like

Thank you all so far.

Maybe some things are still a bit easier to do with simple scenes, or are you guys spilling coffee and tea again? :wink:

Ok I got it working, also with a time before 24.00, then you have to use XOR.

Q: What happens with the ligths during 00:00:00?
I mean there are several actions and Vera needs time to proces.
00:00:00 Lights off, because Sunset is reset
00:00:01 Lights on because before 00:30:00

Know what I mean?

why do you want to combine? Can you please help me understand the usecase. Much appreciated.

No, thatā€™s not how it works. Combined in an ā€œORā€ group like they are, the second condition instantly takes over for the first, so there is no ā€œgapā€ in time when crossing midnight. The true output of the group will be continuous and unbroken from sunset to 00:30.

1 Like

Ok. Thanks, Got it working with an ending time before 24.00 too, with XOR of course.

Well just because it can all be done with Reactor instread of using scenes.

Not necessary, maybe wrong. But you do you.

Ha, never again will I create a scene on any of my Veras, now that I have Reactor! :smiley:

1 Like

heheā€¦ thatā€™s what I want too, still learning.

1 Like

I still have a couple but thatā€™s more laziness :smiley:

Certainly donā€™t think of creating a scene, the first question is ā€˜How do I do that in Reactorā€™

C

I still have scenes because itā€™s easy for the household to tell Alexa to run them. I think thatā€™s OK. Reactor can run the scenes from an activity, or trigger them directly (the ā€œoldā€ way), so in those cases where I need to, I just use the scene, and thatā€™s fine. There are a few cases where a scene just doesnā€™t work, and in that case, I use a Switchboard virtual switch to trigger Reactor or as a filter in conditions, and Alexa will happily operate the switch on command.

1 Like

Are those scene manual and in that way can be triggered by Alexa? Do you know if thatā€™s possible with Google home too? In my Home account I only see the devices and not the scenes.