Troubleshooting porch lights


#1

1) Give a description of the problem
The lights turn off after 3 minutes if we are outside after 120 minutes after midnight and manually turned on the lights.

2) What is the expected behaviour?
The lights should turn on at sunset (works)
The lights should turn off 120 min after sunset (works)
Between 120 min after sunset and sunrise, if the doorbell senses motion, the lights should turn on for 3 minutes (works)
If the lights were turned on manually (rather than by a timer or by motion), they should stay on indefinitely. It is OK if they happen to turn off 120 min after sunset… we should just be able to turn them back on once, and they should stay on. (fails)

3) What is happening/not happening?
Lights do not stay on for longer than 3 minutes after the sunset-120 min period ends.

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

5) Attach logs after turning logging level to Full
will update after tonight’s run… piston has been paused because it wasn’t working
(PASTE YOUR LOGS HERE THEN HIGHLIGHT ALL OF THE LOGS AND CLICK ON THE </> ICON TO FORMAT THEM CORRECTLY)


#2

When you post the error logs, please also post a new green snapshot with Trace turned on.


#3

Nevermind… I found the problem…

Line 18 should be (no value set)

boolean manuallyActivated = (no value set)

Otherwise, you are FORCING false each and every time


This same logic also applies up top to:

isAfterSunsetPeriod
isBeforeSunrise


Basically, if the variable changes, leave it (no value set) up top


#4

Something else that may be a problem, and maybe you already verified it works. You can set webcore to monitor for a physical change to a switch but many of the DTHs don’t support it. WCmore pointed that out to me in a piston I was trying to setup.

His quote was

Yes, webCoRE has this capability, but 99% of Device Handlers do not report any difference between physical and programmatic interactions

.