Piston Thoughts - lights on at arrival only when dark


#1

1) Give a description of the problem
I would like to turn on some lights when arrive mode triggers, but only if it is dark outside

2) What is the expected behavior?
Depending on complexity, it could be based upon sunrise/sunset +/- minutes like in SmartApps, but if there is a DTH that contains luminescence or other data to trigger off that would be fine as well.

3) What is happening/not happening?
Haven’t created it yet

4) Post a Green Snapshot of the pistonimage
(UPLOAD YOUR IMAGE HERE)

5) Attach any logs (From ST IDE and by turning logging level to Full)
(PASTE YOUR LOGS HERE BETWEEN THE MARKS THEN HIGHLIGHT ALL OF THE LOGS SND CLICK ON THE </> ICON TO FORMAT THEM)

REMOVE BELOW AFTER READING
If a solution is found for your question then please mark the post as the solution.


#2

Hi there,
with the sunset and sunrise, something like this should work:

IF arrive mode changes to ARRIVED (or HOME)
and
IF time is between sunset and sunrise
then
with switches/bulbs TURN ON

To turn off you need some other way (what ever you like)
maybe in 10 minutes, maybe at sunrise etc…

Some sensors have luminescence but I usually stay away from using them since they are really not 100% reliable in my experience.


#3

Just to add a bit to what Ike said…

Luminescence might work IF there are no lightbulbs visible from the luminescence sensor.
(otherwise, the lightbulb could make the sensor think it is daytime)


#4

@ike2018 thank you so much. Got it setup! So simple if you take your time and think through the different variables. I see how powerful WebCore is…