Help with my first WebCoRE piston


#1

1) Give a description of the problem
This piston is supposed to turn on the undercabinet lights one hour before sunset and then turn them off at 11:00pm.

2) What is the expected behavior?
See above

3) What is happening/not happening?
The lights turned on an hour before sunset but did not turn off.

4) Post a Green Snapshot of the pistonimage

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

As a different option, I use a condition with a time is between comparison. For instance I have outdoor garage lights turn on when time is between 30 minutes before sunset and 10:35 PM, otherwise they turn off. I’m not able to access WebCoRE while at work, but I can post a screen shot this evening when at home.


#3

Something like this.


#4

But I want the lights to stay on until 11:00pm then turn off.


#5

I modified your original piston and used the preset sunset values -1.


#6

If this comment is for me, just change the sunrise part to 23:00.
But as you can see from the previous post, there are lots of ways to do the same thing with webCoRE.


#7

We skinned this :cat: twice already… 7 to go lol.


#8

There are multiple ways to go about this, but I think its important here for you to understand why your piston isn’t working.

Your root problem is that you only have one trigger, time happens daily at sunset -1 hour. That is the ONLY time that piston will ever evaluate. So every day, when that time happens, it’ll always run the if and never run the else.


#9

Thanks @eibyer! That looks right. I had actually imported this from an example and changed the time off but it wasn’t working. I have a lot of CoRE pistons and I understand how that app works but this one takes a bit of getting used to. I am just trying to figure it out with little pistons first.


#10

Instead of importing your example, I redid my piston so that I could learn how webCoRE works. starting to get the hang of it.


#11

Here is the example I use for my outdoor garage lights. They turn on 30 minutes before sunset and turn off at 10:35 PM.


#12

Just an observation and a bit of information for you.
You have used 30 minutes to ($sunset).
You do not have to use a variable. Adrian has defined some presets that you can use.
image
image
You may not want to use them but just thought I would pass on the information.


#13

Thanks! I did see that when I redid the piston.


#14

So this piston was working until the weekend. Then it stopped working for some reason. I didn’t change anything but the clocks went back this weekend. That shouldn’t effect the piston though because it is set to go one hour before sunset. Any ideas?


#15

There were issues with DST over the weekend.
Update Update all 4 elements of webCoRE to 0fd.