Hello all,

I have just started with webCoRE, and would very much appreciate help with this issue I’m having (the first of many, I’m sure). Thanks in advance!

**1) Give a description of the problem**

My sunset/sunrise timed switch is not working consistently.

**2) What is the expected behaviour?**

I am expecting the switch to turn on between sunset and sunrise (and turn off otherwise). I would like the ON time to be randomly generated, anywhere from -10 minutes to +10 minutes with respect to sunset. Similarly, I would like the OFF time to be randomly generated, anywhere from -10 minutes to +10 minutes with respect to sunrise.

**3) What is happening/not happening?**

For this example (see log below), I have manually set the switch to ON, and have set the piston running. When it runs, the switch is turned OFF, which I’m not wanting to at this time (night time, after sunset and before sunrise the next morning).

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

**5) Attach logs after turning logging level to Full**

1/27/2020, 9:53:54 PM +72ms

+1ms ╔Received event [Home].time = 1580180034653 with a delay of -581ms

+187ms ║RunTime Analysis CS > 41ms > PS > 121ms > PE > 24ms > CE

+189ms ║Runtime (38190 bytes) successfully initialized in 121ms (v0.3.110.20191009) (188ms)

+190ms ║╔Execution stage started

+246ms ║║Calculating (decimal) 0.0 - (decimal) 10.0 >> (decimal) -10.0

+248ms ║║Calculating (decimal) -10.0 + (decimal) 17.0 >> (decimal) 7.0

+255ms ║║Calculating (decimal) 0.0 - (decimal) 10.0 >> (decimal) -10.0

+257ms ║║Calculating (decimal) -10.0 + (decimal) 14.0 >> (decimal) 4.0

+269ms ║║Comparison (time) 78834268 is_between (time) 1580163540000 … (time) 1580128680000 = true (9ms)

+271ms ║║Time restriction check passed

+272ms ║║Condition #2 evaluated true (77ms)

+273ms ║║Cancelling statement #2’s schedules…

+278ms ║║Calculating (decimal) 0.0 - (decimal) 10.0 >> (decimal) -10.0

+281ms ║║Calculating (decimal) -10.0 + (decimal) 13.0 >> (decimal) 3.0

+291ms ║║Calculating (decimal) 0.0 - (decimal) 10.0 >> (decimal) -10.0

+293ms ║║Calculating (decimal) -10.0 + (decimal) 9.0 >> (decimal) -1.0

+298ms ║║Requesting time schedule wake up at Tue, Jan 28 2020 @ 7:37:00 AM EST

+304ms ║║Comparison (datetime) 1580180034373 is_after (datetime) 1580180034653 = true (2ms)

+305ms ║║Time restriction check passed

+307ms ║║Cancelling condition #7’s schedules…

+308ms ║║Condition #7 evaluated true (7ms)

+309ms ║║Cancelling statement #7’s schedules…

+314ms ║║Requesting time schedule wake up at Mon, Jan 27 2020 @ 9:53:54 PM EST

+316ms ║║Cancelling condition #1’s schedules…

+317ms ║║Condition group #1 evaluated true (state changed) (122ms)

+319ms ║║Cancelling statement #5’s schedules…

+326ms ║║Skipped execution of physical command [Porch Light].on([]) because it would make no change to the device. (2ms)

+326ms ║║Executed [Porch Light].on (4ms)

+344ms ║║Executed virtual command [Porch Light].setVariable (4ms)

+347ms ║║Fast executing schedules, waiting for 234ms to sync up

+593ms ║║Calculating (decimal) 0.0 - (decimal) 10.0 >> (decimal) -10.0

+595ms ║║Calculating (decimal) -10.0 + (decimal) 15.0 >> (decimal) 5.0

+600ms ║║Calculating (decimal) 0.0 - (decimal) 10.0 >> (decimal) -10.0

+603ms ║║Calculating (decimal) -10.0 + (decimal) 19.0 >> (decimal) 9.0

+614ms ║║Comparison (time) 78834659 is_between (time) 1580163540000 … (time) 1580128680000 = true (9ms)

+615ms ║║Time restriction check passed

+616ms ║║Condition #2 evaluated true (29ms)

+617ms ║║Cancelling statement #2’s schedules…

+622ms ║║Calculating (decimal) 0.0 - (decimal) 10.0 >> (decimal) -10.0

+625ms ║║Calculating (decimal) -10.0 + (decimal) 14.0 >> (decimal) 4.0

+632ms ║║Calculating (decimal) 0.0 - (decimal) 10.0 >> (decimal) -10.0

+635ms ║║Calculating (decimal) -10.0 + (decimal) 15.0 >> (decimal) 5.0

+641ms ║║Requesting time schedule wake up at Tue, Jan 28 2020 @ 7:43:00 AM EST

+646ms ║║Comparison (datetime) 1580180034715 is_after (datetime) 1580181834401 = false (2ms)

+647ms ║║Cancelling condition #7’s schedules…

+648ms ║║Condition #7 evaluated false (5ms)

+650ms ║║Cancelling statement #7’s schedules…

+653ms ║║Requesting time schedule wake up at Mon, Jan 27 2020 @ 10:23:54 PM EST

+655ms ║║Cancelling condition #1’s schedules…

+656ms ║║Condition group #1 evaluated false (state changed) (69ms)

+658ms ║║Cancelling statement #3’s schedules…

+680ms ║║Executed physical command [Porch Light].off() (20ms)

+681ms ║║Executed [Porch Light].off (21ms)

+689ms ║║Executed virtual command [Porch Light].setVariable (3ms)

+692ms ║╚Execution stage complete. (502ms)

+694ms ║Setting up scheduled job for Mon, Jan 27 2020 @ 10:23:54 PM EST (in 1799.636s), with 2 more jobs pending

+702ms ╚Event processed successfully (701ms)

Thank you