Second half of piston never running


#1

1) Give a description of the problem
As you can see in the attached screenshot, I have a piston with 2 parts.

2) What is the expected behavior?
Turn lights on @ sunset, and then back on at 9:30am.

3) What is happening/not happening?
While it turns them on, it does not turn off.

**4) Post a Green Snapshot of the piston!

5) Attach any logs (From ST IDE and by turning logging level to Full)
(PASTE YOUR LOGS HERE BETWEEN THE MARKS)

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


#2

Instead of using the if block, you should try using the timer block.

webCoRE Dashboard(1)

webCoRE Dashboard

ignore the set variable I am using in my example.

you can use the if blocks, just change Date & Times happens daily at 10/27/2017, 9:32:00 am to time happens daily at 9:32:00 am


#3

Just try the “is between”


#4

Probably better if you use the presets for sunset and sunrise instead of {$sunset} and {$sunrise}


#5

Interesting, never noticed the Preset option. It has always worked but I just changed it for correctness. Thanks


#6

Thanks much!
Just switched to timers.
Let’s see if it helps.


#7

Yup! Because, $sunset and $sunrise return for the specific day that you run your piston on.

For example if you run today,
Let’s say sunset is at 8:30 PM 6/21/18 and sunrise is at 5:30 A.M. 6/21/18.

Then your conditions would be checking for time between 8:30 PM and 5:30 A.M., during the same day.

Where as using the presets uses the sunset and the next sunrise. Ie. 8:30 pm 6/21/18 and 5:30 6/22/18

Hope that helps as to why.