Need troubleshooting help


#1

1) Give a description of the problem
Piston works as intended…unless lights are on before ST runs webcore rule

2) What is the expected behavior?
I expect my rule to run and turn on my lights at the designated time. I expect the lights to remain ON if already ON.

3) What is happening/not happening?
Lights turn on at the appropriate time, but if the lights were turned on early, the lights turn off.

4) Post a Green Snapshot of the pistonimage
(see attached image)


#2

I’ve looked through the code, and can’t for the life of me see why it switches the lights to off, when the rule specifically says to turn them ON and set to 100.

I guess I can set an if statement that checks that the lights are OFF before changing their state?


#3

I’m taking a stab in the dark.

Here is my logic:

Time is 5;50 pm ( 20 minutes to sunset). Lights turn on
However it is also after 12:15 A.M. so lights turn off

Try changing if time is after 12:15 A.M. to :
If time is 12:15 A.M. or, use a wait until 12:15 A.M. - turn off lights


#4

Or this would work. This is similar to what I use for my porch lights


#5

This rule works fine, unless the lights are manually turned on before the rule automatically runs.

I guess I see what you’re saying about clock time, though. Thanks.


#6

This what I use for my porch light.
Why not do the same.
Just change the times for what you want.


#7

Just for the record. “Time is after” is not a specific designated time. WC gives you two options if you want a specific moment. You can use Time (as in Time happens daily) or a Timer, as has been shown in the examples posted.

Now that’s a different problem entirely. I’m curious as to what is going on with this one. Because if the lights are already on and WC knows that the lights are already on, the command to turn on the lights should be ignored (not sent). So if they actually do get turned off then a command must be getting sent to them somehow. I’d start looking at logs (like from WC, or from the device itself in the ST IDE) to see where the command is coming from.


#8

Mike,

It’s interesting. I can see that the ST system sends an OFF command at the ON time in the logging on my phone:

New photo by Sam Roza

You see Google turning the light on, and then at the ON time-1742-the OFF command is sent.

I think I will change the ‘Time is After’ variable as you suggested, though.


#9

Or maybe you won’t see the log snippet, since the board software is weird…

https://photos.app.goo.gl/yF6Nc7OrB2BqE99h1


#10

Post 6 will do the job for you.


#11

I don’t think that does what I want it to. What’s missing in your piston is the delayed turnoff, but I think I have that handled with Post 4’s ‘every’ statements.

Thanks for all your help!

-SR